]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TEvtGen/EvtGenBase/EvtDecayParm.cpp
Updates EvtGen Code
[u/mrichter/AliRoot.git] / TEvtGen / EvtGenBase / EvtDecayParm.cpp
1 //--------------------------------------------------------------------------
2 //
3 // Environment:
4 //      This software is part of the EvtGen package developed jointly
5 //      for the BaBar and CLEO collaborations.  If you use all or part
6 //      of it, please give an appropriate acknowledgement.
7 //
8 // Copyright Information: See EvtGen/COPYRIGHT
9 //      Copyright (C) 1998      Caltech, UCSB
10 //
11 // Module: EvtDecayParm.cc
12 //
13 // Description: Store decay parameters for one decay.
14 //
15 // Modification history:
16 //
17 //    RYD     April 5, 1997         Module created
18 //
19 //------------------------------------------------------------------------
20 //
21 #include "EvtGenBase/EvtPatches.hh"
22 #include <iostream>
23 #include <fstream>
24 #include <stdlib.h>
25 #include <ctype.h>
26 #include "EvtGenBase/EvtDecayParm.hh"
27 #include <string>
28 using std::fstream;
29
30 void EvtDecayParm::init(fcnPtr pfcn, int ndaug, int *daugs, int narg,
31                double *args, std::string name) {
32
33   int i;
34
35   itsfcn=pfcn;
36   itsndaug=ndaug;
37   itsnarg=narg;
38   
39   itsdaugs=new int [itsndaug];
40   for(i=0;i<itsndaug;i++){
41     itsdaugs[i]=daugs[i];
42   }
43   itsargs=new double [itsnarg];
44   for(i=0;i<itsnarg;i++){
45     itsargs[i]=args[i];
46   }
47   modelname=name;
48 }
49
50 EvtDecayParm::EvtDecayParm() {
51
52   itsfcn=0;
53   itsndaug=0;
54   itsnarg=0;
55   itsdaugs=0;
56   itsargs=0;
57
58   modelname="**********";
59
60 }
61
62 EvtDecayParm::~EvtDecayParm() {
63
64   if (itsdaugs!=0){
65      delete [] itsdaugs;
66   }
67
68   if (itsargs!=0){
69      delete [] itsargs;
70   }
71
72 }
73