Implementation of the "random" policy. More...
#include <BasePolicies.h>
Classes | |
class | RandomImpl |
Public Types | |
using | base_t = RandomSeedPolicyBase< SEED > |
using | this_t = RandomPolicy< SEED > |
using | seed_t = typename base_t::seed_t |
using | base_t = RandomSeedPolicyBase< SEED > |
using | this_t = RandomPolicy< SEED > |
using | seed_t = typename base_t::seed_t |
Public Types inherited from rndm::details::RandomSeedPolicyBase< SEED > | |
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 | |
RandomPolicy (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 details of the configuration of the random generator. More... | |
RandomPolicy (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 details of the configuration of the random generator. 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 | 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 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 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 bool | yieldsUniqueSeeds () const |
Returns whether the returned seed should be unique. More... | |
Private Member Functions | |
virtual seed_t | createSeed (SeedMasterHelper::EngineId const &) override |
Extracts a random seed. More... | |
virtual seed_t | createSeed (SeedMasterHelper::EngineId const &) override |
Extracts a random seed. More... | |
Private Attributes | |
std::unique_ptr< RandomImpl > | random_seed |
Additional Inherited Members | |
Static Public Attributes inherited from rndm::details::RandomSeedPolicyBase< SEED > | |
static constexpr seed_t | InvalidSeed = 0 |
An invalid seed. 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... | |
Protected Attributes inherited from rndm::details::RandomSeedPolicyBase< SEED > | |
std::string | name |
name of the policy More... | |
Implementation of the "random" policy.
This policy extracts seeds randomly. Each seed is between 1 and the maximum seed value specified at construction, both extremes included. The sequence of these seeds is initialized by a random seed. The random generator used is potentially low quality – it does not matter for this application.
Definition at line 781 of file BasePolicies.h.
using rndm::details::RandomPolicy< SEED >::base_t = RandomSeedPolicyBase<SEED> |
Definition at line 45 of file RandomPolicy.h.
using rndm::details::RandomPolicy< SEED >::base_t = RandomSeedPolicyBase<SEED> |
Definition at line 783 of file BasePolicies.h.
using rndm::details::RandomPolicy< SEED >::seed_t = typename base_t::seed_t |
Definition at line 47 of file RandomPolicy.h.
using rndm::details::RandomPolicy< SEED >::seed_t = typename base_t::seed_t |
Definition at line 785 of file BasePolicies.h.
using rndm::details::RandomPolicy< SEED >::this_t = RandomPolicy<SEED> |
Definition at line 46 of file RandomPolicy.h.
using rndm::details::RandomPolicy< SEED >::this_t = RandomPolicy<SEED> |
Definition at line 784 of file BasePolicies.h.
|
inline |
Configures from a parameter set
Definition at line 789 of file BasePolicies.h.
|
inline |
Configures from a parameter set
Definition at line 51 of file RandomPolicy.h.
|
overridevirtual |
Configure this policy.
pset | the parameter set for the configuration |
Parameters:
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
|
overridevirtual |
Configure this policy.
pset | the parameter set for the configuration |
Parameters:
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 836 of file BasePolicies.h.
|
inlineoverrideprivatevirtual |
Extracts a random seed.
Implements rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 91 of file RandomPolicy.h.
|
inlineoverrideprivatevirtual |
Extracts a random seed.
Implements rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 829 of file BasePolicies.h.
|
overridevirtual |
Prints the details of the configuration of the random generator.
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
|
overridevirtual |
Prints the details of the configuration of the random generator.
Reimplemented from rndm::details::RandomSeedPolicyBase< SEED >.
Definition at line 852 of file BasePolicies.h.
|
private |
Definition at line 826 of file BasePolicies.h.