CMS 3D CMS Logo

P8RndmEngine.cc
Go to the documentation of this file.
3 #include "CLHEP/Random/RandomEngine.h"
4 
5 namespace gen {
6 
7  double P8RndmEngine::flat(void) {
8  if (randomEngine_ == nullptr) {
9  throwNullPtr();
10  }
11  return randomEngine_->flat();
12  }
13 
15  throw edm::Exception(edm::errors::LogicError) << "The Pythia 8 code attempted to a generate random number while\n"
16  << "the engine pointer was null. This might mean that the code\n"
17  << "was modified to generate a random number outside the event and\n"
18  << "beginLuminosityBlock methods, which is not allowed.\n";
19  }
20 } // namespace gen
edm::errors::LogicError
Definition: EDMException.h:37
gen::P8RndmEngine::throwNullPtr
void throwNullPtr() const
Definition: P8RndmEngine.cc:14
gen::P8RndmEngine::flat
double flat() override
Definition: P8RndmEngine.cc:7
P8RndmEngine.h
EDMException.h
gen::P8RndmEngine::randomEngine_
CLHEP::HepRandomEngine * randomEngine_
Definition: P8RndmEngine.h:39
gen
Definition: PythiaDecays.h:13
Exception
Definition: hltDiff.cc:245