Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:13:58

0001 #include "GeneratorInterface/Pythia8Interface/interface/P8RndmEngine.h"
0002 #include "FWCore/Utilities/interface/EDMException.h"
0003 #include "CLHEP/Random/RandomEngine.h"
0004 
0005 namespace gen {
0006 
0007   double P8RndmEngine::flat(void) {
0008     if (randomEngine_ == nullptr) {
0009       throwNullPtr();
0010     }
0011     return randomEngine_->flat();
0012   }
0013 
0014   void P8RndmEngine::throwNullPtr() const {
0015     throw edm::Exception(edm::errors::LogicError) << "The Pythia 8 code attempted to a generate random number while\n"
0016                                                   << "the engine pointer was null. This might mean that the code\n"
0017                                                   << "was modified to generate a random number outside the event and\n"
0018                                                   << "beginLuminosityBlock methods, which is not allowed.\n";
0019   }
0020 }  // namespace gen