34G4HadronicInteractionRegistry::instance =
nullptr;
38 if(
nullptr == instance) {
45G4HadronicInteractionRegistry::G4HadronicInteractionRegistry()
55 size_t nModels = allModels.size();
58 for (
size_t i=0; i<nModels; ++i) {
78 for (
auto & mod : allModels) {
79 if( mod ) { mod->InitialiseModel(); }
86 if(!aModel) {
return; }
87 for (
auto & mod : allModels) {
88 if( aModel == mod ) {
return; }
92 allModels.push_back(aModel);
98 if(!aModel) {
return; }
99 for (
size_t i=0; i<allModels.size(); ++i) {
100 if( aModel == allModels[i] ) {
103 allModels[i] =
nullptr;
113 for (
auto & mod : allModels) {
114 if(mod && mod->GetModelName() == name) {
122std::vector<G4HadronicInteraction*>
125 std::vector<G4HadronicInteraction*> models;
126 for (
auto & mod : allModels) {
127 if(mod && mod->GetModelName() == name) {
128 models.push_back(mod);
void RegisterMe(G4HadronicInteraction *aModel)
std::vector< G4HadronicInteraction * > FindAllModels(const G4String &name)
~G4HadronicInteractionRegistry()
void RemoveMe(G4HadronicInteraction *aModel)
G4HadronicInteraction * FindModel(const G4String &name)
static G4HadronicInteractionRegistry * Instance()