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

#include <G4RunManagerKernel.hh>

Inheritance diagram for G4RunManagerKernel:
Collaboration diagram for G4RunManagerKernel:

Public Types

enum  RMKType { sequentialRMK, masterRMK, workerRMK }
 

Public Member Functions

 G4RunManagerKernel ()
 
virtual ~G4RunManagerKernel ()
 
void DefineWorldVolume (G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
 
void WorkerDefineWorldVolume (G4VPhysicalVolume *worldVol, G4bool topologyIsChanged=true)
 
void SetPhysics (G4VUserPhysicsList *uPhys)
 
void InitializePhysics ()
 
G4bool RunInitialization (G4bool fakeRun=false)
 
void RunTermination ()
 
void WorkerUpdateWorldVolume ()
 
void UpdateRegion ()
 
void DumpRegion (const G4String &rname) const
 
void DumpRegion (G4Region *region=0) const
 
void GeometryHasBeenModified ()
 
void PhysicsHasBeenModified ()
 
G4EventManagerGetEventManager () const
 
G4StackManagerGetStackManager () const
 
G4TrackingManagerGetTrackingManager () const
 
void SetPrimaryTransformer (G4PrimaryTransformer *pt)
 
G4PrimaryTransformerGetPrimaryTransformer () const
 
const G4StringGetVersionString () const
 
void SetVerboseLevel (G4int vl)
 
void SetGeometryToBeOptimized (G4bool vl)
 
G4int GetNumberOfParallelWorld () const
 
void SetNumberOfParallelWorld (G4int i)
 
G4VUserPhysicsListGetPhysicsList () const
 
G4VPhysicalVolumeGetCurrentWorld () const
 
G4int GetNumberOfStaticAllocators () const
 

Static Public Member Functions

static G4RunManagerKernelGetRunManagerKernel ()
 

Protected Member Functions

 G4RunManagerKernel (RMKType rmkType)
 
void SetupDefaultRegion ()
 
void SetupPhysics ()
 
void ResetNavigator ()
 
void BuildPhysicsTables (G4bool fakeRun)
 
void CheckRegions ()
 
virtual void SetupShadowProcess () const
 
void PropagateGenericIonID ()
 

Protected Attributes

RMKType runManagerKernelType
 
G4RegiondefaultRegion
 
G4RegiondefaultRegionForParallelWorld
 
G4bool geometryNeedsToBeClosed
 

Detailed Description

Definition at line 68 of file G4RunManagerKernel.hh.

Member Enumeration Documentation

Constructor & Destructor Documentation

G4RunManagerKernel::G4RunManagerKernel ( )

Definition at line 78 of file G4RunManagerKernel.cc.

79 : physicsList(0),currentWorld(0),
80  geometryInitialized(false),physicsInitialized(false),
81  geometryToBeOptimized(true),
82  physicsNeedsToBeReBuilt(true),verboseLevel(0),
83  numberOfParallelWorld(0),geometryNeedsToBeClosed(true),
84  numberOfStaticAllocators(0)
85 {
86 #ifdef G4FPE_DEBUG
88 #endif
90  if(allocList) numberOfStaticAllocators = allocList->Size();
91  defaultExceptionHandler = new G4ExceptionHandler();
92  if(fRunManagerKernel)
93  {
94  G4Exception("G4RunManagerKernel::G4RunManagerKernel()","Run0001",
95  FatalException,"More than one G4RunManagerKernel is constructed.");
96  }
97  fRunManagerKernel = this;
98 
100  if(particleTable->entries()>0)
101  {
102  // No particle should be registered beforehand
104  ED<<"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<G4endl;
105  ED<<" G4RunManagerKernel fatal exception"<<G4endl;
106  ED<<" -- Following particles have already been registered"<<G4endl;
107  ED<<" before G4RunManagerKernel is instantiated."<<G4endl;
108  for(int i=0;i<particleTable->entries();i++)
109  { ED<<" "<<particleTable->GetParticle(i)->GetParticleName()<<G4endl; }
110  ED<<"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"<<G4endl;
111  G4Exception("G4RunManagerKernel::G4RunManagerKernel()","Run0002",
112  FatalException,ED);
113  }
114 
115  // construction of Geant4 kernel classes
116  eventManager = new G4EventManager();
117 
118  defaultRegion = new G4Region("DefaultRegionForTheWorld"); // deleted by store
119  defaultRegionForParallelWorld = new G4Region("DefaultRegionForParallelWorld"); // deleted by store
121  G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
123  G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
124 
126  // set the initial application state
128 
129  // version banner
130  G4String vs = G4Version;
131  vs = vs.substr(1,vs.size()-2);
132  versionString = " Geant4 version ";
133  versionString += vs;
134  versionString += " ";
135  versionString += G4Date;
136  G4cout << G4endl
137  << "*************************************************************" << G4endl
138  << versionString << G4endl
139  << " Copyright : Geant4 Collaboration" << G4endl
140  << " Reference : NIM A 506 (2003), 250-303" << G4endl
141  << " WWW : http://cern.ch/geant4" << G4endl
142  << "*************************************************************" << G4endl
143  << G4endl;
144 }
G4Region * defaultRegionForParallelWorld
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
G4int Size() const
static G4AllocatorList * GetAllocatorListIfExist()
const G4String & GetParticleName() const
static G4StateManager * GetStateManager()
G4ParticleDefinition * GetParticle(G4int index) const
G4GLOB_DLL std::ostream G4cout
G4bool SetNewState(G4ApplicationState requestedState)
static void InvalidOperationDetection()
static const G4String G4Version
Definition: G4Version.hh:63
static const G4String G4Date
Definition: G4Version.hh:65
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ProductionCutsTable * GetProductionCutsTable()
static G4ParticleTable * GetParticleTable()
#define G4endl
Definition: G4ios.hh:61
void SetProductionCuts(G4ProductionCuts *cut)
G4int entries() const

Here is the call graph for this function:

G4RunManagerKernel::~G4RunManagerKernel ( )
virtual

Definition at line 267 of file G4RunManagerKernel.cc.

268 {
270  // set the application state to the quite state
271  if(pStateManager->GetCurrentState()!=G4State_Quit)
272  {
273  if(verboseLevel>0) G4cout << "G4 kernel has come to Quit state." << G4endl;
274  pStateManager->SetNewState(G4State_Quit);
275  }
276 
277  // open geometry for deletion
279 
280  // deletion of Geant4 kernel classes
282  if(pwps) delete pwps;
284  if(fSDM)
285  {
286  delete fSDM;
287  if(verboseLevel>1) G4cout << "G4SDManager deleted." << G4endl;
288  }
289  delete eventManager;
290  if(verboseLevel>1) G4cout << "EventManager deleted." << G4endl;
291 
293  if(verboseLevel>1) G4cout << "Units table cleared." << G4endl;
294 
295  // deletion of navigation levels
296  if(verboseLevel>1) G4NavigationHistoryPool::GetInstance()->Print();
298 
299  // deletion of allocators
301  if(allocList)
302  {
303  allocList->Destroy(numberOfStaticAllocators,verboseLevel);
304  delete allocList;
305  if(verboseLevel>1) G4cout << "G4Allocator objects are deleted." << G4endl;
306  }
307 
308  G4UImanager* pUImanager = G4UImanager::GetUIpointer();
309  if((runManagerKernelType==workerRMK) && (verboseLevel>0))
310  {
311  G4cout << "Thread-local UImanager is to be deleted." << G4endl
312  << "There should not be any thread-local G4cout/G4cerr hereafter."
313  << G4endl;
314  verboseLevel = 0;
315  }
316  if(pUImanager) delete pUImanager;
317  if(verboseLevel>1) G4cout << "UImanager deleted." << G4endl;
318 
319  delete pStateManager;
320  if(verboseLevel>1) G4cout << "StateManager deleted." << G4endl;
321  delete defaultExceptionHandler;
322  if(verboseLevel>0) G4cout << "RunManagerKernel is deleted. Good bye :)" << G4endl;
323  fRunManagerKernel = 0;
324 }
static G4AllocatorList * GetAllocatorListIfExist()
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
static G4ParallelWorldProcessStore * GetInstanceIfExist()
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
G4bool SetNewState(G4ApplicationState requestedState)
G4ApplicationState GetCurrentState() const
static G4GeometryManager * GetInstance()
static void ClearUnitsTable()
void Destroy(G4int nStat=0, G4int verboseLevel=0)
#define G4endl
Definition: G4ios.hh:61
void OpenGeometry(G4VPhysicalVolume *vol=0)
static G4NavigationHistoryPool * GetInstance()
static G4SDManager * GetSDMpointerIfExist()
Definition: G4SDManager.cc:49

Here is the call graph for this function:

G4RunManagerKernel::G4RunManagerKernel ( RMKType  rmkType)
protected

Definition at line 146 of file G4RunManagerKernel.cc.

147 : physicsList(0),currentWorld(0),
148 geometryInitialized(false),physicsInitialized(false),
149 geometryToBeOptimized(true),
150 physicsNeedsToBeReBuilt(true),verboseLevel(0),
151 numberOfParallelWorld(0),geometryNeedsToBeClosed(true),
152  numberOfStaticAllocators(0)
153 {
154 //This version of the constructor should never be called in sequential mode!
155 #ifndef G4MULTITHREADED
157  msg<<"Geant4 code is compiled without multi-threading support (-DG4MULTITHREADED is set to off).";
158  msg<<" This type of RunManagerKernel can only be used in mult-threaded applications.";
159  G4Exception("G4RunManagerKernel::G4RunManagerKernel(G4bool)","Run0105",FatalException,msg);
160 #endif
161 
162 #ifdef G4FPE_DEBUG
163  if ( G4Threading::IsMasterThread() ) {
165  }
166 #endif
167 
168  defaultExceptionHandler = new G4ExceptionHandler();
169  if(fRunManagerKernel)
170  {
171  G4Exception("G4RunManagerKernel::G4RunManagerKernel()","Run0001",
172  FatalException,"More than one G4RunManagerKernel is constructed.");
173  }
174  fRunManagerKernel = this;
175  // construction of Geant4 kernel classes
176  eventManager = new G4EventManager();
177 
178  switch(rmkType)
179  {
180  case masterRMK:
181  //Master thread behvior
182  defaultRegion = new G4Region("DefaultRegionForTheWorld"); // deleted by store
183  defaultRegionForParallelWorld = new G4Region("DefaultRegionForParallelWorld"); // deleted by store
185  G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
187  G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
188  break;
189  case workerRMK:
190  //Worker thread behavior
191  defaultRegion = G4RegionStore::GetInstance()->GetRegion("DefaultRegionForTheWorld", true);
193  = G4RegionStore::GetInstance()->GetRegion("DefaultRegionForParallelWorld", true);
194  break;
195  default:
196  defaultRegion = 0;
199  msgx<<" This type of RunManagerKernel can only be used in mult-threaded applications.";
200  G4Exception("G4RunManagerKernel::G4RunManagerKernel(G4bool)","Run0106",FatalException,msgx);
201  }
202  runManagerKernelType = rmkType;
203 
204  // set the initial application state
206 
207  // version banner
208  G4String vs = G4Version;
209  vs = vs.substr(1,vs.size()-2);
210  switch(rmkType)
211  {
212  case masterRMK:
213  versionString = " Geant4 version ";
214  versionString += vs;
215  versionString += " ";
216  versionString += G4Date;
217  G4cout << G4endl
218  << "*************************************************************" << G4endl
219  << versionString << G4endl
220  << " << in Multi-threaded mode >> " << G4endl
221  << " Copyright : Geant4 Collaboration" << G4endl
222  << " Reference : NIM A 506 (2003), 250-303" << G4endl
223  << " WWW : http://cern.ch/geant4" << G4endl
224  << "*************************************************************" << G4endl
225  << G4endl;
226  break;
227  default:
228  if(verboseLevel) {
229  versionString = " Local thread RunManagerKernel version ";
230  versionString += vs;
231  G4cout << G4endl
232  << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" << G4endl
233  << versionString << G4endl
234  << "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" << G4endl
235  << G4endl;
236  }
237  }
238 
239 #ifdef G4MULTITHREADED
240  G4UnitDefinition::GetUnitsTable().Synchronize();
241 #endif
242 }
G4Region * defaultRegionForParallelWorld
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
static G4RegionStore * GetInstance()
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
G4bool SetNewState(G4ApplicationState requestedState)
static void InvalidOperationDetection()
static const G4String G4Version
Definition: G4Version.hh:63
static const G4String G4Date
Definition: G4Version.hh:65
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4UnitsTable & GetUnitsTable()
static G4ProductionCutsTable * GetProductionCutsTable()
#define G4endl
Definition: G4ios.hh:61
void SetProductionCuts(G4ProductionCuts *cut)
G4bool IsMasterThread()
Definition: G4Threading.cc:146

Here is the call graph for this function:

Member Function Documentation

void G4RunManagerKernel::BuildPhysicsTables ( G4bool  fakeRun)
protected

Definition at line 750 of file G4RunManagerKernel.cc.

751 {
753  || physicsNeedsToBeReBuilt)
754  {
755 #ifdef G4MULTITHREADED
757  {
758  // make sure workers also rebuild physics tables
759  G4UImanager* pUImanager = G4UImanager::GetUIpointer();
760  pUImanager->ApplyCommand("/run/physicsModified");
761  }
762 #endif
763  physicsList->BuildPhysicsTable();
765  physicsNeedsToBeReBuilt = false;
766  }
767 
768  if(!fakeRun && verboseLevel>1) DumpRegion();
769  if(!fakeRun && verboseLevel>0) physicsList->DumpCutValuesTable();
770  if(!fakeRun) physicsList->DumpCutValuesTableIfRequested();
771 }
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
void DumpCutValuesTable(G4int flag=1)
void DumpRegion(const G4String &rname) const
static G4ProductionCutsTable * GetProductionCutsTable()
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::CheckRegions ( )
protected

