CLHEP 2.4.6.4
C++ Class Library for High Energy Physics
Loading...
Searching...
No Matches
CLHEP::HepRandomEngine Class Referenceabstract

#include <RandomEngine.h>

+ Inheritance diagram for CLHEP::HepRandomEngine:

Public Member Functions

 HepRandomEngine ()
 
virtual ~HepRandomEngine ()
 
bool operator== (const HepRandomEngine &engine)
 
bool operator!= (const HepRandomEngine &engine)
 
virtual double flat ()=0
 
virtual void flatArray (const int size, double *vect)=0
 
virtual void setSeed (long seed, int)=0
 
virtual void setSeeds (const long *seeds, int)=0
 
virtual void saveStatus (const char filename[]="Config.conf") const =0
 
virtual void restoreStatus (const char filename[]="Config.conf")=0
 
virtual void showStatus () const =0
 
virtual std::string name () const =0
 
virtual std::ostream & put (std::ostream &os) const
 
virtual std::istream & get (std::istream &is)
 
virtual std::istream & getState (std::istream &is)
 
virtual std::vector< unsigned long > put () const
 
virtual bool get (const std::vector< unsigned long > &v)
 
virtual bool getState (const std::vector< unsigned long > &v)
 
long getSeed () const
 
const long * getSeeds () const
 
virtual operator double ()
 
virtual operator float ()
 
virtual operator unsigned int ()
 

Static Public Member Functions

static std::string beginTag ()
 
static HepRandomEnginenewEngine (std::istream &is)
 
static HepRandomEnginenewEngine (const std::vector< unsigned long > &v)
 

Static Protected Member Functions

static double exponent_bit_32 ()
 
static double mantissa_bit_12 ()
 
static double mantissa_bit_24 ()
 
static double mantissa_bit_32 ()
 
static double twoToMinus_32 ()
 
static double twoToMinus_48 ()
 
static double twoToMinus_49 ()
 
static double twoToMinus_53 ()
 
static double nearlyTwoToMinus_54 ()
 
static bool checkFile (std::istream &file, const std::string &filename, const std::string &classname, const std::string &methodname)
 

Protected Attributes

long theSeed
 
const long * theSeeds
 

Detailed Description

Constructor & Destructor Documentation

◆ HepRandomEngine()

CLHEP::HepRandomEngine::HepRandomEngine ( )

Definition at line 29 of file RandomEngine.cc.

30: theSeed (19780503L)
32{ }

◆ ~HepRandomEngine()

CLHEP::HepRandomEngine::~HepRandomEngine ( )
virtual

Definition at line 34 of file RandomEngine.cc.

34{}

Member Function Documentation

◆ beginTag()

std::string CLHEP::HepRandomEngine::beginTag ( )
static

Definition at line 70 of file RandomEngine.cc.

70 {
71 return "HepRandomEngine-begin";
72}

◆ checkFile()

bool CLHEP::HepRandomEngine::checkFile ( std::istream &  file,
const std::string &  filename,
const std::string &  classname,
const std::string &  methodname 
)
staticprotected

◆ exponent_bit_32()

static double CLHEP::HepRandomEngine::exponent_bit_32 ( )
inlinestaticprotected

◆ flat()

◆ flatArray()

◆ get() [1/2]

bool CLHEP::HepRandomEngine::get ( const std::vector< unsigned long > &  v)
virtual

◆ get() [2/2]

std::istream & CLHEP::HepRandomEngine::get ( std::istream &  is)
virtual

◆ getSeed()

long CLHEP::HepRandomEngine::getSeed ( ) const
inline

Definition at line 114 of file RandomEngine.h.

114{ return theSeed; }

◆ getSeeds()

const long * CLHEP::HepRandomEngine::getSeeds ( ) const
inline

Definition at line 117 of file RandomEngine.h.

117{ return theSeeds; }

◆ getState() [1/2]

bool CLHEP::HepRandomEngine::getState ( const std::vector< unsigned long > &  v)
virtual

◆ getState() [2/2]

std::istream & CLHEP::HepRandomEngine::getState ( std::istream &  is)
virtual

◆ mantissa_bit_12()

static double CLHEP::HepRandomEngine::mantissa_bit_12 ( )
inlinestaticprotected

◆ mantissa_bit_24()

◆ mantissa_bit_32()

static double CLHEP::HepRandomEngine::mantissa_bit_32 ( )
inlinestaticprotected

◆ name()

◆ nearlyTwoToMinus_54()

◆ newEngine() [1/2]

HepRandomEngine * CLHEP::HepRandomEngine::newEngine ( const std::vector< unsigned long > &  v)
static

Definition at line 98 of file RandomEngine.cc.

98 {
100}
static HepRandomEngine * newEngine(std::istream &is)

◆ newEngine() [2/2]

HepRandomEngine * CLHEP::HepRandomEngine::newEngine ( std::istream &  is)
static

Definition at line 93 of file RandomEngine.cc.

93 {
94 return EngineFactory::newEngine(is);
95}

Referenced by anonymousRestore2(), CLHEP::StaticRandomStates::restore(), and vectorRestore2().

◆ operator double()

◆ operator float()

◆ operator unsigned int()

CLHEP::HepRandomEngine::operator unsigned int ( )
virtual

◆ operator!=()

bool CLHEP::HepRandomEngine::operator!= ( const HepRandomEngine engine)
inline

◆ operator==()

bool CLHEP::HepRandomEngine::operator== ( const HepRandomEngine engine)
inline

◆ put() [1/2]

std::vector< unsigned long > CLHEP::HepRandomEngine::put ( ) const
virtual

Reimplemented in CLHEP::DRand48Engine, CLHEP::DualRand, CLHEP::Hurd160Engine, CLHEP::Hurd288Engine, CLHEP::HepJamesRandom, CLHEP::MixMaxRng, CLHEP::MTwistEngine, CLHEP::NonRandomEngine, CLHEP::RandEngine, CLHEP::RanecuEngine, CLHEP::Ranlux64Engine, CLHEP::RanluxEngine, CLHEP::RanshiEngine, CLHEP::TripleRand, and CLHEP::RanluxppEngine.

Definition at line 79 of file RandomEngine.cc.

79 {
80 std::cerr << "v=HepRandomEngine::put() called -- no data!\n";
81 std::vector<unsigned long> v;
82 return v;
83}

◆ put() [2/2]

std::ostream & CLHEP::HepRandomEngine::put ( std::ostream &  os) const
virtual

◆ restoreStatus()

◆ saveStatus()

◆ setSeed()

◆ setSeeds()

◆ showStatus()

◆ twoToMinus_32()

◆ twoToMinus_48()

static double CLHEP::HepRandomEngine::twoToMinus_48 ( )
inlinestaticprotected

◆ twoToMinus_49()

static double CLHEP::HepRandomEngine::twoToMinus_49 ( )
inlinestaticprotected

◆ twoToMinus_53()

Member Data Documentation

◆ theSeed

long CLHEP::HepRandomEngine::theSeed
protected

Definition at line 144 of file RandomEngine.h.

Referenced by CLHEP::DRand48Engine::DRand48Engine(), CLHEP::DualRand::DualRand(), getSeed(), CLHEP::DRand48Engine::getState(), CLHEP::DualRand::getState(), CLHEP::Hurd160Engine::getState(), CLHEP::Hurd288Engine::getState(), CLHEP::HepJamesRandom::getState(), CLHEP::MixMaxRng::getState(), CLHEP::MTwistEngine::getState(), CLHEP::RandEngine::getState(), CLHEP::RanecuEngine::getState(), CLHEP::Ranlux64Engine::getState(), CLHEP::RanluxEngine::getState(), CLHEP::RanshiEngine::getState(), CLHEP::TripleRand::getState(), CLHEP::HepJamesRandom::HepJamesRandom(), CLHEP::MixMaxRng::MixMaxRng(), CLHEP::DRand48Engine::put(), CLHEP::DualRand::put(), CLHEP::Hurd160Engine::put(), CLHEP::Hurd288Engine::put(), CLHEP::HepJamesRandom::put(), CLHEP::MixMaxRng::put(), CLHEP::MTwistEngine::put(), CLHEP::RandEngine::put(), CLHEP::RanecuEngine::put(), CLHEP::Ranlux64Engine::put(), CLHEP::RanluxEngine::put(), CLHEP::RanshiEngine::put(), CLHEP::TripleRand::put(), CLHEP::RandEngine::RandEngine(), CLHEP::RanecuEngine::RanecuEngine(), CLHEP::RanluxEngine::RanluxEngine(), CLHEP::RanluxppEngine::RanluxppEngine(), CLHEP::RanshiEngine::RanshiEngine(), CLHEP::DRand48Engine::restoreStatus(), CLHEP::DualRand::restoreStatus(), CLHEP::Hurd160Engine::restoreStatus(), CLHEP::Hurd288Engine::restoreStatus(), CLHEP::HepJamesRandom::restoreStatus(), CLHEP::MTwistEngine::restoreStatus(), CLHEP::RandEngine::restoreStatus(), CLHEP::RanecuEngine::restoreStatus(), CLHEP::RanluxEngine::restoreStatus(), CLHEP::Ranlux64Engine::restoreStatus(), CLHEP::RanshiEngine::restoreStatus(), CLHEP::TripleRand::restoreStatus(), CLHEP::DRand48Engine::saveStatus(), CLHEP::DualRand::saveStatus(), CLHEP::Hurd160Engine::saveStatus(), CLHEP::Hurd288Engine::saveStatus(), CLHEP::HepJamesRandom::saveStatus(), CLHEP::MTwistEngine::saveStatus(), CLHEP::RandEngine::saveStatus(), CLHEP::RanecuEngine::saveStatus(), CLHEP::RanluxEngine::saveStatus(), CLHEP::Ranlux64Engine::saveStatus(), CLHEP::RanshiEngine::saveStatus(), CLHEP::TripleRand::saveStatus(), CLHEP::RanecuEngine::setIndex(), CLHEP::RanecuEngine::setSeed(), CLHEP::DRand48Engine::setSeed(), CLHEP::HepJamesRandom::setSeed(), CLHEP::MixMaxRng::setSeed(), CLHEP::RandEngine::setSeed(), CLHEP::RanluxppEngine::setSeed(), CLHEP::Ranlux64Engine::setSeed(), CLHEP::RanluxEngine::setSeed(), CLHEP::DualRand::setSeed(), CLHEP::Hurd160Engine::setSeed(), CLHEP::Hurd288Engine::setSeed(), CLHEP::MTwistEngine::setSeed(), CLHEP::TripleRand::setSeed(), CLHEP::RanecuEngine::setSeeds(), CLHEP::Ranlux64Engine::setSeeds(), CLHEP::RanluxEngine::setSeeds(), CLHEP::MixMaxRng::setSeeds(), CLHEP::RanshiEngine::setSeeds(), CLHEP::DRand48Engine::showStatus(), CLHEP::DualRand::showStatus(), CLHEP::Hurd160Engine::showStatus(), CLHEP::Hurd288Engine::showStatus(), CLHEP::HepJamesRandom::showStatus(), CLHEP::MTwistEngine::showStatus(), CLHEP::RandEngine::showStatus(), CLHEP::RanecuEngine::showStatus(), CLHEP::Ranlux64Engine::showStatus(), CLHEP::RanluxEngine::showStatus(), CLHEP::RanshiEngine::showStatus(), CLHEP::TripleRand::showStatus(), and CLHEP::TripleRand::TripleRand().

◆ theSeeds


The documentation for this class was generated from the following files: