LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
rndm::details::PredefinedSeedPolicy< SEED > Class Template Reference

Implementation of the "preDefinedSeed" policy. More...

#include "BasePolicies.h"

Inheritance diagram for rndm::details::PredefinedSeedPolicy< SEED >:
rndm::details::PerInstancePolicy< SEED > rndm::details::PerInstancePolicy< SEED > rndm::details::CheckedRangePolicy< SEED > rndm::details::CheckedRangePolicy< SEED > rndm::details::CheckedRangePolicy< SEED > rndm::details::CheckedRangePolicy< SEED > rndm::details::RandomSeedPolicyBase< SEED > rndm::details::RandomSeedPolicyBase< SEED > rndm::details::RandomSeedPolicyBase< SEED > rndm::details::RandomSeedPolicyBase< SEED > rndm::details::RandomSeedPolicyBase< SEED > rndm::details::RandomSeedPolicyBase< SEED > rndm::details::RandomSeedPolicyBase< SEED > rndm::details::RandomSeedPolicyBase< SEED >

Public Types

using base_t = PerInstancePolicy< SEED >
 
using this_t = PredefinedSeedPolicy< SEED >
 
using seed_t = typename base_t::seed_t
 
using base_t = PerInstancePolicy< SEED >
 
using this_t = PredefinedSeedPolicy< 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

 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...
 
virtual seed_t getSeed (SeedMasterHelper::EngineId const &id)
 Returns the next random number. More...
 
virtual seed_t getSeed (SeedMasterHelper::EngineId const &id) override
 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...
 
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...
 

Static Public Attributes

static constexpr seed_t InvalidSeed = 0
 An invalid seed. 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 &)
 
seed_t getInstanceSeed (SeedMasterHelper::EngineId const &id) const
 Retrieves the parameter (seed) for the specified engine ID. More...
 
seed_t getInstanceSeed (SeedMasterHelper::EngineId const &id) const
 Retrieves the parameter (seed) for the specified engine ID. More...
 
virtual void ensureRange (SeedMasterHelper::EngineId const &id, seed_t seed) const
 Performs the range checks and complains if needed. 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 CheckRangeConfiguration () const
 Check that the configuration is complete. 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...
 

Static Protected Member Functions

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

fhicl::ParameterSet parameters
 configuration parameters More...
 
RangeCheckHelper< seed_trange_check
 
std::string name
 name of the policy More...
 

Detailed Description

template<typename SEED>
class rndm::details::PredefinedSeedPolicy< SEED >

Implementation of the "preDefinedSeed" policy.


Definition at line 625 of file BasePolicies.h.

Member Typedef Documentation

template<typename SEED >
using rndm::details::PredefinedSeedPolicy< SEED >::base_t = PerInstancePolicy<SEED>

Definition at line 208 of file StandardPolicies.h.

template<typename SEED >
using rndm::details::PredefinedSeedPolicy< SEED >::base_t = PerInstancePolicy<SEED>

Definition at line 627 of file BasePolicies.h.

type of data used for event seeds

Definition at line 48 of file BasePolicies.h.

type of data used for event seeds

Definition at line 93 of file RandomSeedPolicyBase.h.

template<typename SEED >
using rndm::details::PredefinedSeedPolicy< SEED >::seed_t = typename base_t::seed_t

Definition at line 210 of file StandardPolicies.h.

template<typename SEED >
using rndm::details::PredefinedSeedPolicy< SEED >::seed_t = typename base_t::seed_t

Definition at line 629 of file BasePolicies.h.

template<typename SEED >
using rndm::details::PredefinedSeedPolicy< SEED >::this_t = PredefinedSeedPolicy<SEED>

Definition at line 209 of file StandardPolicies.h.

template<typename SEED >
using rndm::details::PredefinedSeedPolicy< SEED >::this_t = PredefinedSeedPolicy<SEED>

Definition at line 628 of file BasePolicies.h.

Constructor & Destructor Documentation

template<typename SEED >
rndm::details::PredefinedSeedPolicy< SEED >::PredefinedSeedPolicy ( fhicl::ParameterSet const &  pset)
inline

Configures from a parameter set

See also
configure()

Definition at line 633 of file BasePolicies.h.