Definition at line 773 of file G4RunManagerKernel.cc.

774 {
776  size_t nWorlds = transM->GetNoWorlds();
777  std::vector<G4VPhysicalVolume*>::iterator wItr;
778  for(size_t i=0;i<G4RegionStore::GetInstance()->size();i++)
779  {
780  G4Region* region = (*(G4RegionStore::GetInstance()))[i];
781 
782  //Let each region have a pointer to the world volume where it belongs to.
783  //G4Region::SetWorld() checks if the region belongs to the given world and set it
784  //only if it does. Thus, here we go through all the registered world volumes.
785  region->SetWorld(0); // reset
786  region->UsedInMassGeometry(false);
787  region->UsedInParallelGeometry(false);
788  wItr = transM->GetWorldsIterator();
789  for(size_t iw=0;iw<nWorlds;iw++)
790  {
791  if(region->BelongsTo(*wItr))
792  {
793  if(*wItr==currentWorld)
794  { region->UsedInMassGeometry(true); }
795  else
796  { region->UsedInParallelGeometry(true); }
797  }
798  region->SetWorld(*wItr);
799  wItr++;
800  }
801 
802  G4ProductionCuts* cuts = region->GetProductionCuts();
803  if(!cuts)
804  {
805  if(region->IsInMassGeometry())
806  {
807  G4cout << "Warning : Region <" << region->GetName()
808  << "> does not have specific production cuts," << G4endl
809  << "even though it appears in the current tracking world." << G4endl;
810  G4cout << "Default cuts are used for this region." << G4endl;
811  }
812 
813  if(region->IsInMassGeometry()||region->IsInParallelGeometry())
814  {
815  region->SetProductionCuts(
817  ->GetDefaultProductionCuts());
818  }
819  }
820  }
821 
822  //
823  // If a parallel world has no region, set default region for parallel world
824  //
825 
826  wItr = transM->GetWorldsIterator();
827  for(size_t iw=0;iw<nWorlds;iw++)
828  {
829  //G4cout << "+++ " << (*wItr)->GetName() << G4endl;
830  if(*wItr!=currentWorld)
831  {
832  G4LogicalVolume* pwLogical = (*wItr)->GetLogicalVolume();
833  if(!(pwLogical->GetRegion()))
834  {
837  //G4cout << "+++++ defaultRegionForParallelWorld is set to "
838  // << (*wItr)->GetName() << " +++++" << G4endl;
839  }
840  }
841  wItr++;
842  }
843 
844 }
G4Region * defaultRegionForParallelWorld
G4ProductionCuts * GetProductionCuts() const
const G4String & GetName() const
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
void UsedInParallelGeometry(G4bool val=true)
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
G4Region * GetRegion() const
static G4RegionStore * GetInstance()
void SetRegion(G4Region *reg)
G4GLOB_DLL std::ostream G4cout
void UsedInMassGeometry(G4bool val=true)
static G4TransportationManager * GetTransportationManager()
static G4ProductionCutsTable * GetProductionCutsTable()
G4bool BelongsTo(G4VPhysicalVolume *thePhys) const
Definition: G4Region.cc:398
void SetWorld(G4VPhysicalVolume *wp)
Definition: G4Region.cc:382
G4bool IsInMassGeometry() const
size_t GetNoWorlds() const
#define G4endl
Definition: G4ios.hh:61
void SetProductionCuts(G4ProductionCuts *cut)
G4bool IsInParallelGeometry() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::DefineWorldVolume ( G4VPhysicalVolume worldVol,
G4bool  topologyIsChanged = true 
)

