25#define GAUDI_RANDOMGENSVC_RNDMGENSVC_CPP
51 const bool CREATE =
false;
52 std::string machName =
name() +
".Engine";
54 if ( !jos.isSet( machName +
".ThreadSafe" ) ) {
66 status =
service->sysInitialize();
93 error() <<
"Cannot input serialize Generator settings!" <<
endmsg;
100 error() <<
"Cannot output serialize Generator settings!" <<
endmsg;
114 refpGen = pGen.get();
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
#define DECLARE_COMPONENT(type)
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Helper class to parse a string of format "type/name".
virtual unsigned long addRef() const =0
Increment the reference count of Interface instance.
Definition of a interface for a generic random number generator giving randomly distributed numbers i...
Definition of a interface for a generic random number generators.
virtual StatusCode initialize(const IRndmGen::Param &par)=0
Initialize the generator.
Object serialization interface definition.
General service interface definition.
The ISvcManager is the interface implemented by the Service Factory in the Application Manager to sup...
Random Generator service definition.
StreamBuffer & serialize(StreamBuffer &str) override
IRndmGenSvc interface implementation.
StatusCode initialize() override
Service override: initialization.
Gaudi::Property< bool > m_useThreadSafeEngine
double rndm() const override
Single shot returning single random number.
SmartIF< ISerialize > m_serialize
Serialization interface of random number engine.
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.
StatusCode setSeeds(const std::vector< long > &seeds) override
Allow to set new seeds.
SmartIF< IRndmEngine > m_engine
Random number engine.
IRndmEngine * engine() override
Retrieve engine.
StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const override
Multiple shots returning vector with flat random numbers.
StatusCode finalize() override
Service override: finalization.
Gaudi::Property< std::string > m_engineName
SmartIF< ISvcLocator > & serviceLocator() const override
Retrieve pointer to service locator.
StatusCode finalize() override
const std::string & name() const override
Retrieve name of the service.
SmartIF< IFace > service(const std::string &name, bool createIf=true) const
StatusCode start() override
StatusCode initialize() override
Small smart pointer class with automatic reference counting for IInterface.
This class is used for returning status codes from appropriate routines.
const StatusCode & ignore() const
Allow discarding a StatusCode without warning.
constexpr static const auto FAILURE
The stream buffer is a small object collecting object data.