#include </builds/gaudi/Gaudi/GaudiHive/src/HiveNumbers.h>
Definition at line 37 of file HiveNumbers.h.
◆ HiveNumbers() [1/3]
HiveRndm::HiveNumbers::HiveNumbers |
( |
| ) |
|
Standard constructor.
Definition at line 25 of file HiveNumbers.cpp.
27}
const unsigned int m_buffer_size
unsigned int m_buffer_index
IRndmGen * m_generator
Pointer to random number generator.
std::vector< double > m_buffer
◆ HiveNumbers() [2/3]
HiveRndm::HiveNumbers::HiveNumbers |
( |
const HiveNumbers & | copy | ) |
|
◆ HiveNumbers() [3/3]
Initializing constructor.
Definition at line 37 of file HiveNumbers.cpp.
41 if ( !status.
isSuccess() ) {
throw GaudiException(
"Initialization failed !",
"HiveRndm::HiveNumbers", status ); }
42}
virtual StatusCode initialize(const SmartIF< IRndmGenSvc > &svc, const IRndmGen::Param &par)
Initialization.
◆ ~HiveNumbers()
HiveRndm::HiveNumbers::~HiveNumbers |
( |
| ) |
|
|
virtual |
Standard destructor.
Definition at line 45 of file HiveNumbers.cpp.
virtual StatusCode finalize()
Finalization.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
◆ finalize()
Finalization.
Definition at line 58 of file HiveNumbers.cpp.
58 {
63 }
65}
constexpr static const auto SUCCESS
◆ initialize()
Initialization.
- Fix-Me
- : this is a hack, but I do not have the time to review the correct constantness of all the methods
Definition at line 48 of file HiveNumbers.cpp.
48 {
53 }
55}
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 FAILURE
◆ operator bool()
HiveRndm::HiveNumbers::operator bool |
( |
| ) |
const |
|
inline |
Check if the number supply is possible.
Definition at line 62 of file HiveNumbers.h.
◆ operator()()
double HiveRndm::HiveNumbers::operator() |
( |
| ) |
|
|
inline |
Operator () for the use within STL.
Definition at line 64 of file HiveNumbers.h.
64{
return this->
shoot(); }
double shoot()
Pop a new number from the buffer.
◆ pop()
double HiveRndm::HiveNumbers::pop |
( |
| ) |
|
|
inline |
Pop a new number from the buffer.
Definition at line 66 of file HiveNumbers.h.
66{
return this->
shoot(); }
◆ shoot()
double HiveRndm::HiveNumbers::shoot |
( |
| ) |
|
|
inline |
Pop a new number from the buffer.
Definition at line 68 of file HiveNumbers.h.
68 {
73 }
76 return number;
77 }
78 return -1;
79 }
StatusCode shootArray(std::vector< double > &array, long num, long start=0)
Pop a new number from the buffer.
◆ shootArray()
StatusCode HiveRndm::HiveNumbers::shootArray |
( |
std::vector< double > & | array, |
|
|
long | num, |
|
|
long | start = 0 ) |
|
inline |
Pop a new number from the buffer.
Definition at line 81 of file HiveNumbers.h.
81 {
83 StatusCode status;
84 {
85 HiveNumbersMutex::scoped_lock lock(
m_genMutex );
86 status =
m_generator->shootArray( array, num, start );
87 }
88 return status;
89 }
91 }
static HiveNumbersMutex m_genMutex
◆ m_buffer
std::vector<double> HiveRndm::HiveNumbers::m_buffer |
|
private |
◆ m_buffer_index
unsigned int HiveRndm::HiveNumbers::m_buffer_index |
|
private |
◆ m_buffer_size
const unsigned int HiveRndm::HiveNumbers::m_buffer_size |
|
private |
◆ m_generator
IRndmGen* HiveRndm::HiveNumbers::m_generator |
|
protected |
Pointer to random number generator.
Definition at line 46 of file HiveNumbers.h.
◆ m_genMutex
The documentation for this class was generated from the following files: