42 #ifdef G4MULTITHREADED
59 #ifdef G4MULTITHREADED
86 G4Random::getTheEngine();
91 if ( dynamic_cast<const CLHEP::HepJamesRandom*>(aNewRNG) ) {
94 if ( dynamic_cast<const CLHEP::MixMaxRng*>(aNewRNG) ) {
97 if ( dynamic_cast<const CLHEP::RanecuEngine*>(aNewRNG) ) {
100 if ( dynamic_cast<const CLHEP::Ranlux64Engine*>(aNewRNG) ) {
103 if ( dynamic_cast<const CLHEP::MTwistEngine*>(aNewRNG) ) {
106 if ( dynamic_cast<const CLHEP::DualRand*>(aNewRNG) ) {
109 if ( dynamic_cast<const CLHEP::RanluxEngine*>(aNewRNG) ) {
112 if ( dynamic_cast<const CLHEP::RanshiEngine*>(aNewRNG) ) {
117 G4Random::setTheEngine( retRNG );
121 msg<<
" Unknown type of RNG Engine - " <<
G4endl
122 <<
" Can cope only with HepJamesRandom, MixMaxRng, Ranecu, Ranlux64, MTwistEngine, DualRand, Ranlux or Ranshi."
124 <<
" Cannot clone this type of RNG engine, as required for this thread" <<
G4endl
125 <<
" Aborting " <<
G4endl;
126 G4Exception(
"G4UserWorkerInitializition::SetupRNGEngine()",
virtual void SetupRNGEngine(const CLHEP::HepRandomEngine *aRNGEngine) const
std::ostringstream G4ExceptionDescription
G4UserWorkerThreadInitialization()
virtual G4Thread * CreateAndStartWorker(G4WorkerThread *workerThreadContext)
virtual void JoinWorker(G4Thread *aThread)
#define G4MUTEX_INITIALIZER
virtual ~G4UserWorkerThreadInitialization()
static void StartThread(G4WorkerThread *context)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
#define G4THREADJOIN(worker)
virtual G4WorkerRunManager * CreateWorkerRunManager() const
void G4THREADCREATE(_Worker *&worker, _Func func, _Args...args)