32std::vector<G4WorkerRunManager*>* G4MTRunManagerKernel::workerRMvector = 0;
43#ifndef G4MULTITHREADED
45 msg <<
"Geant4 code is compiled without multi-threading support "
48 msg <<
" This type of RunManager can only be used in mult-threaded "
50 G4Exception(
"G4RunManagerKernel::G4RunManagerKernel()",
"Run0109",
55 workerRMvector =
new std::vector<G4WorkerRunManager*>;
66 if(workerRMvector->size() > 0)
69 msg <<
"G4MTRunManagerKernel is to be deleted while "
70 << workerRMvector->size() <<
" G4WorkerRunManager are still alive.";
71 G4Exception(
"G4RunManagerKernel::~G4RunManagerKernel()",
"Run10035",
74 delete workerRMvector;
111 return wThreadContext;
130 wThreadContext = context;
179 workerRMvector->push_back(wrm);
188 wrm->G4RunManager::SetUserInitialization(
223 std::vector<G4WorkerRunManager*>::iterator itrWrm = workerRMvector->begin();
224 for(; itrWrm != workerRMvector->end(); itrWrm++)
228 workerRMvector->erase(itrWrm);
261 for(
G4int i = 0; i < nCh; i++)
272 std::vector<G4WorkerRunManager*>::iterator itr = workerRMvector->begin();
273 for(; itr != workerRMvector->end(); itr++)
275 (*itr)->AbortRun(softAbort);
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
#define G4MUTEX_INITIALIZER
G4VDecayChannel * GetDecayChannel(G4int index) const
void BroadcastAbortRun(G4bool softAbort)
static G4WorkerThread * GetWorkerThread()
void SetUpDecayChannels()
virtual ~G4MTRunManagerKernel()
void SetupShadowProcess() const
static void StartThread(G4WorkerThread *context)
G4int GetPinAffinity() const
const CLHEP::HepRandomEngine * getMasterRandomEngine() const
static G4MTRunManager * GetMasterRunManager()
void reset(G4bool ifSkipIon=true)
G4PTblDicIterator * GetIterator() const
static G4ParticleTable * GetParticleTable()
virtual void SetupShadowProcess() const
const G4UserWorkerInitialization * GetUserWorkerInitialization() const
virtual void Initialize()
const G4VUserDetectorConstruction * GetUserDetectorConstruction() const
const G4VUserActionInitialization * GetUserActionInitialization() const
G4VUserActionInitialization * GetNonConstUserActionInitialization() const
const G4VUserPhysicsList * GetUserPhysicsList() const
const G4UserWorkerThreadInitialization * GetUserWorkerThreadInitialization() const
void SetUpForAThread(G4int tId)
static G4UImanager * GetUIpointer()
virtual void WorkerStop() const
virtual void WorkerInitialize() const
virtual void WorkerStart() const
virtual void SetupRNGEngine(const CLHEP::HepRandomEngine *aRNGEngine) const
virtual G4WorkerRunManager * CreateWorkerRunManager() const
G4ParticleDefinition * GetDaughter(G4int anIndex)
static void SetInstance(G4VSteppingVerbose *Instance)
virtual void Build() const =0
virtual G4VSteppingVerbose * InitializeSteppingVerbose() const
void SetWorkerThread(G4WorkerThread *wc)
Sets the worker context.
virtual void SetUserInitialization(G4VUserPhysicsList *userInit)
G4int GetThreadId() const
static void BuildGeometryAndPhysicsVector()
static void DestroyGeometryAndPhysicsVector()
void SetPinAffinity(G4int aff) const
G4int WorkerThreadJoinsPool()
G4int WorkerThreadLeavesPool()
void SetMultithreadedApplication(G4bool value)
void G4SetThreadId(G4int aNewValue)