73 if(
nullptr == instance) {
80G4CrossSectionDataSetRegistry::G4CrossSectionDataSetRegistry()
90 size_t n = xSections.size();
91 for (
size_t i=0; i<n; ++i) {
97 xSections[i] =
nullptr;
100 n = xComponents.size();
101 for (
size_t i=0; i<n; ++i) {
107 xComponents[i] =
nullptr;
114 if(
nullptr == p) {
return; }
115 for (
auto xsec : xSections) {
116 if(xsec == p) {
return; }
120 xSections.push_back(p);
125 if(
nullptr == p) {
return; }
126 size_t n = xSections.size();
127 for (
size_t i=0; i<n; ++i) {
128 if(xSections[i] == p) {
131 xSections[i] =
nullptr;
140 for (
auto xsec : xComponents) {
141 if(xsec == p) {
return; }
145 xComponents.push_back(p);
151 size_t n = xComponents.size();
152 for (
size_t i=0; i<n; ++i) {
153 if(xComponents[i] == p) {
156 xComponents[i] =
nullptr;
166 size_t n = xComponents.size();
167 for (
size_t i=0; i<n; ++i) {
168 if(xComponents[i] == p) {
181 for (
auto xsec : xSections) {
182 if(xsec && xsec->GetName() == name) {
return xsec; }
202 for (
auto xsec : xComponents) {
203 if(xsec && xsec->GetName() == name) {
return xsec; }
#define G4_REFERENCE_XS_FACTORY(cross_section)
void DeRegister(G4VCrossSectionDataSet *)
~G4CrossSectionDataSetRegistry()
G4VCrossSectionDataSet * GetCrossSectionDataSet(const G4String &name, G4bool warning=false)
G4VComponentCrossSection * GetComponentCrossSection(const G4String &name)
void Register(G4VCrossSectionDataSet *)
static G4CrossSectionDataSetRegistry * Instance()
void DeleteComponent(G4VComponentCrossSection *)
static G4CrossSectionFactoryRegistry * Instance()
G4VBaseXSFactory * GetFactory(const G4String &name, G4bool abortIfNotFound=true) const
virtual G4VCrossSectionDataSet * Instantiate()=0