Classes | Public Types | Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
lar::example::Disturbance Class Reference

A silly module. More...

Inheritance diagram for lar::example::Disturbance:
art::EDProducer art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper

Classes

struct  Config
 

Public Types

using Parameters = art::EDProducer::Table< Config >
 
- Public Types inherited from art::EDProducer
using ModuleType = EDProducer
 
using WorkerType = WorkerT< EDProducer >
 
- Public Types inherited from art::detail::Producer
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 
- Public Types inherited from art::Modifier
template<typename UserConfig , typename UserKeysToIgnore = void>
using Table = ProducerTable< UserConfig, detail::ModuleConfig, UserKeysToIgnore >
 

Public Member Functions

 Disturbance (Parameters const &config)
 Constructor. More...
 
virtual void produce (art::Event &) override
 Executes the iterations. More...
 
- Public Member Functions inherited from art::EDProducer
 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
std::string workerType () const
 
- Public Member Functions inherited from art::detail::Producer
virtual ~Producer () noexcept
 
 Producer (fhicl::ParameterSet const &)
 
 Producer (Producer const &)=delete
 
 Producer (Producer &&)=delete
 
Produceroperator= (Producer const &)=delete
 
Produceroperator= (Producer &&)=delete
 
void doBeginJob (SharedResources const &resources)
 
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::Modifier
 ~Modifier () noexcept
 
 Modifier ()
 
 Modifier (Modifier const &)=delete
 
 Modifier (Modifier &&)=delete
 
Modifieroperator= (Modifier const &)=delete
 
Modifieroperator= (Modifier &&)=delete
 
- 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 &current_process_name)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Static Private Member Functions

static void throwArtException ()
 Throws a std::out_of_range exception. More...
 

Private Attributes

unsigned int fNArtExceptions
 

Additional Inherited Members

- Static Public Member Functions inherited from art::EDProducer
static void commitEvent (EventPrincipal &ep, Event &e)
 
- Protected Member Functions inherited from art::ModuleBase
ConsumesCollectorconsumesCollector ()
 
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 ()
 

Detailed Description

A silly module.

This module throws and catches a lot of art::Exception exceptions. Kids, don't do this at home!

Configuration

Definition at line 33 of file Disturbance_module.cc.

Member Typedef Documentation

Definition at line 45 of file Disturbance_module.cc.

Constructor & Destructor Documentation

lar::example::Disturbance::Disturbance ( Parameters const &  config)

Constructor.

Definition at line 68 of file Disturbance_module.cc.

70  , fNArtExceptions(config().NArtExceptions())
71  {}
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
static Config * config
Definition: config.cpp:1054

Member Function Documentation

void lar::example::Disturbance::produce ( art::Event )
overridevirtual

Executes the iterations.

Implements art::EDProducer.

Definition at line 75 of file Disturbance_module.cc.

75  {
76 
77  //
78  // art::Exception
79  //
80  for (unsigned int i = 0; i < fNArtExceptions; ++i) {
81  try {
83  }
84  catch (art::Exception const&) {}
85  } // for
86 
87 } // lar::example::Disturbance::produce()
static void throwArtException()
Throws a std::out_of_range exception.
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
void lar::example::Disturbance::throwArtException ( )
staticprivate

Throws a std::out_of_range exception.

Definition at line 91 of file Disturbance_module.cc.

91  {
92 
94  << "I want to annoy you.\n";
95 
96 } // lar::example::Disturbance::throwArtException()
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66

Member Data Documentation

unsigned int lar::example::Disturbance::fNArtExceptions
private

Definition at line 56 of file Disturbance_module.cc.


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