CMS 3D CMS Logo

P8RndmEngine.h
Go to the documentation of this file.
1 #ifndef GeneratorInterface_Pythia8Interface_P8RndmEngine_h
2 #define GeneratorInterface_Pythia8Interface_P8RndmEngine_h
3 
19 #include "Pythia8/Basics.h"
20 
21 namespace CLHEP {
22  class HepRandomEngine;
23 }
24 
25 namespace gen {
26 
27  class P8RndmEngine : public Pythia8::RndmEngine {
28  public:
29  P8RndmEngine() : randomEngine_(nullptr) {}
30 
31  // Routine for generating a random number.
32  double flat() override;
33 
34  void setRandomEngine(CLHEP::HepRandomEngine* v) { randomEngine_ = v; }
35 
36  private:
37  void throwNullPtr() const;
38 
39  CLHEP::HepRandomEngine* randomEngine_;
40  };
41 } // namespace gen
42 #endif
#define nullptr
void setRandomEngine(CLHEP::HepRandomEngine *v)
Definition: P8RndmEngine.h:34
CLHEP::HepRandomEngine * randomEngine_
Definition: P8RndmEngine.h:39