The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
HepRndm::SynchronizedEngine< Engine > Class Template Reference

#include </builds/gaudi/Gaudi/GaudiSvc/src/RndmGenSvc/HepRndmBaseEngine.h>

Inheritance diagram for HepRndm::SynchronizedEngine< Engine >:
Collaboration diagram for HepRndm::SynchronizedEngine< Engine >:

Public Member Functions

double flat () override
 
void flatArray (const int size, double *vect) override
 
void setSeed (long seed, int n) override
 
void setSeeds (const long *seeds, int n) override
 
void saveStatus (const char filename[]="Config.conf") const override
 
void restoreStatus (const char filename[]="Config.conf") override
 
void showStatus () const override
 
std::ostream & put (std::ostream &os) const override
 
std::istream & get (std::istream &is) override
 
std::istream & getState (std::istream &is) override
 
std::vector< unsigned long > put () const override
 
bool get (const std::vector< unsigned long > &v) override
 
bool getState (const std::vector< unsigned long > &v) override
 
 operator double () override
 
 operator float () override
 
 operator unsigned int () override
 
- Public Member Functions inherited from HepRndm::Engine< TYPE >
StatusCode initialize () override
 Initialize the Engine.
 
StatusCode finalize () override
 Finalize the Engine.
 
StatusCode setSeeds (const std::vector< long > &seed) override
 Set seeds.
 
StatusCode seeds (std::vector< long > &seed) const override
 Retrieve seeds.
 
 BaseEngine (const std::string &name, ISvcLocator *loc)
 Standard Constructor.
 
- Public Member Functions inherited from HepRndm::BaseEngine
 BaseEngine (const std::string &name, ISvcLocator *loc)
 
CLHEP::HepRandomEngine * hepEngine ()
 
const CLHEP::HepRandomEngine * hepEngine () const
 
double rndm () const override
 
StatusCode finalize () override
 
- Public Member Functions inherited from RndmEngine
double rndm () const override
 Single shot returning single random number.
 
StatusCode rndmArray (std::vector< double > &array, long howmany, long start=0) const override
 Multiple shots returning vector with flat random numbers.
 
StreamBufferserialize (StreamBuffer &str) override
 Input serialization from stream buffer.
 
StreamBufferserialize (StreamBuffer &str) const override
 Output serialization to stream buffer.
 
- Public Member Functions inherited from extends< Service, IRndmEngine, ISerialize >
void const * i_cast (const InterfaceID &tid) const override
 Implementation of IInterface::i_cast.
 
StatusCode queryInterface (const InterfaceID &ti, void **pp) override
 Implementation of IInterface::queryInterface.
 
std::vector< std::string > getInterfaceNames () const override
 Implementation of IInterface::getInterfaceNames.
 
- Public Member Functions inherited from Service
const std::string & name () const override
 Retrieve name of the service.
 
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.
 
StatusCode sysStart () override
 Initialize Service.
 
StatusCode sysStop () override
 Initialize Service.
 
StatusCode sysFinalize () override
 Finalize Service.
 
StatusCode sysReinitialize () override
 Re-initialize the Service.
 
StatusCode sysRestart () override
 Re-initialize the Service.
 
 Service (std::string name, ISvcLocator *svcloc)
 Standard Constructor.
 
SmartIF< ISvcLocator > & serviceLocator () const override
 Retrieve pointer to service locator.
 
template<typename IFace = IService>
SmartIF< IFace > service (const std::string &name, bool createIf=true) const
 
template<class T>
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandle< T > &hndl, const std::string &doc="none")
 
template<class T>
StatusCode declareTool (ToolHandle< T > &handle, bool createIf=true)
 
template<class T>
StatusCode declareTool (ToolHandle< T > &handle, const std::string &toolTypeAndName, bool createIf=true)
 Declare used tool.
 
template<class T>
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, ToolHandleArray< T > &hndlArr, const std::string &doc="none")
 
template<class T>
void addToolsArray (ToolHandleArray< T > &hndlArr)
 
const std::vector< IAlgTool * > & tools () const
 
SmartIF< IAuditorSvc > & auditorSvc () const
 The standard auditor service.May not be invoked before sysInitialize() has been invoked.
 
- Public Member Functions inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property.
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals.
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string.
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
 PropertyHolder ()=default
 
Gaudi::Details::PropertyBasedeclareProperty (Gaudi::Details::PropertyBase &prop)
 Declare a property.
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, TYPE &value, const std::string &doc="none")
 Helper to wrap a regular data member and use it as a regular property.
 
Gaudi::Details::PropertyBasedeclareProperty (const std::string &name, Gaudi::Property< TYPE, VERIFIER, HANDLERS > &prop, const std::string &doc="none")
 Declare a PropertyBase instance setting name and documentation.
 
Gaudi::Details::PropertyBasedeclareRemoteProperty (const std::string &name, IProperty *rsvc, const std::string &rname="")
 Declare a remote property.
 
StatusCode setProperty (const std::string &name, const Gaudi::Details::PropertyBase &p) override
 set the property from another property with a different name
 
StatusCode setProperty (const std::string &s) override
 set the property from the formatted string
 
StatusCode setProperty (const Gaudi::Details::PropertyBase &p)
 Set the property from a property.
 
StatusCode setProperty (const std::string &name, const char *v)
 Special case for string literals.
 
StatusCode setProperty (const std::string &name, const std::string &v)
 Special case for std::string.
 
StatusCode setProperty (const std::string &name, const TYPE &value)
 set the property form the value
 
StatusCode setPropertyRepr (const std::string &n, const std::string &r) override
 set the property from name and value string representation
 
StatusCode getProperty (Gaudi::Details::PropertyBase *p) const override
 get the property
 
const Gaudi::Details::PropertyBasegetProperty (std::string_view name) const override
 get the property by name
 
StatusCode getProperty (std::string_view n, std::string &v) const override
 convert the property to the string
 
const std::vector< Gaudi::Details::PropertyBase * > & getProperties () const override
 get all properties
 
bool hasProperty (std::string_view name) const override
 Return true if we have a property with the given name.
 
Gaudi::Details::PropertyBaseproperty (std::string_view name) const
 \fixme property and bindPropertiesTo should be protected
 
void bindPropertiesTo (Gaudi::Interfaces::IOptionsSvc &optsSvc)
 
 PropertyHolder (const PropertyHolder &)=delete
 
PropertyHolderoperator= (const PropertyHolder &)=delete
 
- Public Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level msgLevel () const
 get the cached level (originally extracted from the embedded MsgStream)
 
bool msgLevel (MSG::Level lvl) const
 get the output level from the embedded MsgStream
 
- Public Member Functions inherited from CommonMessagingBase
virtual ~CommonMessagingBase ()=default
 Virtual destructor.
 
const SmartIF< IMessageSvc > & msgSvc () const
 The standard message service.
 
MsgStreammsgStream () const
 Return an uninitialized MsgStream.
 
MsgStreammsgStream (const MSG::Level level) const
 Predefined configurable message stream for the efficient printouts.
 
MsgStreamalways () const
 shortcut for the method msgStream(MSG::ALWAYS)
 
MsgStreamfatal () const
 shortcut for the method msgStream(MSG::FATAL)
 
MsgStreamerr () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamerror () const
 shortcut for the method msgStream(MSG::ERROR)
 
MsgStreamwarning () const
 shortcut for the method msgStream(MSG::WARNING)
 
MsgStreaminfo () const
 shortcut for the method msgStream(MSG::INFO)
 
MsgStreamdebug () const
 shortcut for the method msgStream(MSG::DEBUG)
 
MsgStreamverbose () const
 shortcut for the method msgStream(MSG::VERBOSE)
 
MsgStreammsg () const
 shortcut for the method msgStream(MSG::INFO)
 

Private Attributes

std::mutex m_mutex
 

Additional Inherited Members

- Public Types inherited from extends< Service, IRndmEngine, ISerialize >
using base_class
 Typedef to this class.
 
using extend_interfaces_base
 Typedef to the base of this class.
 
- Public Types inherited from Service
using Factory = Gaudi::PluginService::Factory<IService*( const std::string&, ISvcLocator* )>
 
- Public Types inherited from PropertyHolder< CommonMessaging< implements< IService, IProperty, IStateful > > >
using PropertyHolderImpl
 Typedef used to refer to this class from derived classes, as in.
 
- Public Types inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
using base_class
 
- Public Types inherited from extend_interfaces< Interfaces... >
using ext_iids
 take union of the ext_iids of all Interfaces...
 
- Protected Member Functions inherited from HepRndm::BaseEngine
void initEngine ()
 
template<typename Engine, typename... Args>
auto create_engine (Args &&... args)
 
- Protected Member Functions inherited from Service
std::vector< IAlgTool * > & tools ()
 
 ~Service () override
 
int outputLevel () const
 get the Service's output level
 
- Protected Member Functions inherited from CommonMessaging< implements< IService, IProperty, IStateful > >
MSG::Level setUpMessaging () const
 Set up local caches.
 
MSG::Level resetMessaging ()
 Reinitialize internal states.
 
void updateMsgStreamOutputLevel (int level)
 Update the output level of the cached MsgStream.
 
- Protected Attributes inherited from HepRndm::Engine< TYPE >
Gaudi::Property< std::vector< long > > m_seeds { this, "Seeds", {}, "seed table" }
 
Gaudi::Property< int > m_col { this, "Column", 0 }
 
Gaudi::Property< int > m_row { this, "Row", 1 }
 
Gaudi::Property< int > m_lux { this, "Luxury", 3 }
 
Gaudi::Property< bool > m_useTable { this, "UseTable", false }
 
Gaudi::Property< bool > m_setSingleton { this, "SetSingleton", false }
 
- Protected Attributes inherited from HepRndm::BaseEngine
std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine
 
Gaudi::Property< bool > m_threadSafe { this, "ThreadSafe", true }
 
- Protected Attributes inherited from Service
Gaudi::StateMachine::State m_state = Gaudi::StateMachine::OFFLINE
 Service state.
 
Gaudi::StateMachine::State m_targetState = Gaudi::StateMachine::OFFLINE
 Service state.
 
Gaudi::Property< int > m_outputLevel { this, "OutputLevel", MSG::NIL, "output level" }
 flag indicating whether ToolHandle tools have been added to m_tools
 
Gaudi::Property< bool > m_auditorInitialize { this, "AuditInitialize", false, "trigger auditor on initialize()" }
 
Gaudi::Property< bool > m_auditorStart { this, "AuditStart", false, "trigger auditor on start()" }
 
Gaudi::Property< bool > m_auditorStop { this, "AuditStop", false, "trigger auditor on stop()" }
 
Gaudi::Property< bool > m_auditorFinalize { this, "AuditFinalize", false, "trigger auditor on finalize()" }
 
Gaudi::Property< bool > m_auditorReinitialize { this, "AuditReinitialize", false, "trigger auditor on reinitialize()" }
 
Gaudi::Property< bool > m_auditorRestart { this, "AuditRestart", false, "trigger auditor on restart()" }
 
Gaudi::Property< bool > m_autoRetrieveTools
 
Gaudi::Property< bool > m_checkToolDeps
 
SmartIF< IAuditorSvcm_pAuditorSvc
 Auditor Service.
 

Detailed Description

template<typename Engine>
class HepRndm::SynchronizedEngine< Engine >

Definition at line 42 of file HepRndmBaseEngine.h.

Member Function Documentation

◆ flat()

template<typename Engine>
double HepRndm::SynchronizedEngine< Engine >::flat ( )
inlineoverride

◆ flatArray()

template<typename Engine>
void HepRndm::SynchronizedEngine< Engine >::flatArray ( const int size,
double * vect )
inlineoverride

Definition at line 57 of file HepRndmBaseEngine.h.

◆ get() [1/2]

template<typename Engine>
bool HepRndm::SynchronizedEngine< Engine >::get ( const std::vector< unsigned long > & v)
inlineoverride

Definition at line 97 of file HepRndmBaseEngine.h.

97 {
99 return Engine::get( v );
100 }

◆ get() [2/2]

template<typename Engine>
std::istream & HepRndm::SynchronizedEngine< Engine >::get ( std::istream & is)
inlineoverride

Definition at line 85 of file HepRndmBaseEngine.h.

85 {
87 return Engine::get( is );
88 }

◆ getState() [1/2]

template<typename Engine>
bool HepRndm::SynchronizedEngine< Engine >::getState ( const std::vector< unsigned long > & v)
inlineoverride

Definition at line 101 of file HepRndmBaseEngine.h.

101 {
103 return Engine::getState( v );
104 }

◆ getState() [2/2]

template<typename Engine>
std::istream & HepRndm::SynchronizedEngine< Engine >::getState ( std::istream & is)
inlineoverride

Definition at line 89 of file HepRndmBaseEngine.h.

◆ operator double()

template<typename Engine>
HepRndm::SynchronizedEngine< Engine >::operator double ( )
inlineoverride

Definition at line 105 of file HepRndmBaseEngine.h.

105 {
107 return Engine::operator double();
108 }

◆ operator float()

template<typename Engine>
HepRndm::SynchronizedEngine< Engine >::operator float ( )
inlineoverride

Definition at line 109 of file HepRndmBaseEngine.h.

109 {
111 return Engine::operator float();
112 }

◆ operator unsigned int()

template<typename Engine>
HepRndm::SynchronizedEngine< Engine >::operator unsigned int ( )
inlineoverride

Definition at line 113 of file HepRndmBaseEngine.h.

113 {
115 return Engine::operator unsigned int();
116 }

◆ put() [1/2]

template<typename Engine>
std::vector< unsigned long > HepRndm::SynchronizedEngine< Engine >::put ( ) const
inlineoverride

Definition at line 93 of file HepRndmBaseEngine.h.

93 {
95 return Engine::put();
96 }

◆ put() [2/2]

template<typename Engine>
std::ostream & HepRndm::SynchronizedEngine< Engine >::put ( std::ostream & os) const
inlineoverride

Definition at line 81 of file HepRndmBaseEngine.h.

81 {
83 return Engine::put( os );
84 }

◆ restoreStatus()

template<typename Engine>
void HepRndm::SynchronizedEngine< Engine >::restoreStatus ( const char filename[] = "Config.conf")
inlineoverride

Definition at line 73 of file HepRndmBaseEngine.h.

◆ saveStatus()

template<typename Engine>
void HepRndm::SynchronizedEngine< Engine >::saveStatus ( const char filename[] = "Config.conf") const
inlineoverride

Definition at line 69 of file HepRndmBaseEngine.h.

◆ setSeed()

template<typename Engine>
void HepRndm::SynchronizedEngine< Engine >::setSeed ( long seed,
int n )
inlineoverride

Definition at line 61 of file HepRndmBaseEngine.h.

61 {
63 return Engine::setSeed( seed, n );
64 }

◆ setSeeds()

template<typename Engine>
void HepRndm::SynchronizedEngine< Engine >::setSeeds ( const long * seeds,
int n )
inlineoverride

Definition at line 65 of file HepRndmBaseEngine.h.

65 {
67 return Engine::setSeeds( seeds, n );
68 }
StatusCode setSeeds(const std::vector< long > &seed) override
Set seeds.
StatusCode seeds(std::vector< long > &seed) const override
Retrieve seeds.

◆ showStatus()

template<typename Engine>
void HepRndm::SynchronizedEngine< Engine >::showStatus ( ) const
inlineoverride

Definition at line 77 of file HepRndmBaseEngine.h.

Member Data Documentation

◆ m_mutex

template<typename Engine>
std::mutex HepRndm::SynchronizedEngine< Engine >::m_mutex
mutableprivate

Definition at line 45 of file HepRndmBaseEngine.h.


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