17 #ifndef SIMB_EVTTIMESHIFTFACTORY_H 18 #define SIMB_EVTTIMESHIFTFACTORY_H 127 #define TIMESHIFTREG( _name ) \ 128 evgb::EvtTimeShiftI* _name ## _ctor_function (const std::string& config) { return new _name(config); } \ 129 static bool _name ## _creator_registered = \ 130 evgb::EvtTimeShiftFactory::Instance().RegisterCreator(# _name, \ 131 & _name ## _ctor_function, \ 132 & _name ## _creator_registered ); 134 #define TIMESHIFTREG3( _ns, _name, _fqname ) \ 136 evgb::EvtTimeShiftI* _name ## _ctor_function (const std::string& config) { return new _fqname(config); } \ 137 static bool _name ## _creator_registered = \ 138 evgb::EvtTimeShiftFactory::Instance().RegisterCreator(# _fqname, \ 139 & _fqname ## _ctor_function, \ 140 & _fqname ## _creator_registered );} 142 #define TIMESHIFTREG4( _nsa, _nsb, _name, _fqname ) \ 145 evgb::EvtTimeShiftI* _name ## _ctor_function (const std::string& config) { return new _fqname(config); } \ 146 static bool _name ## _creator_registered = \ 147 evgb::EvtTimeShiftFactory::Instance().RegisterCreator(# _fqname, \ 148 & _fqname ## _ctor_function, \ 149 & _fqname ## _creator_registered );}}
static EvtTimeShiftFactory * fgTheInstance
bool IsKnownEvtTimeShift(const std::string &)
const std::vector< std::string > & AvailableEvtTimeShift() const
interface for event time distribution
virtual ~EvtTimeShiftFactory()
std::map< std::string, EvtTimeShiftICtorFuncPtr_t > fFunctionMap
bool RegisterCreator(std::string name, EvtTimeShiftICtorFuncPtr_t ctorptr, bool *ptr)
std::map< std::string, bool * > fBoolPtrMap
std::vector< std::string > listnames
static EvtTimeShiftFactory & Instance()
evgb::EvtTimeShiftI *(* EvtTimeShiftICtorFuncPtr_t)(const std::string &)
Physics generators for neutrinos, cosmic rays, and others.
void operator=(const EvtTimeShiftFactory &)
evgb::EvtTimeShiftI * GetEvtTimeShift(const std::string &name, const std::string &config="") const