LArSoft
v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
|
Range-checked policy (abstract) More...
#include "BasePolicies.h"
Public Types | |
using | base_t = RandomSeedPolicyBase< SEED > |
using | this_t = CheckedRangePolicy< SEED > |
using | seed_t = typename base_t::seed_t |
using | base_t = RandomSeedPolicyBase< SEED > |
using | this_t = CheckedRangePolicy< SEED > |
using | seed_t = typename base_t::seed_t |
using | EventData_t = NuRandomServiceHelper::EventSeedInputData |
type of data used for event seeds More... | |
using | EventData_t = NuRandomServiceHelper::EventSeedInputData |
type of data used for event seeds More... | |
Public Member Functions | |
CheckedRangePolicy (std::string policy_name, fhicl::ParameterSet const &pset) | |
Constructor; requires the policy name. More... | |
virtual void | configure (fhicl::ParameterSet const &pset) override |
Configure this policy. More... | |
virtual seed_t | getSeed (SeedMasterHelper::EngineId const &id) |
Returns the next random number. More... | |
virtual void | print (std::ostream &out) const override |
Prints information on the configuration of this policy. More... | |
CheckedRangePolicy (std::string policy_name, fhicl::ParameterSet const &pset) | |
Constructor; requires the policy name. More... | |
virtual void | configure (fhicl::ParameterSet const &pset) override |
Configure this policy. More... | |
virtual seed_t | getSeed (SeedMasterHelper::EngineId const &id) override |
Returns the next random number. More... | |
virtual void | print (std::ostream &out) const override |
Prints information on the configuration of this policy. More... | |
virtual seed_t | getEventSeed (SeedMasterHelper::EngineId const &id, EventData_t const &eventInfo) |
Returns a random number specific to an event. 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... | |
std::string | getName () const |
Returns the given name of the policy. More... | |
virtual bool | yieldsUniqueSeeds () const override |
Returns whether the returned seed should be unique. 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 | |
CheckedRangePolicy (std::string policy_name) | |
Lets the derived class to start configuration. More... | |
virtual void | ensureRange (SeedMasterHelper::EngineId const &id, seed_t seed) const |
Performs the range checks and complains if needed. More... | |
void | CheckRangeConfiguration () const |
Check that the configuration is complete. More... | |
void | static_configure (fhicl::ParameterSet const &pset) |
Local configuration; does not require the range config to be complete. More... | |
CheckedRangePolicy (std::string policy_name) | |
Lets the derived class to start configuration. More... | |
virtual void | ensureRange (SeedMasterHelper::EngineId const &id, seed_t seed) const |
Performs the range checks and complains if needed. More... | |
void | CheckRangeConfiguration () const |
Check that the configuration is complete. More... | |
void | static_configure (fhicl::ParameterSet const &pset) |
Local configuration; does not require the range config to be complete. More... | |
virtual seed_t | createSeed (SeedMasterHelper::EngineId const &)=0 |
Extracts the next random number seed. 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... | |
virtual seed_t | createEventSeed (SeedMasterHelper::EngineId const &, EventData_t const &) |
Extracts a seed for specified event information; returns InvalidSeed. More... | |
Protected Attributes | |
RangeCheckHelper< seed_t > | range_check |
std::string | name |
name of the policy More... | |
Range-checked policy (abstract)
Definition at line 254 of file BasePolicies.h.
using rndm::details::CheckedRangePolicy< SEED >::base_t = RandomSeedPolicyBase<SEED> |
Definition at line 256 of file BasePolicies.h.
using rndm::details::CheckedRangePolicy< SEED >::base_t = RandomSeedPolicyBase<SEED> |
Definition at line 301 of file RandomSeedPolicyBase.h.
|
inherited |
type of data used for event seeds
Definition at line 48 of file BasePolicies.h.
|
inherited |
type of data used for event seeds
Definition at line 93 of file RandomSeedPolicyBase.h.
using rndm::details::CheckedRangePolicy< SEED >::seed_t = typename base_t::seed_t |
Definition at line 258 of file BasePolicies.h.
using rndm::details::CheckedRangePolicy< SEED >::seed_t = typename base_t::seed_t |
Definition at line 303 of file RandomSeedPolicyBase.h.
using rndm::details::CheckedRangePolicy< SEED >::this_t = CheckedRangePolicy<SEED> |
Definition at line 257 of file BasePolicies.h.
using rndm::details::CheckedRangePolicy< SEED >::this_t = CheckedRangePolicy<SEED> |
Definition at line 302 of file RandomSeedPolicyBase.h.
|
inline |
Constructor; requires the policy name.
Definition at line 262 of file BasePolicies.h.
|
inlineprotected |
Lets the derived class to start configuration.
Definition at line 299 of file BasePolicies.h.
|
inline |
Constructor; requires the policy name.
Definition at line 307 of file RandomSeedPolicyBase.h.
|
inlineprotected |
Lets the derived class to start configuration.
Definition at line 344 of file RandomSeedPolicyBase.h.
|
protected |
Check that the configuration is complete.
Definition at line 323 of file BasePolicies.h.
References art::errors::Configuration, rndm::details::RandomSeedPolicyBase< SEED >::getName(), rndm::details::RangeCheckHelper< SEED >::isConfigured(), and rndm::details::RangeCheckHelper< SEED >::missingConfig().
Referenced by rndm::details::AutoIncrementPolicy< SEED >::createSeed(), rndm::details::LinearMappingPolicy< SEED >::createSeed(), rndm::details::PredefinedOffsetPolicy< SEED >::createSeed(), and rndm::details::CheckedRangePolicy< SEED >::ensureRange().
|
protected |
Check that the configuration is complete.
|
inlineoverridevirtual |
Configure this policy.
pset | the parameter set for the configuration |
Parameters:
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Reimplemented in 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::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, and rndm::details::AutoIncrementPolicy< SEED >.
Definition at line 277 of file BasePolicies.h.
Referenced by rndm::details::AutoIncrementPolicy< SEED >::configure(), rndm::details::LinearMappingPolicy< SEED >::configure(), rndm::details::PredefinedSeedPolicy< SEED >::configure(), and rndm::details::PredefinedOffsetPolicy< SEED >::configure().
|
inlineoverridevirtual |
Configure this policy.
pset | the parameter set for the configuration |
Parameters:
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Reimplemented in 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::PredefinedOffsetPolicy< SEED >, rndm::details::PredefinedSeedPolicy< SEED >, rndm::details::LinearMappingPolicy< SEED >, and rndm::details::AutoIncrementPolicy< SEED >.
Definition at line 322 of file RandomSeedPolicyBase.h.
|
inlineprotectedvirtualinherited |
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().
|
inlineprotectedvirtualinherited |
Extracts a seed for specified event information; returns InvalidSeed.
Reimplemented in rndm::details::PerEventPolicy< SEED >.
Definition at line 135 of file RandomSeedPolicyBase.h.
|
protectedpure virtualinherited |
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 virtualinherited |
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 >.
|
inlineprotectedvirtual |
Performs the range checks and complains if needed.
Definition at line 303 of file BasePolicies.h.
References rndm::details::RangeCheckHelper< SEED >::EnsureRange(), rndm::details::RandomSeedPolicyBase< SEED >::getName(), and rndm::details::CheckedRangePolicy< SEED >::static_configure().
|
inlineprotectedvirtual |
Performs the range checks and complains if needed.
Definition at line 348 of file RandomSeedPolicyBase.h.
References rndm::details::CheckedRangePolicy< SEED >::CheckRangeConfiguration(), art::errors::Configuration, rndm::details::RangeCheckHelper< SEED >::configure(), rndm::details::RangeCheckHelper< SEED >::EnsureRange(), rndm::details::RangeCheckHelper< SEED >::isConfigured(), rndm::details::RangeCheckHelper< SEED >::missingConfig(), and rndm::details::CheckedRangePolicy< SEED >::static_configure().
|
inlinevirtualinherited |
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().
|
inlinevirtualinherited |
Returns a random number specific to an event.
Definition at line 114 of file RandomSeedPolicyBase.h.
|
inlineinherited |
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().
|
inlineinherited |
Returns the given name of the policy.
Definition at line 118 of file RandomSeedPolicyBase.h.
|
inlinevirtual |
Returns the next random number.
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 281 of file BasePolicies.h.
References rndm::details::RandomSeedPolicyBase< SEED >::createSeed(), and seed.
|
inlineoverridevirtual |
Returns the next random number.
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 326 of file RandomSeedPolicyBase.h.
References rndm::details::ValidSeed< SEED >::seed.
|
inlineoverridevirtual |
Prints information on the configuration of this policy.
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Reimplemented in 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 >, and rndm::details::AutoIncrementPolicy< SEED >.
Definition at line 289 of file BasePolicies.h.
Referenced by rndm::details::AutoIncrementPolicy< SEED >::createSeed(), rndm::details::LinearMappingPolicy< SEED >::createSeed(), rndm::details::PredefinedOffsetPolicy< SEED >::createSeed(), and rndm::details::PredefinedSeedPolicy< SEED >::static_configure().
|
inlineoverridevirtual |
Prints information on the configuration of this policy.
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Reimplemented in 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 >, and rndm::details::AutoIncrementPolicy< SEED >.
Definition at line 334 of file RandomSeedPolicyBase.h.
|
protected |
Local configuration; does not require the range config to be complete.
Definition at line 317 of file BasePolicies.h.
References rndm::details::RangeCheckHelper< SEED >::configure().
Referenced by rndm::details::CheckedRangePolicy< SEED >::ensureRange().
|
protected |
Local configuration; does not require the range config to be complete.
|
inlineoverridevirtualinherited |
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.
|
inlinevirtualinherited |
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.
|
staticinherited |
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().
|
protectedinherited |
name of the policy
Definition at line 83 of file BasePolicies.h.
Referenced by rndm::details::RandomSeedPolicyBase< SEED >::getName().
|
protected |
Definition at line 296 of file BasePolicies.h.
Referenced by rndm::details::AutoIncrementPolicy< SEED >::configure(), rndm::details::LinearMappingPolicy< SEED >::configure(), rndm::details::PredefinedOffsetPolicy< SEED >::configure(), rndm::details::AutoIncrementPolicy< SEED >::createSeed(), rndm::details::LinearMappingPolicy< SEED >::createSeed(), rndm::details::PredefinedOffsetPolicy< SEED >::createSeed(), and rndm::details::PredefinedSeedPolicy< SEED >::static_configure().