All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RndmGenSvc Class Reference

Random Generator service definition. More...

#include <src/RndmGenSvc/RndmGenSvc.h>

Inheritance diagram for RndmGenSvc:
Collaboration diagram for RndmGenSvc:

Public Member Functions

 RndmGenSvc (const std::string &name, ISvcLocator *svc)
 Standard Service constructor. More...
 
virtual ~RndmGenSvc ()
 Standard Service destructor. More...
 
virtual StatusCode initialize ()
 Service override: initialization. More...
 
virtual StatusCode finalize ()
 Service override: finalization. More...
 
virtual StreamBufferserialize (StreamBuffer &str)
 IRndmGenSvc interface implementation. More...
 
virtual StreamBufferserialize (StreamBuffer &str) const
 Output serialization to stream buffer. Saves the status of the generator engine. More...
 
virtual IRndmEngineengine ()
 Retrieve engine. More...
 
virtual StatusCode generator (const IRndmGen::Param &par, IRndmGen *&refpGen)
 Retrieve a valid generator from the service. More...
 
virtual double rndm () const
 Single shot returning single random number. More...
 
virtual StatusCode rndmArray (std::vector< double > &array, long howmany, long start=0) const
 Multiple shots returning vector with flat random numbers. More...
 
virtual StatusCode setSeeds (const std::vector< long > &seeds)
 Allow to set new seeds. More...
 
virtual StatusCode seeds (std::vector< long > &seeds) const
 Allow to get seeds. More...
 
- Public Member Functions inherited from extends3< Service, IRndmGenSvc, IRndmEngine, ISerialize >
 extends3 (A1 a1, A2 a2, A3 a3)
 Templated constructor with 3 arguments. More...
 
 extends3 (A1 a1, A2 a2)
 Templated constructor with 2 arguments. More...
 
 extends3 (A1 a1)
 Templated constructor with 1 argument. More...
 
 extends3 ()
 Default constructor. More...
 
virtual void * i_cast (const InterfaceID &tid) const
 Implementation of IInterface::i_cast. More...
 
virtual StatusCode queryInterface (const InterfaceID &ti, void **pp)
 Implementation of IInterface::queryInterface. More...
 
virtual std::vector< std::string > getInterfaceNames () const
 Implementation of IInterface::getInterfaceNames. More...
 
virtual ~extends3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Service
virtual unsigned long release ()
 Release Interface instance. More...
 
virtual const std::string & name () const
 Retrieve name of the service. More...
 
virtual StatusCode configure ()
 Configuration (from OFFLINE to CONFIGURED). More...
 
virtual StatusCode start ()
 Start (from INITIALIZED to RUNNING). More...
 
virtual StatusCode stop ()
 Stop (from RUNNING to INITIALIZED). More...
 
virtual StatusCode terminate ()
 Initialization (from CONFIGURED to OFFLINE). More...
 
virtual Gaudi::StateMachine::State FSMState () const
 Get the current state. More...
 
virtual Gaudi::StateMachine::State targetFSMState () const
 When we are in the middle of a transition, get the state where the transition is leading us. More...
 
virtual StatusCode reinitialize ()
 Initialization (from INITIALIZED or RUNNING to INITIALIZED, via CONFIGURED). More...
 
virtual StatusCode restart ()
 Initialization (from RUNNING to RUNNING, via INITIALIZED). More...
 
virtual StatusCode sysInitialize ()
 Initialize Service. More...
 
virtual StatusCode sysStart ()
 Initialize Service. More...
 
virtual StatusCode sysStop ()
 Initialize Service. More...
 
virtual StatusCode sysFinalize ()
 Finalize Service. More...
 
virtual StatusCode sysReinitialize ()
 Re-initialize the Service. More...
 
virtual StatusCode sysRestart ()
 Re-initialize the Service. More...
 
virtual StatusCode setProperty (const Property &p)
 Set the property by property. More...
 
virtual StatusCode setProperty (const std::string &s)
 Set the property by string. More...
 
virtual StatusCode setProperty (const std::string &n, const std::string &v)
 Set the property by std::string. More...
 
virtual StatusCode getProperty (Property *p) const
 Get the property by property. More...
 
virtual const PropertygetProperty (const std::string &name) const
 Get the property by name. More...
 
