Geant4 9.6.0
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 23 of file EngineFactory.h.

Member Function Documentation

◆ newEngine() [1/2]

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

Definition at line 51 of file EngineFactory.cc.

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

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

◆ newEngine() [2/2]

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

Definition at line 72 of file EngineFactory.cc.

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

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