Geant4 11.1.1
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4ParallelWorldProcessStore Class Reference

#include <G4ParallelWorldProcessStore.hh>

+ Inheritance diagram for G4ParallelWorldProcessStore:

Public Member Functions

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

Static Public Member Functions

static G4ParallelWorldProcessStoreGetInstance ()
 
static G4ParallelWorldProcessStoreGetInstanceIfExist ()
 

Detailed Description

Definition at line 61 of file G4ParallelWorldProcessStore.hh.

Constructor & Destructor Documentation

◆ ~G4ParallelWorldProcessStore()

G4ParallelWorldProcessStore::~G4ParallelWorldProcessStore ( )
virtual

Definition at line 50 of file G4ParallelWorldProcessStore.cc.

51{
52 Clear();
53 fInstance = 0;
54}

Member Function Documentation

◆ Clear()

void G4ParallelWorldProcessStore::Clear ( )

Definition at line 96 of file G4ParallelWorldProcessStore.cc.

97{ fInstance->clear(); }

Referenced by ~G4ParallelWorldProcessStore().

◆ GetInstance()

◆ GetInstanceIfExist()

G4ParallelWorldProcessStore * G4ParallelWorldProcessStore::GetInstanceIfExist ( )
static

Definition at line 42 of file G4ParallelWorldProcessStore.cc.

43{
44 return fInstance;
45}

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}

◆ 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:59
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40

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)

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


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