HepRndm::BaseEngine Class Referenceabstract

#include <src/RndmGenSvc/HepRndmBaseEngine.h>

Inheritance diagram for HepRndm::BaseEngine:
Collaboration diagram for HepRndm::BaseEngine:

Public Member Functions

 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...
 
StatusCode finalize () override
 Service override: finalization. More...
 
- Public Member Functions inherited from RndmEngine
virtual StatusCode initialize ()
 Service override: initialization. More...
 
virtual StatusCode rndmArray (std::vector< double > &array, long howmany, long start=0) const
 Multiple shots returning vector with flat random numbers. More...
 
virtual StreamBufferserialize (StreamBuffer &str)
 Input serialization from stream buffer. More...
 
virtual StreamBufferserialize (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< BASE, Interfaces >
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...
 
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 extend_interfaces< Interfaces...>
 ~extend_interfaces () override=default
 Virtual destructor. More...
 
 ~extend_interfaces () override=default
 Virtual destructor. More...
 

Protected Member Functions

void initEngine ()
 
virtual std::unique_ptr< CLHEP::HepRandomEngine > createEngine ()=0
 
- Protected Member Functions inherited from RndmEngine
 RndmEngine (const std::string &name, ISvcLocator *loc)
 Standard Constructor. More...
 
virtual ~RndmEngine ()
 Standard Destructor. More...
 

Protected Attributes

std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine
 
- Protected Attributes inherited from RndmEngine
SmartIF< IIncidentSvcm_pIncidentSvc
 Reference to the incident service. More...
 

Additional Inherited Members

- Public Types inherited from extends< BASE, Interfaces >
using base_class = extends
 Typedef to this class. More...
 
using extend_interfaces_base = extend_interfaces< Interfaces...>
 Typedef to the base of this class. More...
 
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 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...
 
using ext_iids = typename Gaudi::interface_list_cat< typename Interfaces::ext_iids...>::type
 take union of the ext_iids of all Interfaces... More...
 

Detailed Description

Definition at line 29 of file HepRndmBaseEngine.h.

Constructor & Destructor Documentation

HepRndm::BaseEngine::BaseEngine ( const std::string &  name,
ISvcLocator loc 
)
inline

Definition at line 33 of file HepRndmBaseEngine.h.

34  : RndmEngine( name, loc ) { }
RndmEngine(const std::string &name, ISvcLocator *loc)
Standard Constructor.
Definition: RndmEngine.cpp:31
HepRndm::BaseEngine::~BaseEngine ( )
overridedefault

Member Function Documentation

StatusCode HepRndm::BaseEngine::finalize ( )
inlineoverridevirtual

Service override: finalization.

Reimplemented from RndmEngine.

Reimplemented in HepRndm::Engine< TYPE >.

Definition at line 41 of file HepRndmBaseEngine.h.

41  {
42  if (m_hepEngine) CLHEP::HepRandom::setTheEngine(nullptr);
43  m_hepEngine.reset();
44  return RndmEngine::finalize();
45  }
std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine
virtual StatusCode finalize()
Service override: finalization.
Definition: RndmEngine.cpp:56
CLHEP::HepRandomEngine* HepRndm::BaseEngine::hepEngine ( )
inline

Definition at line 36 of file HepRndmBaseEngine.h.

36 { return m_hepEngine.get(); }
std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine
const CLHEP::HepRandomEngine* HepRndm::BaseEngine::hepEngine ( ) const
inline

Definition at line 37 of file HepRndmBaseEngine.h.

37 { return m_hepEngine.get(); }
std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine
void HepRndm::BaseEngine::initEngine ( )
inlineprotected

Definition at line 48 of file HepRndmBaseEngine.h.

std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine
virtual std::unique_ptr< CLHEP::HepRandomEngine > createEngine()=0
double HepRndm::BaseEngine::rndm ( ) const
inlineoverridevirtual

Single shot returning single random number.

Reimplemented from RndmEngine.

Definition at line 39 of file HepRndmBaseEngine.h.

39 { return m_hepEngine->flat(); }
std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine

Member Data Documentation

std::unique_ptr<CLHEP::HepRandomEngine> HepRndm::BaseEngine::m_hepEngine
protected

Definition at line 31 of file HepRndmBaseEngine.h.


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