Implementation of the "preDefinedSeed" policy. More...
#include <BasePolicies.h>
Public Member Functions | |
PredefinedSeedPolicy (fhicl::ParameterSet const &pset) | |
virtual void | configure (fhicl::ParameterSet const &pset) override |
Configure this policy. More... | |
virtual void | print (std::ostream &out) const override |
Prints the configuration of this policy. More... | |
virtual bool | yieldsUniqueSeeds () const override |
Returns whether the returned seed should be unique: for us it "no". More... | |
PredefinedSeedPolicy (fhicl::ParameterSet const &pset) | |
virtual void | configure (fhicl::ParameterSet const &pset) override |
Configure this policy. More... | |
virtual void | print (std::ostream &out) const override |
Prints the configuration of this policy. More... | |
virtual bool | yieldsUniqueSeeds () const override |
Returns whether the returned seed should be unique: for us it "no". More... | |
Public Member Functions inherited from rndm::details::PerInstancePolicy< SEED > | |
PerInstancePolicy (std::string name, fhicl::ParameterSet const &pset) | |
PerInstancePolicy (std::string name, fhicl::ParameterSet const &pset) | |
Public Member Functions inherited from rndm::details::CheckedRangePolicy< SEED > | |
CheckedRangePolicy (std::string policy_name, fhicl::ParameterSet const &pset) | |
Constructor; requires the policy name. More... | |
virtual seed_t | getSeed (SeedMasterHelper::EngineId const &id) |
Returns the next random number. More... | |
CheckedRangePolicy (std::string policy_name, fhicl::ParameterSet const &pset) | |
Constructor; requires the policy name. More... | |
virtual seed_t | getSeed (SeedMasterHelper::EngineId const &id) override |
Returns the next random number. More... | |
Public Member Functions inherited from rndm::details::RandomSeedPolicyBase< SEED > | |
RandomSeedPolicyBase (std::string policy_name) | |
Constructor; requires the policy name. More... | |
virtual | ~RandomSeedPolicyBase () |
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... | |
RandomSeedPolicyBase (std::string policy_name) | |
Constructor; requires the policy name. More... | |
virtual | ~RandomSeedPolicyBase () |
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... | |
Protected Member Functions | |
virtual seed_t | createSeed (SeedMasterHelper::EngineId const &id) override |
Returns the seed stored in the parameter set. More... | |
void | static_configure (fhicl::ParameterSet const &) |
virtual seed_t | createSeed (SeedMasterHelper::EngineId const &id) override |
Returns the seed stored in the parameter set. More... | |
void | static_configure (fhicl::ParameterSet const &) |
Protected Member Functions inherited from rndm::details::PerInstancePolicy< SEED > | |
PerInstancePolicy (std::string name) | |
Internal constructor: does not configure. For use in derived classes. More... | |
seed_t | getInstanceSeed (SeedMasterHelper::EngineId const &id) const |
Retrieves the parameter (seed) for the specified engine ID. More... | |
void | static_configure (fhicl::ParameterSet const &pset) |
PerInstancePolicy (std::string name) | |
Internal constructor: does not configure. For use in derived classes. More... | |
seed_t | getInstanceSeed (SeedMasterHelper::EngineId const &id) const |
Retrieves the parameter (seed) for the specified engine ID. More... | |
void | static_configure (fhicl::ParameterSet const &pset) |
Protected Member Functions inherited from rndm::details::CheckedRangePolicy< SEED > | |
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... | |
Protected Member Functions inherited from rndm::details::RandomSeedPolicyBase< SEED > | |
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... | |
Additional Inherited Members | |
Static Public Attributes inherited from rndm::details::RandomSeedPolicyBase< SEED > | |
static constexpr seed_t | InvalidSeed = 0 |
An invalid seed. More... | |
Static Protected Member Functions inherited from rndm::details::PerInstancePolicy< SEED > | |
template<typename T > | |
static T | getInstanceParameter (fhicl::ParameterSet const &pset, SeedMasterHelper::EngineId const &id) |
Retrieves the parameter (seed) for the specified engine ID. More... | |
template<typename T > | |
static T | getInstanceParameter (fhicl::ParameterSet const &pset, SeedMasterHelper::EngineId const &id) |
Retrieves the parameter (seed) for the specified engine ID. More... | |
Protected Attributes inherited from rndm::details::PerInstancePolicy< SEED > | |
fhicl::ParameterSet | parameters |
configuration parameters More... | |
Protected Attributes inherited from rndm::details::CheckedRangePolicy< SEED > | |
RangeCheckHelper< seed_t > | range_check |
Protected Attributes inherited from rndm::details::RandomSeedPolicyBase< SEED > | |
std::string | name |
name of the policy More... | |
Implementation of the "preDefinedSeed" policy.
Definition at line 625 of file BasePolicies.h.
using rndm::details::PredefinedSeedPolicy< SEED >::base_t = PerInstancePolicy<SEED> |
Definition at line 208 of file StandardPolicies.h.
using rndm::details::PredefinedSeedPolicy< SEED >::base_t = PerInstancePolicy<SEED> |
Definition at line 627 of file BasePolicies.h.
using rndm::details::PredefinedSeedPolicy< SEED >::seed_t = typename base_t::seed_t |
Definition at line 210 of file StandardPolicies.h.
using rndm::details::PredefinedSeedPolicy< SEED >::seed_t = typename base_t::seed_t |
Definition at line 629 of file BasePolicies.h.
using rndm::details::PredefinedSeedPolicy< SEED >::this_t = PredefinedSeedPolicy<SEED> |
Definition at line 209 of file StandardPolicies.h.
using rndm::details::PredefinedSeedPolicy< SEED >::this_t = PredefinedSeedPolicy<SEED> |
Definition at line 628 of file BasePolicies.h.
|
inline |
Configures from a parameter set
Definition at line 633 of file BasePolicies.h.
|
inline |
Configures from a parameter set
Definition at line 214 of file StandardPolicies.h.
|
inlineoverridevirtual |
Configure this policy.
pset | the parameter set for the configuration |
Parameters: one entry per engine. The FHiCL grammar to specify the seeds takes two forms. If no instance name is given, the seed is given by:
moduleLabel : seed
When a module has multiple instances, the seeds are given by:
moduleLabel : { instanceName1 : seed1 instanceName2 : seed2 }
Reimplemented from rndm::details::PerInstancePolicy< SEED >.
Definition at line 237 of file StandardPolicies.h.
|
inlineoverridevirtual |
Configure this policy.
pset | the parameter set for the configuration |
Parameters: one entry per engine. The FHiCL grammar to specify the seeds takes two forms. If no instance name is given, the seed is given by:
moduleLabel : seed
When a module has multiple instances, the seeds are given by:
moduleLabel : { instanceName1 : seed1 instanceName2 : seed2 }
Reimplemented from rndm::details::PerInstancePolicy< SEED >.
Definition at line 656 of file BasePolicies.h.
|
inlineoverrideprotectedvirtual |
Returns the seed stored in the parameter set.
Implements rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 250 of file StandardPolicies.h.
|
inlineoverrideprotectedvirtual |
Returns the seed stored in the parameter set.
Implements rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 669 of file BasePolicies.h.
|
overridevirtual |
Prints the configuration of this policy.
Reimplemented from rndm::details::CheckedRangePolicy< SEED >.
|
overridevirtual |
Prints the configuration of this policy.
Reimplemented from rndm::details::CheckedRangePolicy< SEED >.
Definition at line 679 of file BasePolicies.h.
|
inlineprotected |
Definition at line 253 of file StandardPolicies.h.
|
inlineprotected |
Definition at line 672 of file BasePolicies.h.
|
inlineoverridevirtual |
Returns whether the returned seed should be unique: for us it "no".
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 245 of file StandardPolicies.h.
|
inlineoverridevirtual |
Returns whether the returned seed should be unique: for us it "no".
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 664 of file BasePolicies.h.