39#ifndef G4MULTITHREADED
41 msg <<
"Geant4 code is compiled without multi-threading support "
44 msg <<
" This type of RunManager can only be used in mult-threaded "
46 G4Exception(
"G4RunManagerKernel::G4RunManagerKernel()",
"Run0102",
72 if(pm ==
nullptr || pmM ==
nullptr)
76 <<
"Process manager or process manager shadow to master are not set.\n";
78 <<
"), proc-manager: " << pm;
79 msg <<
" proc-manager-shadow: " << pmM;
80 G4Exception(
"G4WorkerRunManagerKernel::SetupShadowProcess()",
88 G4cout <<
"G4WorkerRunManagerKernel::SetupShadowProcess() for particle <"
90 G4cout <<
" ProcessManager : " << pm <<
" ProcessManagerShadow : " << pmM
92 for(std::size_t iv1 = 0; iv1 < procs.
size(); ++iv1)
94 G4cout <<
" " << iv1 <<
" - " << procs[iv1]->GetProcessName()
97 G4cout <<
"--------------------------------------------------------------"
99 for(std::size_t iv2 = 0; iv2 < procsM.
size(); ++iv2)
101 G4cout <<
" " << iv2 <<
" - " << procsM[iv2]->GetProcessName()
104 G4cout <<
"--------------------------------------------------------------"
108 <<
" Size of G4ProcessVector is inconsistent between master and worker "
111 msg <<
" size of G4ProcessVector for worker thread is " << procs.
size();
112 msg <<
" while master thread is " << procsM.
size() <<
".";
113 G4Exception(
"G4WorkerRunManagerKernel::SetupShadowProcess()",
"Run0117",
120 for(std::size_t idx = 0; idx < procs.
size(); ++idx)
122 procs[idx]->SetMasterProcess(procsM[idx]);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define theParticleIterator
G4GLOB_DLL std::ostream G4cout
G4ProcessManager * GetProcessManager() const
G4ProcessManager * GetMasterProcessManager() const
const G4String & GetParticleName() const
void DestroyWorkerG4ParticleTable()
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()
G4ProcessVector * GetProcessList() const
virtual ~G4WorkerRunManagerKernel()
G4WorkerRunManagerKernel()
void SetupShadowProcess() const