Definition at line 407 of file G4RunManagerKernel.cc.

409 {
411  G4ApplicationState currentState = stateManager->GetCurrentState();
412  if(currentState!=G4State_Init)
413  {
414  G4cout << "Current application state is "
415  << stateManager->GetStateString(currentState) << G4endl;
416  if(!(currentState==G4State_Idle||currentState==G4State_PreInit))
417  {
418  G4Exception("G4RunManagerKernel::DefineWorldVolume",
419  "DefineWorldVolumeAtIncorrectState",
421  "Geant4 kernel is not Init state : Method ignored.");
422  return;
423  } else {
424  //G4Exception("G4RunManagerKernel::DefineWorldVolume",
425  // "DefineWorldVolumeAtIncorrectState",
426  // JustWarning,
427  // "Geant4 kernel is not Init state : Assuming Init state.");
428  G4cout<<"Warning : Geant4 kernel is not Init state : Assuming Init state."
429  <<G4endl;
430  stateManager->SetNewState(G4State_Init);
431  }
432  }
433 
434  // The world volume MUST NOT have a region defined by the user
435  if(worldVol->GetLogicalVolume()->GetRegion())
436  {
437  if(worldVol->GetLogicalVolume()->GetRegion()!=defaultRegion)
438  {
440  ED << "The world volume has a user-defined region <"
441  << worldVol->GetLogicalVolume()->GetRegion()->GetName()
442  << ">." << G4endl;
443  ED << "World would have a default region assigned by RunManagerKernel."
444  << G4endl;
445  G4Exception("G4RunManager::DefineWorldVolume",
446  "Run0004", FatalException, ED);
447  }
448  }
449 
451 
452  // Accept the world volume
453  currentWorld = worldVol;
454 
455  // Set the default region to the world
456 
457  G4LogicalVolume* worldLog = currentWorld->GetLogicalVolume();
458  worldLog->SetRegion(defaultRegion);
460  if(verboseLevel>1) G4cout << worldLog->GetName()
461  << " is registered to the default region." << G4endl;
462 
463  // Set the world volume, notify the Navigator and reset its state
465  ->SetWorldForTracking(currentWorld);
466  if(topologyIsChanged) geometryNeedsToBeClosed = true;
467 
468  // Notify the VisManager as well
470  {
472  if(pVVisManager) pVVisManager->GeometryHasChanged();
473  }
474 
475  geometryInitialized = true;
476  stateManager->SetNewState(currentState);
477  if(physicsInitialized && currentState!=G4State_Idle)
478  { stateManager->SetNewState(G4State_Idle); }
479 }
virtual void GeometryHasChanged()=0
const G4String & GetName() const
std::ostringstream G4ExceptionDescription
Definition: globals.hh:76
void AddRootLogicalVolume(G4LogicalVolume *lv)
Definition: G4Region.cc:290
static G4VVisManager * GetConcreteInstance()
G4Region * GetRegion() const
static G4StateManager * GetStateManager()
void SetRegion(G4Region *reg)
G4GLOB_DLL std::ostream G4cout
G4bool SetNewState(G4ApplicationState requestedState)
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4TransportationManager * GetTransportationManager()
G4LogicalVolume * GetLogicalVolume() const
#define G4endl
Definition: G4ios.hh:61
G4bool IsMasterThread()
Definition: G4Threading.cc:146
const G4String & GetName() const
void SetWorldForTracking(G4VPhysicalVolume *theWorld)
G4ApplicationState
G4String GetStateString(G4ApplicationState aState) const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::DumpRegion ( const G4String rname) const

