Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v31r0 (aeb156f0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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
16 #include "GaudiKernel/ISerialize.h"
17 #include "GaudiKernel/Service.h"
18 
42 class RndmEngine : public extends<Service, IRndmEngine, ISerialize> {
43 protected:
45  using extends::extends;
46 
47 public:
49  StatusCode initialize() override;
51  double rndm() const override;
58  StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0 ) const override;
63  StreamBuffer& serialize( StreamBuffer& str ) override;
68  StreamBuffer& serialize( StreamBuffer& str ) const override;
69 };
70 
71 #endif // GAUDI_RNDMGENSVC_RNDMENGINE_H
StreamBuffer & serialize(StreamBuffer &str) override
Input serialization from stream buffer.
Definition: RndmEngine.cpp:39
StatusCode start() override
Definition: Service.cpp:129
The stream buffer is a small object collecting object data.
Definition: StreamBuffer.h:41
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:50
StatusCode initialize() override
Service override: initialization.
Definition: RndmEngine.cpp:31
struct GAUDI_API array
Parametrisation class for redirection array - like implementation.
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
StatusCode rndmArray(std::vector< double > &array, long howmany, long start=0) const override
Multiple shots returning vector with flat random numbers.
Definition: RndmEngine.cpp:53
double rndm() const override
Single shot returning single random number.
Definition: RndmEngine.cpp:45
Random Generator engine definition.
Definition: RndmEngine.h:42