Geant4-11
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Attributes
G4ParallelWorldProcessStore Class Reference

#include <G4ParallelWorldProcessStore.hh>

Inheritance diagram for G4ParallelWorldProcessStore:

Public Member Functions

void Clear ()
 
G4ParallelWorldProcessGetProcess (G4String parallelWorldName)
 
void SetParallelWorld (G4ParallelWorldProcess *proc, G4String parallelWorldName)
 
void UpdateWorlds ()
 
virtual ~G4ParallelWorldProcessStore ()
 

Static Public Member Functions

static G4ParallelWorldProcessStoreGetInstance ()
 
static G4ParallelWorldProcessStoreGetInstanceIfExist ()
 

Private Member Functions

 G4ParallelWorldProcessStore ()
 

Static Private Attributes

static G4ThreadLocal G4ParallelWorldProcessStorefInstance =0
 

Detailed Description

Definition at line 61 of file G4ParallelWorldProcessStore.hh.

Constructor & Destructor Documentation

◆ G4ParallelWorldProcessStore()

G4ParallelWorldProcessStore::G4ParallelWorldProcessStore ( )
private

Definition at line 47 of file G4ParallelWorldProcessStore.cc.

48{;}

Referenced by GetInstance().

◆ ~G4ParallelWorldProcessStore()

G4ParallelWorldProcessStore::~G4ParallelWorldProcessStore ( )
virtual

Definition at line 50 of file G4ParallelWorldProcessStore.cc.

51{
52 Clear();
53 fInstance = 0;
54}
static G4ThreadLocal G4ParallelWorldProcessStore * fInstance

References Clear(), and fInstance.

Member Function Documentation

◆ Clear()

void G4ParallelWorldProcessStore::Clear ( )

Definition at line 96 of file G4ParallelWorldProcessStore.cc.

97{ fInstance->clear(); }

References fInstance.

Referenced by ~G4ParallelWorldProcessStore().

◆ GetInstance()

G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::GetInstance ( )
static

◆ GetInstanceIfExist()

G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::GetInstanceIfExist ( )
static

Definition at line 42 of file G4ParallelWorldProcessStore.cc.

43{
44 return fInstance;
45}

References fInstance.

Referenced by G4RunManagerKernel::~G4RunManagerKernel().

◆ GetProcess()

G4ParallelWorldProcess * G4ParallelWorldProcessStore::GetProcess ( G4String  parallelWorldName)

Definition at line 88 of file G4ParallelWorldProcessStore.cc.

89{
90 std::map<G4ParallelWorldProcess*,G4String>::iterator itr;
91 for(itr=fInstance->begin();itr!=fInstance->end();itr++)
92 { if(itr->second==parallelWorldName) return itr->first; }
93 return 0;
94}

References fInstance.

◆ SetParallelWorld()

void G4ParallelWorldProcessStore::SetParallelWorld ( G4ParallelWorldProcess proc,
G4String  parallelWorldName 
)

Definition at line 56 of file G4ParallelWorldProcessStore.cc.

58{
59 std::map<G4ParallelWorldProcess*,G4String>::iterator itr;
60 for(itr=fInstance->begin();itr!=fInstance->end();itr++)
61 {
62 if(itr->first==proc)
63 {
64 if(itr->second==parallelWorldName)
65 { // already registered
66 return;
67 }
68 else
69 { // insonsistent !
71 ED << "G4ParallelWorldProcess (" << proc << ") has the world volume ("
72 << itr->second << "). It is inconsistent with (" << parallelWorldName << ").";
73 G4Exception("G4ParallelWorldProcessStore::SetParallelWorld","ProcScore0101",
75 }
76 }
77 }
78 (*fInstance)[proc] = parallelWorldName;
79}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

References FatalException, fInstance, and G4Exception().

Referenced by G4ParallelWorldProcess::G4ParallelWorldProcess(), and UpdateWorlds().

◆ UpdateWorlds()

void G4ParallelWorldProcessStore::UpdateWorlds ( )

Definition at line 81 of file G4ParallelWorldProcessStore.cc.

82{
83 std::map<G4ParallelWorldProcess*,G4String>::iterator itr;
84 for(itr=fInstance->begin();itr!=fInstance->end();itr++)
85 { (itr->first)->SetParallelWorld(itr->second); }
86}
void SetParallelWorld(G4ParallelWorldProcess *proc, G4String parallelWorldName)

References fInstance, and SetParallelWorld().

Referenced by G4RunManager::RunInitialization(), G4WorkerRunManager::RunInitialization(), and G4WorkerTaskRunManager::RunInitialization().

Field Documentation

◆ fInstance

G4ThreadLocal G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::fInstance =0
staticprivate

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