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

#include <RandBit.h>

+ Inheritance diagram for CLHEP::RandBit:

Public Member Functions

 RandBit (HepRandomEngine &anEngine)
 
 RandBit (HepRandomEngine &anEngine, double width)
 
 RandBit (HepRandomEngine &anEngine, double a, double b)
 
 RandBit (HepRandomEngine *anEngine)
 
 RandBit (HepRandomEngine *anEngine, double width)
 
 RandBit (HepRandomEngine *anEngine, double a, double b)
 
virtual ~RandBit ()
 
int fireBit ()
 
std::ostream & put (std::ostream &os) const
 
std::istream & get (std::istream &is)
 
std::string name () const
 
- Public Member Functions inherited from CLHEP::RandFlat
 RandFlat (HepRandomEngine &anEngine)
 
 RandFlat (HepRandomEngine &anEngine, double width)
 
 RandFlat (HepRandomEngine &anEngine, double a, double b)
 
 RandFlat (HepRandomEngine *anEngine)
 
 RandFlat (HepRandomEngine *anEngine, double width)
 
 RandFlat (HepRandomEngine *anEngine, double a, double b)
 
virtual ~RandFlat ()
 
double fire ()
 
double fire (double width)
 
double fire (double a, double b)
 
long fireInt (long n)
 
long fireInt (long a1, long n)
 
int fireBit ()
 
void fireArray (const int size, double *vect)
 
void fireArray (const int size, double *vect, double lx, double dx)
 
double operator() ()
 
double operator() (double width)
 
double operator() (double a, double b)
 
std::ostream & put (std::ostream &os) const
 
std::istream & get (std::istream &is)
 
std::string name () const
 
HepRandomEngineengine ()
 
- Public Member Functions inherited from CLHEP::HepRandom
 HepRandom ()
 
 HepRandom (long seed)
 
 HepRandom (HepRandomEngine &algorithm)
 
 HepRandom (HepRandomEngine *algorithm)
 
virtual ~HepRandom ()
 
double flat ()
 
void flatArray (const int size, double *vect)
 
double flat (HepRandomEngine *theNewEngine)
 
void flatArray (HepRandomEngine *theNewEngine, const int size, double *vect)
 
virtual double operator() ()
 
virtual std::string name () const
 
virtual HepRandomEngineengine ()
 
virtual std::ostream & put (std::ostream &os) const
 
virtual std::istream & get (std::istream &is)
 

Static Public Member Functions

static int shootBit ()
 
static int shootBit (HepRandomEngine *)
 
static std::string distributionName ()
 
static std::ostream & saveFullState (std::ostream &os)
 
static std::istream & restoreFullState (std::istream &is)
 
static std::ostream & saveDistState (std::ostream &os)
 
static std::istream & restoreDistState (std::istream &is)
 
- Static Public Member Functions inherited from CLHEP::RandFlat
static double shoot ()
 
static double shoot (double width)
 
static double shoot (double a, double b)
 
static long shootInt (long n)
 
static long shootInt (long a1, long n)
 
static int shootBit ()
 
static void shootArray (const int size, double *vect)
 
static void shootArray (const int size, double *vect, double lx, double dx)
 
static double shoot (HepRandomEngine *anEngine)
 
static double shoot (HepRandomEngine *anEngine, double width)
 
static double shoot (HepRandomEngine *anEngine, double a, double b)
 
static long shootInt (HepRandomEngine *anEngine, long n)
 
static long shootInt (HepRandomEngine *anEngine, long a1, long n)
 
static int shootBit (HepRandomEngine *)
 
static void shootArray (HepRandomEngine *anEngine, const int size, double *vect)
 
static void shootArray (HepRandomEngine *anEngine, const int size, double *vect, double lx, double dx)
 
static std::string distributionName ()
 
static void saveEngineStatus (const char filename[]="Config.conf")
 
static void restoreEngineStatus (const char filename[]="Config.conf")
 
static std::ostream & saveFullState (std::ostream &os)
 
static std::istream & restoreFullState (std::istream &is)
 
static std::ostream & saveDistState (std::ostream &os)
 
static std::istream & restoreDistState (std::istream &is)
 
- Static Public Member Functions inherited from CLHEP::HepRandom
static void setTheSeed (long seed, int lxr=3)
 
static long getTheSeed ()
 
static void setTheSeeds (const long *seeds, int aux=-1)
 
static const long * getTheSeeds ()
 
static void getTheTableSeeds (long *seeds, int index)
 
static HepRandomgetTheGenerator ()
 
static void setTheEngine (HepRandomEngine *theNewEngine)
 
static HepRandomEnginegetTheEngine ()
 
static void saveEngineStatus (const char filename[]="Config.conf")
 
static void restoreEngineStatus (const char filename[]="Config.conf")
 
static std::ostream & saveFullState (std::ostream &os)
 
static std::istream & restoreFullState (std::istream &is)
 
static std::ostream & saveDistState (std::ostream &os)
 
static std::istream & restoreDistState (std::istream &is)
 
static std::ostream & saveStaticRandomStates (std::ostream &os)
 
static std::istream & restoreStaticRandomStates (std::istream &is)
 
static void showEngineStatus ()
 
static int createInstance ()
 
static std::string distributionName ()
 

Additional Inherited Members

- Static Protected Attributes inherited from CLHEP::HepRandom
static const long seedTable [215][2]
 

Detailed Description

Author

Definition at line 40 of file RandBit.h.

Constructor & Destructor Documentation

◆ RandBit() [1/6]

CLHEP::RandBit::RandBit ( HepRandomEngine anEngine)
inline

◆ RandBit() [2/6]

CLHEP::RandBit::RandBit ( HepRandomEngine anEngine,
double  width 
)
inline

◆ RandBit() [3/6]

CLHEP::RandBit::RandBit ( HepRandomEngine anEngine,
double  a,
double  b 
)
inline

◆ RandBit() [4/6]

CLHEP::RandBit::RandBit ( HepRandomEngine anEngine)
inline

◆ RandBit() [5/6]

CLHEP::RandBit::RandBit ( HepRandomEngine anEngine,
double  width 
)
inline

◆ RandBit() [6/6]

CLHEP::RandBit::RandBit ( HepRandomEngine anEngine,
double  a,
double  b 
)
inline

◆ ~RandBit()

CLHEP::RandBit::~RandBit ( )
virtual

Definition at line 26 of file RandBit.cc.

26 {
27}

Member Function Documentation

◆ distributionName()

static std::string CLHEP::RandBit::distributionName ( )
inlinestatic

Definition at line 81 of file RandBit.h.

81{return "RandBit";}

◆ fireBit()

int CLHEP::RandBit::fireBit ( )
inline

Referenced by main().

◆ get()

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

Reimplemented from CLHEP::HepRandom.

Definition at line 35 of file RandBit.cc.

35 {
36 std::string inName;
37 is >> inName;
38 if (inName != name()) {
39 is.clear(std::ios::badbit | is.rdstate());
40 std::cerr << "Mismatch when expecting to read state of a "
41 << name() << " distribution\n"
42 << "Name found was " << inName
43 << "\nistream is left in the badbit state\n";
44 return is;
45 }
46 RandFlat::get(is);
47 return is;
48}
std::string name() const
Definition: RandBit.cc:24
std::istream & get(std::istream &is)
Definition: RandFlat.cc:190

◆ name()

std::string CLHEP::RandBit::name ( ) const
virtual

Reimplemented from CLHEP::HepRandom.

Definition at line 24 of file RandBit.cc.

24{return "RandBit";}

Referenced by get(), and put().

◆ put()

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

Reimplemented from CLHEP::HepRandom.

Definition at line 29 of file RandBit.cc.

29 {
30 os << " " << name() << "\n";
31 RandFlat::put(os);
32 return os;
33}
std::ostream & put(std::ostream &os) const
Definition: RandFlat.cc:159

◆ restoreDistState()

static std::istream & CLHEP::RandBit::restoreDistState ( std::istream &  is)
inlinestatic

Definition at line 96 of file RandBit.h.

98 {return RandFlat::restoreDistState(is);}
static std::istream & restoreDistState(std::istream &is)
Definition: RandFlat.cc:237

◆ restoreFullState()

static std::istream & CLHEP::RandBit::restoreFullState ( std::istream &  is)
inlinestatic

Definition at line 88 of file RandBit.h.

90 {return RandFlat::restoreFullState(is);}
static std::istream & restoreFullState(std::istream &is)
Definition: RandFlat.cc:268

◆ saveDistState()

static std::ostream & CLHEP::RandBit::saveDistState ( std::ostream &  os)
inlinestatic

Definition at line 92 of file RandBit.h.

94 {return RandFlat::saveDistState(os);}
static std::ostream & saveDistState(std::ostream &os)
Definition: RandFlat.cc:228

◆ saveFullState()

static std::ostream & CLHEP::RandBit::saveFullState ( std::ostream &  os)
inlinestatic

Definition at line 84 of file RandBit.h.

86 {return RandFlat::saveFullState(os);}
static std::ostream & saveFullState(std::ostream &os)
Definition: RandFlat.cc:262

◆ shootBit() [1/2]

static int CLHEP::RandBit::shootBit ( )
inlinestatic

◆ shootBit() [2/2]

static int CLHEP::RandBit::shootBit ( HepRandomEngine )
inlinestatic

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