76 if(0 == theInstance) {
78 theInstance = &manager;
83G4CrossSectionDataSetRegistry::G4CrossSectionDataSetRegistry()
93 size_t n = xSections.size();
95 for (
size_t i=0; i<n; ++i) {
109 size_t n = xSections.size();
111 for (
size_t i=0; i<n; ++i) {
112 if(xSections[i] == p) {
return; }
115 xSections.push_back(p);
121 size_t n = xSections.size();
123 for (
size_t i=0; i<n; ++i) {
124 if(xSections[i] == p) {
134 factories[name] = factory;
139 size_t n = xSections.size();
141 for (
size_t i=0; i<n; ++i)
146 if (p->
GetName() == name)
return p;
151 if (factories.find(name)!=factories.end())
153 return factories[name]->Instantiate();
160 ED <<
"Factory for ["<< name <<
"] cross section data set not found." <<
G4endl;
#define G4_REFERENCE_XS_FACTORY(cross_section)
void AddFactory(G4String, G4VBaseXSFactory *)
void DeRegister(G4VCrossSectionDataSet *)
~G4CrossSectionDataSetRegistry()
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=true)
void Register(G4VCrossSectionDataSet *)
static G4CrossSectionDataSetRegistry * Instance()
const G4String & GetName() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
std::ostringstream G4ExceptionDescription