| The Gaudi Framework v27r1

- 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 virtual ~RndmEngine();
59 public:
61 virtual StatusCode initialize();
63 virtual StatusCode finalize();
65 virtual double rndm() const;
72 virtual StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0) const;
77 virtual StreamBuffer& serialize(StreamBuffer& str);
82 virtual StreamBuffer& serialize(StreamBuffer& str) const;
84 virtual void handle(const Incident& inc);
85 };
86
87 #endif // GAUDI_RNDMGENSVC_RNDMENGINE_H
SmartIF< IIncidentSvc >
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
RndmEngine::rndmArray
virtual StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const
Multiple shots returning vector with flat random numbers.
Definition: RndmEngine.cpp:87
Service::start
StatusCode start() override
Definition: Service.cpp:152
StreamBuffer
The stream buffer is a small object collecting object data.
Definition: StreamBuffer.h:41
RndmEngine::rndm
virtual double rndm() const
Single shot returning single random number.
Definition: RndmEngine.cpp:73
RndmEngine::handle
virtual void handle(const Incident &inc)
Inform that a new incident has occurred.
Definition: RndmEngine.cpp:78
std::string
STL class.
Service.h
Service::name
const std::string & name() const override
Retrieve name of the service.
Definition: Service.cpp:319
IRndmEngine.h
RndmEngine::m_pIncidentSvc
SmartIF< IIncidentSvc > m_pIncidentSvc
Reference to the incident service.
Definition: RndmEngine.h:53
RndmEngine::finalize
virtual StatusCode finalize()
Service override: finalization.
Definition: RndmEngine.cpp:56
StatusCode
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
RndmEngine::serialize
virtual StreamBuffer & serialize(StreamBuffer &str)
Input serialization from stream buffer.
Definition: RndmEngine.cpp:63
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::~RndmEngine
virtual ~RndmEngine()
Standard Destructor.
Definition: RndmEngine.cpp:37
Incident
Base class for all Incidents (computing events).
Definition: Incident.h:17
ISerialize.h
IIncidentListener.h
RndmEngine::initialize
virtual StatusCode initialize()
Service override: initialization.
Definition: RndmEngine.cpp:41
RndmEngine
Random Generator engine definition.
Definition: RndmEngine.h:46
IIncidentSvc
The interface implemented by the IncidentSvc service.
Definition: IIncidentSvc.h:21