42 #ifdef G4MULTITHREADED
63 #ifdef G4MULTITHREADED
90 G4Random::getTheEngine();
96 if ( dynamic_cast<const CLHEP::HepJamesRandom*>(aNewRNG) ) {
99 if ( dynamic_cast<const CLHEP::RanecuEngine*>(aNewRNG) ) {
102 if ( dynamic_cast<const CLHEP::Ranlux64Engine*>(aNewRNG) ) {
105 if ( dynamic_cast<const CLHEP::MTwistEngine*>(aNewRNG) ) {
108 if ( dynamic_cast<const CLHEP::DualRand*>(aNewRNG) ) {
111 if ( dynamic_cast<const CLHEP::RanluxEngine*>(aNewRNG) ) {
114 if ( dynamic_cast<const CLHEP::RanshiEngine*>(aNewRNG) ) {
119 G4Random::setTheEngine( retRNG );
123 msg<<
" Unknown type of RNG Engine - " <<
G4endl
124 <<
" Can cope only with HepJamesRandom, Ranecu, Ranlux64, MTwistEngine, DualRand, Ranlux or Ranshi."
126 <<
" Cannot clone this type of RNG engine, as required for this thread" <<
G4endl
127 <<
" Aborting " <<
G4endl;
128 G4Exception(
"G4UserWorkerInitializition::SetupRNGEngine()",
static void * StartThread(void *context)
#define G4THREADJOIN(worker)
std::ostringstream G4ExceptionDescription
virtual void SetupRNGEngine(const CLHEP::HepRandomEngine *aRNGEngine) const
G4UserWorkerThreadInitialization()
virtual G4WorkerRunManager * CreateWorkerRunManager() const
#define G4MUTEX_INITIALIZER
#define G4THREADCREATE(worker, func, arg)
virtual ~G4UserWorkerThreadInitialization()
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
virtual G4Thread * CreateAndStartWorker(G4WorkerThread *workerThreadContext)
virtual void JoinWorker(G4Thread *aThread)