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

#include <RandPoissonT.h>

+ Inheritance diagram for CLHEP::RandPoissonT:

Public Member Functions

 RandPoissonT (HepRandomEngine &anEngine, double mean=1.0)
 
 RandPoissonT (HepRandomEngine *anEngine, double mean=1.0)
 
virtual ~RandPoissonT ()
 
std::ostream & put (std::ostream &os) const
 
std::istream & get (std::istream &is)
 
long fire ()
 
long fire (double m)
 
void fireArray (const int size, long *vect)
 
void fireArray (const int size, long *vect, double mean)
 
double operator() ()
 
double operator() (double mean)
 
std::string name () const
 
HepRandomEngineengine ()
 
- Public Member Functions inherited from CLHEP::RandPoisson
 RandPoisson (HepRandomEngine &anEngine, double a1=1.0)
 
 RandPoisson (HepRandomEngine *anEngine, double a1=1.0)
 
virtual ~RandPoisson ()
 
std::ostream & put (std::ostream &os) const
 
std::istream & get (std::istream &is)
 
long fire ()
 
long fire (double mean)
 
void fireArray (const int size, long *vect)
 
void fireArray (const int size, long *vect, double mean)
 
double operator() ()
 
double operator() (double mean)
 
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 long shoot (double mean=1.0)
 
static void shootArray (const int size, long *vect, double mean=1.0)
 
static long shoot (HepRandomEngine *anEngine, double mean=1.0)
 
static void shootArray (HepRandomEngine *anEngine, const int size, long *vect, double mean=1.0)
 
static std::string distributionName ()
 
- Static Public Member Functions inherited from CLHEP::RandPoisson
static long shoot (double mean=1.0)
 
static void shootArray (const int size, long *vect, double mean=1.0)
 
static long shoot (HepRandomEngine *anEngine, double mean=1.0)
 
static void shootArray (HepRandomEngine *anEngine, const int size, long *vect, double mean=1.0)
 
static std::string distributionName ()
 
- 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

- Protected Member Functions inherited from CLHEP::RandPoisson
HepRandomEnginegetLocalEngine ()
 
- Static Protected Member Functions inherited from CLHEP::RandPoisson
static double getOldMean ()
 
static double getMaxMean ()
 
static void setOldMean (double val)
 
static doublegetPStatus ()
 
static void setPStatus (double sq, double alxm, double g1)
 
- Protected Attributes inherited from CLHEP::RandPoisson
double meanMax
 
double defaultMean
 
- Static Protected Attributes inherited from CLHEP::HepRandom
static const long seedTable [215][2]
 

Detailed Description

Author

Definition at line 41 of file RandPoissonT.h.

Constructor & Destructor Documentation

◆ RandPoissonT() [1/2]

CLHEP::RandPoissonT::RandPoissonT ( HepRandomEngine anEngine,
double  mean = 1.0 
)

Definition at line 45 of file RandPoissonT.cc.

46: RandPoisson(anEngine, m)
47{}
RandPoisson(HepRandomEngine &anEngine, double a1=1.0)

◆ RandPoissonT() [2/2]

CLHEP::RandPoissonT::RandPoissonT ( HepRandomEngine anEngine,
double  mean = 1.0 
)

Definition at line 49 of file RandPoissonT.cc.

50: RandPoisson(anEngine, m)
51{}

◆ ~RandPoissonT()

CLHEP::RandPoissonT::~RandPoissonT ( )
virtual

Definition at line 53 of file RandPoissonT.cc.

53 {
54}

Member Function Documentation

◆ distributionName()

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

Definition at line 93 of file RandPoissonT.h.

93{return "RandPoissonT";}

◆ engine()

HepRandomEngine & CLHEP::RandPoissonT::engine ( )
virtual

Reimplemented from CLHEP::RandPoisson.

Definition at line 43 of file RandPoissonT.cc.

43{return RandPoisson::engine();}
HepRandomEngine & engine()
Definition: RandPoisson.cc:40

◆ fire() [1/2]

long CLHEP::RandPoissonT::fire ( )

Definition at line 77 of file RandPoissonT.cc.

77 {
78
81 } else {
83 }
84
85} // fire()
static int tableBoundary()
static long shoot(double mean=1.0)
HepRandomEngine * getLocalEngine()
static long shoot(double mean=1.0)
Definition: RandPoisson.cc:95

Referenced by fireArray(), main(), operator()(), and testRandPoissonT().

◆ fire() [2/2]

long CLHEP::RandPoissonT::fire ( double  m)

Definition at line 73 of file RandPoissonT.cc.

73 {
74 return shoot (getLocalEngine(), mean);
75}
static long shoot(double mean=1.0)
Definition: RandPoissonT.cc:60

◆ fireArray() [1/2]

void CLHEP::RandPoissonT::fireArray ( const int  size,
long *  vect 
)

Definition at line 110 of file RandPoissonT.cc.

110 {
111 int i;
112 for (i=0; i<size; ++i) {
113 vect[i] = fire( defaultMean );
114 }
115}

◆ fireArray() [2/2]

void CLHEP::RandPoissonT::fireArray ( const int  size,
long *  vect,
double  mean 
)

Definition at line 103 of file RandPoissonT.cc.

103 {
104 int i;
105 for (i=0; i<size; ++i) {
106 vect[i] = fire( m );
107 }
108}

◆ get()

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

Reimplemented from CLHEP::RandPoisson.

Definition at line 126 of file RandPoissonT.cc.

126 {
127 std::string inName;
128 is >> inName;
129 if (inName != name()) {
130 is.clear(std::ios::badbit | is.rdstate());
131 std::cerr << "Mismatch when expecting to read state of a "
132 << name() << " distribution\n"
133 << "Name found was " << inName
134 << "\nistream is left in the badbit state\n";
135 return is;
136 }
138 return is;
139}
std::string name() const
Definition: RandPoissonT.cc:42
std::istream & get(std::istream &is)
Definition: RandPoisson.cc:314

◆ name()

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

Reimplemented from CLHEP::RandPoisson.

Definition at line 42 of file RandPoissonT.cc.

42{return "RandPoissonT";}

Referenced by get(), and put().

◆ operator()() [1/2]

double CLHEP::RandPoissonT::operator() ( )
virtual

Reimplemented from CLHEP::RandPoisson.

Definition at line 65 of file RandPoissonT.cc.

65 {
66 return double( fire() );
67}
#define double(obj)
Definition: excDblThrow.cc:32

◆ operator()() [2/2]

double CLHEP::RandPoissonT::operator() ( double  mean)

Definition at line 69 of file RandPoissonT.cc.

69 {
70 return double( fire( mean ) );
71}

◆ put()

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

Reimplemented from CLHEP::RandPoisson.

Definition at line 118 of file RandPoissonT.cc.

118 {
119 long pr=os.precision(20);
120 os << " " << name() << "\n";
122 os.precision(pr);
123 return os;
124}
std::ostream & put(std::ostream &os) const
Definition: RandPoisson.cc:285

◆ shoot() [1/2]

long CLHEP::RandPoissonT::shoot ( double  mean = 1.0)
static

Definition at line 60 of file RandPoissonT.cc.

60 {
61 HepRandomEngine* e = HepRandom::getTheEngine();
62 return shoot ( e, xm );
63} // shoot()
static HepRandomEngine * getTheEngine()
Definition: Random.cc:270

Referenced by captureStatics(), fire(), main(), randomizeStatics(), shoot(), and shootArray().

◆ shoot() [2/2]

long CLHEP::RandPoissonT::shoot ( HepRandomEngine anEngine,
double  mean = 1.0 
)
static

Definition at line 87 of file RandPoissonT.cc.

87 {
88
89 if ( mean < RandPoissonQ::tableBoundary() ) {
90 return RandPoissonQ::shoot ( anEngine, mean );
91 } else {
92 return RandPoisson::shoot( anEngine, mean );
93 }
94
95} // shoot (anEngine, mean)

◆ shootArray() [1/2]

void CLHEP::RandPoissonT::shootArray ( const int  size,
long *  vect,
double  mean = 1.0 
)
static

Definition at line 97 of file RandPoissonT.cc.

97 {
98 int i;
99 for (i=0; i<size; ++i)
100 vect[i] = shoot(m);
101}

◆ shootArray() [2/2]

static void CLHEP::RandPoissonT::shootArray ( HepRandomEngine anEngine,
const int  size,
long *  vect,
double  mean = 1.0 
)
static

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