GeneratorInterface
Pythia8Interface
src
P8RndmEngine.cc
Go to the documentation of this file.
1
#include "
GeneratorInterface/Pythia8Interface/interface/P8RndmEngine.h
"
2
#include "
FWCore/Utilities/interface/EDMException.h
"
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
14
void
P8RndmEngine::throwNullPtr
()
const
{
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
Generated for CMSSW Reference Manual by
1.8.16