Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 52 of file G4IStore.cc.

52  :
53 fWorldVolume(G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume())
54 {}
virtual const G4VPhysicalVolume & GetWorldVolume() const
Definition: G4IStore.cc:87
static G4TransportationManager * GetTransportationManager()

Here is the caller graph for this function:

G4IStore::G4IStore ( const G4String ParallelWorldName)
explicitprotected

Definition at line 56 of file G4IStore.cc.

56  :
57 fWorldVolume(G4TransportationManager::GetTransportationManager()->GetParallelWorld(ParallelWorldName))
58 {
59  G4cout << " G4IStore:: ParallelWorldName = " << ParallelWorldName << G4endl;
60  G4cout << " G4IStore:: fParallelWorldVolume = " << fWorldVolume->GetName() << G4endl;
61 }
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 63 of file G4IStore.cc.

64 {}

Member Function Documentation

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

Definition at line 107 of file G4IStore.cc.

109 {
110  if (importance < 0 ) {
111  Error("AddImportanceGeometryCell() - Invalid importance value given.");
112  }
113  if (!IsInWorld(gCell.GetPhysicalVolume()) ) {
114  Error("AddImportanceGeometryCell() - Physical volume not found!");
115  }
116  SetInternalIterator(gCell);
117  if (fCurrentIterator!=fGeometryCelli.end()) {
118  Error("AddImportanceGeometryCell() - Region already existing!");
119  }
120  fGeometryCelli[gCell] = importance;
121 }
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 123 of file G4IStore.cc.

126 {
127  AddImportanceGeometryCell(importance,
128  G4GeometryCell(aVolume, aRepNum));
129 }
void AddImportanceGeometryCell(G4double importance, const G4GeometryCell &gCell)
Definition: G4IStore.cc:107

Here is the call graph for this function:

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

Definition at line 131 of file G4IStore.cc.

132  {
133  if (importance < 0 ) {
134  Error("ChangeImportance() - Invalid importance value given.");
135  }
136  if (!IsInWorld(gCell.GetPhysicalVolume()) ) {
137  Error("ChangeImportance() - Physical volume not found!");
138  }
139  SetInternalIterator(gCell);
140  if (fCurrentIterator==fGeometryCelli.end()) {
141  Error("ChangeImportance() - Region does not exist!");
142  }
143  fGeometryCelli[gCell] = importance;
144 
145 }
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 146 of file G4IStore.cc.

149 {
150  ChangeImportance(importance, G4GeometryCell(aVolume, aRepNum));
151 }
void ChangeImportance(G4double importance, const G4GeometryCell &gCell)
Definition: G4IStore.cc:131

Here is the call graph for this function:

void G4IStore::Clear ( )

Definition at line 66 of file G4IStore.cc.

67 {
68  fGeometryCelli.clear();
69 }
G4double G4IStore::GetImportance ( const G4GeometryCell gCell) const
virtual

Implements G4VIStore.

Definition at line 174 of file G4IStore.cc.

175 {
176 #ifdef G4MULTITHREADED
177  G4MUTEXLOCK(&G4IStore::IStoreMutex);
178 #endif
179  SetInternalIterator(gCell);
180  G4GeometryCellImportance::const_iterator gCellIterator = fCurrentIterator;
181  if (gCellIterator==fGeometryCelli.end()) {
182  std::ostringstream err_mess;
183  err_mess << "GetImportance() - Region does not exist!" << G4endl
184  << "Geometry cell, " << gCell
185  << ", not found in: " << fGeometryCelli << ".";
186  Error(err_mess.str());
187  return 0.;
188  }
189  G4double importance_value = (*fCurrentIterator).second;
190 #ifdef G4MULTITHREADED
191  G4MUTEXUNLOCK(&G4IStore::IStoreMutex);
192 #endif
193  return importance_value;
194  // return (*fCurrentIterator).second;
195 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double G4IStore::GetImportance ( const G4VPhysicalVolume aVolume,
G4int  aRepNum = 0 
) const

Definition at line 153 of file G4IStore.cc.

155 {
156 #ifdef G4MULTITHREADED
157  G4MUTEXLOCK(&G4IStore::IStoreMutex);
158 #endif
159  SetInternalIterator(G4GeometryCell(aVolume, aRepNum));
160  G4GeometryCellImportance::const_iterator gCellIterator = fCurrentIterator;
161  if (gCellIterator==fGeometryCelli.end()) {
162  Error("GetImportance() - Region does not exist!");
163  return 0.;
164  }
165  G4double importance_value = (*fCurrentIterator).second;
166 #ifdef G4MULTITHREADED
167  G4MUTEXUNLOCK(&G4IStore::IStoreMutex);
168 #endif
169  return importance_value;
170  // return (*fCurrentIterator).second;
171 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
double G4double
Definition: G4Types.hh:76
G4IStore * G4IStore::GetInstance ( void  )
static

Definition at line 236 of file G4IStore.cc.

237 {
238  if (!fInstance)
239  {
240  G4cout << "G4IStore:: Creating new MASS IStore " << G4endl;
241  fInstance = new G4IStore();
242  }
243  return fInstance;
244 }
G4IStore()
Definition: G4IStore.cc:52
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 251 of file G4IStore.cc.

252 {
253  if (!fInstance)
254  {
255  G4cout << "G4IStore:: Creating new Parallel IStore " << ParallelWorldName << G4endl;
256  fInstance = new G4IStore(ParallelWorldName);
257  }
258  return fInstance;
259 }
G4IStore()
Definition: G4IStore.cc:52
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 97 of file G4IStore.cc.

98 {
99  return fWorldVolume;
100 }

Here is the caller graph for this function:

const G4VPhysicalVolume & G4IStore::GetWorldVolume ( ) const
virtual

Implements G4VIStore.

Definition at line 87 of file G4IStore.cc.

88 {
89  return *fWorldVolume;
90 }
G4bool G4IStore::IsKnown ( const G4GeometryCell gCell) const
virtual

Implements G4VIStore.

Definition at line 197 of file G4IStore.cc.

197  {
198 #ifdef G4MULTITHREADED
199  G4MUTEXLOCK(&G4IStore::IStoreMutex);
200 #endif
201  G4bool inWorldKnown(IsInWorld(gCell.GetPhysicalVolume()));
202 
203  if ( inWorldKnown ) {
204  SetInternalIterator(gCell);
205  inWorldKnown = (fCurrentIterator!=fGeometryCelli.end());
206  }
207 #ifdef G4MULTITHREADED
208  G4MUTEXUNLOCK(&G4IStore::IStoreMutex);
209 #endif
210  return inWorldKnown;
211 }
#define G4MUTEXUNLOCK
Definition: G4Threading.hh:180
bool G4bool
Definition: G4Types.hh:79
#define G4MUTEXLOCK
Definition: G4Threading.hh:179
const G4VPhysicalVolume & GetPhysicalVolume() const

Here is the call graph for this function:

void G4IStore::SetParallelWorldVolume ( G4String  paraName)

Definition at line 79 of file G4IStore.cc.

80 {
81  G4cout << " G4IStore:: SetParallelWorldVolume " << G4endl;
83  G4cout << " ParallelWorld volume is: " << fWorldVolume->GetName() << G4endl;
84  // fGeometryCelli = new G4GeometryCellImportance;
85 }
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 71 of file G4IStore.cc.

72 {
73  G4cout << " G4IStore:: SetWorldVolume " << G4endl;
75  G4cout << " World volume is: " << fWorldVolume->GetName() << G4endl;
76  // fGeometryCelli = new G4GeometryCellImportance;
77 }
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: