Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4MTRunManager.cc
Go to the documentation of this file.
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27
28#include "G4MTRunManager.hh"
29#include "G4AutoLock.hh"
32#include "G4Run.hh"
33#include "G4ScoringManager.hh"
34#include "G4StateManager.hh"
35#include "G4TiMemory.hh"
36#include "G4Timer.hh"
38#include "G4UImanager.hh"
39#include "G4UserRunAction.hh"
43#include "G4WorkerRunManager.hh"
44#include "G4WorkerThread.hh"
45
51G4ThreadId G4MTRunManager::masterThreadId = G4ThisThread::get_id();
52
53namespace
54{
55 G4Mutex cmdHandlingMutex = G4MUTEX_INITIALIZER;
56 G4Mutex scorerMergerMutex = G4MUTEX_INITIALIZER;
57 G4Mutex runMergerMutex = G4MUTEX_INITIALIZER;
58 G4Mutex setUpEventMutex = G4MUTEX_INITIALIZER;
59} // namespace
60
62{
63 ////////#ifdef G4MULTITHREADED
64 return fMasterRM;
65 ////////#else
66 //////// return G4RunManager::GetRunManager();
67 ////////#endif
68}
69
71{
72 return fMasterRM->kernel;
73}
74
76{
77 return fMasterRM->MTkernel;
78}
80{
81 return masterScM;
82}
83
85{
86 return masterWorlds;
87}
89{
90 masterWorlds.insert(std::make_pair(counter, w));
91}
93 return masterThreadId;
94}
96{
98}
100{
102}
103
105 : G4RunManager(masterRM)
106 , nworkers(2)
107 , forcedNwokers(-1)
108 , pinAffinity(0)
109 , masterRNGEngine(0)
110 , nextActionRequest(WorkerActionRequest::UNDEFINED)
111 , eventModuloDef(0)
112 , eventModulo(1)
113 , nSeedsUsed(0)
114 , nSeedsFilled(0)
115 , nSeedsMax(10000)
116 , nSeedsPerEvent(2)
117{
118 if(fMasterRM)
119 {
120 G4Exception("G4MTRunManager::G4MTRunManager", "Run0110", FatalException,
121 "Another instance of a G4MTRunManager already exists.");
122 }
123 fMasterRM = this;
124 masterThreadId = G4ThisThread::get_id();
125 MTkernel = static_cast<G4MTRunManagerKernel*>(kernel);
126#ifndef G4MULTITHREADED
128 msg << "Geant4 code is compiled without multi-threading support"
129 << "(-DG4MULTITHREADED is set to off).\n";
130 msg << "G4MTRunManager can only be used in multi-threaded applications.";
131 G4Exception("G4MTRunManager::G4MTRunManager", "Run0111", FatalException, msg);
132#endif
133
134 G4int numberOfStaticAllocators = kernel->GetNumberOfStaticAllocators();
135 if(numberOfStaticAllocators > 0)
136 {
138 msg1 << "There are " << numberOfStaticAllocators
139 << " static G4Allocator objects detected.\n"
140 << "In multi-threaded mode, all G4Allocator objects must be dynamically "
141 "instantiated.";
142 G4Exception("G4MTRunManager::G4MTRunManager", "Run1035", FatalException,
143 msg1);
144 }
147
148 // Check if a default RandomNumberGenerator has been created by user,
149 // if not create default one
150 // Note this call forces creation of defaults if not already there
151 // G4Random::getTheEngine(); //User did not specify RNG, create defaults
152 // Now remember the master instance of the RNG Engine
153 masterRNGEngine = G4Random::getTheEngine();
154
156 randDbl = new double[nSeedsPerEvent * nSeedsMax];
157
158 char* env = std::getenv("G4FORCENUMBEROFTHREADS");
159 if(env)
160 {
161 G4String envS = env;
162 if(envS == "MAX" || envS == "max")
163 {
165 }
166 else
167 {
168 std::istringstream is(env);
169 G4int val = -1;
170 is >> val;
171 if(val > 0)
172 {
173 forcedNwokers = val;
174 }
175 else
176 {
178 msg2 << "Environment variable G4FORCENUMBEROFTHREADS has an invalid "
179 "value <"
180 << envS << ">. It has to be an integer or a word \"max\".\n"
181 << "G4FORCENUMBEROFTHREADS is ignored.";
182 G4Exception("G4MTRunManager::G4MTRunManager", "Run1039", JustWarning,
183 msg2);
184 }
185 }
186 if(forcedNwokers > 0)
187 {
189 G4cout << "### Number of threads is forced to " << forcedNwokers
190 << " by Environment variable G4FORCENUMBEROFTHREADS." << G4endl;
191 }
192 }
193}
194
196{
197 // TODO: Currently does not work due to concurrent deletion of something
198 // that is shared:
199 // G4ProcessTable::DeleteMessenger from ~G4RunManager
200 // G4cout<<"Destroy MTRunManager"<<G4endl;//ANDREA
202 delete[] randDbl;
203}
204
206{
207 std::ostringstream os;
208 os << randomNumberStatusDir << "G4Master_" << fn << ".rndm";
209 G4Random::saveEngineStatus(os.str().c_str());
210}
211
213{
214 G4int runNumber = 0;
215 if(currentRun) runNumber = currentRun->GetRunID();
217 {
218 G4cerr << "Warning from G4RunManager::rndmSaveThisRun():"
219 << " Random number status was not stored prior to this run."
220 << G4endl << "/random/setSavingFlag command must be issued. "
221 << "Command ignored." << G4endl;
222 return;
223 }
224
225 G4String fileIn = randomNumberStatusDir + "G4Worker_currentRun.rndm";
226
227 std::ostringstream os;
228 os << "run" << runNumber << ".rndm" << '\0';
229 G4String fileOut = randomNumberStatusDir + os.str();
230
231#ifdef WIN32
232 G4String copCmd = "/control/shell copy " + fileIn + " " + fileOut;
233#else
234 G4String copCmd = "/control/shell cp " + fileIn + " " + fileOut;
235#endif
237 if(verboseLevel > 0)
238 { G4cout << fileIn << " is copied to " << fileOut << G4endl; }
239}
240
242{
243 G4Exception("G4MTRunManager::rndmSaveThisEvent","RUN_RNDM001",
244 FatalException,"This method shall not be invoked !!");
245}
246
248{
249 if(threads.size() != 0)
250 {
252 msg << "Number of threads cannot be changed at this moment \n"
253 << "(old threads are still alive). Method ignored.";
254 G4Exception("G4MTRunManager::SetNumberOfThreads(G4int)", "Run0112",
255 JustWarning, msg);
256 }
257 else if(forcedNwokers > 0)
258 {
260 msg << "Number of threads is forced to " << forcedNwokers
261 << " by G4FORCENUMBEROFTHREADS shell variable.\n"
262 << "Method ignored.";
263 G4Exception("G4MTRunManager::SetNumberOfThreads(G4int)", "Run0113",
264 JustWarning, msg);
265 }
266 else
267 {
268 nworkers = n;
269 }
270}
271
273{
275
276 // make sure all worker threads are set up.
277 BeamOn(0);
279 /// G4UImanager::GetUIpointer()->SetIgnoreCmdNotFound(true);
280}
281
282////void G4MTRunManager::TerminateEventLoop()
283////{
284//// //Nothing to do
285////}
287{
288 // Nothing to do
289}
291{
292 // Nothing to do
293}
294
296{
297 G4AutoLock l(&cmdHandlingMutex);
298 uiCmdsForWorkers.clear();
299 std::vector<G4String>* cmdCopy =
301 for(std::vector<G4String>::const_iterator it = cmdCopy->begin();
302 it != cmdCopy->end(); ++it)
303 uiCmdsForWorkers.push_back(*it);
304 cmdCopy->clear();
305 delete cmdCopy;
306}
307
308std::vector<G4String> G4MTRunManager::GetCommandStack()
309{
310 G4AutoLock l(&cmdHandlingMutex);
311 return uiCmdsForWorkers;
312}
313
315{
316 // Now loop on requested number of workers
317 // This will also start the workers
318 // Currently we do not allow to change the
319 // number of threads: threads area created once
320 if(threads.size() == 0)
321 {
322 {
323 // for consistency with G4TaskRunManager
324 std::stringstream msg;
325 msg << "--> G4MTRunManager::CreateAndStartWorkers() --> "
326 << "Initializing workers...";
327
328 std::stringstream ss;
329 ss.fill('=');
330 ss << std::setw(msg.str().length()) << "";
331 G4cout << "\n"
332 << ss.str() << "\n"
333 << msg.str() << "\n"
334 << ss.str() << "\n"
335 << G4endl;
336 }
337
338 for(G4int nw = 0; nw < nworkers; ++nw)
339 {
340 // Create a new worker and remember it
341 G4WorkerThread* context = new G4WorkerThread;
342 context->SetNumberThreads(nworkers);
343 context->SetThreadId(nw);
344 G4Thread* thread =
346 threads.push_back(thread);
347 }
348 }
349 // Signal to threads they can start a new run
351}
352
353void G4MTRunManager::InitializeEventLoop(G4int n_event, const char* macroFile,
354 G4int n_select)
355{
356 MTkernel->SetUpDecayChannels();
359
360 if(!fakeRun)
361 {
362 nSeedsUsed = 0;
363 nSeedsFilled = 0;
364
365 if(verboseLevel > 0)
366 {
367 timer->Start();
368 }
369
370 n_select_msg = n_select;
371 if(macroFile != 0)
372 {
373 if(n_select_msg < 0)
374 n_select_msg = n_event;
375 msgText = "/control/execute ";
376 msgText += macroFile;
377 selectMacro = macroFile;
378 }
379 else
380 {
381 n_select_msg = -1;
382 selectMacro = "";
383 }
384
385 // initialize seeds
386 // If user did not implement InitializeSeeds,
387 // use default: nSeedsPerEvent seeds per event
388 if(eventModuloDef > 0)
389 {
392 {
394 if(eventModulo < 1)
395 eventModulo = 1;
397 msgd << "Event modulo is reduced to " << eventModulo
398 << " to distribute events to all threads.";
399 G4Exception("G4MTRunManager::InitializeEventLoop()", "Run10035",
400 JustWarning, msgd);
401 }
402 }
403 else
404 {
406 int(std::sqrt(double(numberOfEventToBeProcessed / nworkers)));
407 if(eventModulo < 1)
408 eventModulo = 1;
409 }
410 if(InitializeSeeds(n_event) == false && n_event > 0)
411 {
414 {
415 case 0:
416 nSeedsFilled = n_event;
417 break;
418 case 1:
420 break;
421 case 2:
422 nSeedsFilled = n_event / eventModulo + 1;
423 break;
424 default:
426 msgd << "Parameter value <" << seedOncePerCommunication
427 << "> of seedOncePerCommunication is invalid. It is reset to 0.";
428 G4Exception("G4MTRunManager::InitializeEventLoop()", "Run10036",
429 JustWarning, msgd);
431 nSeedsFilled = n_event;
432 }
433
434 // Generates up to nSeedsMax seed pairs only.
437 masterRNGEngine->flatArray(nSeedsPerEvent * nSeedsFilled, randDbl);
438 helper->Fill(randDbl, nSeedsFilled, n_event, nSeedsPerEvent);
439 }
440 }
441
442 // Now initialize workers. Check if user defined a WorkerThreadInitialization
444 {
446 }
447
448 // Prepare UI commands for threads
450
451 // Start worker threads
453
454 // We need a barrier here. Wait for workers to start event loop.
455 // This will return only when all workers have started processing events.
457}
458
460{
462 G4int nFill = 0;
464 {
465 case 0:
467 break;
468 case 1:
469 nFill = nworkers - nSeedsFilled;
470 break;
471 case 2:
472 default:
475 1;
476 }
477 // Generates up to nSeedsMax seed pairs only.
478 if(nFill > nSeedsMax)
479 nFill = nSeedsMax;
480 masterRNGEngine->flatArray(nSeedsPerEvent * nFill, randDbl);
481 helper->Refill(randDbl, nFill);
482 nSeedsFilled += nFill;
483 // G4cout<<"helper->Refill() for "<<nFill<<" events."<<G4endl;
484}
485
487{
488 // Wait for all worker threads to have finished the run
489 // i.e. wait for them to return from RunTermination()
490 // This guarantee that userrunaction for workers has been called
491
492 // Wait now for all threads to finish event-loop
494 // Now call base-class methof
497}
498
500{
502 // Call base class stuff...
504
505 masterWorlds.clear();
506 size_t nWorlds =
508 std::vector<G4VPhysicalVolume*>::iterator itrW =
510 for(size_t iWorld = 0; iWorld < nWorlds; iWorld++)
511 {
512 addWorld(iWorld, *itrW);
513 itrW++;
514 }
515}
516
518{
519 userWorkerInitialization = userInit;
520}
521
524{
526}
527
530{
531 userActionInitialization = userInit;
533}
534
536{
538 // Needed for MT, to be moved in kernel
539}
540
542{
544}
545
547{
548 G4RunManager::SetUserAction(userAction);
549 if(userAction)
550 userAction->SetMaster();
551}
552
554 G4VUserPrimaryGeneratorAction* /*userAction*/)
555{
557 "G4MTRunManager::SetUserAction()", "Run0123", FatalException,
558 "For multi-threaded version, define G4VUserPrimaryGeneratorAction in "
559 "G4VUserActionInitialization.");
560}
561
563{
564 G4Exception("G4MTRunManager::SetUserAction()", "Run0124", FatalException,
565 "For multi-threaded version, define G4UserEventAction in "
566 "G4VUserActionInitialization.");
567}
568
570{
571 G4Exception("G4MTRunManager::SetUserAction()", "Run0125", FatalException,
572 "For multi-threaded version, define G4UserStackingAction in "
573 "G4VUserActionInitialization.");
574}
575
577{
578 G4Exception("G4MTRunManager::SetUserAction()", "Run0126", FatalException,
579 "For multi-threaded version, define G4UserTrackingAction in "
580 "G4VUserActionInitialization.");
581}
582
584{
585 G4Exception("G4MTRunManager::SetUserAction()", "Run0127", FatalException,
586 "For multi-threaded version, define G4UserSteppingAction in "
587 "G4VUserActionInitialization.");
588}
589
590void G4MTRunManager::MergeScores(const G4ScoringManager* localScoringManager)
591{
592 G4AutoLock l(&scorerMergerMutex);
593 if(masterScM && localScoringManager)
594 masterScM->Merge(localScoringManager);
595}
596
597void G4MTRunManager::MergeRun(const G4Run* localRun)
598{
599 G4AutoLock l(&runMergerMutex);
600 if(currentRun && localRun)
601 currentRun->Merge(localRun);
602}
603
604G4bool G4MTRunManager::SetUpAnEvent(G4Event* evt, long& s1, long& s2, long& s3,
605 G4bool reseedRequired)
606{
607 G4AutoLock l(&setUpEventMutex);
609 {
611 if(reseedRequired)
612 {
614 G4int idx_rndm = nSeedsPerEvent * nSeedsUsed;
615 s1 = helper->GetSeed(idx_rndm);
616 s2 = helper->GetSeed(idx_rndm + 1);
617 if(nSeedsPerEvent == 3)
618 s3 = helper->GetSeed(idx_rndm + 2);
619 nSeedsUsed++;
621 RefillSeeds();
622 }
624 return true;
625 }
626 return false;
627}
628
630 G4bool reseedRequired)
631{
632 G4AutoLock l(&setUpEventMutex);
634 {
635 G4int nev = eventModulo;
637 {
639 }
641 if(reseedRequired)
642 {
644 G4int nevRnd = nev;
646 nevRnd = 1;
647 for(int i = 0; i < nevRnd; i++)
648 {
649 seedsQueue->push(helper->GetSeed(nSeedsPerEvent * nSeedsUsed));
650 seedsQueue->push(helper->GetSeed(nSeedsPerEvent * nSeedsUsed + 1));
651 if(nSeedsPerEvent == 3)
652 seedsQueue->push(helper->GetSeed(nSeedsPerEvent * nSeedsUsed + 2));
653 nSeedsUsed++;
655 RefillSeeds();
656 }
657 }
659 return nev;
660 }
661 return 0;
662}
663
665{
666 // Force workers to execute (if any) all UI commands left in the stack
668 // Ask workers to exit
670 // finalize profiler before shutting down the threads
672 // Now join threads.
673#ifdef G4MULTITHREADED // protect here to prevent warning in compilation
674 while(!threads.empty())
675 {
676 G4Thread* t = *(threads.begin());
677 threads.pop_front();
679 // G4THREADJOIN(*t);
680 delete t;
681 }
682#endif
683 threads.clear();
684}
685
687{
688 // This method is valid only for GeomClosed or EventProc state
689 G4ApplicationState currentState =
691 if(currentState == G4State_GeomClosed || currentState == G4State_EventProc)
692 {
693 runAborted = true;
694 MTkernel->BroadcastAbortRun(softAbort);
695 }
696 else
697 {
698 G4cerr << "Run is not in progress. AbortRun() ignored." << G4endl;
699 }
700}
701
703{
704 // nothing to do in the master thread
705}
706
708{
712}
713
715{
717}
718
720{
724}
725
727{
729}
730
733{
735 // nextActionRequest is a shared resource, but there is no
736 // data-race thanks to the barrier: all threads are waiting
737 nextActionRequest = newRequest;
739}
740
743{
745 return nextActionRequest;
746}
747
749{
754}
755
757{
759}
761{
762 if(n == 0)
763 {
764 G4Exception("G4MTRunManager::SetPinAffinity", "Run0114", FatalException,
765 "Pin affinity must be >0 or <0.");
766 }
767 pinAffinity = n;
768 return;
769}
G4ApplicationState
@ G4State_EventProc
@ G4State_GeomClosed
@ JustWarning
@ 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
std::queue< G4long > G4SeedsQueue
Definition: G4RNGHelper.hh:133
#define G4MUTEX_INITIALIZER
Definition: G4Threading.hh:85
G4Thread::id G4ThreadId
Definition: G4Threading.hh:286
std::mutex G4Mutex
Definition: G4Threading.hh:81
bool G4bool
Definition: G4Types.hh:86
int G4int
Definition: G4Types.hh:85
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
virtual void flatArray(const int size, double *vect)=0
void SetEventID(G4int i)
Definition: G4Event.hh:80
void ThisWorkerReady()
Definition: G4MTBarrier.cc:40
void ResetCounter()
Definition: G4MTBarrier.cc:90
void Wait()
Definition: G4MTBarrier.cc:53
virtual void WaitForReadyWorkers()
Definition: G4MTBarrier.cc:81
void ReleaseBarrier()
Definition: G4MTBarrier.cc:72
void SetActiveThreads(unsigned int val)
Definition: G4MTBarrier.hh:140
void BroadcastAbortRun(G4bool softAbort)
static G4int SeedOncePerCommunication()
virtual void SetUserAction(G4UserRunAction *userAction)
virtual WorkerActionRequest ThisWorkerWaitForNextAction()
std::map< G4int, G4VPhysicalVolume * > masterWorlds_t
static void SetSeedOncePerCommunication(G4int val)
virtual void AbortEvent()
G4int numberOfEventToBeProcessed
virtual void ProcessOneEvent(G4int i_event)
virtual void TerminateOneEvent()
virtual void rndmSaveThisEvent()
virtual void SetUserInitialization(G4VUserPhysicsList *userPL)
virtual G4bool InitializeSeeds(G4int)
virtual void WaitForReadyWorkers()
G4MTBarrier beginOfEventLoopBarrier
virtual void CreateAndStartWorkers()
virtual void SetNumberOfThreads(G4int n)
virtual ~G4MTRunManager()
virtual void ThisWorkerProcessCommandsStackDone()
virtual G4int SetUpNEvents(G4Event *, G4SeedsQueue *seedsQueue, G4bool reseedRequired=true)
virtual G4bool SetUpAnEvent(G4Event *, long &s1, long &s2, long &s3, G4bool reseedRequired=true)
static void addWorld(G4int counter, G4VPhysicalVolume *w)
virtual void InitializeEventLoop(G4int n_event, const char *macroFile=0, G4int n_select=-1)
virtual void PrepareCommandsStack()
static G4ScoringManager * GetMasterScoringManager()
static G4MTRUN_DLL G4ScoringManager * masterScM
virtual void Initialize()
static G4MTRUN_DLL G4MTRunManager * fMasterRM
virtual void ThisWorkerReady()
static G4MTRunManagerKernel * GetMTMasterRunManagerKernel()
static G4int seedOncePerCommunication
virtual void RunTermination()
static G4MTRUN_DLL masterWorlds_t masterWorlds
virtual size_t GetNumberActiveThreads() const
virtual void ConstructScoringWorlds()
static G4MTRunManager * GetMasterRunManager()
virtual void StoreRNGStatus(const G4String &filenamePrefix)
virtual void WaitForEndEventLoopWorkers()
WorkerActionRequest nextActionRequest
virtual void AbortRun(G4bool softAbort=false)
virtual void RefillSeeds()
virtual void rndmSaveThisRun()
static G4ThreadId masterThreadId
G4MTBarrier processUIBarrier
static G4ThreadId GetMasterThreadId()
void MergeRun(const G4Run *localRun)
G4MTBarrier endOfEventLoopBarrier
G4MTBarrier nextActionRequestBarrier
virtual void TerminateWorkers()
static masterWorlds_t & GetMasterWorlds()
virtual void RequestWorkersProcessCommandsStack()
static G4RunManagerKernel * GetMasterRunManagerKernel()
void MergeScores(const G4ScoringManager *localScoringManager)
virtual void NewActionRequest(WorkerActionRequest newRequest)
void SetPinAffinity(G4int n=1)
std::vector< G4String > GetCommandStack()
virtual void ThisWorkerEndEventLoop()
static void Finalize()
Definition: G4Profiler.cc:331
G4int GetNumberOfStaticAllocators() const
G4UserWorkerInitialization * userWorkerInitialization
virtual void Initialize()
G4Timer * timer
void SetRunIDCounter(G4int i)
G4UserWorkerThreadInitialization * userWorkerThreadInitialization
G4int n_select_msg
G4int numberOfEventProcessed
virtual void BeamOn(G4int n_event, const char *macroFile=0, G4int n_select=-1)
G4RunManagerKernel * kernel
G4int verboseLevel
G4Run * currentRun
G4bool runAborted
G4String msgText
G4String selectMacro
virtual void RunTermination()
G4VUserActionInitialization * userActionInitialization
G4String randomNumberStatusDir
virtual void TerminateEventLoop()
virtual void SetUserAction(G4UserRunAction *userAction)
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
G4bool storeRandomNumberStatus
virtual void ConstructScoringWorlds()
Definition: G4Run.hh:49
G4int GetRunID() const
Definition: G4Run.hh:82
virtual void Merge(const G4Run *)
Definition: G4Run.cc:64
void Merge(const G4ScoringManager *scMan)
static G4ScoringManager * GetScoringManagerIfExist()
const G4ApplicationState & GetCurrentState() const
static G4StateManager * GetStateManager()
static G4TemplateRNGHelper< T > * GetInstance()
Definition: G4RNGHelper.cc:37
virtual const T GetSeed(const G4int &sdId)
Definition: G4RNGHelper.hh:58
void Fill(G4double *dbl, G4int nev, G4int nev_tot, G4int nrpe)
Definition: G4RNGHelper.hh:77
void Refill(G4double *dbl, G4int nev)
Definition: G4RNGHelper.hh:90
void Start()
static G4TransportationManager * GetTransportationManager()
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
size_t GetNoWorlds() const
std::vector< G4String > * GetCommandStack()
Definition: G4UImanager.cc:810
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:485
void SetMasterUIManager(G4bool val)
Definition: G4UImanager.hh:212
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
virtual void SetMaster(G4bool val=true)
virtual G4Thread * CreateAndStartWorker(G4WorkerThread *workerThreadContext)
void SetNumberThreads(G4int numnberThreads)
void SetThreadId(G4int threadId)
G4int G4GetNumberOfCores()
Definition: G4Threading.cc:121