43 #ifdef G4MULTITHREADED
59 G4cout <<
" G4IStore:: ParallelWorldName = " << ParallelWorldName <<
G4endl;
68 fGeometryCelli.clear();
81 G4cout <<
" G4IStore:: SetParallelWorldVolume " <<
G4endl;
102 void G4IStore::SetInternalIterator(
const G4GeometryCell &gCell)
const
104 fCurrentIterator = fGeometryCelli.find(gCell);
110 if (importance < 0 ) {
111 Error(
"AddImportanceGeometryCell() - Invalid importance value given.");
114 Error(
"AddImportanceGeometryCell() - Physical volume not found!");
116 SetInternalIterator(gCell);
117 if (fCurrentIterator!=fGeometryCelli.end()) {
118 Error(
"AddImportanceGeometryCell() - Region already existing!");
120 fGeometryCelli[gCell] = importance;
133 if (importance < 0 ) {
134 Error(
"ChangeImportance() - Invalid importance value given.");
137 Error(
"ChangeImportance() - Physical volume not found!");
139 SetInternalIterator(gCell);
140 if (fCurrentIterator==fGeometryCelli.end()) {
141 Error(
"ChangeImportance() - Region does not exist!");
143 fGeometryCelli[gCell] = importance;
156 #ifdef G4MULTITHREADED
160 G4GeometryCellImportance::const_iterator gCellIterator = fCurrentIterator;
161 if (gCellIterator==fGeometryCelli.end()) {
162 Error(
"GetImportance() - Region does not exist!");
165 G4double importance_value = (*fCurrentIterator).second;
166 #ifdef G4MULTITHREADED
169 return importance_value;
176 #ifdef G4MULTITHREADED
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());
189 G4double importance_value = (*fCurrentIterator).second;
190 #ifdef G4MULTITHREADED
193 return importance_value;
198 #ifdef G4MULTITHREADED
203 if ( inWorldKnown ) {
204 SetInternalIterator(gCell);
205 inWorldKnown = (fCurrentIterator!=fGeometryCelli.end());
207 #ifdef G4MULTITHREADED
218 if (!(aVolume == *fWorldVolume)) {
226 void G4IStore::Error(
const G4String &msg)
const
240 G4cout <<
"G4IStore:: Creating new MASS IStore " <<
G4endl;
255 G4cout <<
"G4IStore:: Creating new Parallel IStore " << ParallelWorldName <<
G4endl;
256 fInstance =
new G4IStore(ParallelWorldName);
void SetParallelWorldVolume(G4String paraName)
void ChangeImportance(G4double importance, const G4GeometryCell &gCell)
G4bool IsAncestor(const G4VPhysicalVolume *p) const
G4Navigator * GetNavigatorForTracking() const
virtual const G4VPhysicalVolume * GetParallelWorldVolumePointer() const
#define G4MUTEX_INITIALIZER
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
virtual G4bool IsKnown(const G4GeometryCell &gCell) const
virtual G4double GetImportance(const G4GeometryCell &gCell) const
virtual const G4VPhysicalVolume & GetWorldVolume() const
void AddImportanceGeometryCell(G4double importance, const G4GeometryCell &gCell)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
static G4TransportationManager * GetTransportationManager()
const G4VPhysicalVolume & GetPhysicalVolume() const
G4VPhysicalVolume * GetParallelWorld(const G4String &worldName)
static G4IStore * GetInstance()
G4LogicalVolume * GetLogicalVolume() const
G4VPhysicalVolume * GetWorldVolume() const