Line data Source code
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 0 : itsfcn=pfcn;
36 0 : itsndaug=ndaug;
37 0 : itsnarg=narg;
38 :
39 0 : itsdaugs=new int [itsndaug];
40 0 : for(i=0;i<itsndaug;i++){
41 0 : itsdaugs[i]=daugs[i];
42 : }
43 0 : itsargs=new double [itsnarg];
44 0 : for(i=0;i<itsnarg;i++){
45 0 : itsargs[i]=args[i];
46 : }
47 0 : modelname=name;
48 0 : }
49 :
50 0 : EvtDecayParm::EvtDecayParm() {
51 :
52 0 : itsfcn=0;
53 0 : itsndaug=0;
54 0 : itsnarg=0;
55 0 : itsdaugs=0;
56 0 : itsargs=0;
57 :
58 0 : modelname="**********";
59 :
60 0 : }
61 :
62 0 : EvtDecayParm::~EvtDecayParm() {
63 :
64 0 : if (itsdaugs!=0){
65 0 : delete [] itsdaugs;
66 : }
67 :
68 0 : if (itsargs!=0){
69 0 : delete [] itsargs;
70 : }
71 :
72 0 : }
73 :
|