LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 216 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 226 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().

227  { if (hasSeeder()) seeder(std::forward<Args>(args)...); }
Seeder_t seeder
engine seeder
Definition: SeedMaster.h:235
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 231 of file SeedMaster.h.

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

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

Definition at line 221 of file SeedMaster.h.

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

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

Definition at line 218 of file SeedMaster.h.

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

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

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

Definition at line 219 of file SeedMaster.h.

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

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

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

Definition at line 222 of file SeedMaster.h.

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

222 { seeder = new_seeder; }
Seeder_t seeder
engine seeder
Definition: SeedMaster.h:235

Member Data Documentation

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

whether seeding can be automatic

Definition at line 236 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: