Changeset View
Changeset View
Standalone View
Standalone View
EvtGenExternal/EvtExternalGenFactory.hh
Show All 24 Lines | |||||
#include <map> | #include <map> | ||||
// Description: A factory type method to create engines for external physics | // Description: A factory type method to create engines for external physics | ||||
// generators like Pythia. | // generators like Pythia. | ||||
class EvtExternalGenFactory { | class EvtExternalGenFactory { | ||||
public: | public: | ||||
enum genId | enum GenId | ||||
{ | { | ||||
PythiaGenId = 0, | PythiaGenId = 0, | ||||
PhotosGenId, | PhotosGenId, | ||||
TauolaGenId | TauolaGenId | ||||
}; | }; | ||||
static EvtExternalGenFactory* getInstance(); | static EvtExternalGenFactory* getInstance(); | ||||
EvtAbsExternalGen* getGenerator( int genId = 0 ); | EvtAbsExternalGen* getGenerator( GenId genId = GenId::PythiaGenId ); | ||||
void initialiseAllGenerators(); | void initialiseAllGenerators(); | ||||
void definePythiaGenerator( std::string xmlDir, bool convertPhysCodes, | void definePythiaGenerator( std::string xmlDir, bool convertPhysCodes, | ||||
bool useEvtGenRandom = true ); | bool useEvtGenRandom = true ); | ||||
void definePhotosGenerator( std::string photonType = "gamma", | void definePhotosGenerator( std::string photonType = "gamma", | ||||
bool useEvtGenRandom = true ); | bool useEvtGenRandom = true ); | ||||
void defineTauolaGenerator( bool useEvtGenRandom = true ); | void defineTauolaGenerator( bool useEvtGenRandom = true ); | ||||
//methods to add configuration commands to the pythia generators | //methods to add configuration commands to the pythia generators | ||||
//void addPythiaCommand( std::string generator, std::string module, std::string param, std::string value); | //void addPythiaCommand( std::string generator, std::string module, std::string param, std::string value); | ||||
//void addPythia6Command(std::string generator, std::string module, std::string param, std::string value); | //void addPythia6Command(std::string generator, std::string module, std::string param, std::string value); | ||||
protected: | protected: | ||||
EvtExternalGenFactory(); | EvtExternalGenFactory(); | ||||
~EvtExternalGenFactory(); | ~EvtExternalGenFactory(); | ||||
typedef std::map<int, EvtAbsExternalGen*> ExtGenMap; | typedef std::map<GenId, EvtAbsExternalGen*> ExtGenMap; | ||||
typedef std::map<int, std::map<std::string, std::vector<std::string>>> ExtGenCommandMap; | //typedef std::map<int, std::map<std::string, std::vector<std::string>>> ExtGenCommandMap; | ||||
private: | private: | ||||
EvtExternalGenFactory( const EvtExternalGenFactory& ){}; | EvtExternalGenFactory( const EvtExternalGenFactory& ){}; | ||||
ExtGenMap _extGenMap; | ExtGenMap m_extGenMap; | ||||
ExtGenCommandMap _extGenCommandMap; | //ExtGenCommandMap m_extGenCommandMap; | ||||
}; | }; | ||||
#endif | #endif |