LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
hit::HitFinderAna Class Reference

Base class for creation of raw signals on wires. More...

Inheritance diagram for hit::HitFinderAna:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Public Types

using ModuleType = EDAnalyzer
 

Public Member Functions

 HitFinderAna (fhicl::ParameterSet const &pset)
 
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)
 
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< Worker > makeWorker (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

std::string const & processName () const
 
bool wantAllEvents () const noexcept
 
bool wantEvent (ScheduleID id, Event const &e) const
 
Handle< TriggerResults > getTriggerResults (Event const &e) const
 
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 ()
 

Private Member Functions

void analyze (const art::Event &evt)
 read/write access to event More...
 
void beginJob ()
 

Private Attributes

std::string fFFTHitFinderModuleLabel
 
std::string fLArG4ModuleLabel
 
TTree * fHTree
 
Int_t fRun
 
Int_t fEvt
 
Int_t fNp0
 
Int_t fNp1
 
Int_t fNp2
 
Int_t fN3p0
 
Int_t fN3p1
 
Int_t fN3p2
 
Float_t * fTimep0
 
Float_t * fTimep1
 
Float_t * fTimep2
 
Int_t * fWirep0
 
Int_t * fWirep1
 
Int_t * fWirep2
 
Float_t * fChgp0
 
Float_t * fChgp1
 
Float_t * fChgp2
 
Float_t * fXYZp0
 
Float_t * fXYZp1
 
Float_t * fXYZp2
 
Int_t * fMCPdg0
 
Int_t * fMCTId0
 
Float_t * fMCE0
 
Int_t * fMCPdg1
 
Int_t * fMCTId1
 
Float_t * fMCE1
 
Int_t * fMCPdg2
 
Int_t * fMCTId2
 
Float_t * fMCE2
 

Detailed Description

Base class for creation of raw signals on wires.

Definition at line 48 of file HitFinderAna_module.cc.

Member Typedef Documentation

Definition at line 22 of file EDAnalyzer.h.

Constructor & Destructor Documentation

hit::HitFinderAna::HitFinderAna ( fhicl::ParameterSet const &  pset)
explicit

Definition at line 99 of file HitFinderAna_module.cc.

References fFFTHitFinderModuleLabel, fLArG4ModuleLabel, and fhicl::ParameterSet::get().

99  : EDAnalyzer(pset)
100  {
101  fFFTHitFinderModuleLabel = pset.get<std::string>("HitsModuleLabel");
102  fLArG4ModuleLabel = pset.get<std::string>("LArGeantModuleLabel");
103  }
std::string fFFTHitFinderModuleLabel
std::string fLArG4ModuleLabel
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.cc:6

Member Function Documentation

void hit::HitFinderAna::analyze ( const art::Event evt)
private

read/write access to event

Definition at line 172 of file HitFinderAna_module.cc.

References sim::ParticleList::at(), DEFINE_ART_MODULE, simb::MCParticle::E(), sim::ParticleList::end(), art::EventID::event(), fChgp0, fChgp1, fChgp2, fEvt, fFFTHitFinderModuleLabel, fHTree, sim::ParticleList::find(), fMCE0, fMCE1, fMCE2, fMCPdg0, fMCPdg1, fMCPdg2, fMCTId0, fMCTId1, fMCTId2, fN3p0, fN3p1, fN3p2, fNp0, fNp1, fNp2, fRun, fTimep0, fTimep1, fTimep2, fWirep0, fWirep1, fWirep2, fXYZp0, fXYZp1, fXYZp2, art::ProductRetriever::getByLabel(), cheat::BackTrackerService::HitToTrackIDEs(), cheat::BackTrackerService::HitToXYZ(), art::Event::id(), art::Event::isRealData(), MF_LOG_VERBATIM, cheat::ParticleInventoryService::ParticleList(), simb::MCParticle::PdgCode(), geo::PlaneID::Plane, and art::Event::run().

173  {
174 
175  if (evt.isRealData()) {
176  throw cet::exception("HitFinderAna: ") << "Not for use on Data yet...\n";
177  }
178 
180  evt.getByLabel(fFFTHitFinderModuleLabel, hitHandle);
181 
184  auto const clockData = art::ServiceHandle<detinfo::DetectorClocksService const>()->DataFor(evt);
185 
186  sim::ParticleList const& _particleList = pi_serv->ParticleList();
187 
188  MF_LOG_VERBATIM("HitFinderAna") << _particleList;
189 
191 
192  std::map<geo::PlaneID, std::vector<art::Ptr<recob::Hit>>> planeIDToHits;
193  for (size_t h = 0; h < hitHandle->size(); ++h)
194  planeIDToHits[hitHandle->at(h).WireID().planeID()].push_back(
195  art::Ptr<recob::Hit>(hitHandle, h));
196 
197  for (auto mapitr : planeIDToHits) {
198  fNp0 = 0;
199  fN3p0 = 0;
200  fNp1 = 0;
201  fN3p1 = 0;
202  fNp2 = 0;
203  fN3p2 = 0;
204 
205  geo::PlaneID pid = mapitr.first;
206  auto itr = mapitr.second.begin();
207  while (itr != mapitr.second.end()) {
208 
209  fRun = evt.run();
210  fEvt = evt.id().event();
211 
212  std::vector<sim::TrackIDE> trackides = bt_serv->HitToTrackIDEs(clockData, *itr);
213  std::vector<sim::TrackIDE>::iterator idesitr = trackides.begin();
214  std::vector<double> xyz = bt_serv->HitToXYZ(clockData, *itr);
215 
216  if (pid.Plane == 0 && fNp0 < 9000) {
217  fTimep0[fNp0] = (*itr)->PeakTime();
218  fWirep0[fNp0] = (*itr)->WireID().Wire;
219  fChgp0[fNp0] = (*itr)->Integral();
220 
221  for (unsigned int kk = 0; kk < 3; ++kk) {
222  fXYZp0[fNp0 * 3 + kk] = xyz[kk];
223  }
224 
225  while (idesitr != trackides.end()) {
226  fMCTId0[fNp0] = (*idesitr).trackID;
227  if (_particleList.find((*idesitr).trackID) != _particleList.end()) {
228  const simb::MCParticle* particle = _particleList.at((*idesitr).trackID);
229  fMCPdg0[fNp0] = particle->PdgCode();
230  fMCE0[fNp0] = particle->E();
231  }
232  idesitr++;
233  }
234 
235  ++fNp0;
236  }
237 
238  else if (pid.Plane == 1 && fNp1 < 9000) {
239  fTimep1[fNp1] = (*itr)->PeakTime();
240  fWirep1[fNp1] = (*itr)->WireID().Wire;
241  fChgp1[fNp1] = (*itr)->Integral();
242 
243  for (unsigned int kk = 0; kk < 3; ++kk) {
244  fXYZp1[fNp1 * 3 + kk] = xyz[kk];
245  }
246 
247  while (idesitr != trackides.end()) {
248  fMCTId1[fNp1] = (*idesitr).trackID;
249  if (_particleList.find((*idesitr).trackID) != _particleList.end()) {
250  const simb::MCParticle* particle = _particleList.at((*idesitr).trackID);
251  fMCPdg1[fNp1] = particle->PdgCode();
252  fMCE1[fNp1] = particle->E();
253  }
254  idesitr++;
255  }
256  ++fNp1;
257  }
258 
259  else if (pid.Plane == 2 && fNp2 < 9000) {
260  fTimep2[fNp2] = (*itr)->PeakTime();
261  fWirep2[fNp2] = (*itr)->WireID().Wire;
262  fChgp2[fNp2] = (*itr)->Integral();
263 
264  for (unsigned int kk = 0; kk < 3; ++kk) {
265  fXYZp2[fNp2 * 3 + kk] = xyz[kk];
266  }
267 
268  while (idesitr != trackides.end()) {
269  fMCTId2[fNp2] = (*idesitr).trackID;
270  if (_particleList.find((*idesitr).trackID) != _particleList.end()) {
271  const simb::MCParticle* particle = _particleList.at((*idesitr).trackID);
272  fMCPdg2[fNp2] = particle->PdgCode();
273  fMCE2[fNp2] = particle->E();
274  }
275  idesitr++;
276  }
277  ++fNp2;
278  }
279 
280  fN3p0 = 3 * fNp0;
281  fN3p1 = 3 * fNp1;
282  fN3p2 = 3 * fNp2;
283 
284  fHTree->Fill();
285  itr++;
286  } // loop on Hits
287  } // loop on map
288 
289  return;
290  } // end analyze method
double E(const int i=0) const
Definition: MCParticle.h:234
intermediate_table::iterator iterator
int PdgCode() const
Definition: MCParticle.h:213
std::vector< sim::TrackIDE > HitToTrackIDEs(detinfo::DetectorClocksData const &clockData, recob::Hit const &hit) const
The data type to uniquely identify a Plane.
Definition: geo_types.h:463
mapped_type at(const key_type &key)
Definition: ParticleList.h:330
std::string fFFTHitFinderModuleLabel
bool isRealData() const
Definition: Event.cc:53
std::vector< double > HitToXYZ(detinfo::DetectorClocksData const &clockData, const recob::Hit &hit) const
iterator find(const key_type &key)
Definition: ParticleList.h:318
PlaneID_t Plane
Index of the plane within its TPC.
Definition: geo_types.h:481
const sim::ParticleList & ParticleList() const
bool getByLabel(std::string const &label, std::string const &instance, Handle< PROD > &result) const
#define MF_LOG_VERBATIM(category)
EventNumber_t event() const
Definition: EventID.h:116
RunNumber_t run() const
Definition: Event.cc:29
EventID id() const
Definition: Event.cc:23
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
void hit::HitFinderAna::beginJob ( )
privatevirtual

Reimplemented from art::EDAnalyzer.

Definition at line 106 of file HitFinderAna_module.cc.

References fChgp0, fChgp1, fChgp2, fEvt, fHTree, fMCE0, fMCE1, fMCE2, fMCPdg0, fMCPdg1, fMCPdg2, fMCTId0, fMCTId1, fMCTId2, fN3p0, fN3p1, fN3p2, fNp0, fNp1, fNp2, fRun, fTimep0, fTimep1, fTimep2, fWirep0, fWirep1, fWirep2, fXYZp0, fXYZp1, and fXYZp2.

107  {
108  // get access to the TFile service
110  fNp0 = 9000;
111  fNp1 = 9000;
112  fNp2 = 9000;
113 
114  fHTree = tfs->make<TTree>("HTree", "HTree");
115  fTimep0 = new Float_t[fNp0];
116  fTimep1 = new Float_t[fNp1];
117  fTimep2 = new Float_t[fNp2];
118  fWirep0 = new Int_t[fNp0];
119  fWirep1 = new Int_t[fNp1];
120  fWirep2 = new Int_t[fNp2];
121  fChgp0 = new Float_t[fNp0];
122  fChgp1 = new Float_t[fNp1];
123  fChgp2 = new Float_t[fNp2];
124  fXYZp0 = new Float_t[fNp0 * 3];
125  fXYZp1 = new Float_t[fNp1 * 3];
126  fXYZp2 = new Float_t[fNp2 * 3];
127 
128  fMCPdg0 = new Int_t[fNp0];
129  fMCPdg1 = new Int_t[fNp1];
130  fMCPdg2 = new Int_t[fNp2];
131  fMCTId0 = new Int_t[fNp0];
132  fMCTId1 = new Int_t[fNp1];
133  fMCTId2 = new Int_t[fNp2];
134  fMCE0 = new Float_t[fNp0];
135  fMCE1 = new Float_t[fNp1];
136  fMCE2 = new Float_t[fNp2];
137 
138  fHTree->Branch("HEvt", &fEvt, "HEvt/I");
139  fHTree->Branch("HRun", &fRun, "HRun/I");
140  fHTree->Branch("HNp0", &fNp0, "HNp0/I");
141  fHTree->Branch("HNp1", &fNp1, "HNp1/I");
142  fHTree->Branch("HNp2", &fNp2, "HNp2/I");
143  fHTree->Branch("HN3p0", &fN3p0, "HN3p0/I");
144  fHTree->Branch("HN3p1", &fN3p1, "HN3p1/I");
145  fHTree->Branch("HN3p2", &fN3p2, "HN3p2/I");
146  fHTree->Branch("Htp0", fTimep0, "Htp0[HNp0]/F");
147  fHTree->Branch("Htp1", fTimep1, "Htp1[HNp1]/F");
148  fHTree->Branch("Htp2", fTimep2, "Htp2[HNp2]/F");
149  fHTree->Branch("Hwp0", fWirep0, "Hwp0[HNp0]/I");
150  fHTree->Branch("Hwp1", fWirep1, "Hwp1[HNp1]/I");
151  fHTree->Branch("Hwp2", fWirep2, "Hwp2[HNp2]/I");
152  fHTree->Branch("Hchgp0", fChgp0, "Hchgp0[HNp0]/F");
153  fHTree->Branch("Hchgp1", fChgp1, "Hchgp1[HNp1]/F");
154  fHTree->Branch("Hchgp2", fChgp2, "Hchgp2[HNp2]/F");
155  fHTree->Branch("HMCXYZp0", fXYZp0, "HMCXYZp0[HN3p0]/F");
156  fHTree->Branch("HMCXYZp1", fXYZp1, "HMCXYZp1[HN3p1]/F");
157  fHTree->Branch("HMCXYZp2", fXYZp2, "HMCXYZp2[HN3p2]/F");
158  fHTree->Branch("HMCPdgp0", fMCPdg0, "HMCPdgp0[HNp0]/I");
159  fHTree->Branch("HMCPdgp1", fMCPdg1, "HMCPdgp1[HNp1]/I");
160  fHTree->Branch("HMCPdgp2", fMCPdg2, "HMCPdgp2[HNp2]/I");
161  fHTree->Branch("HMCTIdp0", fMCTId0, "HMCTIdp0[HNp0]/I");
162  fHTree->Branch("HMCTIdp1", fMCTId1, "HMCTIdp1[HNp1]/I");
163  fHTree->Branch("HMCTIdp2", fMCTId2, "HMCTIdp2[HNp2]/I");
164  fHTree->Branch("HMCEp0", fMCE0, "HMCEp0[HNp0]/F");
165  fHTree->Branch("HMCEp1", fMCE1, "HMCEp1[HNp1]/F");
166  fHTree->Branch("HMCEp2", fMCE2, "HMCEp2[HNp2]/F");
167 
168  return;
169  }
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::Analyzer::doBeginJob ( SharedResources const &  resources)
inherited

Definition at line 25 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

26  {
27  setupQueues(resources);
28  ProcessingFrame const frame{ScheduleID{}};
29  beginJobWithFrame(frame);
30  }
virtual void beginJobWithFrame(ProcessingFrame const &)=0
virtual void setupQueues(SharedResources const &)=0
bool art::detail::Analyzer::doBeginRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 68 of file Analyzer.cc.

References art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

69  {
70  ProcessingFrame const frame{mc.scheduleID()};
71  beginRunWithFrame(std::as_const(rp).makeRun(mc), frame);
72  return true;
73  }
virtual void beginRunWithFrame(Run const &, ProcessingFrame const &)=0
bool art::detail::Analyzer::doBeginSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 84 of file Analyzer.cc.

References art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

85  {
86  ProcessingFrame const frame{mc.scheduleID()};
87  beginSubRunWithFrame(std::as_const(srp).makeSubRun(mc), frame);
88  return true;
89  }
virtual void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &)=0
void art::detail::Analyzer::doEndJob ( )
inherited

Definition at line 33 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

34  {
35  ProcessingFrame const frame{ScheduleID{}};
36  endJobWithFrame(frame);
37  }
virtual void endJobWithFrame(ProcessingFrame const &)=0
bool art::detail::Analyzer::doEndRun ( RunPrincipal rp,
ModuleContext const &  mc 
)
inherited

Definition at line 76 of file Analyzer.cc.

References art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

77  {
78  ProcessingFrame const frame{mc.scheduleID()};
79  endRunWithFrame(std::as_const(rp).makeRun(mc), frame);
80  return true;
81  }
virtual void endRunWithFrame(Run const &, ProcessingFrame const &)=0
bool art::detail::Analyzer::doEndSubRun ( SubRunPrincipal srp,
ModuleContext const &  mc 
)
inherited

Definition at line 92 of file Analyzer.cc.

References art::ModuleContext::scheduleID().

Referenced by art::detail::Analyzer::Analyzer().

93  {
94  ProcessingFrame const frame{mc.scheduleID()};
95  endSubRunWithFrame(std::as_const(srp).makeSubRun(mc), frame);
96  return true;
97  }
virtual void endSubRunWithFrame(SubRun const &, ProcessingFrame const &)=0
bool art::detail::Analyzer::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 100 of file Analyzer.cc.

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

Referenced by art::detail::Analyzer::Analyzer().

105  {
106  auto const e = std::as_const(ep).makeEvent(mc);
107  if (wantEvent(mc.scheduleID(), e)) {
108  ++counts_run;
109  ProcessingFrame const frame{mc.scheduleID()};
110  analyzeWithFrame(e, frame);
111  ++counts_passed;
112  }
113  return true;
114  }
bool wantEvent(ScheduleID id, Event const &e) const
Definition: Observer.cc:63
Float_t e
Definition: plot.C:35
virtual void analyzeWithFrame(Event const &, ProcessingFrame const &)=0
void art::detail::Analyzer::doRespondToCloseInputFile ( FileBlock const &  fb)
inherited

Definition at line 47 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

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

Definition at line 61 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

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

Definition at line 40 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

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

Definition at line 54 of file Analyzer.cc.

Referenced by art::detail::Analyzer::Analyzer().

55  {
56  ProcessingFrame const frame{ScheduleID{}};
58  }
virtual void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &)=0
TFile fb("Li6.root")
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
Handle< TriggerResults > art::Observer::getTriggerResults ( Event const &  e) const
protectedinherited

Definition at line 75 of file Observer.cc.

References art::ProductRetriever::get(), and art::Observer::selectors_.

Referenced by art::OutputModule::doWriteEvent(), and art::Observer::wantAllEvents().

76  {
77  if (selectors_) {
78  return selectors_->getOneTriggerResults(e);
79  }
80 
81  // The following applies for cases where no SelectEvents entries
82  // exist.
83  Handle<TriggerResults> h;
84  if (e.get(empty_process_name, h)) {
85  return h;
86  }
87  return Handle<TriggerResults>{};
88  }
Float_t e
Definition: plot.C:35
std::optional< detail::ProcessAndEventSelectors > selectors_
Definition: Observer.h:79
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
string const & art::Observer::processName ( ) const
protectedinherited

Definition at line 57 of file Observer.cc.

References art::Observer::process_name_.

Referenced by art::FileDumperOutput::printPrincipal().

58  {
59  return process_name_;
60  }
std::string process_name_
Definition: Observer.h:76
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::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)
bool art::Observer::wantAllEvents ( ) const
inlineprotectednoexceptinherited

Definition at line 31 of file Observer.h.

References e, art::Observer::getTriggerResults(), art::Observer::wantAllEvents_, and art::Observer::wantEvent().

32  {
33  return wantAllEvents_;
34  }
bool wantAllEvents_
Definition: Observer.h:75
bool art::Observer::wantEvent ( ScheduleID  id,
Event const &  e 
) const
protectedinherited

Definition at line 63 of file Observer.cc.

References art::Observer::rejectors_, art::Observer::selectors_, and art::Observer::wantAllEvents_.

Referenced by art::OutputModule::doEvent(), art::OutputModule::doWriteEvent(), and art::Observer::wantAllEvents().

64  {
65  if (wantAllEvents_) {
66  return true;
67  }
68  bool const select_event = selectors_ ? selectors_->matchEvent(id, e) : true;
69  bool const reject_event =
70  rejectors_ ? rejectors_->matchEvent(id, e) : false;
71  return select_event and not reject_event;
72  }
bool wantAllEvents_
Definition: Observer.h:75
std::optional< detail::ProcessAndEventSelectors > rejectors_
Definition: Observer.h:80
Float_t e
Definition: plot.C:35
std::optional< detail::ProcessAndEventSelectors > selectors_
Definition: Observer.h:79

Member Data Documentation

Float_t* hit::HitFinderAna::fChgp0
private

Definition at line 75 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fChgp1
private

Definition at line 76 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fChgp2
private

Definition at line 77 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t hit::HitFinderAna::fEvt
private

Definition at line 62 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

std::string hit::HitFinderAna::fFFTHitFinderModuleLabel
private

Definition at line 57 of file HitFinderAna_module.cc.

Referenced by analyze(), and HitFinderAna().

TTree* hit::HitFinderAna::fHTree
private

Definition at line 60 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

std::string hit::HitFinderAna::fLArG4ModuleLabel
private

Definition at line 58 of file HitFinderAna_module.cc.

Referenced by HitFinderAna().

Float_t* hit::HitFinderAna::fMCE0
private

Definition at line 84 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fMCE1
private

Definition at line 87 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fMCE2
private

Definition at line 90 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fMCPdg0
private

Definition at line 82 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fMCPdg1
private

Definition at line 85 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fMCPdg2
private

Definition at line 88 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fMCTId0
private

Definition at line 83 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fMCTId1
private

Definition at line 86 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fMCTId2
private

Definition at line 89 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t hit::HitFinderAna::fN3p0
private

Definition at line 66 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t hit::HitFinderAna::fN3p1
private

Definition at line 67 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t hit::HitFinderAna::fN3p2
private

Definition at line 68 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t hit::HitFinderAna::fNp0
private

Definition at line 63 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t hit::HitFinderAna::fNp1
private

Definition at line 64 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t hit::HitFinderAna::fNp2
private

Definition at line 65 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t hit::HitFinderAna::fRun
private

Definition at line 61 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fTimep0
private

Definition at line 69 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fTimep1
private

Definition at line 70 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fTimep2
private

Definition at line 71 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fWirep0
private

Definition at line 72 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fWirep1
private

Definition at line 73 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Int_t* hit::HitFinderAna::fWirep2
private

Definition at line 74 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fXYZp0
private

Definition at line 78 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fXYZp1
private

Definition at line 79 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().

Float_t* hit::HitFinderAna::fXYZp2
private

Definition at line 80 of file HitFinderAna_module.cc.

Referenced by analyze(), and beginJob().


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