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
double flat() override
Definition: P8RndmEngine.cc:7
void throwNullPtr() const
Definition: P8RndmEngine.cc:14
CLHEP::HepRandomEngine * randomEngine_
Definition: P8RndmEngine.h:39