Geant4
10.01.p03
|
#include <G4MTRunManager.hh>
Public Types | |
enum | WorkerActionRequest { UNDEFINED, NEXTITERATION, ENDWORKER } |
typedef std::map< G4int, G4VPhysicalVolume * > | masterWorlds_t |
Public Types inherited from G4RunManager | |
enum | RMType { sequentialRM, masterRM, workerRM } |
Static Public Member Functions | |
static G4ScoringManager * | GetMasterScoringManager () |
static masterWorlds_t & | GetMasterWorlds () |
static void | addWorld (G4int counter, G4VPhysicalVolume *w) |
static G4MTRunManager * | GetMasterRunManager () |
static G4RunManagerKernel * | GetMasterRunManagerKernel () |
static G4MTRunManagerKernel * | GetMTMasterRunManagerKernel () |
static G4int | SeedOncePerCommunication () |
static void | SetSeedOncePerCommunication (G4int val) |
Static Public Member Functions inherited from G4RunManager | |
static G4RunManager * | GetRunManager () |
static G4bool | IfGeometryHasBeenDestroyed () |
Protected Member Functions | |
virtual G4bool | InitializeSeeds (G4int) |
virtual void | PrepareCommandsStack () |
virtual void | StoreRNGStatus (const G4String &filenamePrefix) |
virtual void | CreateAndStartWorkers () |
virtual void | WaitForReadyWorkers () |
virtual void | WaitForEndEventLoopWorkers () |
virtual void | TerminateWorkers () |
virtual void | NewActionRequest (WorkerActionRequest newRequest) |
void | RefillSeeds () |
Protected Member Functions inherited from G4RunManager | |
void | CleanUpPreviousEvents () |
void | CleanUpUnnecessaryEvents (G4int keepNEvents) |
void | StackPreviousEvent (G4Event *anEvent) |
G4RunManager (RMType rmType) | |
void | UpdateScoring () |
virtual void | DeleteUserInitializations () |
Static Protected Attributes | |
static G4int | seedOncePerCommunication = 0 |
Static Protected Attributes inherited from G4RunManager | |
static G4bool | fGeometryHasBeenDestroyed = false |
Private Types | |
typedef std::list< G4Thread * > | G4ThreadsList |
Private Attributes | |
G4int | nworkers |
G4int | forcedNwokers |
G4int | pinAffinity |
G4ThreadsList | threads |
std::vector< G4String > | uiCmdsForWorkers |
CLHEP::HepRandomEngine * | masterRNGEngine |
G4MTRunManagerKernel * | MTkernel |
Static Private Attributes | |
static G4ScoringManager * | masterScM = 0 |
static masterWorlds_t | masterWorlds = G4MTRunManager::masterWorlds_t() |
static G4MTRunManager * | fMasterRM = 0 |
Definition at line 50 of file G4MTRunManager.hh.
|
private |
Definition at line 113 of file G4MTRunManager.hh.
typedef std::map<G4int,G4VPhysicalVolume*> G4MTRunManager::masterWorlds_t |
Definition at line 154 of file G4MTRunManager.hh.
Enumerator | |
---|---|
UNDEFINED | |
NEXTITERATION | |
ENDWORKER |
Definition at line 193 of file G4MTRunManager.hh.
G4MTRunManager::G4MTRunManager | ( | ) |
Definition at line 84 of file G4MTRunManager.cc.
References FatalException, fMasterRM, forcedNwokers, G4cout, G4endl, G4Exception(), G4Threading::G4GetNumberOfCores(), G4RunManagerKernel::GetNumberOfStaticAllocators(), G4ScoringManager::GetScoringManagerIfExist(), G4UImanager::GetUIpointer(), JustWarning, G4RunManager::kernel, masterRNGEngine, masterScM, MTkernel, nSeedsMax, nSeedsPerEvent, numberOfEventToBeProcessed, nworkers, randDbl, and G4UImanager::SetMasterUIManager().
|
virtual |
Definition at line 163 of file G4MTRunManager.cc.
References randDbl, and TerminateWorkers().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 587 of file G4MTRunManager.cc.
|
virtual |
Reimplemented from G4RunManager.
Definition at line 571 of file G4MTRunManager.cc.
References G4MTRunManagerKernel::BroadcastAbortRun(), G4cerr, G4endl, G4State_EventProc, G4State_GeomClosed, G4StateManager::GetCurrentState(), G4StateManager::GetStateManager(), MTkernel, and G4RunManager::runAborted.
|
inlinestatic |
Definition at line 157 of file G4MTRunManager.hh.
References masterWorlds.
Referenced by ConstructScoringWorlds().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 399 of file G4MTRunManager.cc.
References addWorld(), G4RunManager::ConstructScoringWorlds(), G4TransportationManager::GetNoWorlds(), G4ScoringManager::GetScoringManagerIfExist(), G4TransportationManager::GetTransportationManager(), G4TransportationManager::GetWorldsIterator(), masterScM, and masterWorlds.
|
protectedvirtual |
Reimplemented in tbbMasterRunManager.
Definition at line 245 of file G4MTRunManager.cc.
References G4UserWorkerThreadInitialization::CreateAndStartWorker(), NewActionRequest(), NEXTITERATION, nworkers, G4WorkerThread::SetNumberThreads(), G4WorkerThread::SetThreadId(), threads, and G4RunManager::userWorkerThreadInitialization.
Referenced by InitializeEventLoop().
std::vector< G4String > G4MTRunManager::GetCommandStack | ( | ) |
Definition at line 239 of file G4MTRunManager.cc.
References uiCmdsForWorkers.
Referenced by tbbTask::execute(), and G4MTRunManagerKernel::StartThread().
|
inline |
Definition at line 222 of file G4MTRunManager.hh.
References eventModuloDef.
Referenced by G4WorkerRunManager::GenerateEvent().
|
inline |
Definition at line 158 of file G4MTRunManager.hh.
References masterRNGEngine.
Referenced by tbbTask::execute(), G4WorkerRunManager::SetupDefaultRNGEngine(), and G4MTRunManagerKernel::StartThread().
|
static |
Definition at line 65 of file G4MTRunManager.cc.
References fMasterRM.
Referenced by G4TheMTRayTracer::CreateBitMap(), G4TrajectoriesModel::DescribeYourselfTo(), tbbTask::execute(), G4WorkerRunManager::GenerateEvent(), XrayFluoPrimaryGeneratorAction::GeneratePrimaries(), G4WorkerRunManager::MergePartialResults(), G4VisCommandSceneAddEventID::EventID::operator()(), G4VSceneHandler::ProcessScene(), G4TheMTRayTracer::RestoreUserActions(), G4WorkerRunManager::RunInitialization(), G4WorkerRunManager::RunTermination(), G4VisCommandSceneEndOfEventAction::SetNewValue(), G4VisCommandReviewKeptEvents::SetNewValue(), G4WorkerRunManager::SetupDefaultRNGEngine(), G4MTRunManagerKernel::StartThread(), G4TheMTRayTracer::StoreUserActions(), G4RunManagerKernel::WorkerDefineWorldVolume(), and G4RunManagerKernel::WorkerUpdateWorldVolume().
|
static |
Definition at line 74 of file G4MTRunManager.cc.
References fMasterRM, and G4RunManager::kernel.
Referenced by G4WorkerRunManager::InitializeGeometry().
|
inlinestatic |
Definition at line 155 of file G4MTRunManager.hh.
References masterScM.
Referenced by G4WorkerRunManager::ConstructScoringWorlds(), and G4WorkerRunManager::G4WorkerRunManager().
|
inlinestatic |
Definition at line 156 of file G4MTRunManager.hh.
References masterWorlds.
Referenced by G4RunManagerKernel::WorkerDefineWorldVolume(), and G4RunManagerKernel::WorkerUpdateWorldVolume().
|
static |
Definition at line 79 of file G4MTRunManager.cc.
|
inline |
Definition at line 56 of file G4MTRunManager.hh.
References nworkers.
Referenced by main().
|
inline |
Definition at line 58 of file G4MTRunManager.hh.
References pinAffinity.
Referenced by G4MTRunManagerKernel::StartThread().
|
virtual |
G4UImanager::GetUIpointer()->SetIgnoreCmdNotFound(true);
Reimplemented from G4RunManager.
Definition at line 205 of file G4MTRunManager.cc.
References G4RunManager::BeamOn(), G4RunManager::Initialize(), and G4RunManager::SetRunIDCounter().
Referenced by main().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 266 of file G4MTRunManager.cc.
References CreateAndStartWorkers(), eventModulo, eventModuloDef, G4RunManager::fakeRun, G4TemplateRNGHelper< T >::Fill(), G4Exception(), G4TemplateRNGHelper< T >::GetInstance(), InitializeSeeds(), JustWarning, masterRNGEngine, G4RunManager::msgText, MTkernel, G4RunManager::n_select_msg, nSeedsFilled, nSeedsMax, nSeedsPerEvent, nSeedsUsed, G4RunManager::numberOfEventProcessed, numberOfEventToBeProcessed, nworkers, PrepareCommandsStack(), randDbl, seedOncePerCommunication, G4RunManager::selectMacro, G4MTRunManagerKernel::SetUpDecayChannels(), G4Timer::Start(), G4RunManager::timer, G4RunManager::userWorkerThreadInitialization, G4RunManager::verboseLevel, and WaitForReadyWorkers().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 564 of file G4MTRunManager.cc.
References G4CascadeInterface::Initialize(), and G4RunManager::InitializePhysics().
Definition at line 93 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop().
void G4MTRunManager::MergeRun | ( | const G4Run * | localRun | ) |
Definition at line 485 of file G4MTRunManager.cc.
References G4RunManager::currentRun, and G4Run::Merge().
Referenced by G4WorkerRunManager::MergePartialResults().
void G4MTRunManager::MergeScores | ( | const G4ScoringManager * | localScoringManager | ) |
Definition at line 479 of file G4MTRunManager.cc.
References masterScM, and G4ScoringManager::Merge().
Referenced by G4WorkerRunManager::MergePartialResults().
|
protectedvirtual |
Reimplemented in tbbMasterRunManager.
Definition at line 841 of file G4MTRunManager.cc.
References G4CONDITIONWAIT, G4CONDTIONBROADCAST, nextActionRequest, threads, and G4TemplateAutoLock< M, L, U >::unlock().
Referenced by CreateAndStartWorkers(), and TerminateWorkers().
|
protectedvirtual |
Definition at line 228 of file G4MTRunManager.cc.
References G4UImanager::GetCommandStack(), G4UImanager::GetUIpointer(), and uiCmdsForWorkers.
Referenced by InitializeEventLoop().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 219 of file G4MTRunManager.cc.
|
protected |
Definition at line 362 of file G4MTRunManager.cc.
References eventModulo, G4TemplateRNGHelper< T >::GetInstance(), masterRNGEngine, nSeedsFilled, nSeedsMax, nSeedsPerEvent, numberOfEventToBeProcessed, nworkers, randDbl, G4TemplateRNGHelper< T >::Refill(), and seedOncePerCommunication.
Referenced by SetUpAnEvent(), and SetUpNEvents().
|
virtual |
Reimplemented from G4RunManager.
Reimplemented in tbbMasterRunManager.
Definition at line 386 of file G4MTRunManager.cc.
References G4RunManager::RunTermination(), G4RunManager::TerminateEventLoop(), and WaitForEndEventLoopWorkers().
Referenced by tbbMasterRunManager::RunTermination().
|
inlinestatic |
Definition at line 245 of file G4MTRunManager.hh.
References seedOncePerCommunication.
Referenced by G4WorkerRunManager::GenerateEvent(), and G4RunMessenger::GetCurrentValue().
|
inline |
Definition at line 221 of file G4MTRunManager.hh.
void G4MTRunManager::SetNumberOfThreads | ( | G4int | n | ) |
Definition at line 180 of file G4MTRunManager.cc.
References forcedNwokers, G4Exception(), JustWarning, n, nworkers, and threads.
Referenced by main().
void G4MTRunManager::SetPinAffinity | ( | G4int | n = 1 | ) |
Definition at line 908 of file G4MTRunManager.cc.
References FatalException, G4Exception(), n, and pinAffinity.
|
inlinestatic |
Definition at line 246 of file G4MTRunManager.hh.
Referenced by G4RunMessenger::SetNewValue().
|
virtual |
Definition at line 491 of file G4MTRunManager.cc.
References G4TemplateRNGHelper< T >::GetInstance(), G4TemplateRNGHelper< T >::GetSeed(), nSeedsFilled, nSeedsPerEvent, nSeedsUsed, G4RunManager::numberOfEventProcessed, numberOfEventToBeProcessed, RefillSeeds(), and G4Event::SetEventID().
Referenced by G4WorkerRunManager::GenerateEvent().
|
virtual |
Definition at line 513 of file G4MTRunManager.cc.
References eventModulo, G4TemplateRNGHelper< T >::GetInstance(), G4TemplateRNGHelper< T >::GetSeed(), nSeedsFilled, nSeedsPerEvent, nSeedsUsed, G4RunManager::numberOfEventProcessed, numberOfEventToBeProcessed, RefillSeeds(), G4RunManager::runAborted, seedOncePerCommunication, and G4Event::SetEventID().
Referenced by G4WorkerRunManager::GenerateEvent().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 443 of file G4MTRunManager.cc.
References G4UserRunAction::SetMaster(), and G4RunManager::SetUserAction().
Referenced by G4TheMTRayTracer::RestoreUserActions(), and G4TheMTRayTracer::StoreUserActions().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 449 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 455 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 461 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 467 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 473 of file G4MTRunManager.cc.
References FatalException, and G4Exception().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 432 of file G4MTRunManager.cc.
References G4RunManager::SetUserInitialization().
Referenced by main(), G4TheMTRayTracer::RestoreUserActions(), and G4TheMTRayTracer::StoreUserActions().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 438 of file G4MTRunManager.cc.
References G4RunManager::SetUserInitialization().
|
virtual |
Reimplemented from G4RunManager.
Definition at line 416 of file G4MTRunManager.cc.
References G4RunManager::userWorkerInitialization.
|
virtual |
Reimplemented from G4RunManager.
Definition at line 421 of file G4MTRunManager.cc.
References G4RunManager::userWorkerThreadInitialization.
|
virtual |
Reimplemented from G4RunManager.
Definition at line 426 of file G4MTRunManager.cc.
References G4VUserActionInitialization::BuildForMaster(), and G4RunManager::userActionInitialization.
|
protectedvirtual |
Reimplemented from G4RunManager.
Definition at line 173 of file G4MTRunManager.cc.
References G4RunManager::randomNumberStatusDir.
|
virtual |
Reimplemented from G4RunManager.
Definition at line 223 of file G4MTRunManager.cc.
|
protectedvirtual |
Reimplemented in tbbMasterRunManager.
Definition at line 543 of file G4MTRunManager.cc.
References ENDWORKER, G4UserWorkerThreadInitialization::JoinWorker(), NewActionRequest(), threads, and G4RunManager::userWorkerThreadInitialization.
Referenced by ~G4MTRunManager().
|
virtual |
Reimplemented in tbbMasterRunManager.
Definition at line 821 of file G4MTRunManager.cc.
References G4CONDITIONWAIT, and G4CONDTIONBROADCAST.
Referenced by G4WorkerRunManager::RunTermination().
|
virtual |
Reimplemented in tbbMasterRunManager.
Definition at line 759 of file G4MTRunManager.cc.
References G4CONDITIONWAIT, and G4CONDTIONBROADCAST.
Referenced by G4WorkerRunManager::RunInitialization().
|
virtual |
Reimplemented in tbbMasterRunManager.
Definition at line 882 of file G4MTRunManager.cc.
References G4CONDITIONWAIT, G4CONDTIONBROADCAST, and nextActionRequest.
Referenced by G4MTRunManagerKernel::StartThread().
|
protectedvirtual |
Reimplemented in tbbMasterRunManager.
Definition at line 789 of file G4MTRunManager.cc.
References G4CONDITIONWAIT, G4CONDTIONBROADCAST, and threads.
Referenced by RunTermination().
|
protectedvirtual |
Reimplemented in tbbMasterRunManager.
Definition at line 703 of file G4MTRunManager.cc.
References G4CONDITIONWAIT, G4CONDTIONBROADCAST, and threads.
Referenced by InitializeEventLoop().
|
protected |
Definition at line 211 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop(), RefillSeeds(), and SetUpNEvents().
|
protected |
Definition at line 210 of file G4MTRunManager.hh.
Referenced by GetEventModulo(), and InitializeEventLoop().
|
staticprivate |
Definition at line 164 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), GetMasterRunManager(), GetMasterRunManagerKernel(), and GetMTMasterRunManagerKernel().
|
private |
Definition at line 108 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), and SetNumberOfThreads().
|
private |
Definition at line 119 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), getMasterRandomEngine(), InitializeEventLoop(), and RefillSeeds().
|
staticprivate |
Definition at line 161 of file G4MTRunManager.hh.
Referenced by ConstructScoringWorlds(), G4MTRunManager(), GetMasterScoringManager(), and MergeScores().
|
staticprivate |
Definition at line 162 of file G4MTRunManager.hh.
Referenced by addWorld(), ConstructScoringWorlds(), and GetMasterWorlds().
|
private |
Definition at line 165 of file G4MTRunManager.hh.
Referenced by AbortRun(), G4MTRunManager(), GetMTMasterRunManagerKernel(), and InitializeEventLoop().
|
protected |
Definition at line 206 of file G4MTRunManager.hh.
Referenced by NewActionRequest(), and ThisWorkerWaitForNextAction().
|
protected |
Definition at line 213 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop(), RefillSeeds(), SetUpAnEvent(), and SetUpNEvents().
|
protected |
Definition at line 214 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), InitializeEventLoop(), and RefillSeeds().
|
protected |
Definition at line 215 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), InitializeEventLoop(), RefillSeeds(), SetUpAnEvent(), and SetUpNEvents().
|
protected |
Definition at line 212 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop(), SetUpAnEvent(), and SetUpNEvents().
|
protected |
Definition at line 135 of file G4MTRunManager.hh.
Referenced by tbbMasterRunManager::CreateAndStartWorkers(), G4MTRunManager(), InitializeEventLoop(), RefillSeeds(), SetUpAnEvent(), and SetUpNEvents().
|
private |
Definition at line 106 of file G4MTRunManager.hh.
Referenced by CreateAndStartWorkers(), G4MTRunManager(), GetNumberOfThreads(), InitializeEventLoop(), RefillSeeds(), and SetNumberOfThreads().
|
private |
Definition at line 110 of file G4MTRunManager.hh.
Referenced by GetPinAffinity(), and SetPinAffinity().
|
protected |
Definition at line 216 of file G4MTRunManager.hh.
Referenced by G4MTRunManager(), InitializeEventLoop(), RefillSeeds(), and ~G4MTRunManager().
|
staticprotected |
Definition at line 229 of file G4MTRunManager.hh.
Referenced by InitializeEventLoop(), RefillSeeds(), SeedOncePerCommunication(), and SetUpNEvents().
|
private |
Definition at line 114 of file G4MTRunManager.hh.
Referenced by CreateAndStartWorkers(), NewActionRequest(), SetNumberOfThreads(), TerminateWorkers(), WaitForEndEventLoopWorkers(), and WaitForReadyWorkers().
|
private |
Definition at line 117 of file G4MTRunManager.hh.
Referenced by GetCommandStack(), and PrepareCommandsStack().