15 #ifndef HEPRNDM_HEPRNDMBASEENGINE_H
16 #define HEPRNDM_HEPRNDMBASEENGINE_H 1
20 #include "CLHEP/Random/Random.h"
24 class HepRandomEngine;
36 CLHEP::HepRandomEngine*
hepEngine() {
return m_hepEngine.get(); }
37 const CLHEP::HepRandomEngine*
hepEngine()
const {
return m_hepEngine.get(); }
39 double rndm()
const override {
return m_hepEngine->flat(); }
42 if (m_hepEngine) CLHEP::HepRandom::setTheEngine(
nullptr);
49 virtual std::unique_ptr<CLHEP::HepRandomEngine>
createEngine() = 0;
52 #endif // HEPRNDM_HEPRNDMBASEENGINE_H
The ISvcLocator is the interface implemented by the Service Factory in the Application Manager to loc...
StatusCode finalize() override
Service override: finalization.
std::unique_ptr< CLHEP::HepRandomEngine > m_hepEngine
virtual std::unique_ptr< CLHEP::HepRandomEngine > createEngine()=0
double rndm() const override
Single shot returning single random number.
virtual StatusCode finalize()
Service override: finalization.
This class is used for returning status codes from appropriate routines.
const CLHEP::HepRandomEngine * hepEngine() const
BaseEngine(const std::string &name, ISvcLocator *loc)
~BaseEngine() override=default
Random Generator engine definition.
CLHEP::HepRandomEngine * hepEngine()