1 #ifndef USERACTIONFACTORY_H 19 #define USERACTIONFACTORY_H 112 #define USERACTIONREG( _name ) \ 113 g4b::UserAction* _name ## _ctor_function () { return new _name; } \ 114 static bool _name ## _creator_registered = \ 115 g4b::UserActionFactory::Instance().RegisterCreator(# _name, \ 116 & _name ## _ctor_function, \ 117 & _name ## _creator_registered ); 119 #define USERACTIONREG3( _ns, _name, _fqname ) \ 121 g4b::UserAction* _name ## _ctor_function () { return new _fqname; } \ 122 static bool _name ## _creator_registered = \ 123 g4b::UserActionFactory::Instance().RegisterCreator(# _fqname, \ 124 & _fqname ## _ctor_function, \ 125 & _fqname ## _creator_registered );} 127 #define USERACTIONREG4( _nsa, _nsb, _name, _fqname ) \ 130 g4b::UserAction* _name ## _ctor_function () { return new _fqname; } \ 131 static bool _name ## _creator_registered = \ 132 g4b::UserActionFactory::Instance().RegisterCreator(# _fqname, \ 133 & _fqname ## _ctor_function, \ 134 & _fqname ## _creator_registered );}} bool IsKnownUserAction(const std::string &)
std::vector< std::string > listnames
static UserActionFactory & Instance()
std::map< std::string, UserActionCtorFuncPtr_t > fFunctionMap
const std::vector< std::string > & AvailableUserActions() const
std::map< std::string, bool * > fBoolPtrMap
g4b::UserAction *(* UserActionCtorFuncPtr_t)()
void operator=(const UserActionFactory &)
static UserActionFactory * fgTheInstance
basic interface to Geant4 for ART-based software
virtual ~UserActionFactory()
bool RegisterCreator(std::string name, UserActionCtorFuncPtr_t ctorptr, bool *ptr)
g4b::UserAction * GetUserAction(const std::string &)