43G4tgrMaterialFactory::G4tgrMaterialFactory()
50 if(theInstance ==
nullptr)
60 for(
auto isotcite = theG4tgrIsotopes.cbegin();
61 isotcite != theG4tgrIsotopes.cend(); ++isotcite)
63 delete(*isotcite).second;
65 theG4tgrIsotopes.clear();
67 for(
auto elemcite = theG4tgrElements.cbegin();
68 elemcite != theG4tgrElements.cend(); ++elemcite)
70 delete(*elemcite).second;
72 theG4tgrElements.clear();
74 for(
auto matcite = theG4tgrMaterials.cbegin();
75 matcite != theG4tgrMaterials.cend(); ++matcite)
77 delete(*matcite).second;
79 theG4tgrMaterials.clear();
89 ErrorAlreadyExists(
"isotope", wl);
93 theG4tgrIsotopes[isot->
GetName()] = isot;
105 ErrorAlreadyExists(
"element", wl);
109 theG4tgrElements[elem->
GetName()] = elem;
121 ErrorAlreadyExists(
"element", wl);
125 theG4tgrElements[elem->
GetName()] = elem;
137 G4cout <<
" G4tgrMaterialFactory::AddMaterialSimple" << wl[1] <<
G4endl;
144 ErrorAlreadyExists(
"material simple", wl);
150 theG4tgrMaterials[mate->
GetName()] = mate;
163 G4cout <<
" G4tgrMaterialFactory::AddMaterialMixture " << wl[1] <<
G4endl;
170 ErrorAlreadyExists(
"material mixture", wl);
177 theG4tgrMaterials[mate->
GetName()] = mate;
188 G4cout <<
" G4tgrMaterialFactory::FindIsotope() - " << name <<
G4endl;
192 G4mstgrisot::const_iterator cite;
193 cite = theG4tgrIsotopes.find(name);
194 if(cite == theG4tgrIsotopes.cend())
203 G4cout <<
" G4tgrIsotope found: " << ((*cite).second)->GetName()
207 return (*cite).second;
217 G4cout <<
" G4tgrMaterialFactory::FindElement() - " << name <<
G4endl;
220 G4mstgrelem::const_iterator cite;
221 cite = theG4tgrElements.find(name);
222 if(cite == theG4tgrElements.cend())
232 G4cout <<
" G4tgrElement found: " << ((*cite).second)->GetName()
236 return (*cite).second;
246 G4cout <<
" G4tgrMaterialFactory::FindMaterial() - " << name <<
G4endl;
249 G4mstgrmate::const_iterator cite;
250 cite = theG4tgrMaterials.find(name);
251 if(cite == theG4tgrMaterials.cend())
257 return (*cite).second;
264 G4cout <<
" @@@@@@@@@@@@@@@@ DUMPING G4tgrIsotope's List " <<
G4endl;
265 for(
auto cite = theG4tgrIsotopes.cbegin();
266 cite != theG4tgrIsotopes.cend(); ++cite)
268 G4cout <<
" ISOT: " << (*cite).second->GetName() <<
G4endl;
275 G4cout <<
" @@@@@@@@@@@@@@@@ DUMPING G4tgrElement's List " <<
G4endl;
276 for(
auto cite = theG4tgrElements.cbegin();
277 cite != theG4tgrElements.cend(); ++cite)
279 G4cout <<
" ELEM: " << (*cite).second->GetName() <<
G4endl;
286 G4cout <<
" @@@@@@@@@@@@@@@@ DUMPING G4tgrMaterial's List " <<
G4endl;
287 for(
auto cite = theG4tgrMaterials.cbegin();
288 cite != theG4tgrMaterials.cend(); ++cite)
297void G4tgrMaterialFactory::ErrorAlreadyExists(
const G4String&
object,
298 const std::vector<G4String>& wl,
299 const G4bool bNoRepeating)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
const G4String & GetName() const
G4tgrMaterial * FindMaterial(const G4String &name) const
static G4tgrMaterialFactory * GetInstance()
G4tgrElementFromIsotopes * AddElementFromIsotopes(const std::vector< G4String > &wl)
void DumpElementList() const
G4tgrElementSimple * AddElementSimple(const std::vector< G4String > &wl)
G4tgrElement * FindElement(const G4String &name) const
G4tgrMaterialMixture * AddMaterialMixture(const std::vector< G4String > &wl, const G4String &mixtType)
void DumpMaterialList() const
G4tgrIsotope * FindIsotope(const G4String &name) const
G4tgrIsotope * AddIsotope(const std::vector< G4String > &wl)
G4tgrMaterialSimple * AddMaterialSimple(const std::vector< G4String > &wl)
void DumpIsotopeList() const
const G4String & GetName() const
const G4String & GetType() const
G4int GetNumberOfComponents() const
static G4int GetVerboseLevel()
static G4String GetString(const G4String &str)
static void DumpVS(const std::vector< G4String > &wl, const char *msg)