| The Gaudi Framework v27r1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Attributes | Private Member Functions | List of all members
HepRndm::Engine< TYPE > Class Template Reference

`#include <src/RndmGenSvc/HepRndmEngine.h>`

Inheritance diagram for HepRndm::Engine< TYPE >:
[legend]
Collaboration diagram for HepRndm::Engine< TYPE >:
[legend]

## Public Member Functions
| Engine (const std::string &name, ISvcLocator *loc)
| Standard Constructor. More...
| ~Engine () override=default
| Standard Destructor. More...
StatusCode | initialize () override
| Initialize the Engine. More...
StatusCode | finalize () override
| Finalize the Engine. More...
StatusCode | setSeeds (const std::vector< long > &seed) override
| Set seeds. More...
StatusCode | seeds (std::vector< long > &seed) const override
| Retrieve seeds. More...
Public Member Functions inherited from HepRndm::BaseEngine
| BaseEngine (const std::string &name, ISvcLocator *loc)
| ~BaseEngine () override=default
CLHEP::HepRandomEngine * | hepEngine ()
const CLHEP::HepRandomEngine * | hepEngine () const
double | rndm () const override
| Single shot returning single random number. More...
Public Member Functions inherited from RndmEngine
virtual StatusCode | rndmArray (std::vector< double > &array, long howmany, long start=0) const
| Multiple shots returning vector with flat random numbers. More...
virtual StreamBuffer & | serialize (StreamBuffer &str)
| Input serialization from stream buffer. More...
virtual StreamBuffer & | serialize (StreamBuffer &str) const
| Output serialization to stream buffer. More...
virtual void | handle (const Incident &inc)
| Inform that a new incident has occurred. More...
Public Member Functions inherited from extends< Service, IRndmEngine, ISerialize, IIncidentListener >
void * | i_cast (const InterfaceID &tid) const override
| Implementation of IInterface::i_cast. More...
StatusCode | queryInterface (const InterfaceID &ti, void **pp) override
| Implementation of IInterface::queryInterface. More...
std::vector< std::string > | getInterfaceNames () const override
| Implementation of IInterface::getInterfaceNames. More...
| ~extends () override=default
| Virtual destructor. More...
Public Member Functions inherited from Service
const std::string & | name () const override
| Retrieve name of the service. More...
StatusCode | configure () override
StatusCode | initialize () override
StatusCode | start () override
StatusCode | stop () override
StatusCode | finalize () override
StatusCode | terminate () override
Gaudi::StateMachine::State | FSMState () const override
Gaudi::StateMachine::State | targetFSMState () const override
StatusCode | reinitialize () override
StatusCode | restart () override
StatusCode | sysInitialize () override
| Initialize Service. More...
StatusCode | sysStart () override
| Initialize Service. More...
StatusCode | sysStop () override
| Initialize Service. More...
StatusCode | sysFinalize () override
| Finalize Service. More...
StatusCode | sysReinitialize () override
| Re-initialize the Service. More...
StatusCode | sysRestart () override
| Re-initialize the Service. More...
StatusCode | setProperty (const Property &p) override
StatusCode | setProperty (const std::string &s) override
StatusCode | setProperty (const std::string &n, const std::string &v) override
StatusCode | getProperty (Property *p) const override
const Property & | getProperty (const std::string &name) const override
StatusCode | getProperty (const std::string &n, std::string &v) const override
const std::vector< Property * > & | getProperties () const override
bool | hasProperty (const std::string &name) const override
template<class TYPE >
StatusCode | setProperty (const std::string &name, const TYPE &value)
| set the property form the value More...
| Service (std::string name, ISvcLocator *svcloc)
| Standard Constructor. More...
SmartIF< ISvcLocator > & | serviceLocator () const override
| 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<typename IFace = IService>
SmartIF< IFace > | service (const std::string &name, 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 >
Property * | declareProperty (const std::string &name, T &property, const std::string &doc="none") const
| Declare the named property. More...
Property * | declareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="") const
| Declare remote named properties. More...
template<class T >
StatusCode | declarePrivateTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Private tool. More...
template<class T >
StatusCode | declarePublicTool (ToolHandle< T > &handle, std::string toolTypeAndName="", bool createIf=true)
| Declare used Public tool. More...
SmartIF< IAuditorSvc > & | auditorSvc () const
| The standard auditor service.May not be invoked before sysInitialize() has been invoked. More...
Public Member Functions inherited from CommonMessagingBase
virtual | ~CommonMessagingBase ()=default
| Virtual destructor. More...
SmartIF< IMessageSvc > & | msgSvc () const
| The standard message service. More...
MsgStream & | msgStream () const
| Return an uninitialized MsgStream. More...
MsgStream & | msgStream (const MSG::Level level) const
| Predefined configurable message stream for the efficient printouts. More...
MsgStream & | always () const
| shortcut for the method msgStream(MSG::ALWAYS) More...
MsgStream & | fatal () const
| shortcut for the method msgStream(MSG::FATAL) More...
MsgStream & | err () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | error () const
| shortcut for the method msgStream(MSG::ERROR) More...
MsgStream & | warning () const
| shortcut for the method msgStream(MSG::WARNING) More...
MsgStream & | info () const
| shortcut for the method msgStream(MSG::INFO) More...
MsgStream & | debug () const
| shortcut for the method msgStream(MSG::DEBUG) More...
MsgStream & | verbose () const
| shortcut for the method msgStream(MSG::VERBOSE) More...
MsgStream & | msg () const
| shortcut for the method msgStream(MSG::INFO) More...
MSG::Level | msgLevel () const
| get the output level from the embedded MsgStream More...
MSG::Level | outputLevel () const __attribute__((deprecated))
| Backward compatibility function for getting the output level. More...
bool | msgLevel (MSG::Level lvl) const
| get the output level from the embedded MsgStream More...
Public Member Functions inherited from extend_interfaces< Interfaces...>
| ~extend_interfaces () override=default
| Virtual destructor. More...

## Protected Attributes
std::vector< long > | m_seeds
int | m_row
int | m_col
int | m_lux
bool | m_useTable
bool | m_setSingleton
Protected Attributes inherited from HepRndm::BaseEngine
std::unique_ptr< CLHEP::HepRandomEngine > | m_hepEngine
Protected Attributes inherited from RndmEngine
SmartIF< IIncidentSvc > | m_pIncidentSvc
| Reference to the incident service. More...
Protected Attributes inherited from Service
IntegerProperty | m_outputLevel = MSG::NIL
| Service output level. More...
Gaudi::StateMachine::State | m_state = Gaudi::StateMachine::OFFLINE
| Service state. More...
Gaudi::StateMachine::State | m_targetState = Gaudi::StateMachine::OFFLINE
| Service state. More...

## Private Member Functions
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine () override
| Create new HepEngine.... More...
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()
template<>
std::unique_ptr< CLHEP::HepRandomEngine > | createEngine ()

## Additional Inherited Members
Public Types inherited from extends< Service, IRndmEngine, ISerialize, IIncidentListener >
using | base_class = extends
| Typedef to this class. More...
using | extend_interfaces_base = extend_interfaces< Interfaces...>
| Typedef to the base of this class. More...
Public Types inherited from Service
typedef Gaudi::PluginService::Factory< IService *, const std::string &, ISvcLocator * > | Factory
Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using | base_class = CommonMessaging
Public Types inherited from extend_interfaces< Interfaces...>
using | ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
| take union of the ext_iids of all Interfaces... More...
Protected Member Functions inherited from HepRndm::BaseEngine
void | initEngine ()
Protected Member Functions inherited from RndmEngine
| RndmEngine (const std::string &name, ISvcLocator *loc)
| Standard Constructor. More...
virtual | ~RndmEngine ()
| Standard Destructor. More...
Protected Member Functions inherited from Service
| ~Service () override
| Standard Destructor. More...
int | outputLevel () const
| get the `Service's` output level More...
Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
void | updateMsgStreamOutputLevel (int level)
| Update the output level of the cached MsgStream. More...

## Detailed Description

### template<class TYPE>
class HepRndm::Engine< TYPE >

Definition at line 25 of file HepRndmEngine.h.

## Constructor & Destructor Documentation

template<class TYPE >

HepRndm::Engine< TYPE >::Engine | ( | const std::string & | name,
|  | ISvcLocator * | loc
| ) |  |

Standard Constructor.

Definition at line 56 of file HepRndmEngines.cpp.

57 : BaseEngine (nam, loc) {
58 declareProperty("Seeds", m_seeds);
59 declareProperty("Column", m_col = 0);
60 declareProperty("Row", m_row = 1);
61 declareProperty("Luxury", m_lux = 3);
62 declareProperty("UseTable", m_useTable = false);
63 declareProperty("SetSingleton",m_setSingleton = false);
64 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
HepRndm::Engine::m_setSingleton
bool m_setSingleton
Definition: HepRndmEngine.h:31
HepRndm::BaseEngine::BaseEngine
BaseEngine(const std::string &name, ISvcLocator *loc)
Definition: HepRndmBaseEngine.h:33
Service::declareProperty
Property * declareProperty(const std::string &name, T &property, const std::string &doc="none") const
Declare the named property.
Definition: Service.h:215
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_lux
int m_lux
Definition: HepRndmEngine.h:30
template<class TYPE >

HepRndm::Engine< TYPE >::~Engine | ( |  | ) |
| override default

Standard Destructor.

## Member Function Documentation

template<class TYPE >

std::unique_ptr<CLHEP::HepRandomEngine> HepRndm::Engine< TYPE >::createEngine | ( |  | ) |
| override private virtual

Create new HepEngine....

Implements HepRndm::BaseEngine.

template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< DualRand >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 145 of file HepRndmEngines.cpp.

145 {
146 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new DualRand(m_row, m_col)
147 : new DualRand(m_seeds[0]) );
148 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< TripleRand >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 150 of file HepRndmEngines.cpp.

150 {
151 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new TripleRand(m_row, m_col)
152 : new TripleRand(m_seeds[0]));
153 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< DRand48Engine >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 155 of file HepRndmEngines.cpp.

155 {
156 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new DRand48Engine(m_row, m_col)
157 : new DRand48Engine(m_seeds[0]));
158 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< Hurd160Engine >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 160 of file HepRndmEngines.cpp.

160 {
161 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new Hurd160Engine(m_row, m_col)
162 : new Hurd160Engine(m_seeds[0]));
163 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< Hurd288Engine >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 165 of file HepRndmEngines.cpp.

165 {
166 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new Hurd288Engine(m_row, m_col)
167 : new Hurd288Engine(m_seeds[0]));
168 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< RanecuEngine >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 170 of file HepRndmEngines.cpp.

170 {
171 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new RanecuEngine(m_row)
172 : new RanecuEngine(m_seeds[0]));
173 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< RanshiEngine >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 175 of file HepRndmEngines.cpp.

175 {
176 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new RanshiEngine(m_row, m_col)
177 : new RanshiEngine(m_seeds[0]));
178 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< RanluxEngine >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 180 of file HepRndmEngines.cpp.

180 {
181 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new RanluxEngine(m_row, m_col, m_lux)
182 : new RanluxEngine(m_seeds[0], m_lux));
183 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_lux
int m_lux
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< Ranlux64Engine >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 185 of file HepRndmEngines.cpp.

185 {
186 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new Ranlux64Engine(m_row, m_col, m_lux)
187 : new Ranlux64Engine(m_seeds[0], m_lux));
188 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_lux
int m_lux
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< MTwistEngine >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 190 of file HepRndmEngines.cpp.

190 {
191 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new MTwistEngine(m_row, m_col)
192 : new MTwistEngine(m_seeds[0]));
193 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
template<>

std::unique_ptr< CLHEP::HepRandomEngine > HepRndm::Engine< HepJamesRandom >::createEngine | ( |  | ) |
| private virtual

Implements HepRndm::BaseEngine.

Definition at line 195 of file HepRndmEngines.cpp.

195 {
196 return std::unique_ptr<CLHEP::HepRandomEngine>( m_useTable ? new HepJamesRandom(m_row, m_col)
197 : new HepJamesRandom(m_seeds[0]) );
198 }
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
std::unique_ptr< CLHEP::HepRandomEngine >
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
template<class TYPE >

StatusCode HepRndm::Engine< TYPE >::finalize | ( |  | ) |
| override virtual

Finalize the Engine.

Reimplemented from HepRndm::BaseEngine.

Definition at line 109 of file HepRndmEngines.cpp.

109 {
110 m_seeds.clear();
111 return BaseEngine::finalize();
112 }
HepRndm::BaseEngine::finalize
StatusCode finalize() override
Service override: finalization.
Definition: HepRndmBaseEngine.h:41
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
std::vector::clear
T clear(T...args)
template<class TYPE >

StatusCode HepRndm::Engine< TYPE >::initialize | ( |  | ) |
| override virtual

Initialize the Engine.

Reimplemented from RndmEngine.

Definition at line 67 of file HepRndmEngines.cpp.

67 {
68 m_seeds.erase(m_seeds.begin(), m_seeds.end());
69 StatusCode status = RndmEngine::initialize();
70 if ( m_seeds.size() == 0 ) {
71 // Default seeds
72 long theSeed = 1234567;
73 m_seeds.push_back(theSeed);
74 m_seeds.push_back(0);
75 }
76 if ( status.isSuccess() ) {
77 initEngine();
78 info() << "Generator engine type:"
79 << System::typeinfoName(typeid(*hepEngine()))
80 << endmsg;
81 if ( m_useTable ) {
82 if ( m_row > 214 || m_col > 1 ) {
83 error() << "Generator engine seed table has dimension [215][2], you gave:"
84 << " Row=" << m_row << " Column:" << m_col << endmsg;
85 status = StatusCode::FAILURE;
86 }
87 else {
88 info() << "Generator engine seeds from table."
89 << " Row=" << m_row << " Column:" << m_col << endmsg;
90 }
91 }
92 info() << "Current Seed:" << hepEngine()->getSeed();
93 info() << " Luxury:" << m_lux;
94 info() << endmsg;
95 // Use the default static engine if required (e.g. for GEANT4)
96 if ( m_setSingleton ) {
97 HepRandom::setTheEngine(hepEngine());
98 info() << "This is the GEANT4 engine!" << endmsg;
99 }
100 return status;
101 }
102 error() << "Cannot initialze random engine of type:"
103 << System::typeinfoName(typeid(TYPE))
104 << endmsg;
105 return status;
106 }
HepRndm::BaseEngine::initEngine
void initEngine()
Definition: HepRndmBaseEngine.h:48
CommonMessagingBase::info
MsgStream & info() const
shortcut for the method msgStream(MSG::INFO)
Definition: CommonMessaging.h:124
System::typeinfoName
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
Definition: System.cpp:297
StatusCode::isSuccess
bool isSuccess() const
Test for a status code of SUCCESS.
Definition: StatusCode.h:76
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
HepRndm::Engine::m_useTable
bool m_useTable
Definition: HepRndmEngine.h:31
HepRndm::Engine::m_setSingleton
bool m_setSingleton
Definition: HepRndmEngine.h:31
std::vector::end
T end(T...args)
std::vector::push_back
T push_back(T...args)
CommonMessagingBase::error
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
Definition: CommonMessaging.h:118
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
std::vector::erase
T erase(T...args)
std::vector::size
T size(T...args)
std::vector::begin
T begin(T...args)
HepRndm::Engine::m_row
int m_row
Definition: HepRndmEngine.h:30
RndmEngine::initialize
virtual StatusCode initialize()
Service override: initialization.
Definition: RndmEngine.cpp:41
HepRndm::Engine::m_col
int m_col
Definition: HepRndmEngine.h:30
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:244
HepRndm::Engine::m_lux
int m_lux
Definition: HepRndmEngine.h:30
HepRndm::BaseEngine::hepEngine
CLHEP::HepRandomEngine * hepEngine()
Definition: HepRndmBaseEngine.h:36
template<class TYPE >

StatusCode HepRndm::Engine< TYPE >::seeds | ( | std::vector< long > & | seed | ) | const
| override

Retrieve seeds.

Definition at line 129 of file HepRndmEngines.cpp.

129 {
130 /*
131 const long *s = hepEngine()->getSeeds();
132 for ( size_t i = 0; i < NUMBER_OF_SEEDS; i++ ) {
133 seed.push_back(s[i]);
134 if ( m_seeds.size() > i )
135 m_seeds[i] = s[i];
136 else
137 m_seeds.push_back(s[i]);
138 }
139 */
140 seed.push_back(hepEngine()->getSeed());
141 return StatusCode::SUCCESS;
142 }
std::vector::push_back
T push_back(T...args)
StatusCode::SUCCESS
Definition: StatusCode.h:30
HepRndm::BaseEngine::hepEngine
CLHEP::HepRandomEngine * hepEngine()
Definition: HepRndmBaseEngine.h:36
template<class TYPE >

StatusCode HepRndm::Engine< TYPE >::setSeeds | ( | const std::vector< long > & | seed | ) |
| override

Set seeds.

Definition at line 115 of file HepRndmEngines.cpp.

115 {
116 m_seeds.clear();
117 std::copy(seed.begin(),seed.end(),std::back_inserter(m_seeds));
118 if ( !m_seeds.empty() ) {
119 if ( m_seeds.back() != 0 ) {
120 m_seeds.push_back(0);
121 }
122 hepEngine()->setSeeds(&m_seeds[0], m_lux);
123 return StatusCode::SUCCESS;
124 }
125 return StatusCode::FAILURE;
126 }
std::vector::empty
T empty(T...args)
std::copy
T copy(T...args)
HepRndm::Engine::m_seeds
std::vector< long > m_seeds
Definition: HepRndmEngine.h:28
std::vector::end
T end(T...args)
std::vector::push_back
T push_back(T...args)
StatusCode::FAILURE
Definition: StatusCode.h:29
StatusCode::SUCCESS
Definition: StatusCode.h:30
std::vector::clear
T clear(T...args)
std::vector::begin
T begin(T...args)
std::back_inserter
T back_inserter(T...args)
std::vector::back
T back(T...args)
HepRndm::Engine::m_lux
int m_lux
Definition: HepRndmEngine.h:30
HepRndm::BaseEngine::hepEngine
CLHEP::HepRandomEngine * hepEngine()
Definition: HepRndmBaseEngine.h:36

## Member Data Documentation

template<class TYPE >

int HepRndm::Engine< TYPE >::m_col
| protected

Definition at line 30 of file HepRndmEngine.h.

template<class TYPE >

int HepRndm::Engine< TYPE >::m_lux
| protected

Definition at line 30 of file HepRndmEngine.h.

template<class TYPE >

int HepRndm::Engine< TYPE >::m_row
| protected

Definition at line 30 of file HepRndmEngine.h.

template<class TYPE >

std::vector<long> HepRndm::Engine< TYPE >::m_seeds
| mutable protected

Definition at line 28 of file HepRndmEngine.h.

template<class TYPE >

bool HepRndm::Engine< TYPE >::m_setSingleton
| protected

Definition at line 31 of file HepRndmEngine.h.

template<class TYPE >

bool HepRndm::Engine< TYPE >::m_useTable
| protected

Definition at line 31 of file HepRndmEngine.h.

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

- GaudiSvc/src/RndmGenSvc/HepRndmEngine.h
- GaudiSvc/src/RndmGenSvc/HepRndmEngines.cpp