CLHEP VERSION Reference Documentation
   
CLHEP Home Page     CLHEP Documentation     CLHEP Bug Reports

CLHEP::HepRandomEngine Class Reference

#include <RandomEngine.h>

Inheritance diagram for CLHEP::HepRandomEngine:

CLHEP::DRand48Engine CLHEP::DualRand CLHEP::HepJamesRandom CLHEP::Hurd160Engine CLHEP::Hurd288Engine CLHEP::MTwistEngine CLHEP::NonRandomEngine CLHEP::RandEngine CLHEP::RanecuEngine CLHEP::Ranlux64Engine CLHEP::RanluxEngine CLHEP::RanshiEngine CLHEP::TripleRand List of all members.

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

Author:
<Gabriele.Cosmo@cern.ch>

Definition at line 55 of file RandomEngine.h.


Constructor & Destructor Documentation

CLHEP::HepRandomEngine::HepRandomEngine (  ) 

Definition at line 26 of file RandomEngine.cc.

CLHEP::HepRandomEngine::~HepRandomEngine (  )  [virtual]

Definition at line 31 of file RandomEngine.cc.


Member Function Documentation

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

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

Definition at line 67 of file RandomEngine.cc.

bool CLHEP::HepRandomEngine::checkFile ( std::istream &  file,
const std::string &  filename,
const std::string &  classname,
const std::string &  methodname 
) [static, protected]

Definition at line 46 of file RandomEngine.cc.

Referenced by CLHEP::TripleRand::restoreStatus(), CLHEP::RanshiEngine::restoreStatus(), CLHEP::RanluxEngine::restoreStatus(), CLHEP::Ranlux64Engine::restoreStatus(), CLHEP::RanecuEngine::restoreStatus(), CLHEP::RandEngine::restoreStatus(), CLHEP::MTwistEngine::restoreStatus(), CLHEP::HepJamesRandom::restoreStatus(), CLHEP::Hurd288Engine::restoreStatus(), CLHEP::Hurd160Engine::restoreStatus(), CLHEP::DualRand::restoreStatus(), and CLHEP::DRand48Engine::restoreStatus().

static double CLHEP::HepRandomEngine::exponent_bit_32 (  )  [inline, static, protected]

Referenced by CLHEP::RanluxEngine::operator unsigned int(), operator unsigned int(), and CLHEP::HepJamesRandom::operator unsigned int().

virtual double CLHEP::HepRandomEngine::flat (  )  [pure virtual]

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

Referenced by anonymousRestoreStatics(), operator double(), operator float(), operator unsigned int(), CLHEP::RandStudentT::shoot(), CLHEP::RandPoisson::shoot(), CLHEP::RandGauss::shoot(), CLHEP::RandFlat::shoot(), and CLHEP::RandBreitWigner::shoot().

virtual void CLHEP::HepRandomEngine::flatArray ( const int  size,
double *  vect 
) [pure virtual]

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

Referenced by CLHEP::RandFlat::shootArray().

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

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

Definition at line 81 of file RandomEngine.cc.

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

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

Definition at line 62 of file RandomEngine.cc.

Referenced by CLHEP::operator>>().

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

Definition at line 114 of file RandomEngine.h.

References theSeed.

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

Definition at line 117 of file RandomEngine.h.

References theSeeds.

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

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

Definition at line 85 of file RandomEngine.cc.

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

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

Definition at line 71 of file RandomEngine.cc.

static double CLHEP::HepRandomEngine::mantissa_bit_12 (  )  [inline, static, protected]

Referenced by CLHEP::RanluxEngine::flat(), and CLHEP::RanluxEngine::flatArray().

static double CLHEP::HepRandomEngine::mantissa_bit_24 (  )  [inline, static, protected]

Referenced by CLHEP::RanluxEngine::flat(), CLHEP::RanluxEngine::flatArray(), CLHEP::RanluxEngine::getState(), CLHEP::RanluxEngine::put(), CLHEP::RanluxEngine::setSeed(), and CLHEP::RanluxEngine::setSeeds().

static double CLHEP::HepRandomEngine::mantissa_bit_32 (  )  [inline, static, protected]

virtual std::string CLHEP::HepRandomEngine::name (  )  const [pure virtual]

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

Referenced by anonymousRestoreStatics(), anonymousRestoreStatics1(), checkRandGeneralDistribution(), and CLHEP::StaticRandomStates::restore().

static double CLHEP::HepRandomEngine::nearlyTwoToMinus_54 (  )  [inline, static, protected]

Referenced by CLHEP::TripleRand::flat(), CLHEP::RanshiEngine::flat(), CLHEP::MTwistEngine::flat(), CLHEP::Hurd288Engine::flat(), CLHEP::Hurd160Engine::flat(), CLHEP::DualRand::flat(), CLHEP::TripleRand::operator float(), and CLHEP::DualRand::operator float().

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

Definition at line 95 of file RandomEngine.cc.

References CLHEP::EngineFactory::newEngine().

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

Definition at line 90 of file RandomEngine.cc.

References CLHEP::EngineFactory::newEngine().

Referenced by CLHEP::StaticRandomStates::restore().

CLHEP::HepRandomEngine::operator double (  )  [virtual]

Definition at line 33 of file RandomEngine.cc.

References flat().

CLHEP::HepRandomEngine::operator float (  )  [virtual]

Reimplemented in CLHEP::DualRand, CLHEP::Hurd160Engine, CLHEP::Hurd288Engine, CLHEP::MTwistEngine, CLHEP::RanshiEngine, and CLHEP::TripleRand.

Definition at line 37 of file RandomEngine.cc.

References flat().

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

Reimplemented in CLHEP::DualRand, CLHEP::Hurd160Engine, CLHEP::Hurd288Engine, CLHEP::HepJamesRandom, CLHEP::MTwistEngine, CLHEP::RandEngine, CLHEP::RanecuEngine, CLHEP::RanluxEngine, CLHEP::RanshiEngine, and CLHEP::TripleRand.

Definition at line 41 of file RandomEngine.cc.

References exponent_bit_32(), and flat().

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

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

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

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

Definition at line 76 of file RandomEngine.cc.

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

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

Definition at line 58 of file RandomEngine.cc.

Referenced by CLHEP::operator<<().

virtual void CLHEP::HepRandomEngine::restoreStatus ( const char  filename[] = "Config.conf"  )  [pure virtual]

Implemented in CLHEP::DRand48Engine, CLHEP::DualRand, CLHEP::Hurd160Engine, CLHEP::Hurd288Engine, CLHEP::HepJamesRandom, CLHEP::MTwistEngine, CLHEP::RandEngine, CLHEP::RanecuEngine, CLHEP::Ranlux64Engine, CLHEP::RanluxEngine, CLHEP::RanshiEngine, and CLHEP::TripleRand.

Referenced by CLHEP::RandGauss::restoreEngineStatus(), and CLHEP::RandFlat::restoreEngineStatus().

virtual void CLHEP::HepRandomEngine::saveStatus ( const char  filename[] = "Config.conf"  )  const [pure virtual]

Implemented in CLHEP::DRand48Engine, CLHEP::DualRand, CLHEP::Hurd160Engine, CLHEP::Hurd288Engine, CLHEP::HepJamesRandom, CLHEP::MTwistEngine, CLHEP::RandEngine, CLHEP::RanecuEngine, CLHEP::Ranlux64Engine, CLHEP::RanluxEngine, CLHEP::RanshiEngine, and CLHEP::TripleRand.

Referenced by CLHEP::RandGauss::saveEngineStatus(), and CLHEP::RandFlat::saveEngineStatus().

virtual void CLHEP::HepRandomEngine::setSeed ( long  seed,
int   
) [pure virtual]

Implemented in CLHEP::DRand48Engine, CLHEP::DualRand, CLHEP::Hurd160Engine, CLHEP::Hurd288Engine, CLHEP::HepJamesRandom, CLHEP::MTwistEngine, CLHEP::RandEngine, CLHEP::RanecuEngine, CLHEP::Ranlux64Engine, CLHEP::RanluxEngine, CLHEP::RanshiEngine, and CLHEP::TripleRand.

virtual void CLHEP::HepRandomEngine::setSeeds ( const long *  seeds,
int   
) [pure virtual]

Implemented in CLHEP::DRand48Engine, CLHEP::DualRand, CLHEP::Hurd160Engine, CLHEP::Hurd288Engine, CLHEP::HepJamesRandom, CLHEP::MTwistEngine, CLHEP::RandEngine, CLHEP::RanecuEngine, CLHEP::Ranlux64Engine, CLHEP::RanluxEngine, CLHEP::RanshiEngine, and CLHEP::TripleRand.

virtual void CLHEP::HepRandomEngine::showStatus (  )  const [pure virtual]

Implemented in CLHEP::DRand48Engine, CLHEP::DualRand, CLHEP::Hurd160Engine, CLHEP::Hurd288Engine, CLHEP::HepJamesRandom, CLHEP::MTwistEngine, CLHEP::RandEngine, CLHEP::RanecuEngine, CLHEP::Ranlux64Engine, CLHEP::RanluxEngine, CLHEP::RanshiEngine, and CLHEP::TripleRand.

static double CLHEP::HepRandomEngine::twoToMinus_32 (  )  [inline, static, protected]

Referenced by CLHEP::TripleRand::flat(), CLHEP::RanshiEngine::flat(), CLHEP::MTwistEngine::flat(), CLHEP::Hurd288Engine::flat(), CLHEP::Hurd160Engine::flat(), CLHEP::DualRand::flat(), CLHEP::TripleRand::operator float(), CLHEP::RanshiEngine::operator float(), CLHEP::MTwistEngine::operator float(), CLHEP::Hurd288Engine::operator float(), CLHEP::Hurd160Engine::operator float(), CLHEP::DualRand::operator float(), CLHEP::Ranlux64Engine::setSeed(), and CLHEP::Ranlux64Engine::setSeeds().

static double CLHEP::HepRandomEngine::twoToMinus_48 (  )  [inline, static, protected]

Referenced by CLHEP::Ranlux64Engine::setSeed(), and CLHEP::Ranlux64Engine::setSeeds().

static double CLHEP::HepRandomEngine::twoToMinus_49 (  )  [inline, static, protected]

Referenced by CLHEP::Ranlux64Engine::flat().

static double CLHEP::HepRandomEngine::twoToMinus_53 (  )  [inline, static, protected]

Referenced by CLHEP::TripleRand::flat(), CLHEP::RanshiEngine::flat(), CLHEP::MTwistEngine::flat(), CLHEP::Hurd288Engine::flat(), CLHEP::Hurd160Engine::flat(), and CLHEP::DualRand::flat().


Member Data Documentation

long CLHEP::HepRandomEngine::theSeed [protected]

Definition at line 144 of file RandomEngine.h.

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

const long* CLHEP::HepRandomEngine::theSeeds [protected]

Definition at line 145 of file RandomEngine.h.

Referenced by getSeeds(), CLHEP::RanecuEngine::RanecuEngine(), CLHEP::RanecuEngine::setIndex(), CLHEP::RanecuEngine::setSeed(), CLHEP::TripleRand::setSeeds(), CLHEP::RanshiEngine::setSeeds(), CLHEP::RanluxEngine::setSeeds(), CLHEP::Ranlux64Engine::setSeeds(), CLHEP::RanecuEngine::setSeeds(), CLHEP::RandEngine::setSeeds(), CLHEP::MTwistEngine::setSeeds(), CLHEP::HepJamesRandom::setSeeds(), CLHEP::Hurd288Engine::setSeeds(), CLHEP::Hurd160Engine::setSeeds(), CLHEP::DualRand::setSeeds(), and CLHEP::DRand48Engine::setSeeds().


The documentation for this class was generated from the following files:
Generated on 15 Nov 2012 for CLHEP by  doxygen 1.4.7