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

#include "EDProducer.h"

Inheritance diagram for art::EDProducer:
art::detail::Producer art::detail::LegacyModule art::Modifier art::ModuleBase art::ProductRegistryHelper apa::APAHitFinder artg4tk::artg4tkMain artg4tk::EventGenerator bogoblip::BlipMaker butcher::EventButcher caldata::CalWire caldata::CalWireT962 calo::Calorimetry calo::GnocchiCalorimetry calo::ShowerCalorimetry calo::TrackCalorimetry cheat::BackTrackerLoader cheat::PhotonBackTrackerLoader cluster::BlurredClustering cluster::ClusterCheater cluster::ClusterCrawler cluster::DBcluster cluster::DBCluster3D cluster::EndPointModule cluster::HoughLineFinder cluster::LineCluster cluster::LineMerger cluster::SmallClusterFinder cluster::TrajCluster cosmic::BeamFlashTrackMatchTagger cosmic::CosmicClusterTagger cosmic::CosmicPCAxisTagger cosmic::CosmicPFParticleTagger cosmic::CosmicTrackTagger cosmic::TrackPFParticleMatch CRHitRemoval CRHitRemovalByPCA detsim::DriftElectronstoPlane detsim::SimDriftElectrons detsim::SimWire ems::EMShower3D evd::GraphCluster event::EventCheater evg::AddGenieEventsToArt evgen::BaseRadioGen evgen::CORSIKAGen evgen::CosmicsGen evgen::FileMuons evgen::GaisserParam evgen::GENIEGen evgen::larg4SingleGen evgen::LightSource evgen::MarleyGen evgen::MarleyTimeGen evgen::MUSUN evgen::NDKGen evgen::NeutronOsc evgen::NucleonDecay evgen::PhotonGen evgen::RadioGen evgen::SingleGen evgen::SNNueAr40CCGen evgen::TestGENIEHelper evgen::TextFileGen evwgh::EventWeight hit::DisambigCheater hit::DPRawHitFinder hit::FFTHitFinder hit::HitCheater hit::HitFinder hit::MCHitFinder hit::RawHitFinder hit::RFFHitFinder hit::TTHitFinder lar::example::Disturbance lar_cluster3d::Cluster3D lar_pandora::CollectionSplitting lar_pandora::ILArPandora lar_pandora::LArPandoraExternalEventBuilding lar_pandora::LArPandoraShowerCreation lar_pandora::LArPandoraTrackCreation larg4::IonAndScint larg4::LArG4 larg4::larg4Main lbne::PhotonCounterT0Matching lcvn::ICVNMapper< T, U > lcvn::LArCVNEvaluator MCReco mvapid::MVAPID nnet::EmTrackClusterId nnet::EmTrackClusterId2out nnet::EmTrackClusterId2outTl nnet::EmTrackClusterId3outTl nnet::EmTrackMichelId nnet::EmTrackMichelIdTl nnet::ParticleDecayId nnet::WaveformRoiFinder noisefilteralg::WireCellNoiseFilter NuGraphInference NuSliceHitsProducer opdet::OpFlashFinder opdet::OpHitFinder opdet::OpMCDigi opdet::OptDetDigitizer opdet::OpticalRawDigitReformatter phot::PDFastSimANN phot::PDFastSimPAR phot::PDFastSimPVS phot::PhotonLibraryPropagation pid::Chi2ParticleID quad::QuadVtx reco3d::SpacePointSolver reco::shower::LArPandoraModularShowerCreation sce::SCECorrection shower::EMShower shower::TCShower ShowerReco3D shwf::ShowerCheater shwf::ShowerFinder shwf::ShowerReco sim::GenericCRT sim::MergeSimSources sim::PhotonHitConverter spacecharge::ShiftEdepSCE sppt::TTSpacePointFinder t0::MCParticleHitMatching t0::MCParticleShowerMatching t0::MCParticleTrackMatching t0::MCTruthT0Matching TrackProducerFromPFParticle TrackProducerFromTrack TrackProducerFromTrackTrajectory trk::TrackContainmentTagger trkf::CCTrackMaker trkf::CosmicTracker trkf::FeatureTracker trkf::KalmanFilterFinalTrackFitter trkf::KalmanFilterTrajectoryFitter trkf::MCSFitProducer trkf::PMAlgTrackMaker trkf::PMAlgTrajFitter trkf::SeedFinderModule trkf::SpacePointCheater trkf::SpacePointFinder trkf::SpacePts trkf::TCTrack trkf::Track3DKalman trkf::Track3DKalmanHit trkf::Track3DKalmanSPS trkf::Track3Dreco trkf::TrackCheater trkf::TrackKalmanCheater trkf::TrackStitcher trkf::VertexFitter tss::TrackShowerHits vertex::FeatureVertexFinder vertex::PrimaryVertexFinder vertex::VertexCheater vertex::VertexFinder2D

Public Types

using ModuleType = EDProducer
 
template<typename UserConfig , typename KeysToIgnore = void>
using Table = Modifier::Table< UserConfig, KeysToIgnore >
 

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 &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)
 
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)
 

Protected Member Functions

 EDProducer (fhicl::ParameterSet const &pset)
 
template<typename Config >
 EDProducer (Table< Config > const &config)
 
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 = EngineCreator::base_engine_t
 
using seed_t = EngineCreator::seed_t
 
using label_t = EngineCreator::label_t
 

Private Member Functions

std::unique_ptr< WorkerdoMakeWorker (WorkerParams const &wp) final
 
void setupQueues (detail::SharedResources const &resources) 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
 
void beginRunWithFrame (Run &, ProcessingFrame const &) final
 
void endRunWithFrame (Run &, ProcessingFrame const &) final
 
void beginSubRunWithFrame (SubRun &, ProcessingFrame const &) final
 
void endSubRunWithFrame (SubRun &, ProcessingFrame const &) final
 
void produceWithFrame (Event &, ProcessingFrame const &) final
 
virtual void beginJob ()
 
virtual void endJob ()
 
virtual void respondToOpenInputFile (FileBlock const &)
 
virtual void respondToCloseInputFile (FileBlock const &)
 
virtual void respondToOpenOutputFiles (FileBlock const &)
 
virtual void respondToCloseOutputFiles (FileBlock const &)
 
virtual void beginRun (Run &)
 
virtual void endRun (Run &)
 
virtual void beginSubRun (SubRun &)
 
virtual void endSubRun (SubRun &)
 
virtual void produce (Event &)=0
 
ScheduleID scheduleID () const noexcept
 
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain () const
 
std::set< std::string > const & sharedResources () const
 
void createQueues (SharedResources const &resources)
 
template<BranchType BT = InEvent, typename... T>
void serialize (T const &...)
 
template<BranchType , typename... T>
void serialize (T const &...resources)
 
template<BranchType BT = InEvent, typename... T>
void serializeExternal (T const &...)
 
template<BranchType , typename... T>
void serializeExternal (T const &...resources)
 
template<BranchType BT = InEvent>
void async ()
 

Detailed Description

Definition at line 15 of file EDProducer.h.

Member Typedef Documentation

Definition at line 21 of file LegacyModule.h.

Definition at line 17 of file EDProducer.h.

Definition at line 20 of file LegacyModule.h.

template<typename UserConfig , typename KeysToIgnore = void>
using art::detail::Producer::Table = Modifier::Table<UserConfig, KeysToIgnore>
inherited

Definition at line 26 of file Producer.h.

Constructor & Destructor Documentation

art::EDProducer::EDProducer ( fhicl::ParameterSet const &  pset)
explicitprotected

Definition at line 6 of file EDProducer.cc.

7  : Producer{pset}, LegacyModule{pset.get<std::string>("module_label")}
8  {}
LegacyModule(std::string const &module_label)
Definition: LegacyModule.cc:5
Producer(fhicl::ParameterSet const &)
Definition: Producer.cc:17

Member Function Documentation

template<BranchType BT = InEvent>
void art::detail::SharedModule::async ( )
inlineprotectedinherited

Definition at line 38 of file SharedModule.h.

References art::detail::SharedModule::asyncDeclared_, art::detail::SharedModule::implicit_serialize(), art::InEvent, and art::detail::SharedModule::serialize_for().

39  {
40  static_assert(
41  BT == InEvent,
42  "async is currently supported only for the 'InEvent' level.");
43  asyncDeclared_ = true;
44  }
void art::EDProducer::beginJobWithFrame ( ProcessingFrame const &  )
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 51 of file EDProducer.cc.

References beginJob().

Referenced by EDProducer().

52  {
53  beginJob();
54  }
virtual void beginJob()
Definition: EDProducer.cc:95
void art::EDProducer::beginRunWithFrame ( Run r,
ProcessingFrame const &   
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 63 of file EDProducer.cc.

References beginRun().

Referenced by EDProducer().

64  {
65  beginRun(r);
66  }
TRandom r
Definition: spectrum.C:23
virtual void beginRun(Run &)
Definition: EDProducer.cc:119
void art::EDProducer::beginSubRun ( SubRun )
privatevirtual

Reimplemented in evgen::GENIEGen.

Definition at line 127 of file EDProducer.cc.

Referenced by beginSubRunWithFrame(), and EDProducer().

128  {}
void art::EDProducer::beginSubRunWithFrame ( SubRun sr,
ProcessingFrame const &   
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 75 of file EDProducer.cc.

References beginSubRun().

Referenced by EDProducer().

76  {
77  beginSubRun(sr);
78  }
virtual void beginSubRun(SubRun &)
Definition: EDProducer.cc:127
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 &)
void art::detail::SharedModule::createQueues ( SharedResources const &  resources)
inherited

Definition at line 34 of file SharedModule.cc.

References art::detail::SharedModule::asyncDeclared_, util::cbegin(), util::cend(), art::detail::SharedModule::chain_, art::detail::SharedResources::createQueues(), e, util::empty(), art::errors::LogicError, and art::detail::SharedModule::resourceNames_.

Referenced by art::OutputModule::doBeginJob(), art::SharedFilter::setupQueues(), art::SharedProducer::setupQueues(), art::EDFilter::setupQueues(), art::SharedAnalyzer::setupQueues(), setupQueues(), and art::EDAnalyzer::setupQueues().

35  {
37  "An error occurred while processing scheduling options for a "
38  "module.\n"};
39  if (asyncDeclared_) {
40  if (empty(resourceNames_)) {
41  return;
42  }
43  throw e
44  << "async<art::InEvent>() cannot be called in combination with any "
45  "serialize<art::InEvent>(...) calls.\n";
46  }
47 
48  if (empty(resourceNames_)) {
49  throw e << "Either 'async<art::InEvent>()' or "
50  "'serialize<art::InEvent>(...)'\n"
51  "must be called in a shared module's constructor.\n";
52  }
53  std::vector<std::string> const names(cbegin(resourceNames_),
55  auto queues = resources.createQueues(names);
56  chain_ = std::make_unique<SerialTaskQueueChain>(queues);
57  }
decltype(auto) constexpr cend(T &&obj)
ADL-aware version of std::cend.
Definition: StdUtils.h:93
std::set< std::string > resourceNames_
Definition: SharedModule.h:76
std::unique_ptr< hep::concurrency::SerialTaskQueueChain > chain_
Definition: SharedModule.h:78
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
decltype(auto) constexpr cbegin(T &&obj)
ADL-aware version of std::cbegin.
Definition: StdUtils.h:85
Float_t e
Definition: plot.C:35
decltype(auto) constexpr empty(T &&obj)
ADL-aware version of std::empty.
Definition: StdUtils.h:109
void art::detail::Producer::doBeginJob ( SharedResources const &  resources)
inherited

Definition at line 22 of file Producer.cc.

References art::detail::Producer::beginJobWithFrame(), and art::detail::Producer::setupQueues().

23  {
24  setupQueues(resources);
25  ProcessingFrame const frame{ScheduleID{}};
26  beginJobWithFrame(frame);
27  }
virtual void setupQueues(SharedResources const &)=0
virtual void beginJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Producer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 65 of file Producer.cc.

References art::detail::Producer::beginRunWithFrame(), art::RangeSet::forRun(), art::RunPrincipal::makeRun(), r, art::RunPrincipal::runID(), and art::ModuleContext::scheduleID().

66  {
67  auto r = rp.makeRun(mc, RangeSet::forRun(rp.runID()));
68  ProcessingFrame const frame{mc.scheduleID()};
69  beginRunWithFrame(r, frame);
70  r.commitProducts();
71  return true;
72  }
TRandom r
Definition: spectrum.C:23
virtual void beginRunWithFrame(Run &, ProcessingFrame const &)=0
static RangeSet forRun(RunID)
Definition: RangeSet.cc:51
bool art::detail::Producer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 85 of file Producer.cc.

References art::detail::Producer::beginSubRunWithFrame(), art::RangeSet::forSubRun(), art::SubRunPrincipal::makeSubRun(), art::ModuleContext::scheduleID(), and art::SubRunPrincipal::subRunID().

86  {
87  auto sr = srp.makeSubRun(mc, RangeSet::forSubRun(srp.subRunID()));
88  ProcessingFrame const frame{mc.scheduleID()};
89  beginSubRunWithFrame(sr, frame);
90  sr.commitProducts();
91  return true;
92  }
virtual void beginSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
static RangeSet forSubRun(SubRunID)
Definition: RangeSet.cc:57
void art::detail::Producer::doEndJob ( )
inherited

Definition at line 30 of file Producer.cc.

References art::detail::Producer::endJobWithFrame().

31  {
32  ProcessingFrame const frame{ScheduleID{}};
33  endJobWithFrame(frame);
34  }
virtual void endJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Producer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 75 of file Producer.cc.

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

76  {
77  auto r = rp.makeRun(mc, rp.seenRanges());
78  ProcessingFrame const frame{mc.scheduleID()};
79  endRunWithFrame(r, frame);
80  r.commitProducts();
81  return true;
82  }
TRandom r
Definition: spectrum.C:23
virtual void endRunWithFrame(Run &, ProcessingFrame const &)=0
bool art::detail::Producer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 95 of file Producer.cc.

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

96  {
97  auto sr = srp.makeSubRun(mc, srp.seenRanges());
98  ProcessingFrame const frame{mc.scheduleID()};
99  endSubRunWithFrame(sr, frame);
100  sr.commitProducts();
101  return true;
102  }
virtual void endSubRunWithFrame(SubRun &, ProcessingFrame const &)=0
bool art::detail::Producer::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 105 of file Producer.cc.

References art::detail::Producer::checkPutProducts_, e, art::EventPrincipal::makeEvent(), art::detail::Producer::produceWithFrame(), and art::ModuleContext::scheduleID().

110  {
111  auto e = ep.makeEvent(mc);
112  ++counts_run;
113  ProcessingFrame const frame{mc.scheduleID()};
114  produceWithFrame(e, frame);
115  e.commitProducts(checkPutProducts_, &expectedProducts<InEvent>());
116  ++counts_passed;
117  return true;
118  }
bool const checkPutProducts_
Definition: Producer.h:70
Float_t e
Definition: plot.C:35
virtual void produceWithFrame(Event &, ProcessingFrame const &)=0
std::unique_ptr< Worker > art::EDProducer::doMakeWorker ( WorkerParams const &  wp)
finalprivatevirtual

Implements art::ModuleBase.

Definition at line 11 of file EDProducer.cc.

Referenced by EDProducer().

12  {
13  return std::make_unique<WorkerT<EDProducer>>(this, wp);
14  }
void art::detail::Producer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 44 of file Producer.cc.

References art::detail::Producer::respondToCloseInputFileWithFrame().

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

Definition at line 58 of file Producer.cc.

References art::detail::Producer::respondToCloseOutputFilesWithFrame().

59  {
60  ProcessingFrame const frame{ScheduleID{}};
62  }
virtual void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToOpenInputFile ( FileBlock const &  fb)
inherited

Definition at line 37 of file Producer.cc.

References art::detail::Producer::respondToOpenInputFileWithFrame().

38  {
39  ProcessingFrame const frame{ScheduleID{}};
41  }
virtual void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::detail::Producer::doRespondToOpenOutputFiles ( FileBlock const &  fb)
inherited

Definition at line 51 of file Producer.cc.

References art::detail::Producer::respondToOpenOutputFilesWithFrame().

52  {
53  ProcessingFrame const frame{ScheduleID{}};
55  }
virtual void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
void art::EDProducer::endJobWithFrame ( ProcessingFrame const &  )
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 57 of file EDProducer.cc.

References endJob().

Referenced by EDProducer().

58  {
59  endJob();
60  }
virtual void endJob()
Definition: EDProducer.cc:99
void art::EDProducer::endRun ( Run )
privatevirtual

Reimplemented in evgen::MUSUN, larg4::larg4Main, and artg4tk::artg4tkMain.

Definition at line 123 of file EDProducer.cc.

Referenced by EDProducer(), and endRunWithFrame().

124  {}
void art::EDProducer::endRunWithFrame ( Run r,
ProcessingFrame const &   
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 69 of file EDProducer.cc.

References endRun().

Referenced by EDProducer().

70  {
71  endRun(r);
72  }
TRandom r
Definition: spectrum.C:23
virtual void endRun(Run &)
Definition: EDProducer.cc:123
void art::EDProducer::endSubRun ( SubRun )
privatevirtual

Reimplemented in evgen::GENIEGen, and evgen::TestGENIEHelper.

Definition at line 131 of file EDProducer.cc.

Referenced by EDProducer(), and endSubRunWithFrame().

132  {}
void art::EDProducer::endSubRunWithFrame ( SubRun sr,
ProcessingFrame const &   
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 81 of file EDProducer.cc.

References endSubRun().

Referenced by EDProducer().

82  {
83  endSubRun(sr);
84  }
virtual void endSubRun(SubRun &)
Definition: EDProducer.cc:131
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
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
virtual void art::EDProducer::produce ( Event )
privatepure virtual

Implemented in larg4::LArG4, evgen::CORSIKAGen, evgen::MarleyTimeGen, evg::AddGenieEventsToArt, trkf::CosmicTracker, evgen::RadioGen, evgen::MUSUN, evgen::SingleGen, evgen::larg4SingleGen, opdet::OpHitFinder, trkf::KalmanFilterFinalTrackFitter, phot::PhotonLibraryPropagation, evgen::LightSource, phot::PDFastSimPAR, calo::GnocchiCalorimetry, sim::MergeSimSources, trkf::PMAlgTrackMaker, lar_cluster3d::Cluster3D, trkf::KalmanFilterTrajectoryFitter, nnet::EmTrackMichelId, nnet::EmTrackClusterId, nnet::EmTrackClusterId2out, detsim::SimDriftElectrons, trkf::Track3DKalmanSPS, evgen::GENIEGen, t0::MCTruthT0Matching, calo::Calorimetry, detsim::DriftElectronstoPlane, trkf::PMAlgTrajFitter, evgen::TextFileGen, nnet::ParticleDecayId, evgen::NeutronOsc, shower::EMShower, vertex::FeatureVertexFinder, NuGraphInference, trkf::Track3DKalmanHit, lbne::PhotonCounterT0Matching, evd::GraphCluster, CRHitRemovalByPCA, vertex::VertexFinder2D, hit::DPRawHitFinder, trkf::VertexFitter, evgen::BaseRadioGen, detsim::SimWire, evgen::MarleyGen, quad::QuadVtx, trkf::TrackKalmanCheater, evgen::TestGENIEHelper, cluster::SmallClusterFinder, evgen::GaisserParam, shwf::ShowerReco, trkf::Track3DKalman, TrackProducerFromPFParticle, phot::PDFastSimANN, evgen::NucleonDecay, trkf::CCTrackMaker, phot::PDFastSimPVS, larg4::larg4Main, ems::EMShower3D, trkf::MCSFitProducer, cluster::TrajCluster, larg4::IonAndScint, sce::SCECorrection, nnet::WaveformRoiFinder, cluster::BlurredClustering, t0::MCParticleShowerMatching, t0::MCParticleTrackMatching, ShowerReco3D, trkf::Track3Dreco, butcher::EventButcher, trkf::SpacePts, cosmic::CosmicPCAxisTagger, CRHitRemoval, calo::ShowerCalorimetry, calo::TrackCalorimetry, shower::TCShower, reco3d::SpacePointSolver, TrackProducerFromTrackTrajectory, artg4tk::artg4tkMain, t0::MCParticleHitMatching, TrackProducerFromTrack, evgen::NDKGen, cluster::LineMerger, cluster::DBCluster3D, cluster::HoughLineFinder, evgen::PhotonGen, cosmic::BeamFlashTrackMatchTagger, caldata::CalWireT962, NuSliceHitsProducer, cluster::EndPointModule, evgen::FileMuons, caldata::CalWire, sim::PhotonHitConverter, opdet::OpMCDigi, cluster::DBcluster, spacecharge::ShiftEdepSCE, evwgh::EventWeight, vertex::PrimaryVertexFinder, sim::GenericCRT, noisefilteralg::WireCellNoiseFilter, lar::example::Disturbance, hit::HitCheater, trkf::TrackStitcher, cluster::ClusterCheater, cluster::ClusterCrawler, shwf::ShowerFinder, opdet::OpFlashFinder, hit::FFTHitFinder, cosmic::CosmicPFParticleTagger, cluster::LineCluster, hit::RFFHitFinder, sppt::TTSpacePointFinder, trkf::TrackCheater, opdet::OptDetDigitizer, reco::shower::LArPandoraModularShowerCreation, tss::TrackShowerHits, apa::APAHitFinder, hit::RawHitFinder, evgen::CosmicsGen, evgen::SNNueAr40CCGen, trkf::SpacePointCheater, trkf::SpacePointFinder, lar_pandora::LArPandoraExternalEventBuilding, lcvn::ICVNMapper< T, U >, nnet::EmTrackMichelIdTl, cosmic::CosmicTrackTagger, hit::TTHitFinder, trkf::FeatureTracker, cosmic::CosmicClusterTagger, trk::TrackContainmentTagger, nnet::EmTrackClusterId2outTl, nnet::EmTrackClusterId3outTl, event::EventCheater, shwf::ShowerCheater, trkf::TCTrack, lcvn::LArCVNEvaluator, hit::DisambigCheater, hit::MCHitFinder, vertex::VertexCheater, lar_pandora::LArPandora, hit::HitFinder, cosmic::TrackPFParticleMatch, lar_pandora::LArPandoraShowerCreation, lar_pandora::LArPandoraTrackCreation, MCReco, pid::Chi2ParticleID, opdet::OpticalRawDigitReformatter, mvapid::MVAPID, trkf::SeedFinderModule, lar_pandora::CollectionSplitting, artg4tk::EventGenerator, cheat::BackTrackerLoader, cheat::PhotonBackTrackerLoader, and bogoblip::BlipMaker.

Referenced by EDProducer(), and produceWithFrame().

void art::EDProducer::produceWithFrame ( Event e,
ProcessingFrame const &  frame 
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 87 of file EDProducer.cc.

References produce(), and art::ProcessingFrame::scheduleID().

Referenced by EDProducer().

88  {
89  ScheduleIDSentry sentry{*this, frame.scheduleID()};
90  produce(e);
91  }
Float_t e
Definition: plot.C:35
virtual void produce(Event &)=0
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::EDProducer::respondToCloseInputFile ( FileBlock const &  )
privatevirtual

Definition at line 107 of file EDProducer.cc.

Referenced by EDProducer(), and respondToCloseInputFileWithFrame().

108  {}
void art::EDProducer::respondToCloseInputFileWithFrame ( FileBlock const &  fb,
ProcessingFrame const &   
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 30 of file EDProducer.cc.

References respondToCloseInputFile().

Referenced by EDProducer().

32  {
34  }
TFile fb("Li6.root")
virtual void respondToCloseInputFile(FileBlock const &)
Definition: EDProducer.cc:107
void art::EDProducer::respondToCloseOutputFiles ( FileBlock const &  )
privatevirtual

Definition at line 115 of file EDProducer.cc.

Referenced by EDProducer(), and respondToCloseOutputFilesWithFrame().

116  {}
void art::EDProducer::respondToCloseOutputFilesWithFrame ( FileBlock const &  fb,
ProcessingFrame const &   
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 44 of file EDProducer.cc.

References respondToCloseOutputFiles().

Referenced by EDProducer().

46  {
48  }
virtual void respondToCloseOutputFiles(FileBlock const &)
Definition: EDProducer.cc:115
TFile fb("Li6.root")
void art::EDProducer::respondToOpenInputFile ( FileBlock const &  )
privatevirtual

Definition at line 103 of file EDProducer.cc.

Referenced by EDProducer(), and respondToOpenInputFileWithFrame().

104  {}
void art::EDProducer::respondToOpenInputFileWithFrame ( FileBlock const &  fb,
ProcessingFrame const &   
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 23 of file EDProducer.cc.

References respondToOpenInputFile().

Referenced by EDProducer().

25  {
27  }
virtual void respondToOpenInputFile(FileBlock const &)
Definition: EDProducer.cc:103
TFile fb("Li6.root")
void art::EDProducer::respondToOpenOutputFiles ( FileBlock const &  )
privatevirtual

Definition at line 111 of file EDProducer.cc.

Referenced by EDProducer(), and respondToOpenOutputFilesWithFrame().

112  {}
void art::EDProducer::respondToOpenOutputFilesWithFrame ( FileBlock const &  fb,
ProcessingFrame const &   
)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 37 of file EDProducer.cc.

References respondToOpenOutputFiles().

Referenced by EDProducer().

39  {
41  }
TFile fb("Li6.root")
virtual void respondToOpenOutputFiles(FileBlock const &)
Definition: EDProducer.cc:111
ScheduleID art::detail::LegacyModule::scheduleID ( ) const
noexceptinherited

Definition at line 12 of file LegacyModule.cc.

References art::detail::LegacyModule::scheduleID_.

Referenced by art::EDAnalyzer::EDAnalyzer(), art::EDFilter::EDFilter(), and EDProducer().

13  {
14  return scheduleID_.load();
15  }
std::atomic< ScheduleID > scheduleID_
Definition: LegacyModule.h:32
template<BranchType BT = InEvent, typename... T>
void art::detail::SharedModule::serialize ( T const &  ...)
protectedinherited
template<BranchType , typename... T>
void art::detail::SharedModule::serialize ( T const &...  resources)
inherited

Definition at line 83 of file SharedModule.h.

References art::detail::SharedModule::serialize_for_resource().

84  {
85  serialize_for_resource(resources...);
86  }
void serialize_for_resource(T const &...t)
Definition: SharedModule.h:52
template<BranchType BT = InEvent, typename... T>
void art::detail::SharedModule::serializeExternal ( T const &  ...)
protectedinherited
template<BranchType , typename... T>
void art::detail::SharedModule::serializeExternal ( T const &...  resources)
inherited

Definition at line 90 of file SharedModule.h.

References art::detail::SharedModule::serialize_for_external_resource().

91  {
92  serialize_for_external_resource(resources...);
93  }
void serialize_for_external_resource(T const &...t)
Definition: SharedModule.h:65
SerialTaskQueueChain * art::detail::SharedModule::serialTaskQueueChain ( ) const
inherited

Definition at line 22 of file SharedModule.cc.

References art::detail::SharedModule::chain_.

23  {
24  return chain_.get();
25  }
std::unique_ptr< hep::concurrency::SerialTaskQueueChain > chain_
Definition: SharedModule.h:78
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::EDProducer::setupQueues ( detail::SharedResources const &  resources)
finalprivatevirtual

Implements art::detail::Producer.

Definition at line 17 of file EDProducer.cc.

References art::detail::SharedModule::createQueues().

Referenced by EDProducer().

18  {
19  createQueues(resources);
20  }
void createQueues(SharedResources const &resources)
Definition: SharedModule.cc:34
std::set< std::string > const & art::detail::SharedModule::sharedResources ( ) const
inherited

Definition at line 28 of file SharedModule.cc.

References art::detail::SharedModule::resourceNames_.

29  {
30  return resourceNames_;
31  }
std::set< std::string > resourceNames_
Definition: SharedModule.h:76
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)

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