633  :
634  base_t("preDefinedSeed")
635  { this_t::configure(pset); }
virtual void configure(fhicl::ParameterSet const &pset) override
Configure this policy.
Definition: BasePolicies.h:656
PerInstancePolicy< SEED > base_t
Definition: BasePolicies.h:627
template<typename SEED >
rndm::details::PredefinedSeedPolicy< SEED >::PredefinedSeedPolicy ( fhicl::ParameterSet const &  pset)
inline

Configures from a parameter set

See also
configure()

Definition at line 214 of file StandardPolicies.h.

References rndm::details::AutoIncrementPolicy< SEED >::configure().

214  :
215  base_t("preDefinedSeed")
216  { this_t::configure(pset); }
virtual void configure(fhicl::ParameterSet const &pset) override
Configure this policy.
Definition: BasePolicies.h:656
PerInstancePolicy< SEED > base_t
Definition: BasePolicies.h:627

Member Function Documentation

template<typename SEED >
void rndm::details::CheckedRangePolicy< SEED >::CheckRangeConfiguration ( ) const
protectedinherited

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().

323  {
324  if (!range_check.isConfigured()) {
325  std::ostringstream sstr;
326  sstr << "configuration of policy '" << this->getName()
327  << "' incomplete:";
328  for (std::string const& name: range_check.missingConfig())
329  sstr << " " << name;
330  throw art::Exception(art::errors::Configuration) << sstr.str();
331  }
332  } // CheckedRangePolicy<SEED>::CheckRangeConfiguration()
std::vector< std::string > missingConfig() const
Returns the items currently not configured.
Definition: BasePolicies.h:242
bool isConfigured() const
Returns whether all the parameters are configured.
Definition: BasePolicies.h:208
std::string name
name of the policy
Definition: BasePolicies.h:83
RangeCheckHelper< seed_t > range_check
Definition: BasePolicies.h:296
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::string getName() const
Returns the given name of the policy.
Definition: BasePolicies.h:73
template<typename SEED >
void rndm::details::CheckedRangePolicy< SEED >::CheckRangeConfiguration ( ) const
protectedinherited

Check that the configuration is complete.

template<typename SEED >
virtual void rndm::details::PredefinedSeedPolicy< SEED >::configure ( fhicl::ParameterSet const &  pset)
inlineoverridevirtual

Configure this policy.

Parameters
psetthe 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.

References rndm::details::CheckedRangePolicy< SEED >::configure(), rndm::details::AutoIncrementPolicy< SEED >::print(), and rndm::details::AutoIncrementPolicy< SEED >::static_configure().

238  { base_t::configure(pset); static_configure(pset); }
void static_configure(fhicl::ParameterSet const &)
Definition: BasePolicies.h:672
virtual void configure(fhicl::ParameterSet const &pset) override
Configure this policy.
Definition: BasePolicies.h:527
template<typename SEED >
virtual void rndm::details::PredefinedSeedPolicy< SEED >::configure ( fhicl::ParameterSet const &  pset)
inlineoverridevirtual

Configure this policy.

Parameters
psetthe 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.

References rndm::details::RandomSeedPolicyBase< SEED >::print().

657  { base_t::configure(pset); static_configure(pset); }
void static_configure(fhicl::ParameterSet const &)
Definition: BasePolicies.h:672
virtual void configure(fhicl::ParameterSet const &pset) override
Configure this policy.
Definition: BasePolicies.h:527
template<typename SEED>
virtual seed_t rndm::details::RandomSeedPolicyBase< SEED >::createEventSeed ( SeedMasterHelper::EngineId const &  ,
EventData_t const &   
)
inlineprotectedvirtualinherited

Extracts a seed for specified event information; returns InvalidSeed.

Reimplemented in rndm::details::PerEventPolicy< SEED >.

Definition at line 90 of file BasePolicies.h.

Referenced by rndm::details::RandomSeedPolicyBase< seed_t >::getEventSeed().

91  { return InvalidSeed; }
static constexpr seed_t InvalidSeed
An invalid seed.
Definition: BasePolicies.h:51
template<typename SEED>
virtual seed_t rndm::details::RandomSeedPolicyBase< SEED >::createEventSeed ( SeedMasterHelper::EngineId const &  ,
EventData_t const &   
)
inlineprotectedvirtualinherited

Extracts a seed for specified event information; returns InvalidSeed.

Reimplemented in rndm::details::PerEventPolicy< SEED >.

Definition at line 135 of file RandomSeedPolicyBase.h.

136  { return InvalidSeed; }
static constexpr seed_t InvalidSeed
An invalid seed.
Definition: BasePolicies.h:51
template<typename SEED >
virtual seed_t rndm::details::PredefinedSeedPolicy< SEED >::createSeed ( SeedMasterHelper::EngineId const &  id)
inlineoverrideprotectedvirtual

Returns the seed stored in the parameter set.

Implements rndm::details::RandomSeedPolicyBase< SEED >.

Definition at line 250 of file StandardPolicies.h.

251  { return base_t::getInstanceSeed(id); }
seed_t getInstanceSeed(SeedMasterHelper::EngineId const &id) const
Retrieves the parameter (seed) for the specified engine ID.
Definition: BasePolicies.h:537
template<typename SEED >
virtual seed_t rndm::details::PredefinedSeedPolicy< SEED >::createSeed ( SeedMasterHelper::EngineId const &  id)
inlineoverrideprotectedvirtual

Returns the seed stored in the parameter set.

Implements rndm::details::RandomSeedPolicyBase< SEED >.

Definition at line 669 of file BasePolicies.h.

670  { return base_t::getInstanceSeed(id); }
seed_t getInstanceSeed(SeedMasterHelper::EngineId const &id) const
Retrieves the parameter (seed) for the specified engine ID.
Definition: BasePolicies.h:537
template<typename SEED >
virtual void rndm::details::CheckedRangePolicy< SEED >::ensureRange ( SeedMasterHelper::EngineId const &  id,
seed_t  seed 
) const
inlineprotectedvirtualinherited

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().

304  { range_check.EnsureRange(this->getName(), id, seed); }
long seed
Definition: chem4.cc:67
RangeCheckHelper< seed_t > range_check
Definition: BasePolicies.h:296
void EnsureRange(std::string policy, SeedMasterHelper::EngineId const &id, seed_t seed) const
Throws an exception if the range check on seed fails.
Definition: BasePolicies.h:214
std::string getName() const
Returns the given name of the policy.
Definition: BasePolicies.h:73
template<typename SEED >
virtual void rndm::details::CheckedRangePolicy< SEED >::ensureRange ( SeedMasterHelper::EngineId const &  id,
seed_t  seed 
) const
inlineprotectedvirtualinherited

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().

349  { range_check.EnsureRange(this->getName(), id, seed); }
long seed
Definition: chem4.cc:67
RangeCheckHelper< seed_t > range_check
Definition: BasePolicies.h:296
void EnsureRange(std::string policy, SeedMasterHelper::EngineId const &id, seed_t seed) const
Throws an exception if the range check on seed fails.
Definition: BasePolicies.h:214
std::string getName() const
Returns the given name of the policy.
Definition: BasePolicies.h:73
template<typename SEED>
virtual seed_t rndm::details::RandomSeedPolicyBase< SEED >::getEventSeed ( SeedMasterHelper::EngineId const &  id,
EventData_t const &  eventInfo 
)
inlinevirtualinherited

Returns a random number specific to an event.

Definition at line 69 of file BasePolicies.h.

Referenced by rndm::details::RandomSeedPolicyBase< seed_t >::getSeed().

70  { return createEventSeed(id, eventInfo); }
virtual seed_t createEventSeed(SeedMasterHelper::EngineId const &, EventData_t const &)
Extracts a seed for specified event information; returns InvalidSeed.
Definition: BasePolicies.h:90
template<typename SEED>
virtual seed_t rndm::details::RandomSeedPolicyBase< SEED >::getEventSeed ( SeedMasterHelper::EngineId const &  id,
EventData_t const &  eventInfo 
)
inlinevirtualinherited

Returns a random number specific to an event.

Definition at line 114 of file RandomSeedPolicyBase.h.

115  { return createEventSeed(id, eventInfo); }
virtual seed_t createEventSeed(SeedMasterHelper::EngineId const &, EventData_t const &)
Extracts a seed for specified event information; returns InvalidSeed.
Definition: BasePolicies.h:90
template<typename SEED >
template<typename T >
static T rndm::details::PerInstancePolicy< SEED >::getInstanceParameter ( fhicl::ParameterSet const &  pset,
SeedMasterHelper::EngineId const &  id 
)
staticprotectedinherited

Retrieves the parameter (seed) for the specified engine ID.

template<typename SEED >
template<typename T >
T rndm::details::PerInstancePolicy< SEED >::getInstanceParameter ( fhicl::ParameterSet const &  pset,
SeedMasterHelper::EngineId const &  id 
)
staticprotectedinherited

Retrieves the parameter (seed) for the specified engine ID.

Definition at line 562 of file BasePolicies.h.

References art::errors::Configuration, fhicl::ParameterSet::get(), fhicl::ParameterSet::get_if_present(), fhicl::ParameterSet::get_names(), fhicl::ParameterSet::is_key_to_atom(), and fhicl::ParameterSet::is_key_to_table().

Referenced by rndm::details::PerInstancePolicy< SEED >::getInstanceSeed().

564  {
565  // there must be /some/ configuration for the module
566  // FIXME: use ParameterSet::has_key() as soon as it's available
567  const auto cfgKeys = pset.get_names();
568  if (std::find(cfgKeys.begin(), cfgKeys.end(), id.moduleLabel) == cfgKeys.end()) {
570  << "A seed for the nameless instance '" << id
571  << "' was requested, but there is no configuration for '"
572  << id.moduleLabel << "' module label.";
573  }
574 
575  T param;
576  if (!id.hasInstanceName()) { // Case 1: no instance name.
577  // We expect the element to be just an item.
578  if (pset.is_key_to_table(id.moduleLabel)) {
579  // this is mostly a limitation of the FHiCL syntax,
580  // that we can overcome with some cumbersomeness if we need to.
582  << "A seed for the nameless instance '" << id
583  << "' was requested, but the configuration sets named instances ("
584  << pset.get<fhicl::ParameterSet>(id.moduleLabel).to_compact_string()
585  << ").\nNameless and named engine instances can't coexist.";
586  }
587  if (!pset.get_if_present(id.moduleLabel, param)) {
589  << "NuRandomService: unable to find the parameter for '" << id << "'";
590  }
591  } // if no instance name
592  else { // Case 2: instance name is given.
593 
594  if (pset.is_key_to_atom(id.moduleLabel)) {
595  // see above
597  << "A seed for '" << std::string(id) << "' was requested,"
598  " but the configuration sets a nameless instance of '"
599  << id.moduleLabel << "'.\n"
600  << "Nameless and named engine instances can't coexist.";
601  }
602  fhicl::ParameterSet subSet;
603  if (!pset.get_if_present(id.moduleLabel, subSet)) {
605  << "NuRandomService: unable to find the parameter block for: '"
606  << id << "'";
607  }
608 
609  if (!subSet.get_if_present(id.instanceName, param)) {
611  << "NuRandomService: unable to find the parameter value for: '"
612  << id << "'";
613  }
614  } // if instance name
615 
616  return param;
617  } // PerInstancePolicy<SEED>::getInstanceParameter<>()
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::optional< T > get_if_present(std::string const &key) const
Definition: ParameterSet.h:267
template<typename SEED >
seed_t rndm::details::PerInstancePolicy< SEED >::getInstanceSeed ( SeedMasterHelper::EngineId const &  id) const
inlineprotectedinherited
template<typename SEED >
seed_t rndm::details::PerInstancePolicy< SEED >::getInstanceSeed ( SeedMasterHelper::EngineId const &  id) const
inlineprotectedinherited

Retrieves the parameter (seed) for the specified engine ID.

Definition at line 537 of file BasePolicies.h.

References rndm::details::PerInstancePolicy< SEED >::static_configure().

538  { return getInstanceParameter<seed_t>(parameters, id); }
fhicl::ParameterSet parameters
configuration parameters
Definition: BasePolicies.h:531
template<typename SEED>
std::string rndm::details::RandomSeedPolicyBase< SEED >::getName ( ) const
inlineinherited
template<typename SEED>
std::string rndm::details::RandomSeedPolicyBase< SEED >::getName ( ) const
inlineinherited

Returns the given name of the policy.

Definition at line 118 of file RandomSeedPolicyBase.h.

118 { return name; }
std::string name
name of the policy
Definition: BasePolicies.h:83
template<typename SEED >
virtual seed_t rndm::details::CheckedRangePolicy< SEED >::getSeed ( SeedMasterHelper::EngineId const &  id)
inlinevirtualinherited

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.

282  {
283  seed_t seed = this->createSeed(id);
284  ensureRange(id, seed);
285  return seed;
286  } // getSeed()
typename base_t::seed_t seed_t
Definition: BasePolicies.h:258
virtual seed_t createSeed(SeedMasterHelper::EngineId const &)=0
Extracts the next random number seed.
long seed
Definition: chem4.cc:67
virtual void ensureRange(SeedMasterHelper::EngineId const &id, seed_t seed) const
Performs the range checks and complains if needed.
Definition: BasePolicies.h:303
template<typename SEED >
virtual seed_t rndm::details::CheckedRangePolicy< SEED >::getSeed ( SeedMasterHelper::EngineId const &  id)
inlineoverridevirtualinherited

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.

327  {
328  seed_t seed = this->createSeed(id);
329  ensureRange(id, seed);
330  return seed;
331  } // getSeed()
typename base_t::seed_t seed_t
Definition: BasePolicies.h:258
virtual seed_t createSeed(SeedMasterHelper::EngineId const &)=0
Extracts the next random number seed.
long seed
Definition: chem4.cc:67
virtual void ensureRange(SeedMasterHelper::EngineId const &id, seed_t seed) const
Performs the range checks and complains if needed.
Definition: BasePolicies.h:303
template<typename SEED >
virtual void rndm::details::PredefinedSeedPolicy< SEED >::print ( std::ostream &  out) const
overridevirtual

Prints the configuration of this policy.

Reimplemented from rndm::details::CheckedRangePolicy< SEED >.

template<typename SEED >
void rndm::details::PredefinedSeedPolicy< SEED >::print ( std::ostream &  out) const
overridevirtual

Prints the configuration of this policy.

Reimplemented from rndm::details::CheckedRangePolicy< SEED >.

Definition at line 679 of file BasePolicies.h.

Referenced by rndm::details::PredefinedSeedPolicy< SEED >::static_configure().

679  {
680  base_t::print(out);
681  out << "\n seeds directly from the configuration";
682  } // PredefinedSeedPolicy<SEED>::print()
virtual void print(std::ostream &out) const override
Prints information on the configuration of this policy.
Definition: BasePolicies.h:289
template<typename SEED >
void rndm::details::PredefinedSeedPolicy< SEED >::static_configure ( fhicl::ParameterSet const &  )
inlineprotected
template<typename SEED >
void rndm::details::PredefinedSeedPolicy< SEED >::static_configure ( fhicl::ParameterSet const &  )
inlineprotected

Definition at line 672 of file BasePolicies.h.

673  { base_t::range_check.SetCheck(false); }
void SetCheck(bool doCheck=true)
Sets whether to perform the check or not.
Definition: BasePolicies.h:124
RangeCheckHelper< seed_t > range_check
Definition: BasePolicies.h:296
template<typename SEED >
virtual bool rndm::details::PredefinedSeedPolicy< SEED >::yieldsUniqueSeeds ( ) const
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.

245 { return false; }
template<typename SEED >
virtual bool rndm::details::PredefinedSeedPolicy< SEED >::yieldsUniqueSeeds ( ) const
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.

664 { return false; }

Member Data Documentation

template<typename SEED>
static constexpr seed_t rndm::details::RandomSeedPolicyBase< SEED >::InvalidSeed = 0
staticinherited
template<typename SEED>
std::string rndm::details::RandomSeedPolicyBase< SEED >::name
protectedinherited

name of the policy

Definition at line 83 of file BasePolicies.h.

Referenced by rndm::details::RandomSeedPolicyBase< seed_t >::getName().

template<typename SEED >
fhicl::ParameterSet rndm::details::PerInstancePolicy< SEED >::parameters
protectedinherited

configuration parameters

Definition at line 531 of file BasePolicies.h.


The documentation for this class was generated from the following files: