The Gaudi Framework  v30r3 (a5ef0a68)
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 {
44 protected:
46  using extends::extends;
47 
48 public:
50  StatusCode initialize() override;
52  double rndm() const override;
59  StatusCode rndmArray( std::vector<double>& array, long howmany, long start = 0 ) const override;
64  StreamBuffer& serialize( StreamBuffer& str ) override;
69  StreamBuffer& serialize( StreamBuffer& str ) const override;
70 };
71 
72 #endif // GAUDI_RNDMGENSVC_RNDMENGINE_H
StreamBuffer & serialize(StreamBuffer &str) override
Input serialization from stream buffer.
Definition: RndmEngine.cpp:40
StatusCode start() override
Definition: Service.cpp:136
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:51
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:54
double rndm() const override
Single shot returning single random number.
Definition: RndmEngine.cpp:46
Random Generator engine definition.
Definition: RndmEngine.h:42