42EvtModel::EvtModel() {}
47 if ( _modelNameHash.find( model_name ) != _modelNameHash.end() )
48 { model = _modelNameHash[model_name]; }
52 report(
ERROR,
"EvtGen" ) <<
"Did not find the right model:" << model_name.c_str() <<
"\n";
56 return model->
clone();
61 std::string modelName;
62 prototype->
getName( modelName );
64 _modelNameHash[modelName] = prototype;
68 if ( commandName !=
"" )
73 _commandNameHash[commandName] = prototype;
79 if ( _modelNameHash.find( model_name ) != _modelNameHash.end() ) {
return 1; }
85 if ( _commandNameHash.find( cmd ) != _commandNameHash.end() ) {
return 1; }
92 if ( _commandNameHash.find( cmd ) != _commandNameHash.end() )
93 { model = _commandNameHash[cmd]; }
ostream & report(Severity severity, const char *facility)
virtual EvtDecayBase * clone()=0
virtual void getName(std::string &name)=0
virtual void command(std::string cmd)
virtual std::string commandName()
EvtDecayBase * getFcn(std::string model_name)
void storeCommand(std::string cmd, std::string cnfgstr)
void Register(EvtDecayBase *prototype)
int isModel(std::string name)
int isCommand(std::string cmd)