| The Gaudi Framework v28r2-patches (bc4ad17a)

- 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/Service.h"
16 #include "GaudiKernel/ISerialize.h"
17 #include "GaudiKernel/IRndmEngine.h"
18 #include "GaudiKernel/IIncidentListener.h"
19
20 // Forward declarations
21 class IIncidentSvc;
22
46 class RndmEngine: public extends<Service,
47 IRndmEngine,
48 ISerialize,
49 IIncidentListener>
50 {
51 protected:
53 SmartIF<IIncidentSvc> m_pIncidentSvc;
54
56 RndmEngine(const std::string& name, ISvcLocator* loc);
58 ~RndmEngine() override;
59 public:
61 StatusCode initialize() override;
63 StatusCode finalize() override;
65 double rndm() const override;
72 StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0) const override;
77 StreamBuffer& serialize(StreamBuffer& str) override;
82 StreamBuffer& serialize(StreamBuffer& str) const override;
84 void handle(const Incident& inc) override;
85 };
86
87 #endif // GAUDI_RNDMGENSVC_RNDMENGINE_H
SmartIF< IIncidentSvc >
RndmEngine::serialize
StreamBuffer & serialize(StreamBuffer &str) override
Input serialization from stream buffer.
Definition: RndmEngine.cpp:63
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:56
std::string
STL class.
Service.h
IRndmEngine.h
RndmEngine::m_pIncidentSvc
SmartIF< IIncidentSvc > m_pIncidentSvc
Reference to the incident service.
Definition: RndmEngine.h:53
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:41
RndmEngine::handle
void handle(const Incident &inc) override
Inform that a new incident has occurred.
Definition: RndmEngine.cpp:78
RndmEngine::~RndmEngine
~RndmEngine() override
Standard Destructor.
Definition: RndmEngine.cpp:37
Containers::array
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
Definition: KeyedObjectManager.h:27
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:87
RndmEngine::rndm
double rndm() const override
Single shot returning single random number.
Definition: RndmEngine.cpp:73
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