LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Classes | |
class | AutoIncrementPolicy |
Implementation of the "autoIncrement" policy. More... | |
class | CheckedRangePolicy |
Range-checked policy (abstract) More... | |
class | LinearMappingPolicy |
Implementation of the "linearMapping" policy. More... | |
class | PerEventPolicy |
Implementation of the "perEvent" policy. More... | |
class | PerInstancePolicy |
Base class for policies reacting at engine instance level. More... | |
struct | PolicyStruct_t |
class | PredefinedOffsetPolicy |
Implementation of the "preDefinedOffset" policy. More... | |
class | PredefinedSeedPolicy |
Implementation of the "preDefinedSeed" policy. More... | |
class | RandomPolicy |
Implementation of the "random" policy. More... | |
class | RandomSeedPolicyBase |
Interface for a policy implementation. More... | |
class | RangeCheckHelper |
Helper class to support range checking. More... | |
class | ValidSeed |
Class storing a seed in the valid range. More... | |
Enumerations | |
enum | Policy : unsigned { Policy::NURANDOM_SEED_SERVICE_POLICY, Policy::NURANDOM_SEED_SERVICE_POLICIES } |
Enumeration of all supported random seed policies. More... | |
Functions | |
template<typename SEED > | |
PolicyStruct_t< SEED > | makeRandomSeedPolicy (fhicl::ParameterSet const &config) |
Constructs and returns a RandomSeedPolicyBase based on config . More... | |
std::vector< std::string > const & | policyNames () |
Returns a list of names of policies, in the same order as Policy enum. More... | |
std::string const & | policyName (Policy policy) |
Returns the name of the specified policy. More... | |
Policy | policyFromName (std::string const &name) |
Returns the policy with the specified name . More... | |
|
strong |
Enumeration of all supported random seed policies.
Enumerator | |
---|---|
NURANDOM_SEED_SERVICE_POLICY | |
NURANDOM_SEED_SERVICE_POLICIES |
Definition at line 38 of file PolicyNames.h.
PolicyStruct_t<SEED> rndm::details::makeRandomSeedPolicy | ( | fhicl::ParameterSet const & | config | ) |
Constructs and returns a RandomSeedPolicyBase
based on config
.
SEED | the type of seed RandomSeedPolicyBase is serving |
config | configuration of the policy object |
RandomSeedPolicyBase
objectThe policy class is created according to the parameters in the specified config
parameter set. The type of policy is determined by the "policy"
key in that parameter set.
Definition at line 63 of file PolicyFactory.h.
References fhicl::ParameterSet::get(), rndm::details::PolicyStruct_t< SEED >::policy, policyFromName(), and policyName().
Policy rndm::details::policyFromName | ( | std::string const & | name | ) |
Returns the policy with the specified name
.
name | name of the desired policy |
name
cet::exception | (category: rndm::details::policyFromName ) if the name is unknown or if it matches Policy::unDefined |
The policy placeholder unDefined
is not accepted by this function and treated as a non-existing policy.
Definition at line 67 of file PolicyNames.cxx.
References util::begin(), e, util::end(), and policyNames().
Referenced by makeRandomSeedPolicy(), and rndm::SeedMaster< SEED >::setPolicy().
std::string const & rndm::details::policyName | ( | Policy | policy | ) |
Returns the name of the specified policy.
cet::exception | (category: rndm::details::policyName ) if the name is unknown |
Definition at line 56 of file PolicyNames.cxx.
References policyNames().
Referenced by makeRandomSeedPolicy(), and rndm::details::PerEventPolicy< SEED >::print().
std::vector< std::string > const & rndm::details::policyNames | ( | ) |
Returns a list of names of policies, in the same order as Policy
enum.
Definition at line 52 of file PolicyNames.cxx.
Referenced by policyFromName(), policyName(), and rndm::SeedMaster< SEED >::policyNames().