Geant4-11
Public Member Functions | Data Fields | Private Attributes
CLHEP::anonymous_namespace{Random.cc}::defaults Struct Reference

Public Member Functions

 defaults ()
 
 defaults (defaults const &other)=delete
 
bool ensureInitialized ()
 
defaults const & operator= (defaults const &)=delete
 
void resetEngine (HepRandomEngine &newEngine)
 
void resetEngine (HepRandomEngine *newEngine)
 
 ~defaults ()
 

Data Fields

std::shared_ptr< HepRandomEnginetheEngine
 
std::shared_ptr< HepRandomtheGenerator
 

Private Attributes

MixMaxRng theDefaultEngine
 
HepRandom theDefaultGenerator
 

Detailed Description

Definition at line 42 of file Random.cc.

Constructor & Destructor Documentation

◆ defaults() [1/2]

CLHEP::anonymous_namespace{Random.cc}::defaults::defaults ( )
inline

Definition at line 44 of file Random.cc.

45 : theGenerator( &theDefaultGenerator, do_nothing_deleter() )
46 , theEngine ( &theDefaultEngine, do_nothing_deleter() )
47 { }
std::shared_ptr< HepRandomEngine > theEngine
Definition: Random.cc:76
std::shared_ptr< HepRandom > theGenerator
Definition: Random.cc:75

◆ defaults() [2/2]

CLHEP::anonymous_namespace{Random.cc}::defaults::defaults ( defaults const &  other)
delete

◆ ~defaults()

CLHEP::anonymous_namespace{Random.cc}::defaults::~defaults ( )
inline

Definition at line 65 of file Random.cc.

66 { }

Member Function Documentation

◆ ensureInitialized()

bool CLHEP::anonymous_namespace{Random.cc}::defaults::ensureInitialized ( )
inline

Definition at line 60 of file Random.cc.

60 {
61 assert( theGenerator.get() != 0 && theEngine.get() != 0 );
62 return true;
63 }

References G4INCL::Random::anonymous_namespace{G4INCLRandom.cc}::theGenerator.

Referenced by CLHEP::HepRandom::createInstance().

◆ operator=()

defaults const & CLHEP::anonymous_namespace{Random.cc}::defaults::operator= ( defaults const &  )
delete

◆ resetEngine() [1/2]

void CLHEP::anonymous_namespace{Random.cc}::defaults::resetEngine ( HepRandomEngine newEngine)
inline

Definition at line 56 of file Random.cc.

56 {
57 theEngine.reset( &newEngine, do_nothing_deleter() );
58 }

◆ resetEngine() [2/2]

void CLHEP::anonymous_namespace{Random.cc}::defaults::resetEngine ( HepRandomEngine newEngine)
inline

Definition at line 52 of file Random.cc.

52 {
53 theEngine.reset( newEngine );
54 }

Referenced by CLHEP::HepRandom::HepRandom().

Field Documentation

◆ theDefaultEngine

MixMaxRng CLHEP::anonymous_namespace{Random.cc}::defaults::theDefaultEngine
private

Definition at line 71 of file Random.cc.

◆ theDefaultGenerator

HepRandom CLHEP::anonymous_namespace{Random.cc}::defaults::theDefaultGenerator
private

Definition at line 70 of file Random.cc.

◆ theEngine

std::shared_ptr<HepRandomEngine> CLHEP::anonymous_namespace{Random.cc}::defaults::theEngine

◆ theGenerator

std::shared_ptr<HepRandom > CLHEP::anonymous_namespace{Random.cc}::defaults::theGenerator

Definition at line 75 of file Random.cc.

Referenced by CLHEP::HepRandom::getTheGenerator().


The documentation for this struct was generated from the following file: