myEvtRandomEngine

Macros

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
//--------------------------------------------------------------------------
//
// Module: myEvtRandomEngine.hh
//
// Description:
// this is an EvtRandomEngine
// It is used as an interface of the random number engine provided
// by the random number generator service and EvtGen
// Its "random()" method uses the "Flat()" method of the CLHEP::HepRandomEngine
// provided by the Random Number Generator Service
//
// Modification history:
//
//   Nello Nappi     May 9, 2007         Module created
//
//------------------------------------------------------------------------

#ifndef MYEVTRANDOMENGINE_HH
#define MYEVTRANDOMENGINE_HH

#include "EvtGenBase/EvtRandomEngine.hh"

namespace CLHEP {
  class HepRandomEngine;
}

class myEvtRandomEngine : public EvtRandomEngine {
public:
  myEvtRandomEngine(CLHEP::HepRandomEngine* xx);

  ~myEvtRandomEngine() override;

  double random() override;

  void setRandomEngine(CLHEP::HepRandomEngine* v) { the_engine = v; }

  CLHEP::HepRandomEngine* engine() const { return the_engine; }

private:
  void throwNullPtr() const;

  CLHEP::HepRandomEngine* the_engine;
};
#endif