00001 //-------------------------------------------------------------------------- 00002 // 00003 // Environment: 00004 // This software is part of the EvtGen package developed jointly 00005 // for the BaBar and CLEO collaborations. If you use all or part 00006 // of it, please give an appropriate acknowledgement. 00007 // 00008 // Copyright Information: See EvtGen/COPYRIGHT 00009 // Copyright (C) 1998 Caltech, UCSB 00010 // 00011 // Module: EvtDecayParm.cc 00012 // 00013 // Description: Store decay parameters for one decay. 00014 // 00015 // Modification history: 00016 // 00017 // RYD April 5, 1997 Module created 00018 // 00019 //------------------------------------------------------------------------ 00020 // 00021 #include "EvtGenBase/EvtPatches.hh" 00022 #include <iostream> 00023 #include <fstream> 00024 #include <stdlib.h> 00025 #include <ctype.h> 00026 #include "EvtGenBase/EvtDecayParm.hh" 00027 #include <string> 00028 using std::fstream; 00029 00030 void EvtDecayParm::init(fcnPtr pfcn, int ndaug, int *daugs, int narg, 00031 double *args, std::string name) { 00032 00033 int i; 00034 00035 itsfcn=pfcn; 00036 itsndaug=ndaug; 00037 itsnarg=narg; 00038 00039 itsdaugs=new int [itsndaug]; 00040 for(i=0;i<itsndaug;i++){ 00041 itsdaugs[i]=daugs[i]; 00042 } 00043 itsargs=new double [itsnarg]; 00044 for(i=0;i<itsnarg;i++){ 00045 itsargs[i]=args[i]; 00046 } 00047 modelname=name; 00048 } 00049 00050 EvtDecayParm::EvtDecayParm() { 00051 00052 itsfcn=0; 00053 itsndaug=0; 00054 itsnarg=0; 00055 itsdaugs=0; 00056 itsargs=0; 00057 00058 modelname="**********"; 00059 00060 } 00061 00062 EvtDecayParm::~EvtDecayParm() { 00063 00064 if (itsdaugs!=0){ 00065 delete [] itsdaugs; 00066 } 00067 00068 if (itsargs!=0){ 00069 delete [] itsargs; 00070 } 00071 00072 } 00073