Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4IStore Class Reference

#include <G4IStore.hh>

Inheritance diagram for G4IStore:
Collaboration diagram for G4IStore:

Public Member Functions

virtual G4double GetImportance (const G4GeometryCell &gCell) const
 
virtual G4bool IsKnown (const G4GeometryCell &gCell) const
 
void Clear ()
 
void SetWorldVolume ()
 
void SetParallelWorldVolume (G4String paraName)
 
virtual const G4VPhysicalVolumeGetWorldVolume () const
 
virtual const G4VPhysicalVolumeGetParallelWorldVolumePointer () const
 
void AddImportanceGeometryCell (G4double importance, const G4GeometryCell &gCell)
 
void AddImportanceGeometryCell (G4double importance, const G4VPhysicalVolume &, G4int aRepNum=0)
 
void ChangeImportance (G4double importance, const G4GeometryCell &gCell)
 
void ChangeImportance (G4double importance, const G4VPhysicalVolume &, G4int aRepNum=0)
 
G4double GetImportance (const G4VPhysicalVolume &, G4int aRepNum=0) const
 
- Public Member Functions inherited from G4VIStore
 G4VIStore ()
 
virtual ~G4VIStore ()
 

Static Public Member Functions

static G4IStoreGetInstance ()
 
static G4IStoreGetInstance (const G4String &ParallelWorldName)
 

Protected Member Functions

 G4IStore ()
 
 G4IStore (const G4String &ParallelWorldName)
 
 ~G4IStore ()
 

Detailed Description

Definition at line 62 of file G4IStore.hh.

Constructor & Destructor Documentation

G4IStore::G4IStore ( )
explicitprotected

Definition at line 48 of file G4IStore.cc.

48  :
49 fWorldVolume(G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume())
50 {}
virtual const G4VPhysicalVolume & GetWorldVolume() const
Definition: G4IStore.cc:83
static G4TransportationManager * GetTransportationManager()

Here is the caller graph for this function:

G4IStore::G4IStore ( const G4String ParallelWorldName)
explicitprotected

Definition at line 52 of file G4IStore.cc.

52  :
53 fWorldVolume(G4TransportationManager::GetTransportationManager()->GetParallelWorld(ParallelWorldName))
54 {
55  G4cout << " G4IStore:: ParallelWorldName = " << ParallelWorldName << G4endl;
56  G4cout << " G4IStore:: fParallelWorldVolume = " << fWorldVolume->GetName() << G4endl;
57 }
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
static G4TransportationManager * GetTransportationManager()
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

G4IStore::~G4IStore ( )
protected

Definition at line 59 of file G4IStore.cc.

60 {}

Member Function Documentation

void G4IStore::AddImportanceGeometryCell ( G4double  importance,
const G4GeometryCell gCell 
)

Definition at line 103 of file G4IStore.cc.

105 {
106  if (importance < 0 ) {
107  Error("AddImportanceGeometryCell() - Invalid importance value given.");
108  }
109  if (!IsInWorld(gCell.GetPhysicalVolume()) ) {
110  Error("AddImportanceGeometryCell() - Physical volume not found!");
111  }
112  SetInternalIterator(gCell);
113  if (fCurrentIterator!=fGeometryCelli.end()) {
114  Error("AddImportanceGeometryCell() - Region already existing!");
115  }
116  fGeometryCelli[gCell] = importance;
117 }
const G4VPhysicalVolume & GetPhysicalVolume() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IStore::AddImportanceGeometryCell ( G4double  importance,
const G4VPhysicalVolume aVolume,
G4int  aRepNum = 0 
)

Definition at line 119 of file G4IStore.cc.

122 {
123  AddImportanceGeometryCell(importance,
124  G4GeometryCell(aVolume, aRepNum));
125 }
void AddImportanceGeometryCell(G4double importance, const G4GeometryCell &gCell)
Definition: G4IStore.cc:103

Here is the call graph for this function:

void G4IStore::ChangeImportance ( G4double  importance,
const G4GeometryCell gCell 
)

Definition at line 127 of file G4IStore.cc.

128  {
129  if (importance < 0 ) {
130  Error("ChangeImportance() - Invalid importance value given.");
131  }
132  if (!IsInWorld(gCell.GetPhysicalVolume()) ) {
133  Error("ChangeImportance() - Physical volume not found!");
134  }
135  SetInternalIterator(gCell);
136  if (fCurrentIterator==fGeometryCelli.end()) {
137  Error("ChangeImportance() - Region does not exist!");
138  }
139  fGeometryCelli[gCell] = importance;
140 
141 }
const G4VPhysicalVolume & GetPhysicalVolume() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4IStore::ChangeImportance ( G4double  importance,
const G4VPhysicalVolume aVolume,
G4int  aRepNum = 0 
)

Definition at line 142 of file G4IStore.cc.

145 {
146  ChangeImportance(importance, G4GeometryCell(aVolume, aRepNum));
147 }
void ChangeImportance(G4double importance, const G4GeometryCell &gCell)
Definition: G4IStore.cc:127

Here is the call graph for this function:

void G4IStore::Clear ( )

Definition at line 62 of file G4IStore.cc.

63 {
64  fGeometryCelli.clear();
65 }
G4double G4IStore::GetImportance ( const G4GeometryCell gCell) const
virtual

Implements G4VIStore.

Definition at line 162 of file G4IStore.cc.

163 {
164  SetInternalIterator(gCell);
165  G4GeometryCellImportance::const_iterator gCellIterator = fCurrentIterator;
166  if (gCellIterator==fGeometryCelli.end()) {
167  std::ostringstream err_mess;
168  err_mess << "GetImportance() - Region does not exist!" << G4endl
169  << "Geometry cell, " << gCell
170  << ", not found in: " << fGeometryCelli << ".";
171  Error(err_mess.str());
172  return 0.;
173  }
174  return (*fCurrentIterator).second;
175 }
#define G4endl
Definition: G4ios.hh:61
G4double G4IStore::GetImportance ( const G4VPhysicalVolume aVolume,
G4int  aRepNum = 0 
) const

Definition at line 149 of file G4IStore.cc.

151 {
152  SetInternalIterator(G4GeometryCell(aVolume, aRepNum));
153  G4GeometryCellImportance::const_iterator gCellIterator = fCurrentIterator;
154  if (gCellIterator==fGeometryCelli.end()) {
155  Error("GetImportance() - Region does not exist!");
156  return 0.;
157  }
158  return (*fCurrentIterator).second;
159 }
G4IStore * G4IStore::GetInstance ( )
static

Definition at line 210 of file G4IStore.cc.

211 {
212  if (!fInstance)
213  {
214  G4cout << "G4IStore:: Creating new MASS IStore " << G4endl;
215  fInstance = new G4IStore();
216  }
217  return fInstance;
218 }
G4IStore()
Definition: G4IStore.cc:48
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

Here is the caller graph for this function:

G4IStore * G4IStore::GetInstance ( const G4String ParallelWorldName)
static

Definition at line 225 of file G4IStore.cc.

226 {
227  if (!fInstance)
228  {
229  G4cout << "G4IStore:: Creating new Parallel IStore " << ParallelWorldName << G4endl;
230  fInstance = new G4IStore(ParallelWorldName);
231  }
232  return fInstance;
233 }
G4IStore()
Definition: G4IStore.cc:48
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

const G4VPhysicalVolume * G4IStore::GetParallelWorldVolumePointer ( ) const
virtual

Definition at line 93 of file G4IStore.cc.

94 {
95  return fWorldVolume;
96 }
const G4VPhysicalVolume & G4IStore::GetWorldVolume ( ) const
virtual

Implements G4VIStore.

Definition at line 83 of file G4IStore.cc.

84 {
85  return *fWorldVolume;
86 }
G4bool G4IStore::IsKnown ( const G4GeometryCell gCell) const
virtual

Implements G4VIStore.

Definition at line 177 of file G4IStore.cc.

177  {
178  G4bool inWorldKnown(IsInWorld(gCell.GetPhysicalVolume()));
179 
180  if ( inWorldKnown ) {
181  SetInternalIterator(gCell);
182  inWorldKnown = (fCurrentIterator!=fGeometryCelli.end());
183  }
184  return inWorldKnown;
185 }
bool G4bool
Definition: G4Types.hh:79
const G4VPhysicalVolume & GetPhysicalVolume() const

Here is the call graph for this function:

void G4IStore::SetParallelWorldVolume ( G4String  paraName)

Definition at line 75 of file G4IStore.cc.

76 {
77  G4cout << " G4IStore:: SetParallelWorldVolume " << G4endl;
79  G4cout << " ParallelWorld volume is: " << fWorldVolume->GetName() << G4endl;
80  // fGeometryCelli = new G4GeometryCellImportance;
81 }
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
static G4TransportationManager * GetTransportationManager()
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
#define G4endl
Definition: G4ios.hh:61

Here is the call graph for this function:

void G4IStore::SetWorldVolume ( )

Definition at line 67 of file G4IStore.cc.

68 {
69  G4cout << " G4IStore:: SetWorldVolume " << G4endl;
71  G4cout << " World volume is: " << fWorldVolume->GetName() << G4endl;
72  // fGeometryCelli = new G4GeometryCellImportance;
73 }
G4Navigator * GetNavigatorForTracking() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
static G4TransportationManager * GetTransportationManager()
#define G4endl
Definition: G4ios.hh:61
G4VPhysicalVolume * GetWorldVolume() const

Here is the call graph for this function:


The documentation for this class was generated from the following files: