![]() |
The Gaudi Framework
v25r3
|
Random number accessor This small class encapsulates the use of the random number generator. More...
#include <GaudiKernel/RndmGenerators.h>
Public Member Functions | |
Numbers () | |
Standard constructor. More... | |
Numbers (const Numbers ©) | |
Copy constructor. More... | |
Numbers (const SmartIF< IRndmGenSvc > &svc, const IRndmGen::Param &par) | |
Initializing constructor. More... | |
virtual | ~Numbers () |
Standard destructor. More... | |
virtual StatusCode | initialize (const SmartIF< IRndmGenSvc > &svc, const IRndmGen::Param &par) |
Initialization. More... | |
Numbers (IRndmGenSvc *svc, const IRndmGen::Param &par) | |
Initializing constructor. More... | |
virtual StatusCode | initialize (IRndmGenSvc *svc, const IRndmGen::Param &par) |
Initialization. More... | |
virtual StatusCode | finalize () |
Finalization. More... | |
operator bool () const | |
Check if the number supply is possible. More... | |
double | operator() () |
Operator () for the use within STL. More... | |
double | pop () |
Pop a new number from the buffer. More... | |
double | shoot () |
Pop a new number from the buffer. More... | |
StatusCode | shootArray (std::vector< double > &array, long num, long start=0) |
Pop a new number from the buffer. More... | |
Protected Attributes | |
IRndmGen * | m_generator |
Pointer to random number generator. More... | |
Random number accessor This small class encapsulates the use of the random number generator.
The sole pupose of this class is to hide the usage of the interface and make the whole thing more user friendly. The object is usable directly after creation.
The typical usage is: Rndm::Numbers numbers(); if ( numbers.initialize(rndmGenSvc, Rndm::Gauss(0.5,0.2)).isSuccess() ) { for ( int i = 0; i < 10; i++ ) { value = numbers(); ... } }
Definition at line 389 of file RndmGenerators.h.
Rndm::Numbers::Numbers | ( | ) |
Standard constructor.
Definition at line 12 of file RndmGenerators.cpp.
Rndm::Numbers::Numbers | ( | const Numbers & | copy | ) |
Copy constructor.
Definition at line 18 of file RndmGenerators.cpp.
Rndm::Numbers::Numbers | ( | const SmartIF< IRndmGenSvc > & | svc, |
const IRndmGen::Param & | par | ||
) |
Initializing constructor.
Definition at line 26 of file RndmGenerators.cpp.
|
virtual |
Rndm::Numbers::Numbers | ( | IRndmGenSvc * | svc, |
const IRndmGen::Param & | par | ||
) |
Initializing constructor.
Definition at line 63 of file RndmGenerators.cpp.
|
virtual |
Finalization.
Definition at line 52 of file RndmGenerators.cpp.
|
virtual |
Initialization.
Definition at line 41 of file RndmGenerators.cpp.
|
virtual |
Initialization.
Definition at line 73 of file RndmGenerators.cpp.
|
inline |
Check if the number supply is possible.
Definition at line 413 of file RndmGenerators.h.
|
inline |
Operator () for the use within STL.
Definition at line 417 of file RndmGenerators.h.
|
inline |
Pop a new number from the buffer.
Definition at line 421 of file RndmGenerators.h.
|
inline |
Pop a new number from the buffer.
Definition at line 425 of file RndmGenerators.h.
|
inline |
Pop a new number from the buffer.
Definition at line 432 of file RndmGenerators.h.
|
protected |
Pointer to random number generator.
Definition at line 392 of file RndmGenerators.h.