Go to the documentation of this file.
25 #define GAUDI_RANDOMGENSVC_RNDMGENSVC_CPP
62 status =
service->sysInitialize();
89 error() <<
"Cannot input serialize Generator settings!" <<
endmsg;
96 error() <<
"Cannot output serialize Generator settings!" <<
endmsg;
110 refpGen = pGen.get();
StatusCode initialize() override
StatusCode start() override
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
SmartIF< IRndmEngine > m_engine
Random number engine.
StatusCode finalize() override
StatusCode initialize() override
Service override: initialization.
SmartIF< ISerialize > m_serialize
Serialization interface of random number engine.
StatusCode finalize() override
Service override: finalization.
Helper class to parse a string of format "type/name".
const std::string & name() const override
Retrieve name of the service
StatusCode generator(const IRndmGen::Param &par, IRndmGen *&refpGen) override
Retrieve a valid generator from the service.
const ValueType & value() const
Gaudi::Property< std::string > m_engineName
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
StatusCode setSeeds(const std::vector< long > &seeds) override
Allow to set new seeds.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const override
Multiple shots returning vector with flat random numbers.
TYPE * get() const
Get interface pointer.
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
#define DECLARE_COMPONENT(type)
double rndm() const override
Single shot returning single random number.
StreamBuffer & serialize(StreamBuffer &str) override
IRndmGenSvc interface implementation
StatusCode seeds(std::vector< long > &seeds) const override
Allow to get seeds.
constexpr static const auto FAILURE
Random Generator service definition.
StatusCode service(const std::string &name, const T *&psvc, bool createIf=true) const
Access a service by name, creating it if it doesn't already exist.
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
virtual StatusCode initialize(const IRndmGen::Param &par)=0
Initialize the generator.
IRndmEngine * engine() override
Retrieve engine.
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator