Geant4
9.6.p02
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
geant4_9_6_p02
source
persistency
ascii
include
G4tgrMaterialFactory.hh
Go to the documentation of this file.
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 69803 2013-05-15 15:24:50Z gcosmo $
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
"
49
#include "
G4tgrElementFromIsotopes.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
58
class
G4tgrMaterialFactory
59
{
60
public
:
// with decription
61
62
~G4tgrMaterialFactory
();
63
64
static
G4tgrMaterialFactory
*
GetInstance
();
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; }
102
const
G4mstgrmate
&
GetMaterialList
()
const
{
return
theG4tgrMaterials;}
103
104
private
:
105
106
G4tgrMaterialFactory
();
107
// Constructor
108
109
void
ErrorAlreadyExists(
const
G4String
&
object
,
110
const
std::vector<G4String>& wl,
111
const
G4bool
bNoRepeating =
true
);
112
private
:
113
114
static
G4tgrMaterialFactory
* theInstance;
115
116
G4mstgrisot
theG4tgrIsotopes;
117
// List of all G4tgrIsotopes created
118
G4mstgrelem
theG4tgrElements;
119
// List of all G4tgrElements created
120
G4mstgrmate
theG4tgrMaterials;
121
// List of all G4tgrMaterials created
122
};
123
124
#endif
Generated on Sat May 25 2013 14:33:24 for Geant4 by
1.8.4