Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:41

0001 //--------------------------------------------------------------------------
0002 //
0003 // Module: myEvtRandomEngine.hh
0004 //
0005 // Description:
0006 // this is an EvtRandomEngine
0007 // It is used as an interface of the random number engine provided
0008 // by the random number generator service and EvtGen
0009 // Its "random()" method uses the "Flat()" method of the CLHEP::HepRandomEngine
0010 // provided by the Random Number Generator Service
0011 //
0012 // Modification history:
0013 //
0014 //   Nello Nappi     May 9, 2007         Module created
0015 //
0016 //------------------------------------------------------------------------
0017 
0018 #ifndef MYEVTRANDOMENGINE_HH
0019 #define MYEVTRANDOMENGINE_HH
0020 
0021 #include "EvtGenBase/EvtRandomEngine.hh"
0022 
0023 namespace CLHEP {
0024   class HepRandomEngine;
0025 }
0026 
0027 class myEvtRandomEngine : public EvtRandomEngine {
0028 public:
0029   myEvtRandomEngine(CLHEP::HepRandomEngine* xx);
0030 
0031   ~myEvtRandomEngine() override;
0032 
0033   double random() override;
0034 
0035   void setRandomEngine(CLHEP::HepRandomEngine* v) { the_engine = v; }
0036 
0037   CLHEP::HepRandomEngine* engine() const { return the_engine; }
0038 
0039 private:
0040   void throwNullPtr() const;
0041 
0042   CLHEP::HepRandomEngine* the_engine;
0043 };
0044 #endif