Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
CLHEP::EngineFactory Class Reference

#include <EngineFactory.h>

Static Public Member Functions

static HepRandomEnginenewEngine (std::istream &is)
 
static HepRandomEnginenewEngine (std::vector< unsigned long > const &v)
 

Detailed Description

Definition at line 22 of file EngineFactory.h.

Member Function Documentation

◆ newEngine() [1/2]

HepRandomEngine * CLHEP::EngineFactory::newEngine ( std::istream & is)
static

Definition at line 53 of file EngineFactory.cc.

53 {
54 HepRandomEngine* eptr;
55 std::string tag;
56 is >> tag;
57 eptr = makeAnEngine <HepJamesRandom> (tag, is); if (eptr) return eptr;
58 eptr = makeAnEngine <RanecuEngine> (tag, is); if (eptr) return eptr;
59 eptr = makeAnEngine <Ranlux64Engine> (tag, is); if (eptr) return eptr;
60 eptr = makeAnEngine <RanluxppEngine> (tag, is); if (eptr) return eptr;
61 eptr = makeAnEngine <MixMaxRng> (tag, is); if (eptr) return eptr;
62 eptr = makeAnEngine <MTwistEngine> (tag, is); if (eptr) return eptr;
63 eptr = makeAnEngine <DualRand> (tag, is); if (eptr) return eptr;
64 eptr = makeAnEngine <RanluxEngine> (tag, is); if (eptr) return eptr;
65 eptr = makeAnEngine <RanshiEngine> (tag, is); if (eptr) return eptr;
66 eptr = makeAnEngine <NonRandomEngine> (tag, is); if (eptr) return eptr;
67 is.clear(std::ios::badbit | is.rdstate());
68 std::cerr <<
69 "Input mispositioned or bad in reading anonymous engine\n"
70 << "\nBegin-tag read was: " << tag
71 << "\nInput stream is probably fouled up\n";
72 return eptr;
73}

Referenced by CLHEP::HepRandomEngine::newEngine(), and CLHEP::HepRandomEngine::newEngine().

◆ newEngine() [2/2]

HepRandomEngine * CLHEP::EngineFactory::newEngine ( std::vector< unsigned long > const & v)
static

Definition at line 76 of file EngineFactory.cc.

76 {
77 HepRandomEngine* eptr;
78 eptr = makeAnEngine <HepJamesRandom> (v); if (eptr) return eptr;
79 eptr = makeAnEngine <RanecuEngine> (v); if (eptr) return eptr;
80 eptr = makeAnEngine <Ranlux64Engine> (v); if (eptr) return eptr;
81 eptr = makeAnEngine <RanluxppEngine> (v); if (eptr) return eptr;
82 eptr = makeAnEngine <MixMaxRng> (v); if (eptr) return eptr;
83 eptr = makeAnEngine <MTwistEngine> (v); if (eptr) return eptr;
84 eptr = makeAnEngine <DualRand> (v); if (eptr) return eptr;
85 eptr = makeAnEngine <RanluxEngine> (v); if (eptr) return eptr;
86 eptr = makeAnEngine <RanshiEngine> (v); if (eptr) return eptr;
87 eptr = makeAnEngine <NonRandomEngine> (v); if (eptr) return eptr;
88 std::cerr <<
89 "Cannot correctly get anonymous engine from vector\n"
90 << "First unsigned long was: " << v[0]
91 << " Vector size was: " << v.size() <<"\n";
92 return eptr;
93}

The documentation for this class was generated from the following files: