18 #define NUMBER_OF_SEEDS 1 21 #define HEPRNDM_HEPRNDMENGINES_CPP 37 #include "CLHEP/Random/DualRand.h" 38 #include "CLHEP/Random/TripleRand.h" 39 #include "CLHEP/Random/DRand48Engine.h" 40 #include "CLHEP/Random/Hurd160Engine.h" 41 #include "CLHEP/Random/Hurd288Engine.h" 42 #include "CLHEP/Random/JamesRandom.h" 43 #include "CLHEP/Random/MTwistEngine.h" 44 #include "CLHEP/Random/RanecuEngine.h" 45 #include "CLHEP/Random/Ranlux64Engine.h" 46 #include "CLHEP/Random/RanluxEngine.h" 47 #include "CLHEP/Random/RanshiEngine.h" 51 using namespace CLHEP;
57 auto& seeds = m_seeds.value();
60 if ( m_seeds.size() == 0 ) {
62 long theSeed = 1234567;
63 seeds.push_back(theSeed);
68 info() <<
"Generator engine type:" 72 if ( m_row > 214 || m_col > 1 ) {
73 error() <<
"Generator engine seed table has dimension [215][2], you gave:" 74 <<
" Row=" << m_row <<
" Column:" << m_col <<
endmsg;
78 info() <<
"Generator engine seeds from table." 79 <<
" Row=" << m_row <<
" Column:" << m_col <<
endmsg;
82 info() <<
"Current Seed:" << hepEngine()->getSeed();
83 info() <<
" Luxury:" << m_lux.value();
86 if ( m_setSingleton ) {
87 HepRandom::setTheEngine(hepEngine());
88 info() <<
"This is the GEANT4 engine!" <<
endmsg;
92 error() <<
"Cannot initialze random engine of type:" 100 m_seeds.value().clear();
101 return BaseEngine::finalize();
106 auto& seeds = m_seeds.value();
109 if ( !seeds.empty() ) {
110 if ( seeds.back() != 0 ) {
113 hepEngine()->setSeeds(&seeds[0], m_lux);
138 :
new DualRand(m_seeds[0]) );
143 :
new TripleRand(m_seeds[0]));
148 :
new DRand48Engine(m_seeds[0]));
153 :
new Hurd160Engine(m_seeds[0]));
158 :
new Hurd288Engine(m_seeds[0]));
163 :
new RanecuEngine(m_seeds[0]));
168 :
new RanshiEngine(m_seeds[0]));
173 :
new RanluxEngine(m_seeds[0], m_lux));
178 :
new Ranlux64Engine(m_seeds[0], m_lux));
183 :
new MTwistEngine(m_seeds[0]));
188 :
new HepJamesRandom(m_seeds[0]) );
GAUDI_API const std::string typeinfoName(const std::type_info &)
Get platform independent information about the class type.
bool isSuccess() const
Test for a status code of SUCCESS.
HepRndm::Engine< DualRand > e1
#define DECLARE_COMPONENT(type)
This class is used for returning status codes from appropriate routines.
StatusCode initialize() override
Service override: initialization.
T back_inserter(T...args)
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.