1 //--------------------------------------------------------------------------
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.
8 // Copyright Information: See EvtGen/COPYRIGHT
9 // Copyright (C) 1998 Caltech, UCSB
11 // Module: EvtGen/EvtModel.hh
15 // Modification history:
17 // DJL/RYD August 8, 1998 Module created
19 //------------------------------------------------------------------------
24 #include "EvtGenBase/EvtDecayBase.hh"
25 #include "EvtGenBase/EvtStringHash.hh"
27 //#include <fstream.h>
30 //Class to read in and handle the decays available
31 //to EvtGen for each particle, and the model to be
38 static EvtModel& instance();
40 void registerModel(EvtDecayBase* prototype);
42 int isModel(std::string name);
44 EvtDecayBase* getFcn(std::string model_name);
46 int isCommand(std::string cmd);
47 void storeCommand(std::string cmd,std::string cnfgstr);
54 static EvtModel* _instance;
56 std::map<std::string,EvtDecayBase*> _modelNameHash;
57 std::map<std::string,EvtDecayBase*> _commandNameHash;
63 inline EvtModel& EvtModel::instance() {
64 if ( _instance == 0 ) _instance=new EvtModel;