Belle II Software development
RandomEngine Class Referencefinal

Interface class to make Geant4 use the Belle2 RandomGenerator. More...

#include <RandomEngine.h>

Inheritance diagram for RandomEngine:

Public Member Functions

 RandomEngine ()
 Constructor expecting a reference to the Belle2::RandomGenerator.
 
double flat () override final
 return a flat distributed double in (0,1), both excluded
 
void flatArray (const int size, double *vect) override final
 fill an array of doubles with values in (0,1), both exluded
 
void setSeed (long, int) override final
 set the seed, ignored
 
void setSeeds (const long *, int) override final
 set array of seed values, ignored
 
void saveStatus (const char[]) const override final
 save status to file, ignored
 
void restoreStatus (const char[]) override final
 restore status from file, ignored
 
void showStatus () const override final
 show status, ignored
 
std::string name () const override final
 return name of the generator
 
std::vector< unsigned long > put () const override final
 put call, whatever that does.
 
std::ostream & put (std::ostream &o) const override final
 put call, whatever that does.
 
bool get (const std::vector< unsigned long > &) override final
 get call, I assume same as above
 
std::istream & get (std::istream &i) override final
 get call, I assume same as above
 

Detailed Description

Interface class to make Geant4 use the Belle2 RandomGenerator.

Definition at line 22 of file RandomEngine.h.

Constructor & Destructor Documentation

◆ RandomEngine()

RandomEngine ( )
inline

Constructor expecting a reference to the Belle2::RandomGenerator.

Definition at line 25 of file RandomEngine.h.

25: CLHEP::HepRandomEngine() {}

Member Function Documentation

◆ flat()

double flat ( )
inlinefinaloverride

return a flat distributed double in (0,1), both excluded

Definition at line 27 of file RandomEngine.h.

27{ return dynamic_cast<RandomGenerator&>(*gRandom).random01(); }

◆ flatArray()

void flatArray ( const int  size,
double *  vect 
)
inlinefinaloverride

fill an array of doubles with values in (0,1), both exluded

Parameters
sizenumber of doubles to generate
vectpointer to buffer at least sizeof(double)*size bytes large

Definition at line 32 of file RandomEngine.h.

32{ dynamic_cast<RandomGenerator&>(*gRandom).RndmArray(size, vect); }

◆ get() [1/2]

bool get ( const std::vector< unsigned long > &  )
inlinefinaloverride

get call, I assume same as above

Definition at line 50 of file RandomEngine.h.

50{ return false; }

◆ get() [2/2]

std::istream & get ( std::istream &  i)
inlinefinaloverride

get call, I assume same as above

Definition at line 52 of file RandomEngine.h.

52{ return i; }

◆ name()

std::string name ( ) const
inlinefinaloverride

return name of the generator

Definition at line 44 of file RandomEngine.h.

44{ return "Belle2::RandomGenerator"; }

◆ put() [1/2]

std::vector< unsigned long > put ( ) const
inlinefinaloverride

put call, whatever that does.

If we don't override it we get useless messages

Definition at line 46 of file RandomEngine.h.

46{ return std::vector<unsigned long>(); }

◆ put() [2/2]

std::ostream & put ( std::ostream &  o) const
inlinefinaloverride

put call, whatever that does.

If we don't override it we get useless messages

Definition at line 48 of file RandomEngine.h.

48{ return o; }

◆ restoreStatus()

void restoreStatus ( const char  [])
inlinefinaloverride

restore status from file, ignored

Definition at line 40 of file RandomEngine.h.

40{}

◆ saveStatus()

void saveStatus ( const char  []) const
inlinefinaloverride

save status to file, ignored

Definition at line 38 of file RandomEngine.h.

38{}

◆ setSeed()

void setSeed ( long  ,
int   
)
inlinefinaloverride

set the seed, ignored

Definition at line 34 of file RandomEngine.h.

34{}

◆ setSeeds()

void setSeeds ( const long *  ,
int   
)
inlinefinaloverride

set array of seed values, ignored

Definition at line 36 of file RandomEngine.h.

36{}

◆ showStatus()

void showStatus ( ) const
inlinefinaloverride

show status, ignored

Definition at line 42 of file RandomEngine.h.

42{}

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