Warning, file /include/Geant4/G4tgrMaterialFactory.hh was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034 #ifndef G4tgrMaterialFactory_hh
0035 #define G4tgrMaterialFactory_hh 1
0036
0037 #include <map>
0038
0039 #include "globals.hh"
0040
0041 #include "G4tgrIsotope.hh"
0042 #include "G4tgrElementSimple.hh"
0043 #include "G4tgrElementFromIsotopes.hh"
0044 #include "G4tgrMaterial.hh"
0045 #include "G4tgrMaterialSimple.hh"
0046 #include "G4tgrMaterialMixture.hh"
0047
0048 using G4mstgrisot = std::map<G4String, G4tgrIsotope*>;
0049 using G4mstgrelem = std::map<G4String, G4tgrElement*>;
0050 using G4mstgrmate = std::map<G4String, G4tgrMaterial*>;
0051
0052 class G4tgrMaterialFactory
0053 {
0054 public:
0055
0056 ~G4tgrMaterialFactory();
0057
0058 static G4tgrMaterialFactory* GetInstance();
0059
0060
0061 G4tgrIsotope* AddIsotope(const std::vector<G4String>& wl);
0062
0063
0064 G4tgrElementSimple* AddElementSimple(const std::vector<G4String>& wl);
0065
0066 G4tgrElementFromIsotopes*
0067 AddElementFromIsotopes(const std::vector<G4String>& wl);
0068
0069
0070 G4tgrMaterialSimple* AddMaterialSimple(const std::vector<G4String>& wl);
0071
0072
0073 G4tgrMaterialMixture* AddMaterialMixture(const std::vector<G4String>& wl,
0074 const G4String& mixtType);
0075
0076
0077
0078 G4tgrIsotope* FindIsotope(const G4String& name) const;
0079
0080
0081 G4tgrElement* FindElement(const G4String& name) const;
0082
0083
0084 G4tgrMaterial* FindMaterial(const G4String& name) const;
0085
0086
0087 void DumpIsotopeList() const;
0088
0089 void DumpElementList() const;
0090
0091 void DumpMaterialList() const;
0092
0093
0094 const G4mstgrisot& GetIsotopeList() const { return theG4tgrIsotopes; }
0095 const G4mstgrelem& GetElementList() const { return theG4tgrElements; }
0096 const G4mstgrmate& GetMaterialList() const { return theG4tgrMaterials; }
0097
0098 private:
0099
0100 G4tgrMaterialFactory();
0101
0102
0103 void ErrorAlreadyExists(const G4String& object,
0104 const std::vector<G4String>& wl,
0105 const G4bool bNoRepeating = true);
0106
0107 private:
0108
0109 static G4ThreadLocal G4tgrMaterialFactory* theInstance;
0110
0111 G4mstgrisot theG4tgrIsotopes;
0112
0113 G4mstgrelem theG4tgrElements;
0114
0115 G4mstgrmate theG4tgrMaterials;
0116
0117 };
0118
0119 #endif