51 if(0 == theInstance) {
53 theInstance = &manager;
58 G4PhysicsConstructorRegistry::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()
std::ostringstream G4ExceptionDescription
G4VPhysicsConstructor * GetPhysicsConstructor(const G4String &name)
void AddFactory(G4String, G4VBasePhysConstrFactory *)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4PhysicsConstructorRegistry * Instance()
void DeRegister(G4VPhysicsConstructor *)
void Register(G4VPhysicsConstructor *)