virtual StatusCode getProperty (const std::string &n, std::string &v) const
 Get the property by std::string. More...
 
virtual const std::vector
< Property * > & 
getProperties () const
 Get list of properties. More...
 
template<class TYPE >
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value More...
 
 Service (const std::string &name, ISvcLocator *svcloc)
 Standard Constructor. More...
 
SmartIF< ISvcLocator > & serviceLocator () const
 Retrieve pointer to service locator. More...
 
StatusCode setProperties ()
 Method for setting declared properties to the values specified for the job. More...
 
template<class T >
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. More...
 
template<class T >
StatusCode service (const std::string &name, T *&psvc, bool createIf=true) const
 
template<class T >
StatusCode service (const std::string &svcType, const std::string &svcName, T *&psvc) const
 Access a service by name and type, creating it if it doesn't already exist. More...
 
template<class T >
PropertydeclareProperty (const std::string &name, T &property, const std::string &doc="none") const
 Declare the named property. More...
 
PropertydeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
 Declare remote named properties. More...
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
 
- Public Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
 CommonMessaging (const A1 &a1, const A2 &a2, const A3 &a3)
 Templated constructor with 3 arguments. More...
 
 CommonMessaging (const A1 &a1, const A2 &a2)
 Templated constructor with 2 arguments. More...
 
 CommonMessaging (const A1 &a1)
 Templated constructor with 1 argument. More...
 
 CommonMessaging ()
 Default constructor. More...
 
virtual ~CommonMessaging ()
 Virtual destructor. More...
 
SmartIF< IMessageSvc > & msgSvc () const
 The standard message service. More...
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream. More...
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts. More...
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS) More...
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL) More...
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR) More...
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING) More...
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG) More...
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE) More...
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO) More...
 
MSG::Level msgLevel () const
 get the output level from the embedded MsgStream More...
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream More...
 
- Public Member Functions inherited from extend_interfaces3< IService, IProperty, IStateful >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IService
 DeclareInterfaceID (IService, 3, 0)
 InterfaceID. More...
 
virtual ~IService ()
 virtual destructor More...
 
- Public Member Functions inherited from INamedInterface
 DeclareInterfaceID (INamedInterface, 1, 0)
 InterfaceID. More...
 
virtual ~INamedInterface ()
 Virtual destructor (always needed for abstract classes). More...
 
- Public Member Functions inherited from IInterface
virtual unsigned long addRef ()=0
 Increment the reference count of Interface instance. More...
 
virtual unsigned long refCount () const =0
 Current reference count. More...
 
