LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
art::ReplicatedFilter Class Referenceabstract

#include "ReplicatedFilter.h"

Inheritance diagram for art::ReplicatedFilter:
art::detail::Filter art::detail::EngineCreator art::Modifier art::ModuleBase art::ProductRegistryHelper

Public Types

using ModuleType = ReplicatedFilter
 
template<typename UserConfig >
using Table = Modifier::Table< UserConfig >
 

Public Member Functions

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 &)
 
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)
 
void fillProductDescriptions ()
 
void registerProducts (ProductDescriptions &productsToRegister)
 
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)
 
std::unique_ptr< WorkermakeWorker (WorkerParams const &wp)
 
template<typename T , BranchType BT>
ViewToken< T > consumesView (InputTag const &tag)
 
template<typename T , BranchType BT>
ViewToken< T > mayConsumeView (InputTag const &tag)
 

Static Public Attributes

static constexpr bool Pass {true}
 
static constexpr bool Fail {false}
 

Protected Member Functions

 ReplicatedFilter (fhicl::ParameterSet const &pset, ProcessingFrame const &frame)
 
template<typename Config >
 ReplicatedFilter (Table< Config > const &config, ProcessingFrame const &frame)
 
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 ()
 

Private Types

using base_engine_t = CLHEP::HepRandomEngine
 
using label_t = RNGsnapshot::label_t
 
using seed_t = long
 
using engine_state_t = RNGsnapshot::engine_state_t
 

Private Member Functions

std::unique_ptr< WorkerdoMakeWorker (WorkerParams const &wp) final
 
void setupQueues (detail::SharedResources const &) final
 
void beginJobWithFrame (ProcessingFrame const &) final
 
void endJobWithFrame (ProcessingFrame const &) final
 
void respondToOpenInputFileWithFrame (FileBlock const &, ProcessingFrame const &) final
 
void respondToCloseInputFileWithFrame (FileBlock const &, ProcessingFrame const &) final
 
void respondToOpenOutputFilesWithFrame (FileBlock const &, ProcessingFrame const &) final
 
void respondToCloseOutputFilesWithFrame (FileBlock const &, ProcessingFrame const &) final
 
bool beginRunWithFrame (Run &, ProcessingFrame const &) final
 
bool endRunWithFrame (Run &, ProcessingFrame const &) final
 
bool beginSubRunWithFrame (SubRun &, ProcessingFrame const &) final
 
bool endSubRunWithFrame (SubRun &, ProcessingFrame const &) final
 
bool filterWithFrame (Event &, ProcessingFrame const &) final
 
virtual void beginJob (ProcessingFrame const &)
 
virtual void endJob (ProcessingFrame const &)
 
virtual void respondToOpenInputFile (FileBlock const &, ProcessingFrame const &)
 
virtual void respondToCloseInputFile (FileBlock const &, ProcessingFrame const &)
 
virtual void respondToOpenOutputFiles (FileBlock const &, ProcessingFrame const &)
 
virtual void respondToCloseOutputFiles (FileBlock const &, ProcessingFrame const &)
 
virtual void beginRun (Run const &, ProcessingFrame const &)
 
virtual void endRun (Run const &, ProcessingFrame const &)
 
virtual void beginSubRun (SubRun const &, ProcessingFrame const &)
 
virtual void endSubRun (SubRun const &, ProcessingFrame const &)
 
virtual bool filter (Event &, ProcessingFrame const &)=0
 
base_engine_tcreateEngine (seed_t seed)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make)
 
base_engine_tcreateEngine (seed_t seed, std::string const &kind_of_engine_to_make, label_t const &engine_label)
 

Detailed Description

Definition at line 17 of file ReplicatedFilter.h.

Member Typedef Documentation

using art::detail::EngineCreator::base_engine_t = CLHEP::HepRandomEngine
inherited

Definition at line 36 of file EngineCreator.h.

Definition at line 37 of file EngineCreator.h.

using art::detail::EngineCreator::seed_t = long
inherited

Definition at line 38 of file EngineCreator.h.

template<typename UserConfig >
using art::detail::Filter::Table = Modifier::Table<UserConfig>
inherited

Definition at line 32 of file Filter.h.

Constructor & Destructor Documentation

art::ReplicatedFilter::ReplicatedFilter ( fhicl::ParameterSet const &  pset,
ProcessingFrame const &  frame 
)
explicitprotected

Definition at line 6 of file ReplicatedFilter.cc.

8  : Filter{pset}
9  , EngineCreator{pset.get<std::string>("module_label"), frame.scheduleID()}
10  {}
EngineCreator(std::string const &label, ScheduleID sid)
Filter(fhicl::ParameterSet const &)
Definition: Filter.cc:24

Member Function Documentation

void art::ReplicatedFilter::beginJob ( ProcessingFrame const &  )
privatevirtual

Definition at line 105 of file ReplicatedFilter.cc.

Referenced by beginJobWithFrame(), and ReplicatedFilter().

106  {}
void art::ReplicatedFilter::beginJobWithFrame ( ProcessingFrame const &  frame)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 57 of file ReplicatedFilter.cc.

References beginJob().

Referenced by ReplicatedFilter().

58  {
59  beginJob(frame);
60  }
virtual void beginJob(ProcessingFrame const &)
void art::ReplicatedFilter::beginRun ( Run const &  ,
ProcessingFrame const &   
)
privatevirtual

Definition at line 133 of file ReplicatedFilter.cc.

Referenced by beginRunWithFrame(), and ReplicatedFilter().

134  {}
bool art::ReplicatedFilter::beginRunWithFrame ( Run r,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 69 of file ReplicatedFilter.cc.

References beginRun().

Referenced by ReplicatedFilter().

70  {
71  beginRun(r, frame);
72  return true;
73  }
TRandom r
Definition: spectrum.C:23
virtual void beginRun(Run const &, ProcessingFrame const &)
void art::ReplicatedFilter::beginSubRun ( SubRun const &  ,
ProcessingFrame const &   
)
privatevirtual

Definition at line 141 of file ReplicatedFilter.cc.

Referenced by beginSubRunWithFrame(), and ReplicatedFilter().

142  {}
bool art::ReplicatedFilter::beginSubRunWithFrame ( SubRun sr,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 83 of file ReplicatedFilter.cc.

References beginSubRun().

Referenced by ReplicatedFilter().

85  {
86  beginSubRun(sr, frame);
87  return true;
88  }
virtual void beginSubRun(SubRun const &, ProcessingFrame const &)
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::consumes ( InputTag const &  tag)
protectedinherited

Definition at line 61 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumes().

62  {
63  return collector_.consumes<T, BT>(tag);
64  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ProductToken< T > consumes(InputTag const &)
ConsumesCollector & art::ModuleBase::consumesCollector ( )
protectedinherited

Definition at line 57 of file ModuleBase.cc.

References art::ModuleBase::collector_.

58  {
59  return collector_;
60  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::consumesMany ( )
protectedinherited

Definition at line 75 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesMany().

76  {
77  collector_.consumesMany<T, BT>();
78  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::consumesView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::consumesView ( InputTag const &  tag)
inherited

Definition at line 68 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::consumesView().

69  {
70  return collector_.consumesView<T, BT>(tag);
71  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > consumesView(InputTag const &)
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed)
inherited

Definition at line 20 of file EngineCreator.cc.

References art::detail::EngineCreator::rng().

Referenced by evg::AddGenieEventsToArt::AddGenieEventsToArt(), artg4tk::artg4tkMain::artg4tkMain(), evgen::BaseRadioGen::BaseRadioGen(), evgen::CORSIKAGen::CORSIKAGen(), evgen::CosmicsGen::CosmicsGen(), art::MixHelper::createEngine(), detsim::DriftElectronstoPlane::DriftElectronstoPlane(), art::EDAnalyzer::EDAnalyzer(), art::EDFilter::EDFilter(), art::EDProducer::EDProducer(), artg4tk::EventGenerator::EventGenerator(), evwgh::EventWeight::EventWeight(), evgen::GaisserParam::GaisserParam(), cluster::HoughLineFinder::HoughLineFinder(), art::MixHelper::initEngine_(), larg4::IonAndScint::IonAndScint(), larg4::ISCalcAna::ISCalcAna(), larg4::LArG4::LArG4(), larg4::larg4Main::larg4Main(), evgen::larg4SingleGen::larg4SingleGen(), evgen::LightSource::LightSource(), evgen::MUSUN::MUSUN(), evgen::NDKGen::NDKGen(), evgen::NeutronOsc::NeutronOsc(), nnet::NoiseWaveformDump::NoiseWaveformDump(), evgen::NucleonDecay::NucleonDecay(), opdet::OpMCDigi::OpMCDigi(), opdet::OptDetDigitizer::OptDetDigitizer(), phot::PDFastSimANN::PDFastSimANN(), phot::PDFastSimPAR::PDFastSimPAR(), phot::PDFastSimPVS::PDFastSimPVS(), evgen::PhotonGen::PhotonGen(), phot::PhotonLibraryPropagation::PhotonLibraryPropagation(), evgen::RadioGen::RadioGen(), nnet::RawWaveformClnSigDump::RawWaveformClnSigDump(), nnet::RawWaveformDump::RawWaveformDump(), art::ReplicatedAnalyzer::ReplicatedAnalyzer(), ReplicatedFilter(), art::ReplicatedProducer::ReplicatedProducer(), detsim::SimDriftElectrons::SimDriftElectrons(), detsim::SimWire::SimWire(), evgen::SingleGen::SingleGen(), evgen::SNNueAr40CCGen::SNNueAr40CCGen(), and trkf::Track3DKalman::Track3DKalman().

21 {
22  return createEngine(seed, rng()->defaultEngineKind());
23 }
base_engine_t & createEngine(seed_t seed)
long seed
Definition: chem4.cc:67
static ServiceHandle< RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make 
)
inherited

Definition at line 26 of file EngineCreator.cc.

References art::detail::EngineCreator::moduleLabel_, art::detail::EngineCreator::requireValid(), art::detail::EngineCreator::rng(), and art::detail::EngineCreator::sid_.

28 {
29  requireValid();
30  return rng()->createEngine(sid_, moduleLabel_, seed, kind_of_engine_to_make);
31 }
long seed
Definition: chem4.cc:67
std::string const moduleLabel_
Definition: EngineCreator.h:53
static ServiceHandle< RandomNumberGenerator > & rng()
EngineCreator::base_engine_t & EngineCreator::createEngine ( seed_t  seed,
std::string const &  kind_of_engine_to_make,
label_t const &  engine_label 
)
inherited

Definition at line 34 of file EngineCreator.cc.

References art::detail::EngineCreator::moduleLabel_, art::detail::EngineCreator::requireValid(), art::detail::EngineCreator::rng(), and art::detail::EngineCreator::sid_.

37 {
38  requireValid();
39  return rng()->createEngine(
40  sid_, moduleLabel_, seed, kind_of_engine_to_make, engine_label);
41 }
long seed
Definition: chem4.cc:67
std::string const moduleLabel_
Definition: EngineCreator.h:53
static ServiceHandle< RandomNumberGenerator > & rng()
void art::detail::Filter::doBeginJob ( SharedResources const &  resources)
inherited

Definition at line 29 of file Filter.cc.

30  {
31  setupQueues(resources);
32  ProcessingFrame const frame{ScheduleID{}};
33  beginJobWithFrame(frame);
34  }
virtual void setupQueues(SharedResources const &)=0
virtual void beginJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Filter::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 72 of file Filter.cc.

References art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().

73  {
74  auto r = rp.makeRun(mc, RangeSet::forRun(rp.runID()));
75  ProcessingFrame const frame{mc.scheduleID()};
76  bool const rc = beginRunWithFrame(r, frame);
77  r.commitProducts();
78  return rc;
79  }
TRandom r
Definition: spectrum.C:23
virtual bool beginRunWithFrame(Run &, ProcessingFrame const &)=0
static RangeSet forRun(RunID)
Definition: RangeSet.cc:51
bool art::detail::Filter::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 92 of file Filter.cc.

References art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().

93  {
94  auto sr = srp.makeSubRun(mc, RangeSet::forSubRun(srp.subRunID()));
95  ProcessingFrame const frame{mc.scheduleID()};
96  bool const rc = beginSubRunWithFrame(sr, frame);
97  sr.commitProducts();
98  return rc;
99  }
static RangeSet forSubRun(SubRunID)
Definition: RangeSet.cc:57
virtual bool beginSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
void art::detail::Filter::doEndJob ( )
inherited

Definition at line 37 of file Filter.cc.

38  {
39  ProcessingFrame const frame{ScheduleID{}};
40  endJobWithFrame(frame);
41  }
virtual void endJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Filter::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 82 of file Filter.cc.

References art::RunPrincipal::makeRun(), r, art::ModuleContext::scheduleID(), and art::Principal::seenRanges().

83  {
84  auto r = rp.makeRun(mc, rp.seenRanges());
85  ProcessingFrame const frame{mc.scheduleID()};
86  bool const rc = endRunWithFrame(r, frame);
87  r.commitProducts();
88  return rc;
89  }
TRandom r
Definition: spectrum.C:23
virtual bool endRunWithFrame(Run &, ProcessingFrame const &)=0
bool art::detail::Filter::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 102 of file Filter.cc.

References art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::Principal::seenRanges().

103  {
104  auto sr = srp.makeSubRun(mc, srp.seenRanges());
105  ProcessingFrame const frame{mc.scheduleID()};
106  bool const rc = endSubRunWithFrame(sr, frame);
107  sr.commitProducts();
108  return rc;
109  }
virtual bool endSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
bool art::detail::Filter::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 
)
inherited

Definition at line 112 of file Filter.cc.

References e, art::EventPrincipal::makeEvent(), and art::ModuleContext::scheduleID().

117  {
118  auto e = ep.makeEvent(mc);
119  ++counts_run;
120  ProcessingFrame const frame{mc.scheduleID()};
121  bool const rc = filterWithFrame(e, frame);
122  e.commitProducts(checkPutProducts_, &expectedProducts<InEvent>());
123  if (rc) {
124  ++counts_passed;
125  } else {
126  ++counts_failed;
127  }
128  return rc;
129  }
virtual bool filterWithFrame(Event &, ProcessingFrame const &)=0
bool const checkPutProducts_
Definition: Filter.h:75
Float_t e
Definition: plot.C:35
std::unique_ptr< Worker > art::ReplicatedFilter::doMakeWorker ( WorkerParams const &  wp)
finalprivatevirtual

Implements art::ModuleBase.

Definition at line 13 of file ReplicatedFilter.cc.

Referenced by ReplicatedFilter().

14  {
15  return std::make_unique<WorkerT<ReplicatedFilter>>(this, wp);
16  }
void art::detail::Filter::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 51 of file Filter.cc.

52  {
53  ProcessingFrame const frame{ScheduleID{}};
55  }
TFile fb("Li6.root")
virtual void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
void art::detail::Filter::doRespondToCloseOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 65 of file Filter.cc.

66  {
67  ProcessingFrame const frame{ScheduleID{}};
69  }
TFile fb("Li6.root")
virtual void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
void art::detail::Filter::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited

Definition at line 44 of file Filter.cc.

45  {
46  ProcessingFrame const frame{ScheduleID{}};
48  }
TFile fb("Li6.root")
virtual void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
void art::detail::Filter::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 58 of file Filter.cc.

59  {
60  ProcessingFrame const frame{ScheduleID{}};
62  }
TFile fb("Li6.root")
virtual void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
void art::ReplicatedFilter::endJob ( ProcessingFrame const &  )
privatevirtual

Definition at line 109 of file ReplicatedFilter.cc.

Referenced by endJobWithFrame(), and ReplicatedFilter().

110  {}
void art::ReplicatedFilter::endJobWithFrame ( ProcessingFrame const &  frame)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 63 of file ReplicatedFilter.cc.

References endJob().

Referenced by ReplicatedFilter().

64  {
65  endJob(frame);
66  }
virtual void endJob(ProcessingFrame const &)
void art::ReplicatedFilter::endRun ( Run const &  ,
ProcessingFrame const &   
)
privatevirtual

Definition at line 137 of file ReplicatedFilter.cc.

Referenced by endRunWithFrame(), and ReplicatedFilter().

138  {}
bool art::ReplicatedFilter::endRunWithFrame ( Run r,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 76 of file ReplicatedFilter.cc.

References endRun().

Referenced by ReplicatedFilter().

77  {
78  endRun(r, frame);
79  return true;
80  }
TRandom r
Definition: spectrum.C:23
virtual void endRun(Run const &, ProcessingFrame const &)
void art::ReplicatedFilter::endSubRun ( SubRun const &  ,
ProcessingFrame const &   
)
privatevirtual

Definition at line 145 of file ReplicatedFilter.cc.

Referenced by endSubRunWithFrame(), and ReplicatedFilter().

146  {}
bool art::ReplicatedFilter::endSubRunWithFrame ( SubRun sr,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 91 of file ReplicatedFilter.cc.

References endSubRun().

Referenced by ReplicatedFilter().

92  {
93  endSubRun(sr, frame);
94  return true;
95  }
virtual void endSubRun(SubRun const &, ProcessingFrame const &)
void art::Modifier::fillProductDescriptions ( )
inherited

Definition at line 10 of file Modifier.cc.

References art::ProductRegistryHelper::fillDescriptions(), and art::ModuleBase::moduleDescription().

11  {
13  }
void fillDescriptions(ModuleDescription const &md)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
virtual bool art::ReplicatedFilter::filter ( Event ,
ProcessingFrame const &   
)
privatepure virtual
bool art::ReplicatedFilter::filterWithFrame ( Event e,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 98 of file ReplicatedFilter.cc.

References filter().

Referenced by ReplicatedFilter().

99  {
100  return filter(e, frame);
101  }
Float_t e
Definition: plot.C:35
virtual bool filter(Event &, ProcessingFrame const &)=0
std::array< std::vector< ProductInfo >, NumBranchTypes > const & art::ModuleBase::getConsumables ( ) const
inherited

Definition at line 43 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::getConsumables().

44  {
45  return collector_.getConsumables();
46  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
std::array< std::vector< ProductInfo >, NumBranchTypes > const & getConsumables() const
std::unique_ptr< Worker > art::ModuleBase::makeWorker ( WorkerParams const &  wp)
inherited

Definition at line 37 of file ModuleBase.cc.

References art::ModuleBase::doMakeWorker(), and art::NumBranchTypes.

38  {
39  return doMakeWorker(wp);
40  }
virtual std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp)=0
template<typename T , BranchType BT>
ProductToken< T > art::ModuleBase::mayConsume ( InputTag const &  tag)
protectedinherited

Definition at line 82 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsume().

83  {
84  return collector_.mayConsume<T, BT>(tag);
85  }
ProductToken< T > mayConsume(InputTag const &)
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename T , BranchType BT>
void art::ModuleBase::mayConsumeMany ( )
protectedinherited

Definition at line 96 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeMany().

97  {
98  collector_.mayConsumeMany<T, BT>();
99  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
template<typename Element , BranchType = InEvent>
ViewToken<Element> art::ModuleBase::mayConsumeView ( InputTag const &  )
protectedinherited
template<typename T , BranchType BT>
ViewToken<T> art::ModuleBase::mayConsumeView ( InputTag const &  tag)
inherited

Definition at line 89 of file ModuleBase.h.

References art::ModuleBase::collector_, and art::ConsumesCollector::mayConsumeView().

90  {
91  return collector_.mayConsumeView<T, BT>(tag);
92  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
ViewToken< Element > mayConsumeView(InputTag const &)
ModuleDescription const & art::ModuleBase::moduleDescription ( ) const
inherited

Definition at line 13 of file ModuleBase.cc.

References art::errors::LogicError.

Referenced by art::OutputModule::doRespondToOpenInputFile(), art::OutputModule::doWriteEvent(), art::Modifier::fillProductDescriptions(), art::OutputModule::makePlugins_(), art::OutputWorker::OutputWorker(), reco::shower::LArPandoraModularShowerCreation::produce(), art::Modifier::registerProducts(), and art::OutputModule::registerProducts().

14  {
15  if (md_.has_value()) {
16  return *md_;
17  }
18 
20  "There was an error while calling moduleDescription().\n"}
21  << "The moduleDescription() base-class member function cannot be called\n"
22  "during module construction. To determine which module is "
23  "responsible\n"
24  "for calling it, find the '<module type>:<module "
25  "label>@Construction'\n"
26  "tag in the message prefix above. Please contact artists@fnal.gov\n"
27  "for guidance.\n";
28  }
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
void art::Modifier::registerProducts ( ProductDescriptions productsToRegister)
inherited

Definition at line 16 of file Modifier.cc.

References art::ModuleBase::moduleDescription(), and art::ProductRegistryHelper::registerProducts().

17  {
18  ProductRegistryHelper::registerProducts(productsToRegister,
20  }
void registerProducts(ProductDescriptions &productsToRegister, ModuleDescription const &md)
ModuleDescription const & moduleDescription() const
Definition: ModuleBase.cc:13
void art::ReplicatedFilter::respondToCloseInputFile ( FileBlock const &  ,
ProcessingFrame const &   
)
privatevirtual

Definition at line 118 of file ReplicatedFilter.cc.

Referenced by ReplicatedFilter(), and respondToCloseInputFileWithFrame().

120  {}
void art::ReplicatedFilter::respondToCloseInputFileWithFrame ( FileBlock const &  fb,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 33 of file ReplicatedFilter.cc.

References respondToCloseInputFile().

Referenced by ReplicatedFilter().

36  {
38  }
virtual void respondToCloseInputFile(FileBlock const &, ProcessingFrame const &)
TFile fb("Li6.root")
void art::ReplicatedFilter::respondToCloseOutputFiles ( FileBlock const &  ,
ProcessingFrame const &   
)
privatevirtual

Definition at line 128 of file ReplicatedFilter.cc.

Referenced by ReplicatedFilter(), and respondToCloseOutputFilesWithFrame().

130  {}
void art::ReplicatedFilter::respondToCloseOutputFilesWithFrame ( FileBlock const &  fb,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 49 of file ReplicatedFilter.cc.

References respondToCloseOutputFiles().

Referenced by ReplicatedFilter().

52  {
54  }
TFile fb("Li6.root")
virtual void respondToCloseOutputFiles(FileBlock const &, ProcessingFrame const &)
void art::ReplicatedFilter::respondToOpenInputFile ( FileBlock const &  ,
ProcessingFrame const &   
)
privatevirtual

Definition at line 113 of file ReplicatedFilter.cc.

Referenced by ReplicatedFilter(), and respondToOpenInputFileWithFrame().

115  {}
void art::ReplicatedFilter::respondToOpenInputFileWithFrame ( FileBlock const &  fb,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 25 of file ReplicatedFilter.cc.

References respondToOpenInputFile().

Referenced by ReplicatedFilter().

28  {
29  respondToOpenInputFile(fb, frame);
30  }
virtual void respondToOpenInputFile(FileBlock const &, ProcessingFrame const &)
TFile fb("Li6.root")
void art::ReplicatedFilter::respondToOpenOutputFiles ( FileBlock const &  ,
ProcessingFrame const &   
)
privatevirtual

Definition at line 123 of file ReplicatedFilter.cc.

Referenced by ReplicatedFilter(), and respondToOpenOutputFilesWithFrame().

125  {}
void art::ReplicatedFilter::respondToOpenOutputFilesWithFrame ( FileBlock const &  fb,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 41 of file ReplicatedFilter.cc.

References respondToOpenOutputFiles().

Referenced by ReplicatedFilter().

44  {
46  }
TFile fb("Li6.root")
virtual void respondToOpenOutputFiles(FileBlock const &, ProcessingFrame const &)
void art::ModuleBase::setModuleDescription ( ModuleDescription const &  md)
inherited

Definition at line 31 of file ModuleBase.cc.

References art::ModuleBase::md_.

32  {
33  md_ = md;
34  }
std::optional< ModuleDescription > md_
Definition: ModuleBase.h:55
void art::ReplicatedFilter::setupQueues ( detail::SharedResources const &  )
finalprivatevirtual

Implements art::detail::Filter.

Definition at line 19 of file ReplicatedFilter.cc.

Referenced by ReplicatedFilter().

20  {
21  // For art 3.0, replicated modules will not have queues.
22  }
void art::ModuleBase::sortConsumables ( std::string const &  current_process_name)
inherited

Definition at line 49 of file ModuleBase.cc.

References art::ModuleBase::collector_, and art::ConsumesCollector::sortConsumables().

50  {
51  // Now that we know we have seen all the consumes declarations,
52  // sort the results for fast lookup later.
53  collector_.sortConsumables(current_process_name);
54  }
ConsumesCollector collector_
Definition: ModuleBase.h:56
void sortConsumables(std::string const &current_process_name)

Member Data Documentation

constexpr bool art::detail::Filter::Fail {false}
staticinherited

Definition at line 29 of file Filter.h.

constexpr bool art::detail::Filter::Pass {true}
staticinherited

Definition at line 28 of file Filter.h.


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