LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
rndm::SeedMaster< SEED >::EngineInfo_t Struct Reference

Information for each engine. More...

Public Member Functions

bool hasSeeder () const
 
bool isFrozen () const
 
void freeze (bool doFreeze=true)
 
void setSeeder (Seeder_t new_seeder)
 
template<typename... Args>
void applySeed (Args...args) const
 Execute the seeder (whatever arguments it has...) More...
 
template<typename... Args>
void autoApplySeed (Args...args) const
 Applies the seed unless frozen. More...
 

Private Attributes

Seeder_t seeder
 engine seeder More...
 
bool autoseed = true
 whether seeding can be automatic More...
 

Detailed Description

template<typename SEED>
struct rndm::SeedMaster< SEED >::EngineInfo_t

Information for each engine.

Definition at line 226 of file SeedMaster.h.

Member Function Documentation

template<typename SEED>
template<typename... Args>
void rndm::SeedMaster< SEED >::EngineInfo_t::applySeed ( Args...  args) const
inline

Execute the seeder (whatever arguments it has...)

Definition at line 236 of file SeedMaster.h.

References rndm::SeedMaster< SEED >::EngineInfo_t::hasSeeder(), and rndm::SeedMaster< SEED >::EngineInfo_t::seeder.

Referenced by rndm::SeedMaster< SEED >::EngineInfo_t::autoApplySeed().

237  { if (hasSeeder()) seeder(std::forward<Args>(args)...); }
Seeder_t seeder
engine seeder
Definition: SeedMaster.h:245
template<typename SEED>
template<typename... Args>
void rndm::SeedMaster< SEED >::EngineInfo_t::autoApplySeed ( Args...  args) const
inline

Applies the seed unless frozen.

Definition at line 241 of file SeedMaster.h.

References rndm::SeedMaster< SEED >::EngineInfo_t::applySeed(), and rndm::SeedMaster< SEED >::EngineInfo_t::isFrozen().

242  { if (!isFrozen()) applySeed(std::forward<Args>(args)...); }
void applySeed(Args...args) const
Execute the seeder (whatever arguments it has...)
Definition: SeedMaster.h:236
template<typename SEED>
void rndm::SeedMaster< SEED >::EngineInfo_t::freeze ( bool  doFreeze = true)
inline

Definition at line 231 of file SeedMaster.h.

References rndm::SeedMaster< SEED >::EngineInfo_t::autoseed.

231 { autoseed = !doFreeze; }
bool autoseed
whether seeding can be automatic
Definition: SeedMaster.h:246
template<typename SEED>
bool rndm::SeedMaster< SEED >::EngineInfo_t::hasSeeder ( ) const
inline

Definition at line 228 of file SeedMaster.h.

References rndm::SeedMaster< SEED >::EngineInfo_t::seeder.

Referenced by rndm::SeedMaster< SEED >::EngineInfo_t::applySeed().

228 { return bool(seeder); }
Seeder_t seeder
engine seeder
Definition: SeedMaster.h:245
template<typename SEED>
bool rndm::SeedMaster< SEED >::EngineInfo_t::isFrozen ( ) const
inline

Definition at line 229 of file SeedMaster.h.

References rndm::SeedMaster< SEED >::EngineInfo_t::autoseed.

Referenced by rndm::SeedMaster< SEED >::EngineInfo_t::autoApplySeed().

229 { return !autoseed; }
bool autoseed
whether seeding can be automatic
Definition: SeedMaster.h:246
template<typename SEED>
void rndm::SeedMaster< SEED >::EngineInfo_t::setSeeder ( Seeder_t  new_seeder)
inline

Definition at line 232 of file SeedMaster.h.

References rndm::SeedMaster< SEED >::EngineInfo_t::seeder.

232 { seeder = new_seeder; }
Seeder_t seeder
engine seeder
Definition: SeedMaster.h:245

Member Data Documentation

template<typename SEED>
bool rndm::SeedMaster< SEED >::EngineInfo_t::autoseed = true
private

whether seeding can be automatic

Definition at line 246 of file SeedMaster.h.

Referenced by rndm::SeedMaster< SEED >::EngineInfo_t::freeze(), and rndm::SeedMaster< SEED >::EngineInfo_t::isFrozen().


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