Definition at line 846 of file G4RunManagerKernel.cc.

847 {
848  G4Region* region = G4RegionStore::GetInstance()->GetRegion(rname);
849  if(region) DumpRegion(region);
850 }
G4Region * GetRegion(const G4String &name, G4bool verbose=true) const
static G4RegionStore * GetInstance()
void DumpRegion(const G4String &rname) const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::DumpRegion ( G4Region region = 0) const

Definition at line 852 of file G4RunManagerKernel.cc.

853 {
854  if(!region)
855  {
856  for(size_t i=0;i<G4RegionStore::GetInstance()->size();i++)
857  { DumpRegion((*(G4RegionStore::GetInstance()))[i]); }
858  }
859  else
860  {
861  if(G4Threading::IsWorkerThread()) return;
862  G4cout << G4endl;
863  G4cout << "Region <" << region->GetName() << "> -- ";
864  if(region->GetWorldPhysical())
865  {
866  G4cout << " -- appears in <"
867  << region->GetWorldPhysical()->GetName() << "> world volume";
868  }
869  else
870  { G4cout << " -- is not associated to any world."; }
871  G4cout << G4endl;
872  if(region->IsInMassGeometry())
873  { G4cout << " This region is in the mass world." << G4endl; }
874  if(region->IsInParallelGeometry())
875  { G4cout << " This region is in the parallel world." << G4endl; }
876 
877  G4cout << " Root logical volume(s) : ";
878  size_t nRootLV = region->GetNumberOfRootVolumes();
879  std::vector<G4LogicalVolume*>::iterator lvItr = region->GetRootLogicalVolumeIterator();
880  for(size_t j=0;j<nRootLV;j++)
881  { G4cout << (*lvItr)->GetName() << " "; lvItr++; }
882  G4cout << G4endl;
883 
884  G4cout << " Pointers : G4VUserRegionInformation[" << region->GetUserInformation()
885  << "], G4UserLimits[" << region->GetUserLimits()
886  << "], G4FastSimulationManager[" << region->GetFastSimulationManager()
887  << "], G4UserSteppingAction[" << region->GetRegionalSteppingAction() << "]" << G4endl;
888 
889  G4cout << " Materials : ";
890  std::vector<G4Material*>::const_iterator mItr = region->GetMaterialIterator();
891  size_t nMaterial = region->GetNumberOfMaterials();
892  for(size_t iMate=0;iMate<nMaterial;iMate++)
893  {
894  G4cout << (*mItr)->GetName() << " ";
895  mItr++;
896  }
897  G4cout << G4endl;
898  G4ProductionCuts* cuts = region->GetProductionCuts();
899  if(!cuts && region->IsInMassGeometry())
900  {
901  G4cerr << "Warning : Region <" << region->GetName()
902  << "> does not have specific production cuts." << G4endl;
903  G4cerr << "Default cuts are used for this region." << G4endl;
904  region->SetProductionCuts(
905  G4ProductionCutsTable::GetProductionCutsTable()->GetDefaultProductionCuts());
906  }
907  else if(cuts)
908  {
909  G4cout << " Production cuts : "
910  << " gamma "
911  << G4BestUnit(cuts->GetProductionCut("gamma"),"Length")
912  << " e- "
913  << G4BestUnit(cuts->GetProductionCut("e-"),"Length")
914  << " e+ "
915  << G4BestUnit(cuts->GetProductionCut("e+"),"Length")
916  << " proton "
917  << G4BestUnit(cuts->GetProductionCut("proton"),"Length")
918  << G4endl;
919  }
920  }
921 }
G4ProductionCuts * GetProductionCuts() const
std::vector< G4Material * >::const_iterator GetMaterialIterator() const
const G4String & GetName() const
G4UserSteppingAction * GetRegionalSteppingAction() const
Definition: G4Region.cc:155
G4double GetProductionCut(G4int index) const
G4VUserRegionInformation * GetUserInformation() const
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
static G4RegionStore * GetInstance()
G4VPhysicalVolume * GetWorldPhysical() const
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
void DumpRegion(const G4String &rname) const
G4bool IsWorkerThread()
Definition: G4Threading.cc:145
static G4ProductionCutsTable * GetProductionCutsTable()
G4bool IsInMassGeometry() const
#define G4endl
Definition: G4ios.hh:61
void SetProductionCuts(G4ProductionCuts *cut)
size_t GetNumberOfMaterials() const
size_t GetNumberOfRootVolumes() const
G4bool IsInParallelGeometry() const
G4FastSimulationManager * GetFastSimulationManager() const
Definition: G4Region.cc:137
G4UserLimits * GetUserLimits() const
G4GLOB_DLL std::ostream G4cerr
std::vector< G4LogicalVolume * >::iterator GetRootLogicalVolumeIterator()

Here is the call graph for this function:

void G4RunManagerKernel::GeometryHasBeenModified ( )
inline

Definition at line 164 of file G4RunManagerKernel.hh.

165  { geometryNeedsToBeClosed = true; }

Here is the caller graph for this function:

G4VPhysicalVolume* G4RunManagerKernel::GetCurrentWorld ( ) const
inline

Definition at line 212 of file G4RunManagerKernel.hh.

213  { return currentWorld; }

Here is the caller graph for this function:

G4EventManager* G4RunManagerKernel::GetEventManager ( ) const
inline

Definition at line 178 of file G4RunManagerKernel.hh.

179  { return eventManager; }

Here is the caller graph for this function:

G4int G4RunManagerKernel::GetNumberOfParallelWorld ( ) const
inline

Definition at line 204 of file G4RunManagerKernel.hh.

205  { return numberOfParallelWorld; }

Here is the caller graph for this function:

G4int G4RunManagerKernel::GetNumberOfStaticAllocators ( ) const
inline

Definition at line 222 of file G4RunManagerKernel.hh.

223  { return numberOfStaticAllocators; }

Here is the caller graph for this function:

G4VUserPhysicsList* G4RunManagerKernel::GetPhysicsList ( ) const
inline

Definition at line 209 of file G4RunManagerKernel.hh.

210  { return physicsList; }
G4PrimaryTransformer* G4RunManagerKernel::GetPrimaryTransformer ( ) const
inline

Definition at line 186 of file G4RunManagerKernel.hh.

187  { return eventManager->GetPrimaryTransformer(); }
G4PrimaryTransformer * GetPrimaryTransformer() const

Here is the call graph for this function:

Here is the caller graph for this function:

G4RunManagerKernel * G4RunManagerKernel::GetRunManagerKernel ( )
static

Definition at line 75 of file G4RunManagerKernel.cc.

76 { return fRunManagerKernel; }

Here is the caller graph for this function:

G4StackManager* G4RunManagerKernel::GetStackManager ( ) const
inline

Definition at line 180 of file G4RunManagerKernel.hh.

181  { return eventManager->GetStackManager(); }
G4StackManager * GetStackManager() const

Here is the call graph for this function:

G4TrackingManager* G4RunManagerKernel::GetTrackingManager ( ) const
inline

Definition at line 182 of file G4RunManagerKernel.hh.

183  { return eventManager->GetTrackingManager(); }
G4TrackingManager * GetTrackingManager() const

Here is the call graph for this function:

Here is the caller graph for this function:

const G4String& G4RunManagerKernel::GetVersionString ( ) const
inline

Definition at line 189 of file G4RunManagerKernel.hh.

190  { return versionString; }

Here is the caller graph for this function:

void G4RunManagerKernel::InitializePhysics ( )

Definition at line 548 of file G4RunManagerKernel.cc.

549 {
551  G4ApplicationState currentState = stateManager->GetCurrentState();
552  if(currentState!=G4State_Init)
553  {
554  G4cout << "Current application state is "
555  << stateManager->GetStateString(currentState) << G4endl;
556  if(!(currentState==G4State_Idle||currentState==G4State_PreInit))
557  {
558  G4Exception("G4RunManagerKernel::InitializePhysics",
559  "InitializePhysicsIncorrectState",
561  "Geant4 kernel is not Init state : Method ignored.");
562  return;
563  } else {
564  //G4Exception("G4RunManagerKernel::DefineWorldVolume",
565  //"DefineWorldVolumeAtIncorrectState",
566  //JustWarning,
567  //"Geant4 kernel is not Init state : Assuming Init state.");
568  G4cout<<"Warning : Geant4 kernel is not Init state : Assuming Init state."
569  <<G4endl;
570  stateManager->SetNewState(G4State_Init);
571  }
572  }
573 
574  if(!physicsList)
575  {
576  G4Exception("G4RunManagerKernel::InitializePhysics",
577  "Run0012", FatalException,
578  "G4VUserPhysicsList is not defined");
579  return;
580  }
581 
582  if(verboseLevel>1) G4cout << "physicsList->Construct() start." << G4endl;
583  if(numberOfParallelWorld>0) physicsList->UseCoupledTransportation();
584  physicsList->Construct();
585 
586  if(verboseLevel>1) G4cout << "physicsList->CheckParticleList() start." << G4endl;
587  physicsList->CheckParticleList();
588  //Cannot assume that SetCuts and CheckRegions are thread safe. We need to mutex
589  //Report from valgrind --tool=drd
590  G4AutoLock l(&initphysicsmutex);
591  if ( G4Threading::IsMasterThread() ) {
592  if(verboseLevel>1) G4cout << "physicsList->setCut() start." << G4endl;
593  physicsList->SetCuts();
594 
595  }
596  CheckRegions();
597  l.unlock();
598 
599 /*******************
600 // static G4bool createIsomerOnlyOnce = false;
601 // if(G4Threading::IsMultithreadedApplication() && G4Threading::IsMasterThread())
602 // {
603 // if(!createIsomerOnlyOnce)
604 // {
605 // createIsomerOnlyOnce = true;
606 // G4ParticleDefinition* gion = G4ParticleTable::GetParticleTable()->GetGenericIon();
607 // if(gion)
608 // {
609 // G4ParticleTable::GetParticleTable()->GetIonTable()->CreateAllIsomer();
610 // PropagateGenericIonID();
611 // }
612 // }
613 // }
614 *********************/
615 
616  physicsInitialized = true;
617 #ifdef G4MULTITHREADED
618  G4UnitDefinition::GetUnitsTable().Synchronize();
619 #endif
620  stateManager->SetNewState(currentState);
621  if(geometryInitialized && currentState!=G4State_Idle)
622  { stateManager->SetNewState(G4State_Idle); }
623 }
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
G4bool SetNewState(G4ApplicationState requestedState)
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4UnitsTable & GetUnitsTable()
void UseCoupledTransportation(G4bool vl=true)
#define G4endl
Definition: G4ios.hh:61
G4bool IsMasterThread()
Definition: G4Threading.cc:146
G4ApplicationState
G4String GetStateString(G4ApplicationState aState) const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::PhysicsHasBeenModified ( )
inline

Definition at line 170 of file G4RunManagerKernel.hh.

171  { physicsNeedsToBeReBuilt = true; }

Here is the caller graph for this function:

void G4RunManagerKernel::PropagateGenericIonID ( )
protected

Definition at line 685 of file G4RunManagerKernel.cc.

686 {
688  if(gion)
689  {
690  //G4ParticleTable::GetParticleTable()->GetIonTable()->CreateAllIsomer();
691  G4int gionId = gion->GetParticleDefinitionID();
693  pItr->reset(false);
694  while( (*pItr)() )
695  {
696  G4ParticleDefinition* particle = pItr->value();
697  if(particle->IsGeneralIon()) particle->SetParticleDefinitionID(gionId);
698  }
699  }
700 }
G4int GetParticleDefinitionID() const
void SetParticleDefinitionID(G4int id=-1)
G4ParticleDefinition * GetGenericIon() const
int G4int
Definition: G4Types.hh:78
G4bool IsGeneralIon() const
void reset(G4bool ifSkipIon=true)
static G4ParticleTable * GetParticleTable()
G4PTblDicIterator * GetIterator() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::ResetNavigator ( )
protected

Definition at line 709 of file G4RunManagerKernel.cc.

710 {
712  { geometryNeedsToBeClosed = false; return; }
713 
714  // We have to tweak the navigator's state in case a geometry has been
715  // modified between runs. By the following calls we ensure that navigator's
716  // state is reset properly. It is required the geometry to be closed
717  // and previous optimisations to be cleared.
718 
720  if(verboseLevel>1) G4cout << "Start closing geometry." << G4endl;
721 
722  geomManager->OpenGeometry();
723  geomManager->CloseGeometry(geometryToBeOptimized, verboseLevel>1);
724 
725  geometryNeedsToBeClosed = false;
726 }
G4GLOB_DLL std::ostream G4cout
static G4GeometryManager * GetInstance()
#define G4endl
Definition: G4ios.hh:61
void OpenGeometry(G4VPhysicalVolume *vol=0)
G4bool CloseGeometry(G4bool pOptimise=true, G4bool verbose=false, G4VPhysicalVolume *vol=0)

Here is the call graph for this function:

Here is the caller graph for this function:

G4bool G4RunManagerKernel::RunInitialization ( G4bool  fakeRun = false)

Definition at line 625 of file G4RunManagerKernel.cc.

626 {
628  G4ApplicationState currentState = stateManager->GetCurrentState();
629 
630  if(!geometryInitialized)
631  {
632  G4Exception("G4RunManagerKernel::RunInitialization",
633  "Run0021",
634  JustWarning,
635  "Geometry has not yet initialized : method ignored.");
636  return false;
637  }
638 
639  if(!physicsInitialized)
640  {
641  G4Exception("G4RunManagerKernel::RunInitialization",
642  "Run0022",
643  JustWarning,
644  "Physics has not yet initialized : method ignored.");
645  return false;
646  }
647 
648  if( currentState != G4State_Idle )
649  {
650  G4Exception("G4RunManagerKernel::RunInitialization",
651  "Run0023",
652  JustWarning,
653  "Geant4 kernel not in Idle state : method ignored.");
654  return false;
655  }
656 
657  if(geometryNeedsToBeClosed) CheckRegularGeometry();
658 
661  UpdateRegion();
662  BuildPhysicsTables(fakeRun);
663 
665  {
666  ResetNavigator();
667  // CheckRegularGeometry();
668  // Notify the VisManager as well
670  {
672  if(pVVisManager) pVVisManager->GeometryHasChanged();
673  }
674  }
675 
677 
678 #ifdef G4MULTITHREADED
679  G4UnitDefinition::GetUnitsTable().Synchronize();
680 #endif
681  stateManager->SetNewState(G4State_GeomClosed);
682  return true;
683 }
virtual void GeometryHasChanged()=0
virtual void SetupShadowProcess() const
static G4VVisManager * GetConcreteInstance()
static G4StateManager * GetStateManager()
G4bool SetNewState(G4ApplicationState requestedState)
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4UnitsTable & GetUnitsTable()
G4PrimaryTransformer * GetPrimaryTransformer() const
G4bool IsMasterThread()
Definition: G4Threading.cc:146
void BuildPhysicsTables(G4bool fakeRun)
G4ApplicationState

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::RunTermination ( )

Definition at line 702 of file G4RunManagerKernel.cc.

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::SetGeometryToBeOptimized ( G4bool  vl)
inline

Definition at line 195 of file G4RunManagerKernel.hh.

196  {
197  if(geometryToBeOptimized != vl)
198  {
199  geometryToBeOptimized = vl;
201  }
202  }

Here is the caller graph for this function:

void G4RunManagerKernel::SetNumberOfParallelWorld ( G4int  i)
inline

Definition at line 206 of file G4RunManagerKernel.hh.

207  { numberOfParallelWorld = i; }

Here is the caller graph for this function:

void G4RunManagerKernel::SetPhysics ( G4VUserPhysicsList uPhys)

Definition at line 481 of file G4RunManagerKernel.cc.

482 {
483  physicsList = uPhys;
484 
485  if(runManagerKernelType==workerRMK) return;
486 
487  SetupPhysics();
488  if(verboseLevel>2) G4ParticleTable::GetParticleTable()->DumpTable();
489  if(verboseLevel>1)
490  {
491  G4cout << "List of instantiated particles ============================================" << G4endl;
493  for(G4int i=0;i<nPtcl;i++)
494  {
496  G4cout << pd->GetParticleName() << " ";
497  if(i%10==9) G4cout << G4endl;
498  }
499  G4cout << G4endl;
500  }
501 }
void DumpTable(const G4String &particle_name="ALL")
int G4int
Definition: G4Types.hh:78
const G4String & GetParticleName() const
G4ParticleDefinition * GetParticle(G4int index) const
G4GLOB_DLL std::ostream G4cout
static G4ParticleTable * GetParticleTable()
#define G4endl
Definition: G4ios.hh:61
G4int entries() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::SetPrimaryTransformer ( G4PrimaryTransformer pt)
inline

Definition at line 184 of file G4RunManagerKernel.hh.

185  { eventManager->SetPrimaryTransformer(pt); }
void SetPrimaryTransformer(G4PrimaryTransformer *tf)

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::SetupDefaultRegion ( )
protected

Definition at line 244 of file G4RunManagerKernel.cc.

245 {
246  if(runManagerKernelType==workerRMK) return;
247 
248  // Remove old world logical volume from the default region, if exist
250  {
251  if(defaultRegion->GetNumberOfRootVolumes()>size_t(1))
252  {
253  G4Exception("G4RunManager::SetupDefaultRegion",
254  "Run0005",
256  "Default world region should have a unique logical volume.");
257  }
258  std::vector<G4LogicalVolume*>::iterator lvItr
260  defaultRegion->RemoveRootLogicalVolume(*lvItr,false);
261  if(verboseLevel>1) G4cout
262  << "Obsolete world logical volume is removed from the default region." << G4endl;
263  }
264 
265 }
G4GLOB_DLL std::ostream G4cout
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
#define G4endl
Definition: G4ios.hh:61
size_t GetNumberOfRootVolumes() const
void RemoveRootLogicalVolume(G4LogicalVolume *lv, G4bool scan=true)
Definition: G4Region.cc:319
std::vector< G4LogicalVolume * >::iterator GetRootLogicalVolumeIterator()

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::SetupPhysics ( )
protected

Definition at line 508 of file G4RunManagerKernel.cc.

509 {
511 
512  physicsList->ConstructParticle();
513 
514  // For sanity reason
517  if(gion)
520 
522  pItr->reset();
523  while( (*pItr)() )
524  {
525  G4ParticleDefinition* particle = pItr->value();
526  if(!(particle->IsGeneralIon())) particle->SetParticleDefinitionID();
527  }
528 
529  if(gion)
530  {
531  G4int gionId = gion->GetParticleDefinitionID();
532  pItr->reset(false);
533  while( (*pItr)() )
534  {
535  G4ParticleDefinition* particle = pItr->value();
536  if(particle->IsGeneralIon()) particle->SetParticleDefinitionID(gionId);
537  }
538  }
539 #ifdef G4MULTITHREADED
540  G4UnitDefinition::GetUnitsTable().Synchronize();
541 #endif
542 }
static G4Geantino * GeantinoDefinition()
Definition: G4Geantino.cc:82
G4int GetParticleDefinitionID() const
void InitializeLightIons()
Definition: G4IonTable.cc:182
void SetParticleDefinitionID(G4int id=-1)
void SetReadiness(G4bool val=true)
G4ParticleDefinition * GetGenericIon() const
int G4int
Definition: G4Types.hh:78
G4bool IsGeneralIon() const
static void ConstructParticle()
G4IonTable * GetIonTable() const
void reset(G4bool ifSkipIon=true)
static G4UnitsTable & GetUnitsTable()
static G4ParticleTable * GetParticleTable()
virtual void ConstructParticle()=0
G4PTblDicIterator * GetIterator() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::SetupShadowProcess ( ) const
protectedvirtual

Reimplemented in G4MTRunManagerKernel, and G4WorkerRunManagerKernel.

Definition at line 992 of file G4RunManagerKernel.cc.

993 {
996  theParticleIterator->reset();
997  //loop on particles and get process manager from there list of processes
998  while((*theParticleIterator)())
999  {
1000  G4ParticleDefinition* pd = theParticleIterator->value();
1001  G4ProcessManager* pm = pd->GetProcessManager();
1002  if(pm)
1003  {
1004  G4ProcessVector& procs = *(pm->GetProcessList());
1005  for ( G4int idx = 0 ; idx<procs.size() ; ++idx)
1006  {
1007  const G4VProcess* masterP = procs[idx]->GetMasterProcess();
1008  if ( ! masterP )
1009  {
1010  //Process does not have an associated shadow master process
1011  //We are in master mode or sequential
1012  procs[idx]->SetMasterProcess(const_cast<G4VProcess*>(procs[idx]));
1013  }
1014  }
1015  }
1016  }
1017 }
int G4int
Definition: G4Types.hh:78
void reset(G4bool ifSkipIon=true)
#define theParticleIterator
G4int size() const
static G4ParticleTable * GetParticleTable()
G4ProcessManager * GetProcessManager() const
G4PTblDicIterator * GetIterator() const
G4ProcessVector * GetProcessList() const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::SetVerboseLevel ( G4int  vl)
inline

Definition at line 192 of file G4RunManagerKernel.hh.

193  { verboseLevel = vl; }

Here is the caller graph for this function:

void G4RunManagerKernel::UpdateRegion ( )

Definition at line 728 of file G4RunManagerKernel.cc.

729 {
731  G4ApplicationState currentState = stateManager->GetCurrentState();
732  if( currentState != G4State_Idle )
733  {
734  G4Exception("G4RunManagerKernel::UpdateRegion",
735  "Run0024",
736  JustWarning,
737  "Geant4 kernel not in Idle state : method ignored.");
738  return;
739  }
740 
741  if(runManagerKernelType==workerRMK) return;
742 
743  CheckRegions();
744 
746 
748 }
void UpdateMaterialList(G4VPhysicalVolume *currentWorld=0)
static G4RegionStore * GetInstance()
static G4StateManager * GetStateManager()
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4ProductionCutsTable * GetProductionCutsTable()
void UpdateCoupleTable(G4VPhysicalVolume *currentWorld)
G4ApplicationState

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::WorkerDefineWorldVolume ( G4VPhysicalVolume worldVol,
G4bool  topologyIsChanged = true 
)

Definition at line 343 of file G4RunManagerKernel.cc.

345 {
347  G4ApplicationState currentState = stateManager->GetCurrentState();
348  if(currentState!=G4State_Init)
349  {
350  G4cout << "Current application state is "
351  << stateManager->GetStateString(currentState) << G4endl;
352  if(!(currentState==G4State_Idle||currentState==G4State_PreInit))
353  {
354  G4Exception("G4RunManagerKernel::DefineWorldVolume",
355  "DefineWorldVolumeAtIncorrectState",
357  "Geant4 kernel is not Init state : Method ignored.");
358  return;
359  } else {
360  //G4Exception("G4RunManagerKernel::DefineWorldVolume",
361  // "DefineWorldVolumeAtIncorrectState",
362  // JustWarning,
363  // "Geant4 kernel is not Init state : Assuming Init state.");
364  G4cout<<"Warning : Geant4 kernel is not Init state : Assuming Init state."
365  <<G4endl;
366  stateManager->SetNewState(G4State_Init);
367  }
368  }
369 
370  currentWorld = worldVol;
373  G4MTRunManager::masterWorlds_t masterWorlds= masterRM->GetMasterWorlds();
374  G4MTRunManager::masterWorlds_t::iterator itrMW = masterWorlds.begin();
375  for(;itrMW!=masterWorlds.end();itrMW++)
376  {
377  if((*itrMW).first == 0)
378  {
379  if((*itrMW).second != currentWorld)
380  {
381  G4Exception("G4RunManagerKernel::WorkerDefineWorldVolume","RUN3091",
382  FatalException,"Mass world is inconsistent");
383  }
384  transM->SetWorldForTracking((*itrMW).second);
385  }
386  else
387  {
388  transM->RegisterWorld((*itrMW).second);
389  }
390  }
391 
392  if(topologyIsChanged) geometryNeedsToBeClosed = true;
393 
394  // Notify the VisManager as well
396  {
398  if(pVVisManager) pVVisManager->GeometryHasChanged();
399  }
400 
401  geometryInitialized = true;
402  stateManager->SetNewState(currentState);
403  if(physicsInitialized && currentState!=G4State_Idle)
404  { stateManager->SetNewState(G4State_Idle); }
405 }
virtual void GeometryHasChanged()=0
std::map< G4int, G4VPhysicalVolume * > masterWorlds_t
static G4VVisManager * GetConcreteInstance()
static masterWorlds_t & GetMasterWorlds()
static G4StateManager * GetStateManager()
G4GLOB_DLL std::ostream G4cout
G4bool SetNewState(G4ApplicationState requestedState)
static G4MTRunManager * GetMasterRunManager()
G4ApplicationState GetCurrentState() const
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
Definition: G4Exception.cc:41
static G4TransportationManager * GetTransportationManager()
#define G4endl
Definition: G4ios.hh:61
G4bool IsMasterThread()
Definition: G4Threading.cc:146
G4bool RegisterWorld(G4VPhysicalVolume *aWorld)
void SetWorldForTracking(G4VPhysicalVolume *theWorld)
G4ApplicationState
G4String GetStateString(G4ApplicationState aState) const

Here is the call graph for this function:

Here is the caller graph for this function:

void G4RunManagerKernel::WorkerUpdateWorldVolume ( )

Definition at line 326 of file G4RunManagerKernel.cc.

327 {
330  G4MTRunManager::masterWorlds_t masterWorlds= masterRM->GetMasterWorlds();
331  G4MTRunManager::masterWorlds_t::iterator itrMW = masterWorlds.begin();
332  for(;itrMW!=masterWorlds.end();itrMW++)
333  {
334  G4VPhysicalVolume* wv = (*itrMW).second;
335  G4VPhysicalVolume* pWorld
337  ->IsWorldExisting(wv->GetName());
338  if(!pWorld)
339  { transM->RegisterWorld(wv); }
340  }
341 }
G4VPhysicalVolume * IsWorldExisting(const G4String &worldName)
std::map< G4int, G4VPhysicalVolume * > masterWorlds_t
static masterWorlds_t & GetMasterWorlds()
const G4String & GetName() const
static G4MTRunManager * GetMasterRunManager()
static G4TransportationManager * GetTransportationManager()
G4bool RegisterWorld(G4VPhysicalVolume *aWorld)

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

G4Region* G4RunManagerKernel::defaultRegion
protected

Definition at line 160 of file G4RunManagerKernel.hh.

G4Region* G4RunManagerKernel::defaultRegionForParallelWorld
protected

Definition at line 161 of file G4RunManagerKernel.hh.

G4bool G4RunManagerKernel::geometryNeedsToBeClosed
protected

Definition at line 162 of file G4RunManagerKernel.hh.

RMKType G4RunManagerKernel::runManagerKernelType
protected

Definition at line 90 of file G4RunManagerKernel.hh.


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