32 #include "CLHEP/Random/defs.h"
33 #include "CLHEP/Random/Random.h"
34 #include "CLHEP/Utility/memory.h"
42 class RandFlat :
public HepRandom {
46 inline RandFlat ( HepRandomEngine& anEngine );
47 inline RandFlat ( HepRandomEngine& anEngine,
double width );
48 inline RandFlat ( HepRandomEngine& anEngine,
double a,
double b );
49 inline RandFlat ( HepRandomEngine* anEngine );
50 inline RandFlat ( HepRandomEngine* anEngine,
double width );
51 inline RandFlat ( HepRandomEngine* anEngine,
double a,
double b );
66 static double shoot();
68 static inline double shoot(
double width );
70 static inline double shoot(
double a,
double b );
74 static inline long shootInt(
long a1,
long n );
78 static void shootArray (
const int size,
double* vect );
80 static void shootArray (
const int size,
double* vect,
81 double lx,
double dx );
86 static inline double shoot ( HepRandomEngine* anEngine );
88 static inline double shoot( HepRandomEngine* anEngine,
double width );
90 static inline double shoot( HepRandomEngine* anEngine,
92 static inline long shootInt( HepRandomEngine* anEngine,
long n );
94 static inline long shootInt( HepRandomEngine* anEngine,
long a1,
long n );
96 static inline int shootBit( HepRandomEngine* );
98 static inline void shootArray ( HepRandomEngine* anEngine,
99 const int size,
double* vect );
101 static void shootArray ( HepRandomEngine* anEngine,
102 const int size,
double* vect,
103 double lx,
double dx );
108 inline double fire();
110 inline double fire(
double width );
112 inline double fire(
double a,
double b );
116 inline long fireInt(
long a1,
long n );
120 void fireArray (
const int size,
double* vect);
122 void fireArray (
const int size,
double* vect,
123 double lx,
double dx);
131 std::ostream &
put ( std::ostream & os )
const;
132 std::istream &
get ( std::istream & is );
134 std::string
name()
const;
135 HepRandomEngine &
engine();
177 inline void fireBits();
178 static inline void shootBits();
191 static const unsigned long MSB;
192 static const int MSBBits;
195 unsigned long randomInt;
196 unsigned long firstUnusedBit;
197 static unsigned long staticRandomInt;
198 static unsigned long staticFirstUnusedBit;
209 #ifdef ENABLE_BACKWARDS_COMPATIBILITY
211 using namespace CLHEP;
214 #include "CLHEP/Random/RandFlat.icc"
static std::ostream & saveFullState(std::ostream &os)
void fireArray(const int size, double *vect)
static std::istream & restoreDistState(std::istream &is)
HepRandomEngine & engine()
static std::string distributionName()
RandFlat(HepRandomEngine &anEngine)
static std::istream & restoreFullState(std::istream &is)
static long shootInt(long n)
static void restoreEngineStatus(const char filename[]="Config.conf")
static void saveEngineStatus(const char filename[]="Config.conf")
static std::ostream & saveDistState(std::ostream &os)
static void shootArray(const int size, double *vect)
std::ostream & put(std::ostream &os) const