CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
myEvtRandomEngine.h
Go to the documentation of this file.
1 //--------------------------------------------------------------------------
2 //
3 // Module: myEvtRandomEngine.hh
4 //
5 // Description:
6 // this is an EvtRandomEngine
7 // It is used as an interface of the random number engine provided
8 // by the random number generator service and EvtGen
9 // Its "random()" method uses the "Flat()" method of the CLHEP::HepRandomEngine
10 // provided by the Random Number Generator Service
11 //
12 // Modification history:
13 //
14 // Nello Nappi May 9, 2007 Module created
15 //
16 //------------------------------------------------------------------------
17 
18 #ifndef MYEVTRANDOMENGINE_HH
19 #define MYEVTRANDOMENGINE_HH
20 
21 #include "EvtGenBase/EvtRandomEngine.hh"
22 
23 namespace CLHEP {
24  class HepRandomEngine;
25 }
26 
27 class myEvtRandomEngine : public EvtRandomEngine {
28 public:
29  myEvtRandomEngine(CLHEP::HepRandomEngine* xx);
30 
31  ~myEvtRandomEngine() override;
32 
33  double random() override;
34 
35  void setRandomEngine(CLHEP::HepRandomEngine* v) { the_engine = v; }
36 
37  CLHEP::HepRandomEngine* engine() const { return the_engine; }
38 
39 private:
40  void throwNullPtr() const;
41 
42  CLHEP::HepRandomEngine* the_engine;
43 };
44 #endif
myEvtRandomEngine(CLHEP::HepRandomEngine *xx)
~myEvtRandomEngine() override
CLHEP::HepRandomEngine * engine() const
double random() override
CLHEP::HepRandomEngine * the_engine
void throwNullPtr() const
void setRandomEngine(CLHEP::HepRandomEngine *v)