51 if(0 == theInstance) {
53 theInstance = &manager;
58G4PhysicsConstructorRegistry::G4PhysicsConstructorRegistry()
68 size_t n = physConstr.size();
70 for (
size_t i=0; i<n; ++i) {
84 size_t n = physConstr.size();
86 for (
size_t i=0; i<n; ++i) {
87 if(physConstr[i] == p) {
return; }
90 physConstr.push_back(p);
96 size_t n = physConstr.size();
98 for (
size_t i=0; i<n; ++i) {
99 if(physConstr[i] == p) {
109 factories[name] = factory;
116 if (factories.find(name)!=factories.end())
122 return factories[name]->Instantiate();
127 ED <<
"The factory for the physics constructor ["<< name <<
"] does not exist!" <<
G4endl;
~G4PhysicsConstructorRegistry()
void DeRegister(G4VPhysicsConstructor *)
void AddFactory(G4String, G4VBasePhysConstrFactory *)
G4VPhysicsConstructor * GetPhysicsConstructor(const G4String &name)
void Register(G4VPhysicsConstructor *)
static G4PhysicsConstructorRegistry * Instance()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription