46 const HepInt RandFlat::MSBBits= 15;
47 const unsigned long RandFlat::MSB= 1ul<<RandFlat::MSBBits;
48 unsigned long RandFlat::staticRandomInt= 0;
49 unsigned long RandFlat::staticFirstUnusedBit= 0;
51 RandFlat::~RandFlat() {
52 if ( deleteEngine )
delete localEngine;
55 HepDouble RandFlat::operator()() {
59 void RandFlat::shootArray(
const HepInt size, HepDouble* vect,
60 HepDouble lx, HepDouble dx )
64 for (i=0; i<size; ++i)
65 vect[i] = shoot(lx,dx);
69 #ifndef ST_NO_TEMPLATE_DEF_ARGS
70 RandFlat::shootArray( vector<HepDouble>& vec, HepDouble lx, HepDouble dx )
72 RandFlat::shootArray( vector<HepDouble,allocator<HepDouble> >& vec, HepDouble lx, HepDouble dx )
75 for (
unsigned int i=0; i<vec.size(); ++i)
76 vec[i] = shoot(lx,dx);
80 const HepInt size, HepDouble* vect,
81 HepDouble lx, HepDouble dx )
83 for (
int i=0; i<size; ++i)
84 vect[i] = shoot(anEngine,lx,dx);
88 #ifndef ST_NO_TEMPLATE_DEF_ARGS
90 vector<HepDouble>& vec,
91 HepDouble lx, HepDouble dx )
94 vector<HepDouble,allocator<HepDouble> >& vec,
95 HepDouble lx, HepDouble dx )
98 for (
unsigned int i=0; i<vec.size(); ++i)
99 vec[i] = shoot(anEngine,lx,dx);
102 void RandFlat::fireArray(
const HepInt size, HepDouble* vect,
103 HepDouble lx, HepDouble dx )
107 for (i=0; i<size; ++i)
108 vect[i] = fire(lx,dx);
111 #ifndef ST_NO_TEMPLATE_DEF_ARGS
112 void RandFlat::fireArray( vector<HepDouble>& vec, HepDouble lx, HepDouble dx )
114 void RandFlat::fireArray( vector<HepDouble,allocator<HepDouble> >& vec, HepDouble lx, HepDouble dx )
117 for (
unsigned int i=0; i<vec.size(); ++i)
118 vec[i] = fire(lx,dx);