Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4tgrMaterialFactory.hh
이 파일의 문서화 페이지로 가기
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: G4tgrMaterialFactory.hh 66872 2013-01-15 01:25:57Z japost $
28 //
29 //
30 // class G4tgrMaterialFactory
31 //
32 // Class description:
33 //
34 // Singleton class to manage the building of transient materials.
35 
36 // History:
37 // - Created. P.Arce, CIEMAT (November 2007)
38 // -------------------------------------------------------------------------
39 
40 #ifndef G4tgrMaterialFactory_h
41 #define G4tgrMaterialFactory_h
42 
43 #include "globals.hh"
44 
45 #include <map>
46 
47 #include "G4tgrIsotope.hh"
48 #include "G4tgrElementSimple.hh"
50 #include "G4tgrMaterial.hh"
51 #include "G4tgrMaterialSimple.hh"
52 #include "G4tgrMaterialMixture.hh"
53 
54 typedef std::map< G4String, G4tgrIsotope* > G4mstgrisot;
55 typedef std::map< G4String, G4tgrElement* > G4mstgrelem;
56 typedef std::map< G4String, G4tgrMaterial* > G4mstgrmate;
57 
59 {
60  public: // with decription
61 
63 
65  // Get only instance (it it does not exist, create it)
66 
67  G4tgrIsotope* AddIsotope( const std::vector<G4String>& wl );
68  // Build a G4tgrIsotope
69 
70  G4tgrElementSimple* AddElementSimple( const std::vector<G4String>& wl );
71  // Build a G4tgrElementSimple
72  G4tgrElementFromIsotopes* AddElementFromIsotopes( const std::vector<G4String>& wl );
73  // Build a G4tgrElementFromIsotopes
74 
75  G4tgrMaterialSimple* AddMaterialSimple( const std::vector<G4String>& wl );
76  // Build a G4tgrMaterialSimple and add it to the Materials list
77 
78  G4tgrMaterialMixture* AddMaterialMixture( const std::vector<G4String>& wl, const G4String& mixtType );
79  // Build a G4tgrMaterialByWeight or G4tgrMaterialByNoAtoms
80  // or G4tgrMaterialByVolume and add it to the Materials list
81 
82  G4tgrIsotope* FindIsotope(const G4String& name) const;
83  // Look for a G4tgrIsotope and if not found return 0
84 
85  G4tgrElement* FindElement(const G4String& name) const;
86  // Look for an G4tgrElement and if not found return 0
87 
88  G4tgrMaterial* FindMaterial(const G4String& name) const;
89  // Look for an G4tgrMaterial and if not found return 0
90 
91  void DumpIsotopeList() const;
92  // Dump detailed list of isotopes
93  void DumpElementList() const;
94  // Dump detailed list of elements
95  void DumpMaterialList() const;
96  // Dump detailed list of materials
97 
98  public: // without description
99 
100  const G4mstgrisot& GetIsotopeList() const {return theG4tgrIsotopes; }
101  const G4mstgrelem& GetElementList() const {return theG4tgrElements; }
103 
104  private:
105 
107  // Constructor
108 
109  void ErrorAlreadyExists(const G4String& object,
110  const std::vector<G4String>& wl,
111  const G4bool bNoRepeating = true );
112  private:
113 
115 
117  // List of all G4tgrIsotopes created
119  // List of all G4tgrElements created
121  // List of all G4tgrMaterials created
122 };
123 
124 #endif
const XML_Char * name
Definition: expat.h:151
G4tgrMaterialSimple * AddMaterialSimple(const std::vector< G4String > &wl)
void ErrorAlreadyExists(const G4String &object, const std::vector< G4String > &wl, const G4bool bNoRepeating=true)
G4tgrElementSimple * AddElementSimple(const std::vector< G4String > &wl)
std::map< G4String, G4tgrElement * > G4mstgrelem
std::map< G4String, G4tgrIsotope * > G4mstgrisot
static G4tgrMaterialFactory * GetInstance()
const G4mstgrisot & GetIsotopeList() const
#define G4ThreadLocal
Definition: tls.hh:69
G4tgrElement * FindElement(const G4String &name) const
bool G4bool
Definition: G4Types.hh:79
G4tgrMaterialMixture * AddMaterialMixture(const std::vector< G4String > &wl, const G4String &mixtType)
static G4ThreadLocal G4tgrMaterialFactory * theInstance
const G4mstgrelem & GetElementList() const
std::map< G4String, G4tgrMaterial * > G4mstgrmate
G4tgrIsotope * FindIsotope(const G4String &name) const
const G4mstgrmate & GetMaterialList() const
G4tgrIsotope * AddIsotope(const std::vector< G4String > &wl)
G4tgrElementFromIsotopes * AddElementFromIsotopes(const std::vector< G4String > &wl)
G4tgrMaterial * FindMaterial(const G4String &name) const