#include <G4CrossSectionDataSetRegistry.hh>
◆ ~G4CrossSectionDataSetRegistry()
| G4CrossSectionDataSetRegistry::~G4CrossSectionDataSetRegistry |
( |
| ) |
|
◆ G4CrossSectionDataSetRegistry()
◆ Clean()
| void G4CrossSectionDataSetRegistry::Clean |
( |
| ) |
|
Definition at line 87 of file G4CrossSectionDataSetRegistry.cc.
88{
89 std::size_t
n = xSections.size();
90 for (std::size_t i=0; i<
n; ++i) {
91 G4VCrossSectionDataSet* p = xSections[i];
92 if(nullptr != p) {
93 delete p;
94 xSections[i] = nullptr;
95 }
96 }
97 n = xComponents.size();
98 for (std::size_t i=0; i<
n; ++i) {
99 auto p = xComponents[i];
100 if(nullptr != p) {
101 delete p;
102 xComponents[i] = nullptr;
103 }
104 }
105}
Referenced by ~G4CrossSectionDataSetRegistry().
◆ DeleteComponent()
Definition at line 150 of file G4CrossSectionDataSetRegistry.cc.
151{
152 if(nullptr == p) { return; }
153 std::size_t
n = xComponents.size();
154 for (std::size_t i=0; i<
n; ++i) {
155 if(xComponents[i] == p) {
156 delete p;
157 return;
158 }
159 }
160}
◆ DeRegister() [1/2]
Definition at line 137 of file G4CrossSectionDataSetRegistry.cc.
138{
139 if(nullptr == p) { return; }
140 std::size_t
n = xComponents.size();
141 for (std::size_t i=0; i<
n; ++i) {
142 if(xComponents[i] == p) {
143 xComponents[i] = nullptr;
144 return;
145 }
146 }
147}
◆ DeRegister() [2/2]
Definition at line 116 of file G4CrossSectionDataSetRegistry.cc.
117{
118 if(nullptr == p) { return; }
119 std::size_t
n = xSections.size();
120 for (std::size_t i=0; i<
n; ++i) {
121 if(xSections[i] == p) {
122 xSections[i] = nullptr;
123 return;
124 }
125 }
126}
◆ GetComponentCrossSection()
◆ GetCrossSectionDataSet()
Definition at line 163 of file G4CrossSectionDataSetRegistry.cc.
165{
166 for (auto const & xsec : xSections) {
167 if (nullptr != xsec && xsec->GetName() == name) { return xsec; }
168 }
169
170
171 G4CrossSectionFactoryRegistry* factories =
173
174
175 G4VBaseXSFactory* factory = factories->
GetFactory(name, warning );
176 if (nullptr != factory ) {
178 } else {
179 G4VCrossSectionDataSet* ptr = nullptr;
180 return ptr;
181 }
182}
static G4CrossSectionFactoryRegistry * Instance()
G4VBaseXSFactory * GetFactory(const G4String &name, G4bool abortIfNotFound=true) const
virtual G4VCrossSectionDataSet * Instantiate()=0
Referenced by G4GammaNuclearXS::G4GammaNuclearXS().
◆ Instance()
Definition at line 70 of file G4CrossSectionDataSetRegistry.cc.
71{
72 if(nullptr == instance) {
75 }
76 return instance;
77}
friend class G4ThreadLocalSingleton< G4CrossSectionDataSetRegistry >
Referenced by G4INCLXXNeutronBuilder::Build(), LBE::ConstructHad(), G4HadronPhysicsLEND::ConstructProcess(), G4NeutronCrossSectionXS::ConstructProcess(), G4HadProcesses::ElasticXS(), G4AntiNuclElastic::G4AntiNuclElastic(), G4ChipsComponentXS::G4ChipsComponentXS(), G4ChipsElasticModel::G4ChipsElasticModel(), G4ChipsKaonZeroElasticXS::G4ChipsKaonZeroElasticXS(), G4ChipsKaonZeroInelasticXS::G4ChipsKaonZeroInelasticXS(), G4ElectroVDNuclearModel::G4ElectroVDNuclearModel(), G4FTFParameters::G4FTFParameters(), G4GammaNuclearXS::G4GammaNuclearXS(), G4InterfaceToXS::G4InterfaceToXS(), G4MuonVDNuclearModel::G4MuonVDNuclearModel(), G4NeutronElasticXS::G4NeutronElasticXS(), G4NeutronInelasticXS::G4NeutronInelasticXS(), G4ParticleInelasticXS::G4ParticleInelasticXS(), G4QGSPAntiBarionBuilder::G4QGSPAntiBarionBuilder(), G4QuasiElRatios::G4QuasiElRatios(), G4VComponentCrossSection::G4VComponentCrossSection(), G4VCrossSectionDataSet::G4VCrossSectionDataSet(), and G4HadProcesses::InelasticXS().
◆ operator=()
◆ Register() [1/2]
Definition at line 128 of file G4CrossSectionDataSetRegistry.cc.
129{
130 if(nullptr == p) { return; }
131 for (auto & xsec : xComponents) {
132 if(xsec == p) { return; }
133 }
134 xComponents.push_back(p);
135}
◆ Register() [2/2]
Definition at line 107 of file G4CrossSectionDataSetRegistry.cc.
108{
109 if(nullptr == p) { return; }
110 for (auto & xsec : xSections) {
111 if(xsec == p) { return; }
112 }
113 xSections.push_back(p);
114}
◆ G4ThreadLocalSingleton< G4CrossSectionDataSetRegistry >
The documentation for this class was generated from the following files: