LArSoft
v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
|
Interface for a policy implementation. More...
#include "BasePolicies.h"
Public Types | |
using | seed_t = SEED |
type of the random seed More... | |
using | EventData_t = NuRandomServiceHelper::EventSeedInputData |
type of data used for event seeds More... | |
using | seed_t = SEED |
type of the random seed More... | |
using | EventData_t = NuRandomServiceHelper::EventSeedInputData |
type of data used for event seeds More... | |
Public Member Functions | |
RandomSeedPolicyBase (std::string policy_name) | |
Constructor; requires the policy name. More... | |
virtual | ~RandomSeedPolicyBase () |
virtual void | configure (fhicl::ParameterSet const &) |
Configure this policy. More... | |
virtual seed_t | getSeed (SeedMasterHelper::EngineId const &id) |
Returns the next random number. More... | |
virtual seed_t | getEventSeed (SeedMasterHelper::EngineId const &id, EventData_t const &eventInfo) |
Returns a random number specific to an event. More... | |
std::string | getName () const |
Returns the given name of the policy. More... | |
virtual void | print (std::ostream &out) const |
Prints information on the configuration of this policy. More... | |
virtual bool | yieldsUniqueSeeds () const override |
Returns whether the returned seed should be unique. More... | |
RandomSeedPolicyBase (std::string policy_name) | |
Constructor; requires the policy name. More... | |
virtual | ~RandomSeedPolicyBase () |
virtual void | configure (fhicl::ParameterSet const &) |
Configure this policy. More... | |
virtual seed_t | getSeed (SeedMasterHelper::EngineId const &id) |
Returns the next random number. More... | |
virtual seed_t | getEventSeed (SeedMasterHelper::EngineId const &id, EventData_t const &eventInfo) |
Returns a random number specific to an event. More... | |
std::string | getName () const |
Returns the given name of the policy. More... | |
virtual void | print (std::ostream &out) const |
Prints information on the configuration of this policy. More... | |
virtual bool | yieldsUniqueSeeds () const |
Returns whether the returned seed should be unique. More... | |
Static Public Attributes | |
static constexpr seed_t | InvalidSeed = 0 |
An invalid seed. More... | |
Protected Member Functions | |
virtual seed_t | createSeed (SeedMasterHelper::EngineId const &)=0 |
Extracts the next random number seed. More... | |
virtual seed_t | createEventSeed (SeedMasterHelper::EngineId const &, EventData_t const &) |
Extracts a seed for specified event information; returns InvalidSeed. More... | |
virtual seed_t | createSeed (SeedMasterHelper::EngineId const &)=0 |
Extracts the next random number seed. More... | |
virtual seed_t | createEventSeed (SeedMasterHelper::EngineId const &, EventData_t const &) |
Extracts a seed for specified event information; returns InvalidSeed. More... | |
Protected Attributes | |
std::string | name |
name of the policy More... | |
Interface for a policy implementation.
Definition at line 43 of file BasePolicies.h.
using rndm::details::RandomSeedPolicyBase< SEED >::EventData_t = NuRandomServiceHelper::EventSeedInputData |
type of data used for event seeds
Definition at line 48 of file BasePolicies.h.
using rndm::details::RandomSeedPolicyBase< SEED >::EventData_t = NuRandomServiceHelper::EventSeedInputData |
type of data used for event seeds
Definition at line 93 of file RandomSeedPolicyBase.h.
using rndm::details::RandomSeedPolicyBase< SEED >::seed_t = SEED |
type of the random seed
Definition at line 45 of file BasePolicies.h.
using rndm::details::RandomSeedPolicyBase< SEED >::seed_t = SEED |
type of the random seed
Definition at line 90 of file RandomSeedPolicyBase.h.
|
inline |
Constructor; requires the policy name.
Definition at line 54 of file BasePolicies.h.
|
inlinevirtual |
Definition at line 58 of file BasePolicies.h.
|
inline |
Constructor; requires the policy name.
Definition at line 99 of file RandomSeedPolicyBase.h.
|
inlinevirtual |
Definition at line 103 of file RandomSeedPolicyBase.h.
|
inlinevirtual |
Configure this policy.
Reimplemented in rndm::details::RandomPolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::PerInstancePolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::PerInstancePolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, rndm::details::CheckedRangePolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::CheckedRangePolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::PerEventPolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, and rndm::details::RandomPolicy< SEED >.
Definition at line 61 of file BasePolicies.h.
Referenced by rndm::details::RandomPolicy< SEED >::RandomPolicy(), and rndm::details::RangeCheckHelper< seed_t >::RangeCheckHelper().
|
inlinevirtual |
Configure this policy.
Reimplemented in rndm::details::RandomPolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::PerInstancePolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::PerInstancePolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, rndm::details::CheckedRangePolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::CheckedRangePolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::PerEventPolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, and rndm::details::RandomPolicy< SEED >.
Definition at line 106 of file RandomSeedPolicyBase.h.
|
inlineprotectedvirtual |
Extracts a seed for specified event information; returns InvalidSeed.
Reimplemented in rndm::details::PerEventPolicy< SEED >.
Definition at line 90 of file BasePolicies.h.
References rndm::details::RandomSeedPolicyBase< SEED >::InvalidSeed.
Referenced by rndm::details::RandomSeedPolicyBase< SEED >::getEventSeed().
|
inlineprotectedvirtual |
Extracts a seed for specified event information; returns InvalidSeed.
Reimplemented in rndm::details::PerEventPolicy< SEED >.
Definition at line 135 of file RandomSeedPolicyBase.h.
|
protectedpure virtual |
Extracts the next random number seed.
Implemented in rndm::details::RandomPolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::PerEventPolicy< SEED >, rndm::details::RandomPolicy< SEED >, and rndm::details::AutoIncrementPolicy< SEED >.
Referenced by rndm::details::RandomSeedPolicyBase< SEED >::getSeed(), and rndm::details::CheckedRangePolicy< SEED >::getSeed().
|
protectedpure virtual |
Extracts the next random number seed.
Implemented in rndm::details::RandomPolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::PerEventPolicy< SEED >, rndm::details::RandomPolicy< SEED >, and rndm::details::AutoIncrementPolicy< SEED >.
|
inlinevirtual |
Returns a random number specific to an event.
Definition at line 69 of file BasePolicies.h.
References rndm::details::RandomSeedPolicyBase< SEED >::createEventSeed().
Referenced by rndm::details::RandomSeedPolicyBase< SEED >::getSeed().
|
inlinevirtual |
Returns a random number specific to an event.
Definition at line 114 of file RandomSeedPolicyBase.h.
|
inline |
Returns the given name of the policy.
Definition at line 73 of file BasePolicies.h.
References rndm::details::RandomSeedPolicyBase< SEED >::name.
Referenced by rndm::details::CheckedRangePolicy< SEED >::CheckRangeConfiguration(), rndm::details::CheckedRangePolicy< SEED >::ensureRange(), and rndm::details::RandomSeedPolicyBase< SEED >::print().
|
inline |
Returns the given name of the policy.
Definition at line 118 of file RandomSeedPolicyBase.h.
|
inlinevirtual |
Returns the next random number.
Reimplemented in rndm::details::CheckedRangePolicy< SEED >, and rndm::details::CheckedRangePolicy< SEED >.
Definition at line 64 of file BasePolicies.h.
References rndm::details::RandomSeedPolicyBase< SEED >::createSeed(), and rndm::details::RandomSeedPolicyBase< SEED >::getEventSeed().
|
inlinevirtual |
Returns the next random number.
Reimplemented in rndm::details::CheckedRangePolicy< SEED >, and rndm::details::CheckedRangePolicy< SEED >.
Definition at line 109 of file RandomSeedPolicyBase.h.
|
inlinevirtual |
Prints information on the configuration of this policy.
Reimplemented in rndm::details::RandomPolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, rndm::details::CheckedRangePolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::CheckedRangePolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::PerEventPolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, and rndm::details::RandomPolicy< SEED >.
Definition at line 76 of file BasePolicies.h.
References rndm::details::RandomSeedPolicyBase< SEED >::getName().
Referenced by rndm::details::AutoIncrementPolicy< SEED >::configure(), rndm::details::LinearMappingPolicy< SEED >::configure(), rndm::details::PredefinedSeedPolicy< SEED >::configure(), rndm::details::PredefinedOffsetPolicy< SEED >::configure(), rndm::details::RandomPolicy< SEED >::createSeed(), rndm::details::RangeCheckHelper< seed_t >::operator()(), rndm::details::PerEventPolicy< SEED >::print(), and rndm::details::RandomPolicy< SEED >::RandomPolicy().
|
inlinevirtual |
Prints information on the configuration of this policy.
Reimplemented in rndm::details::RandomPolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, rndm::details::CheckedRangePolicy< SEED >, rndm::details::PredefinedOffsetPolicy< SEED >, rndm::details::CheckedRangePolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, rndm::details::PerEventPolicy< SEED >, rndm::details::AutoIncrementPolicy< SEED >, and rndm::details::RandomPolicy< SEED >.
Definition at line 121 of file RandomSeedPolicyBase.h.
|
inlineoverridevirtual |
Returns whether the returned seed should be unique.
Reimplemented in rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, and rndm::details::PerEventPolicy< SEED >.
Definition at line 80 of file BasePolicies.h.
|
inlinevirtual |
Returns whether the returned seed should be unique.
Reimplemented in rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, and rndm::details::PerEventPolicy< SEED >.
Definition at line 125 of file RandomSeedPolicyBase.h.
|
static |
An invalid seed.
Definition at line 51 of file BasePolicies.h.
Referenced by rndm::details::RandomSeedPolicyBase< SEED >::createEventSeed(), rndm::details::PerEventPolicy< SEED >::createEventSeed(), and rndm::details::PerEventPolicy< SEED >::createSeed().
|
protected |
name of the policy
Definition at line 83 of file BasePolicies.h.
Referenced by rndm::details::RandomSeedPolicyBase< SEED >::getName().