15 #define GAUDI_RANDOMGENSVC_RNDMGENSVC_CPP 54 status =
service->sysInitialize();
82 error() <<
"Cannot input serialize Generator settings!" <<
endmsg;
89 error() <<
"Cannot output serialize Generator settings!" <<
endmsg;
103 refpGen = pGen.get();
virtual StatusCode initialize(const IRndmGen::Param &par)=0
Initialize the generator.
StatusCode initialize() override
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
virtual StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const =0
Multiple shots returning vector with flat random numbers.
StreamBuffer & serialize(StreamBuffer &str) override
IRndmGenSvc interface implementation.
StatusCode initialize() override
Service override: initialization.
StatusCode finalize() override
StatusCode finalize() override
Service override: finalization.
StatusCode start() override
The ISvcManager is the interface implemented by the Service Factory in the Application Manager to sup...
The stream buffer is a small object collecting object data.
Definition of a interface for a generic random number generators.
SmartIF< IRndmEngine > m_engine
Random number engine.
SmartIF< IFace > as() const
return a new SmartIF instance to another interface
Gaudi::Property< std::string > m_engineName
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
TYPE * get() const
Get interface pointer.
Random Generator service definition.
#define DECLARE_COMPONENT(type)
StatusCode service(const Gaudi::Utils::TypeNameString &name, T *&svc, bool createIf=true)
Templated method to access a service by name.
const std::string & name() const override
Retrieve name of the service.
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Helper class to parse a string of format "type/name".
General service interface definition.
This class is used for returning status codes from appropriate routines.
virtual double rndm() const =0
Single shot returning single random number.
virtual StreamBuffer & serialize(StreamBuffer &str)=0
Input serialization from stream buffer.
StatusCode seeds(std::vector< long > &seeds) const override
Allow to get seeds.
StatusCode generator(const IRndmGen::Param &par, IRndmGen *&refpGen) override
Retrieve a valid generator from the service.
virtual StatusCode setSeeds(const std::vector< long > &seeds)=0
Allow to set new seeds.
StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const override
Multiple shots returning vector with flat random numbers.
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
double rndm() const override
Single shot returning single random number.
const StatusCode & ignore() const
Ignore/check StatusCode.
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
StatusCode setSeeds(const std::vector< long > &seeds) override
Allow to set new seeds.
constexpr static const auto FAILURE
virtual unsigned long addRef()=0
Increment the reference count of Interface instance.
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.
Definition of a interface for a generic random number generator giving randomly distributed numbers i...
void reset(TYPE *ptr=nullptr)
Set the internal pointer to the passed one disposing of the old one.
IRndmEngine * engine() override
Retrieve engine.
SmartIF< ISerialize > m_serialize
Serialization interface of random number engine.
Object serialization interface definition.
virtual StatusCode seeds(std::vector< long > &seeds) const =0
Allow to retrieve seeds.
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.