Test module for NuRandomService. More...
Public Member Functions | |
SeedTestPolicy (fhicl::ParameterSet const &pset) | |
virtual void | analyze (art::Event const &event) override |
virtual void | endJob () override |
Public Member Functions inherited from art::EDAnalyzer | |
EDAnalyzer (fhicl::ParameterSet const &pset) | |
template<typename Config > | |
EDAnalyzer (Table< Config > const &config) | |
std::string | workerType () const |
Public Member Functions inherited from art::detail::Analyzer | |
virtual | ~Analyzer () noexcept |
Analyzer (fhicl::ParameterSet const &pset) | |
template<typename Config > | |
Analyzer (Table< Config > const &config) | |
void | doBeginJob () |
void | doEndJob () |
void | doRespondToOpenInputFile (FileBlock const &fb) |
void | doRespondToCloseInputFile (FileBlock const &fb) |
void | doRespondToOpenOutputFiles (FileBlock const &fb) |
void | doRespondToCloseOutputFiles (FileBlock const &fb) |
bool | doBeginRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doEndRun (RunPrincipal &rp, ModuleContext const &mc) |
bool | doBeginSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEndSubRun (SubRunPrincipal &srp, ModuleContext const &mc) |
bool | doEvent (EventPrincipal &ep, ModuleContext const &mc, std::atomic< std::size_t > &counts_run, std::atomic< std::size_t > &counts_passed, std::atomic< std::size_t > &counts_failed) |
Public Member Functions inherited from art::Observer | |
~Observer () noexcept | |
Observer (Observer const &)=delete | |
Observer (Observer &&)=delete | |
Observer & | operator= (Observer const &)=delete |
Observer & | operator= (Observer &&)=delete |
void | registerProducts (ProductDescriptions &, ModuleDescription const &) |
void | fillDescriptions (ModuleDescription const &) |
std::string const & | processName () const |
bool | wantAllEvents () const |
bool | wantEvent (Event const &e) |
fhicl::ParameterSetID | selectorConfig () const |
Handle< TriggerResults > | getTriggerResults (Event const &e) const |
Public Member Functions inherited from art::ModuleBase | |
virtual | ~ModuleBase () noexcept |
ModuleBase () | |
ModuleDescription const & | moduleDescription () const |
void | setModuleDescription (ModuleDescription const &) |
std::array< std::vector< ProductInfo >, NumBranchTypes > const & | getConsumables () const |
void | sortConsumables (std::string const ¤t_process_name) |
template<typename T , BranchType BT> | |
ViewToken< T > | consumesView (InputTag const &tag) |
template<typename T , BranchType BT> | |
ViewToken< T > | mayConsumeView (InputTag const &tag) |
Private Types | |
using | seed_t = testing::NuRandomService::seed_t |
Private Member Functions | |
bool | isLocalEngine (size_t iEngine) const |
Returns whether the engine associated with the specified index is local. More... | |
seed_t | verifySeed (CLHEP::HepRandomEngine &, std::string const &instanceName) |
seed_t | obtainSeed (std::string instanceName="") |
bool | handleSeedServiceException (art::Exception &e) |
Returns whether e is an exception we can handle (and, if so, it handles) More... | |
Private Attributes | |
std::vector< std::string > | instanceNames |
std::map< std::string, seed_t > | startSeeds |
seeds after the constructor More... | |
unsigned int | nExpectedErrors |
number of expected errors More... | |
bool | useGenerators |
instanciate and use random number generators More... | |
bool | perEventSeeds |
whether we expect different seeds on each event More... | |
std::string const | moduleLabel |
configured module label More... | |
unsigned int | nErrors = 0 |
Number of errors detected so far. More... | |
std::unique_ptr< CLHEP::HepRandomEngine > | localEngine |
self-managed More... | |
std::map< std::string, CLHEP::HepRandomEngine * > | engines |
Additional Inherited Members | |
Public Types inherited from art::EDAnalyzer | |
using | WorkerType = WorkerT< EDAnalyzer > |
using | ModuleType = EDAnalyzer |
Protected Member Functions inherited from art::Observer | |
Observer (fhicl::ParameterSet const &config) | |
Observer (std::vector< std::string > const &paths, fhicl::ParameterSet const &config) | |
detail::ProcessAndEventSelectors & | processAndEventSelectors () |
Protected Member Functions inherited from art::ModuleBase | |
ConsumesCollector & | consumesCollector () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | consumes (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | consumesView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | consumesMany () |
template<typename T , BranchType = InEvent> | |
ProductToken< T > | mayConsume (InputTag const &) |
template<typename Element , BranchType = InEvent> | |
ViewToken< Element > | mayConsumeView (InputTag const &) |
template<typename T , BranchType = InEvent> | |
void | mayConsumeMany () |
Test module for NuRandomService.
The test writes on screen the random seeds it gets.
Note that the test does not actually get any random number, unless the useGenerators option is turned on.
Configuration parameters:
Definition at line 65 of file SeedTestPolicy_module.cc.
|
private |
Definition at line 76 of file SeedTestPolicy_module.cc.
|
explicit |
Definition at line 110 of file SeedTestPolicy_module.cc.
|
overridevirtual |
Implements art::EDAnalyzer.
Definition at line 220 of file SeedTestPolicy_module.cc.
|
overridevirtual |
Reimplemented from art::EDAnalyzer.
Definition at line 270 of file SeedTestPolicy_module.cc.
|
private |
Returns whether e is an exception we can handle (and, if so, it handles)
Definition at line 310 of file SeedTestPolicy_module.cc.
|
private |
Returns whether the engine associated with the specified index is local.
Definition at line 323 of file SeedTestPolicy_module.cc.
|
private |
Definition at line 285 of file SeedTestPolicy_module.cc.
|
private |
Definition at line 329 of file SeedTestPolicy_module.cc.
|
private |
Definition at line 88 of file SeedTestPolicy_module.cc.
|
private |
Definition at line 78 of file SeedTestPolicy_module.cc.
|
private |
self-managed
Definition at line 87 of file SeedTestPolicy_module.cc.
|
private |
configured module label
Definition at line 83 of file SeedTestPolicy_module.cc.
|
private |
Number of errors detected so far.
Definition at line 85 of file SeedTestPolicy_module.cc.
|
private |
number of expected errors
Definition at line 80 of file SeedTestPolicy_module.cc.
|
private |
whether we expect different seeds on each event
Definition at line 82 of file SeedTestPolicy_module.cc.
|
private |
seeds after the constructor
Definition at line 79 of file SeedTestPolicy_module.cc.
|
private |
instanciate and use random number generators
Definition at line 81 of file SeedTestPolicy_module.cc.