2 #define GAUDI_RNDMGENSVC_RNDMGENGENERATORS_CPP
19 : m_generator(copy.m_generator) {
31 throw GaudiException (
"Initialization failed !",
"Rndm::Numbers", status);
43 if ( svc.
isValid() && 0 == m_generator ) {
46 return const_cast<IRndmGenSvc*
>(svc.
get())->generator( par, m_generator );
53 if ( 0 != m_generator ) {
54 m_generator->finalize().
ignore();
55 m_generator->release();
61 #if !defined(GAUDI_V22_API) || defined(G22_NEW_SVCLOCATOR)
68 throw GaudiException (
"Initialization failed !",
"Rndm::Numbers", status);
Define general base for Gaudi exception.
virtual ~Numbers()
Standard destructor.
bool isSuccess() const
Test for a status code of SUCCESS.
Random number accessor This small class encapsulates the use of the random number generator...
virtual StatusCode finalize()
Finalization.
bool isValid() const
Allow for check if smart pointer is valid.
Random Generator service interface definition Definition of a interface for a service to access rando...
This class is used for returning status codes from appropriate routines.
IRndmGen * m_generator
Pointer to random number generator.
TYPE * get() const
Get interface pointer.
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
virtual StatusCode initialize(const SmartIF< IRndmGenSvc > &svc, const IRndmGen::Param &par)
Initialization.
Numbers()
Standard constructor.