CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes
ThePEG::RandomEngineGlue Class Reference

#include <RandomEngineGlue.h>

Inheritance diagram for ThePEG::RandomEngineGlue:

Classes

class  Proxy
 

Public Member Functions

void flush ()
 
 RandomEngineGlue ()
 
virtual ~RandomEngineGlue ()
 

Static Public Member Functions

static void Init ()
 

Protected Member Functions

virtual IBPtr clone () const
 
virtual void doinit () throw (InitException)
 
virtual void fill ()
 
virtual IBPtr fullclone () const
 
virtual void setSeed (long seed)
 

Private Attributes

Proxy::ProxyID proxyID
 
CLHEP::HepRandomEngine * randomEngine
 

Static Private Attributes

static ClassDescription
< RandomEngineGlue
initRandomEngineGlue
 

Detailed Description

Definition at line 23 of file RandomEngineGlue.h.

Constructor & Destructor Documentation

RandomEngineGlue::RandomEngineGlue ( )

Definition at line 18 of file RandomEngineGlue.cc.

18  :
20 {
21 }
CLHEP::HepRandomEngine & getEngineReference()
CLHEP::HepRandomEngine * randomEngine
RandomEngineGlue::~RandomEngineGlue ( )
virtual

Definition at line 23 of file RandomEngineGlue.cc.

24 {
25 }

Member Function Documentation

virtual IBPtr ThePEG::RandomEngineGlue::clone ( void  ) const
inlineprotectedvirtual

Definition at line 49 of file RandomEngineGlue.h.

49 { return new_ptr(*this); }
void RandomEngineGlue::doinit ( )
throw (InitException
)
protectedvirtual

Definition at line 45 of file RandomEngineGlue.cc.

References ThePEG::Proxy< Proxy >::find(), flush(), and proxyID.

46 {
47  RandomGenerator::doinit();
48 
49  boost::shared_ptr<Proxy> proxy = Proxy::find(proxyID);
50  if (!proxy)
51  throw InitException();
52 
53  proxy->instance = this;
54  flush();
55 }
static boost::shared_ptr< Proxy > find(ProxyID id)
Definition: Proxy.h:46
void RandomEngineGlue::fill ( void  )
protectedvirtual

Definition at line 33 of file RandomEngineGlue.cc.

References randomEngine.

34 {
35  nextNumber = theNumbers.begin();
36  for(RndVector::iterator it = nextNumber; it != theNumbers.end(); ++it)
37  *it = randomEngine->flat();
38 }
CLHEP::HepRandomEngine * randomEngine
void RandomEngineGlue::flush ( )

Definition at line 27 of file RandomEngineGlue.cc.

Referenced by doinit(), and ThePEGInterface::flushRandomNumberGenerator().

28 {
29  RandomGenerator::flush();
30  gaussSaved = false;
31 }
virtual IBPtr ThePEG::RandomEngineGlue::fullclone ( ) const
inlineprotectedvirtual

Definition at line 50 of file RandomEngineGlue.h.

50 { return new_ptr(*this); }
void RandomEngineGlue::Init ( void  )
static

Definition at line 59 of file RandomEngineGlue.cc.

References proxyID.

59  {
60  typedef Proxy::ProxyID ProxyID;
61 
62  static ClassDocumentation<RandomEngineGlue> documentation
63  ("Interface to the CMSSW RandomNumberEngine.");
64  static Parameter<RandomEngineGlue, ProxyID> interfaceProxyID
65  ("ProxyID", "The ProxyID.",
66  &RandomEngineGlue::proxyID, ProxyID(),
67  ProxyID(), ProxyID(), false, false, false);
68 
69  interfaceProxyID.rank(11);
70 }
unsigned long ProxyID
Definition: Proxy.h:16
void RandomEngineGlue::setSeed ( long  seed)
protectedvirtual

Definition at line 40 of file RandomEngineGlue.cc.

41 {
42  // we ignore this, CMSSW overrides the seed from ThePEG
43 }

Member Data Documentation

ClassDescription< RandomEngineGlue > RandomEngineGlue::initRandomEngineGlue
staticprivate

Definition at line 58 of file RandomEngineGlue.h.

Proxy::ProxyID ThePEG::RandomEngineGlue::proxyID
private

Definition at line 55 of file RandomEngineGlue.h.

Referenced by doinit(), and Init().

CLHEP::HepRandomEngine* ThePEG::RandomEngineGlue::randomEngine
private

Definition at line 56 of file RandomEngineGlue.h.

Referenced by fill().