| The Gaudi Framework v30r0 (c919700c)

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

- File List
- File Members

RndmEngine.h
Go to the documentation of this file.
1 //====================================================================
2 // Random Engine definition
3 //--------------------------------------------------------------------
4 //
5 // Package : Gaudi/RndmGenSvc ( The LHCb Offline System)
6 // Author : M.Frank
7 //====================================================================
8 #ifndef GAUDI_RNDMGENSVC_RNDMENGINE_H
9 #define GAUDI_RNDMGENSVC_RNDMENGINE_H 1
10
11 // STL include files
12 #include <vector>
13
14 // Framework include files
15 #include "GaudiKernel/IIncidentListener.h"
16 #include "GaudiKernel/IRndmEngine.h"
17 #include "GaudiKernel/ISerialize.h"
18 #include "GaudiKernel/Service.h"
19
20 // Forward declarations
21 class IIncidentSvc;
22
46 class RndmEngine : public extends<Service, IRndmEngine, ISerialize, IIncidentListener>
47 {
48 protected:
50 SmartIF<IIncidentSvc> m_pIncidentSvc;
51
53 RndmEngine( const std::string& name, ISvcLocator* loc );
55 ~RndmEngine() override;
56
57 public:
59 StatusCode initialize() override;
61 StatusCode finalize() override;
63 double rndm() const override;
70 StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0 ) const override;
75 StreamBuffer& serialize( StreamBuffer& str ) override;
80 StreamBuffer& serialize( StreamBuffer& str ) const override;
82 void handle( const Incident& inc ) override;
83 };
84
85 #endif // GAUDI_RNDMGENSVC_RNDMENGINE_H
SmartIF< IIncidentSvc >
RndmEngine::serialize
StreamBuffer & serialize(StreamBuffer &str) override
Input serialization from stream buffer.
Definition: RndmEngine.cpp:61
ISvcLocator
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
Definition: ISvcLocator.h:25
RndmEngine::RndmEngine
RndmEngine(const std::string &name, ISvcLocator *loc)
Standard Constructor.
Definition: RndmEngine.cpp:31
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:289
Service::start
StatusCode start() override
Definition: Service.cpp:137
StreamBuffer
The stream buffer is a small object collecting object data.
Definition: StreamBuffer.h:41
RndmEngine::finalize
StatusCode finalize() override
Service override: finalization.
Definition: RndmEngine.cpp:53
std::string
STL class.
Service.h
IRndmEngine.h
RndmEngine::m_pIncidentSvc
SmartIF< IIncidentSvc > m_pIncidentSvc
Reference to the incident service.
Definition: RndmEngine.h:50
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
RndmEngine::initialize
StatusCode initialize() override
Service override: initialization.
Definition: RndmEngine.cpp:37
RndmEngine::handle
void handle(const Incident &inc) override
Inform that a new incident has occurred.
Definition: RndmEngine.cpp:70
RndmEngine::~RndmEngine
~RndmEngine() override
Standard Destructor.
Definition: RndmEngine.cpp:34
Containers::array
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
Definition: KeyedObjectManager.h:28
std::vector< double >
extends
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
RndmEngine::rndmArray
StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const override
Multiple shots returning vector with flat random numbers.
Definition: RndmEngine.cpp:78
RndmEngine::rndm
double rndm() const override
Single shot returning single random number.
Definition: RndmEngine.cpp:67
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
ISerialize.h
IIncidentListener.h
RndmEngine
Random Generator engine definition.
Definition: RndmEngine.h:46
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:23