19 constexpr
double HIVENUMBERS_BUFFER_SIZE = 1000;
31 : m_buffer_index( 0 ), m_buffer_size( HIVENUMBERS_BUFFER_SIZE ), m_generator( copy.m_generator ) {
38 : m_buffer_index( 0 ), m_buffer_size( HIVENUMBERS_BUFFER_SIZE ), m_generator( 0 ) {
41 if ( !status.
isSuccess() ) {
throw GaudiException(
"Initialization failed !",
"HiveRndm::HiveNumbers", status ); }
49 if ( svc.
isValid() && 0 == m_generator ) {
59 if ( 0 != m_generator ) {
60 m_generator->finalize().
ignore();
61 m_generator->release();
67 #if !defined( GAUDI_V22_API ) || defined( G22_NEW_SVCLOCATOR ) 70 : m_buffer_index( 0 ), m_buffer_size( HIVENUMBERS_BUFFER_SIZE ), m_generator( 0 ) {
72 if ( !status.
isSuccess() ) {
throw GaudiException(
"Initialization failed !",
"HiveRndm::HiveNumbers", status ); }
const unsigned int m_buffer_size
virtual StatusCode finalize()
Finalization.
Define general base for Gaudi exception.
tbb::spin_rw_mutex_v3 HiveNumbersMutex
virtual StatusCode generator(const IRndmGen::Param &par, IRndmGen *&refpGen)=0
Add a Generator factory.
bool isValid() const
Allow for check if smart pointer is valid.
constexpr static const auto SUCCESS
std::vector< double > m_buffer
IRndmGen * m_generator
Pointer to random number generator.
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.
virtual ~HiveNumbers()
Standard destructor.
const StatusCode & ignore() const
Ignore/check StatusCode.
virtual StatusCode initialize(const SmartIF< IRndmGenSvc > &svc, const IRndmGen::Param &par)
Initialization.
constexpr static const auto FAILURE
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
HiveNumbers()
Standard constructor.
static HiveNumbersMutex m_genMutex