virtual ~IInterface ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IProperty
 DeclareInterfaceID (IProperty, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from IStateful
 DeclareInterfaceID (IStateful, 1, 0)
 InterfaceID. More...
 
virtual ~IStateful ()
 
- Public Member Functions inherited from extend_interfaces3< IRndmGenSvc, IRndmEngine, ISerialize >
virtual ~extend_interfaces3 ()
 Virtual destructor. More...
 
- Public Member Functions inherited from IRndmGenSvc
 DeclareInterfaceID (IRndmGenSvc, 2, 0)
 InterfaceID. More...
 
virtual ~IRndmGenSvc ()
 virtual destructor More...
 
- Public Member Functions inherited from IRndmEngine
 DeclareInterfaceID (IRndmEngine, 2, 0)
 InterfaceID. More...
 
- Public Member Functions inherited from ISerialize
 DeclareInterfaceID (ISerialize, 2, 0)
 InterfaceID. More...
 

Private Attributes

IRndmEnginem_engine
 Random number engine. More...
 
ISerializem_serialize
 Serialization interface of random number engine. More...
 
std::string m_engineName
 Engine name. More...
 

Additional Inherited Members

- Public Types inherited from extends3< Service, IRndmGenSvc, IRndmEngine, ISerialize >
typedef extends3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IRndmGenSvc, IRndmEngine,
ISerialize
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from Service
typedef
Gaudi::PluginService::Factory
< IService *, const
std::string &, ISvcLocator * > 
Factory
 
- Public Types inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
typedef CommonMessaging base_class
 
- Public Types inherited from implements3< IService, IProperty, IStateful >
typedef implements3 base_class
 Typedef to this class. More...
 
typedef extend_interfaces3
< IService, IProperty,
IStateful
extend_interfaces_base
 Typedef to the base of this class. More...
 
typedef
extend_interfaces_base::ext_iids 
interfaces
 MPL set of all the implemented interfaces. More...
 
- Public Types inherited from extend_interfaces3< IService, IProperty, IStateful >
typedef mpl::fold< typename
IService::iid::iids::type,
typename mpl::fold< typename
IProperty::iid::iids::type,
typename
IStateful::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Public Types inherited from IInterface
enum  Status { SUCCESS = 1, NO_INTERFACE, VERSMISMATCH, LAST_ERROR }
 Return status. More...
 
typedef Gaudi::InterfaceId
< IInterface, 0, 0 > 
iid
 Interface ID. More...
 
typedef mpl::set1< iidext_iids
 Extra interfaces. More...
 
- Public Types inherited from extend_interfaces3< IRndmGenSvc, IRndmEngine, ISerialize >
typedef mpl::fold< typename
IRndmGenSvc::iid::iids::type,
typename mpl::fold< typename
IRndmEngine::iid::iids::type,
typename
ISerialize::iid::iids::type,
mpl::insert< mpl::_1, mpl::_2 >
>::type, mpl::insert< mpl::_1,
mpl::_2 > >::type 
ext_iids
 MPL set of interfaces extended by this one. More...
 
- Static Public Member Functions inherited from IInterface
static const InterfaceIDinterfaceID ()
 Return an instance of InterfaceID identifying the interface. More...
 
- Protected Member Functions inherited from Service
virtual ~Service ()
 Standard Destructor. More...
 
int outputLevel () const
 get the Service's output level More...
 
- Protected Member Functions inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream. More...
 
- Protected Attributes inherited from Service
IntegerProperty m_outputLevel
 Service output level. More...
 
Gaudi::StateMachine::State m_state
 Service state. More...
 
Gaudi::StateMachine::State m_targetState
 Service state. More...
 
- Protected Attributes inherited from CommonMessaging< implements3< IService, IProperty, IStateful > >
SmartIF< IMessageSvcm_msgsvc
 Pointer to the message service;. More...
 
std::auto_ptr< MsgStreamm_msgStream
 The predefined message stream. More...
 
bool m_streamWithService
 Flag to create a new MsgStream if it was created without the message service. More...
 

Detailed Description

Random Generator service definition.

Description: Definition of a interface for a service to access random generators according to predefined distributions. For more detailed explanations please see the interface definition.

Dependencies:

  • Base class: Gaudi/RndmGenSvc/ISerialize.h
  • Base class: Gaudi/RndmGenSvc/IRandomGenSvc.h

History :

+---------+----------------------------------------------+--------+
|    Date |                 Comment                      | Who    |
+---------+----------------------------------------------+--------+
| 21/04/99| Initial version.                             | MF     |
+---------+----------------------------------------------+--------+

Author: M.Frank Version: 1.0

Definition at line 49 of file RndmGenSvc.h.

Constructor & Destructor Documentation

RndmGenSvc::RndmGenSvc ( const std::string &  name,
ISvcLocator svc 
)

Standard Service constructor.

Definition at line 36 of file RndmGenSvc.cpp.

37 : base_class(nam, svc), m_engine(0), m_serialize(0)
38 {
39  declareProperty("Engine", m_engineName = "HepRndm::Engine<CLHEP::RanluxEngine>");
40 }
std::string m_engineName
Engine name.
Definition: RndmGenSvc.h:56
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:211
ISerialize * m_serialize
Serialization interface of random number engine.
Definition: RndmGenSvc.h:54
RndmGenSvc::~RndmGenSvc ( )
virtual

Standard Service destructor.

Definition at line 43 of file RndmGenSvc.cpp.

43  {
44 }

Member Function Documentation

IRndmEngine * RndmGenSvc::engine ( )
virtual

Retrieve engine.

Implements IRndmGenSvc.

Definition at line 120 of file RndmGenSvc.cpp.

120  {
121  return m_engine;
122 }
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52
StatusCode RndmGenSvc::finalize ( )
virtual

Service override: finalization.

Reimplemented from Service.

Definition at line 85 of file RndmGenSvc.cpp.

85  {
86  StatusCode status = Service::finalize();
88  m_serialize = 0;
89  if ( m_engine ) {
91  service->finalize().ignore();
92  m_engine->release();
93  }
94  m_engine = 0;
95  return status;
96 }
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52
virtual unsigned long release()=0
Release 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: Service.h:142
void ignore() const
Definition: StatusCode.h:107
virtual StatusCode finalize()
Finalize (from INITIALIZED to CONFIGURED).
Definition: Service.cpp:199
ISerialize * m_serialize
Serialization interface of random number engine.
Definition: RndmGenSvc.h:54
StatusCode RndmGenSvc::generator ( const IRndmGen::Param par,
IRndmGen *&  refpGen 
)
virtual

Retrieve a valid generator from the service.

Implements IRndmGenSvc.

Definition at line 125 of file RndmGenSvc.cpp.

125  {
127  IInterface* iface = ObjFactory::create(par.type(),(IInterface*)m_engine);
128  if ( iface ) {
129  // query requested interface (adds ref count)
130  status = iface->queryInterface(IRndmGen::interfaceID(), (void**)& refpGen);
131  if ( status.isSuccess() ) {
132  status = refpGen->initialize(par);
133  }
134  else {
135  iface->release();
136  }
137  }
138  // Error!
139  return status;
140 }
virtual StatusCode initialize(const IRndmGen::Param &par)=0
Initialize the generator.
virtual const InterfaceID & type() const
Parameter's type.
Definition: IRndmGen.h:51
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
Definition of the basic interface.
Definition: IInterface.h:160
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52
virtual unsigned long release()=0
Release Interface instance.
static const InterfaceID & interfaceID()
Return an instance of InterfaceID identifying the interface.
Definition: IInterface.h:171
virtual StatusCode queryInterface(const InterfaceID &ti, void **pp)=0
Set the void** to the pointer to the requested interface of the instance.
StatusCode RndmGenSvc::initialize ( )
virtual

Service override: initialization.

Reimplemented from Service.

Definition at line 47 of file RndmGenSvc.cpp.

47  {
49  MsgStream log(msgSvc(), name());
50  std::string machName = name()+".Engine";
53 
54  if ( status.isSuccess() ) {
55  status = setProperties();
56  if ( status.isSuccess() ) { // Check if the Engine service exists:
57  // FIXME: (MCl) why RndmGenSvc cannot create the engine service in a standard way?
58  const bool CREATE = false;
59  engine = serviceLocator()->service(machName, CREATE);
60  if ( !engine.isValid() && mgr.isValid() ) {
62  engine = mgr->createService(TypeNameString(machName, m_engineName));
63  }
64  if ( engine.isValid() ) {
65  SmartIF<ISerialize> serial(engine);
66  SmartIF<IService> service(engine);
67  if ( serial.isValid( ) && service.isValid( ) ) {
68  status = service->sysInitialize();
69  if ( status.isSuccess() ) {
70  m_engine = engine;
71  m_serialize = serial;
72  m_engine->addRef();
74  log << MSG::INFO << "Using Random engine:" << m_engineName << endmsg;
75  return status;
76  }
77  }
78  }
79  }
80  }
81  return status;
82 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
Small smart pointer class with automatic reference counting for IInterface.
Definition: IConverter.h:14
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:75
std::string m_engineName
Engine name.
Definition: RndmGenSvc.h:56
Helper class to parse a string of format "type/name".
Definition: TypeNameString.h:9
bool isValid() const
Allow for check if smart pointer is valid.
Definition: SmartIF.h:51
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:30
virtual IRndmEngine * engine()
Retrieve engine.
Definition: RndmGenSvc.cpp:120
StatusCode setProperties()
Method for setting declared properties to the values specified for the job.
Definition: Service.cpp:371
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52
virtual StatusCode initialize()
Initialization (from CONFIGURED to INITIALIZED).
Definition: Service.cpp:74
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: Service.h:142
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
ISerialize * m_serialize
Serialization interface of random number engine.
Definition: RndmGenSvc.h:54
SmartIF< ISvcLocator > & serviceLocator() const
Retrieve pointer to service locator.
Definition: Service.cpp:336
double RndmGenSvc::rndm ( ) const
virtual

Single shot returning single random number.

Implements IRndmEngine.

Definition at line 143 of file RndmGenSvc.cpp.

143  {
144  if ( 0 != m_engine ) {
145  return m_engine->rndm();
146  }
147  return -1;
148 }
virtual double rndm() const =0
Single shot returning single random number.
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52
StatusCode RndmGenSvc::rndmArray ( std::vector< double > &  array,
long  howmany,
long  start = 0 
) const
virtual

Multiple shots returning vector with flat random numbers.

Parameters
arrayArray containing random numbers
howmanyfill 'howmany' random numbers into array
start... starting at position start
Returns
StatusCode indicating failure or success.

Implements IRndmEngine.

Definition at line 156 of file RndmGenSvc.cpp.

156  {
157  if ( 0 != m_engine ) {
158  return m_engine->rndmArray(array, howmany, start);
159  }
160  return StatusCode::FAILURE;
161 }
virtual StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const =0
Multiple shots returning vector with flat random numbers.
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52
virtual StatusCode start()
Start (from INITIALIZED to RUNNING).
Definition: Service.cpp:158
StatusCode RndmGenSvc::seeds ( std::vector< long > &  seeds) const
virtual

Allow to get seeds.

Implements IRndmEngine.

Definition at line 172 of file RndmGenSvc.cpp.

172  {
173  if ( 0 != m_engine ) {
174  return m_engine->seeds(seeds);
175  }
176  return StatusCode::FAILURE;
177 }
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52
virtual StatusCode seeds(std::vector< long > &seeds) const =0
Allow to retrieve seeds.
StreamBuffer & RndmGenSvc::serialize ( StreamBuffer str)
virtual

IRndmGenSvc interface implementation.

Input serialization from stream buffer. Restores the status of the generator engine.

Implements ISerialize.

Definition at line 100 of file RndmGenSvc.cpp.

100  {
101  if ( 0 != m_serialize ) {
102  return m_serialize->serialize(str);
103  }
104  MsgStream log(msgSvc(), name());
105  log << MSG::ERROR << "Cannot input serialize Generator settings!" << endmsg;
106  return str;
107 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
virtual StreamBuffer & serialize(StreamBuffer &str)=0
Input serialization from stream buffer.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
ISerialize * m_serialize
Serialization interface of random number engine.
Definition: RndmGenSvc.h:54
StreamBuffer & RndmGenSvc::serialize ( StreamBuffer str) const
virtual

Output serialization to stream buffer. Saves the status of the generator engine.

Implements ISerialize.

Definition at line 110 of file RndmGenSvc.cpp.

110  {
111  if ( 0 != m_serialize ) {
112  return m_serialize->serialize(str);
113  }
114  MsgStream log(msgSvc(), name());
115  log << MSG::ERROR << "Cannot output serialize Generator settings!" << endmsg;
116  return str;
117 }
Definition of the MsgStream class used to transmit messages.
Definition: MsgStream.h:24
SmartIF< IMessageSvc > & msgSvc() const
The standard message service.
virtual StreamBuffer & serialize(StreamBuffer &str)=0
Input serialization from stream buffer.
virtual const std::string & name() const
Retrieve name of the service.
Definition: Service.cpp:331
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
ISerialize * m_serialize
Serialization interface of random number engine.
Definition: RndmGenSvc.h:54
StatusCode RndmGenSvc::setSeeds ( const std::vector< long > &  seeds)
virtual

Allow to set new seeds.

Implements IRndmEngine.

Definition at line 164 of file RndmGenSvc.cpp.

164  {
165  if ( 0 != m_engine ) {
166  return m_engine->setSeeds(seeds);
167  }
168  return StatusCode::FAILURE;
169 }
virtual StatusCode setSeeds(const std::vector< long > &seeds)=0
Allow to set new seeds.
IRndmEngine * m_engine
Random number engine.
Definition: RndmGenSvc.h:52

Member Data Documentation

IRndmEngine* RndmGenSvc::m_engine
mutableprivate

Random number engine.

Definition at line 52 of file RndmGenSvc.h.

std::string RndmGenSvc::m_engineName
private

Engine name.

Definition at line 56 of file RndmGenSvc.h.

ISerialize* RndmGenSvc::m_serialize
mutableprivate

Serialization interface of random number engine.

Definition at line 54 of file RndmGenSvc.h.


The documentation for this class was generated from the following files: