30 #if ((defined(G4MULTITHREADED) && !defined(G4USE_STD11)) || \
31 !__has_feature(cxx_thread_local)) || !__has_feature(c_atomic)
32 #define CLANG_NOSTDTLS
36 #if (defined(G4MULTITHREADED) && \
37 (!defined(G4USE_STD11) || (defined(CLANG_NOSTDTLS) || defined(__INTEL_COMPILER))))
39 #include <CLHEP/Random/StaticRandomStates.h>
40 #include <CLHEP/Random/JamesRandom.h>
191 return CLHEP::StaticRandomStates::save(os);
196 return CLHEP::StaticRandomStates::restore(is);
222 static G4ThreadLocal CLHEP::HepJamesRandom *defaultEngine = 0;
223 if (!defaultEngine) {
225 defaultEngine =
new CLHEP::HepJamesRandom;
static G4long getTheSeed()
static CLHEP::HepRandomEngine * getTheEngine()
std::shared_ptr< HepRandom > theGenerator
static G4MTHepRandom * getTheGenerator()
static G4ThreadLocal G4MTHepRandom * theGenerator
std::shared_ptr< HepRandomEngine > theEngine
static G4int createInstance()
static void setTheSeeds(const G4long *seeds, G4int aux=-1)
static void setTheEngine(CLHEP::HepRandomEngine *theNewEngine)
static void saveEngineStatus(const char filename[]="Config.conf")
#define G4MUTEX_INITIALIZER
static void setTheSeed(G4long seed, G4int lux=3)
static std::istream & restoreFullState(std::istream &is)
static std::ostream & saveStaticRandomStates(std::ostream &os)
std::istream & operator>>(std::istream &is, HepAxisAngle &aa)
static std::istream & restoreStaticRandomStates(std::istream &is)
static G4int createInstanceOnce()
static void showEngineStatus()
static std::ostream & saveFullState(std::ostream &os)
static G4ThreadLocal G4int isActive
std::ostream & operator<<(std::ostream &ostr, const G4String &astr)
virtual std::ostream & put(std::ostream &os) const
static void restoreEngineStatus(const char filename[]="Config.conf")
virtual std::istream & get(std::istream &is)
static const G4long * getTheSeeds()
virtual G4double operator()()
void flatArray(const G4int size, G4double *vect)
static G4ThreadLocal CLHEP::HepRandomEngine * theEngine