LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
recob::DumpTracks Class Reference

Prints the content of all the tracks on screen. More...

Inheritance diagram for recob::DumpTracks:
art::EDAnalyzer art::detail::Analyzer art::detail::LegacyModule art::Observer art::ModuleBase

Classes

struct  Config
 Configuration object. More...
 

Public Types

using Parameters = art::EDAnalyzer::Table< Config >
 
using ModuleType = EDAnalyzer
 

Public Member Functions

 DumpTracks (Parameters const &config)
 Default constructor. More...
 
void analyze (const art::Event &evt)
 Does the printing. More...
 
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 DumpTrack (unsigned int iTrack, recob::Track const &track) const
 Dumps information about the specified track. More...
 

Private Attributes

art::InputTag fTrackModuleLabel
 name of module that produced the tracks More...
 
std::string fOutputCategory
 category for LogInfo output More...
 
unsigned int fPrintWayPoints
 number of printed way points More...
 
bool fPrintNHits
 prints the number of associated hits More...
 
bool fPrintNSpacePoints
 prints the number of associated space points More...
 
bool fPrintNParticles
 prints the number of associated PFParticles More...
 
bool fPrintHits
 prints the index of associated hits More...
 
bool fPrintSpacePoints
 prints the index of associated space points More...
 
bool fPrintParticles
 prints the index of associated PFParticles More...
 

Detailed Description

Prints the content of all the tracks on screen.

This analyser prints the content of all the tracks into the LogInfo/LogVerbatim stream. The associated objects are printed only if they were produced with the same input tag as the tracks.

Configuration parameters

  • TrackModuleLabel (string, required): label of the producer used to create the recob::Track collection to be dumped
  • OutputCategory (string, default: "DumpTracks"): the category used for the output (useful for filtering)
  • WayPoints (unsigned integer, default: 10): approximate number of way points printed in the output
  • SpacePointAssociations (boolean, default: true): prints the number of space points associated with the tracks
  • PrintSpacePoints (boolean, default: false): print the index of all hits associated with the tracks
  • HitAssociations (boolean, default: true): prints the number of hits associated with the tracks
  • PrintHits (boolean, default: false): print the index of all hits associated with the tracks
  • ParticleAssociations (boolean, default: true): prints the number of particle-flow particles associated with the tracks

Definition at line 215 of file DumpTracks_module.cc.

Member Typedef Documentation

Definition at line 22 of file EDAnalyzer.h.

Constructor & Destructor Documentation

recob::DumpTracks::DumpTracks ( Parameters const &  config)
explicit

Default constructor.

Definition at line 285 of file DumpTracks_module.cc.

286  : EDAnalyzer(config)
287  , fTrackModuleLabel(config().TrackModuleLabel())
288  , fOutputCategory(config().OutputCategory())
289  , fPrintWayPoints(config().WayPoints())
290  , fPrintNHits(config().HitAssociations())
291  , fPrintNSpacePoints(config().SpacePointAssociations())
292  , fPrintNParticles(config().ParticleAssociations())
293  , fPrintHits(config().PrintHits())
294  , fPrintSpacePoints(config().PrintSpacePoints())
295  , fPrintParticles(config().ParticleAssociations())
296  {}
bool fPrintNSpacePoints
prints the number of associated space points
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.cc:6
art::InputTag fTrackModuleLabel
name of module that produced the tracks
bool fPrintNHits
prints the number of associated hits
bool fPrintHits
prints the index of associated hits
bool fPrintNParticles
prints the number of associated PFParticles
std::string fOutputCategory
category for LogInfo output
bool fPrintParticles
prints the index of associated PFParticles
bool fPrintSpacePoints
prints the index of associated space points
unsigned int fPrintWayPoints
number of printed way points

Member Function Documentation

void recob::DumpTracks::analyze ( const art::Event evt)

Does the printing.

Definition at line 299 of file DumpTracks_module.cc.

References DumpTrack(), art::InputTag::encode(), fOutputCategory, fPrintHits, fPrintNHits, fPrintNParticles, fPrintNSpacePoints, fPrintParticles, fPrintSpacePoints, fTrackModuleLabel, art::ProductRetriever::getValidHandle(), art::errors::ProductNotFound, art::PtrVector< T >::size(), and track.

300  {
301 
302  // fetch the data to be dumped on screen
303  auto Tracks = evt.getValidHandle<std::vector<recob::Track>>(fTrackModuleLabel);
304 
305  mf::LogInfo(fOutputCategory) << "The event contains " << Tracks->size() << " '"
306  << fTrackModuleLabel.encode() << "'tracks";
307 
308  std::unique_ptr<art::FindManyP<recob::Hit>> pHits(
309  fPrintNHits ? new art::FindManyP<recob::Hit>(Tracks, evt, fTrackModuleLabel) : nullptr);
310  if (pHits && !pHits->isValid()) {
312  << "No hit associated with '" << fTrackModuleLabel.encode() << "' tracks.\n";
313  }
314 
315  std::unique_ptr<art::FindManyP<recob::SpacePoint>> pSpacePoints(
317  nullptr);
318  if (pSpacePoints && !pSpacePoints->isValid()) {
320  << "No space point associated with '" << fTrackModuleLabel.encode() << "' tracks.\n";
321  }
322 
323  std::unique_ptr<art::FindManyP<recob::PFParticle>> pPFParticles(
325  nullptr);
326  if (pPFParticles && !pPFParticles->isValid()) {
328  << "No particle-flow particle associated with '" << fTrackModuleLabel.encode()
329  << "' tracks.\n";
330  }
331 
332  for (unsigned int iTrack = 0; iTrack < Tracks->size(); ++iTrack) {
333  const recob::Track& track = Tracks->at(iTrack);
334 
335  // print track information
336  DumpTrack(iTrack, track);
337 
339  if (pHits || pSpacePoints || pPFParticles) {
340  log << "\n associated with:";
341  if (pHits) log << " " << pHits->at(iTrack).size() << " hits;";
342  if (pSpacePoints) log << " " << pSpacePoints->at(iTrack).size() << " space points;";
343  if (pPFParticles) log << " " << pPFParticles->at(iTrack).size() << " PF particles;";
344  } // if we have any association
345 
346  if (pHits && fPrintHits) {
347  const auto& Hits = pHits->at(iTrack);
348  log << "\n hit indices (" << Hits.size() << "):\n";
349  PrintAssociatedIndexTable(log, Hits, 10 /* 10 hits per line */, " ");
350  } // if print individual hits
351 
352  if (pSpacePoints && fPrintSpacePoints) {
353  const auto& SpacePoints = pSpacePoints->at(iTrack);
354  log << "\n space point IDs (" << SpacePoints.size() << "):\n";
355  PrintAssociatedIDTable(log, SpacePoints, 10 /* 10 hits per line */, " ");
356  } // if print individual space points
357 
358  if (pPFParticles && fPrintParticles) {
359  const auto& PFParticles = pPFParticles->at(iTrack);
360  log << "\n particle indices (" << PFParticles.size() << "):\n";
361  // currently a particle has no ID
362  PrintAssociatedIndexTable(log, PFParticles, 10 /* 10 hits per line */, " ");
363  } // if print individual particles
364  } // for tracks
365  } // DumpTracks::analyze()
void DumpTrack(unsigned int iTrack, recob::Track const &track) const
Dumps information about the specified track.
bool fPrintNSpacePoints
prints the number of associated space points
MaybeLogger_< ELseverityLevel::ELsev_info, false > LogInfo
std::string encode() const
Definition: InputTag.cc:97
art::InputTag fTrackModuleLabel
name of module that produced the tracks
bool fPrintNHits
prints the number of associated hits
reference at(size_type n)
Definition: PtrVector.h:359
size_type size() const
Definition: PtrVector.h:302
bool fPrintHits
prints the index of associated hits
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
art::PtrVector< recob::Hit > Hits
ValidHandle< PROD > getValidHandle(InputTag const &tag) const
bool fPrintNParticles
prints the number of associated PFParticles
std::string fOutputCategory
category for LogInfo output
bool fPrintParticles
prints the index of associated PFParticles
Float_t track
Definition: plot.C:35
bool fPrintSpacePoints
prints the index of associated space points
Track from a non-cascading particle.A recob::Track consists of a recob::TrackTrajectory, plus additional members relevant for a "fitted" track:
Definition: Track.h:49
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")
void recob::DumpTracks::DumpTrack ( unsigned int  iTrack,
recob::Track const &  track 
) const
private

Dumps information about the specified track.

Definition at line 368 of file DumpTracks_module.cc.

References DEFINE_ART_MODULE, recob::Track::End(), recob::Track::EndDirection(), fOutputCategory, fPrintWayPoints, recob::Track::ID(), recob::Track::Length(), recob::Track::LocationAtPoint(), recob::Track::NumberTrajectoryPoints(), recob::Track::Phi(), recob::Track::Theta(), recob::Track::Vertex(), and recob::Track::VertexDirection().

Referenced by analyze().

369  {
370  // print a header for the track
371  const unsigned int nPoints = track.NumberTrajectoryPoints();
373  log << "Track #" << iTrack << " ID: " << track.ID() << std::fixed << std::setprecision(3)
374  << " theta: " << track.Theta() << " rad, phi: " << track.Phi()
375  << " rad, length: " << track.Length() << " cm"
376  << "\n start at: ( " << track.Vertex().X() << " ; " << track.Vertex().Y() << " ; "
377  << track.Vertex().Z() << " ), direction: ( " << track.VertexDirection().X() << " ; "
378  << track.VertexDirection().Y() << " ; " << track.VertexDirection().Z() << " )"
379  << "\n end at: ( " << track.End().X() << " ; " << track.End().Y() << " ; "
380  << track.End().Z() << " ), direction: ( " << track.EndDirection().X() << " ; "
381  << track.EndDirection().Y() << " ; " << track.EndDirection().Z() << " )"
382  << "\n with " << nPoints << " trajectory points";
383 
384  if (fPrintWayPoints > 0) {
385  // print up to 10 (actually, 8 or 9) way points
386  log << "\n passes through:";
387  unsigned int skip = std::max(nPoints / fPrintWayPoints, 1U);
388  unsigned int iPoint = 0;
389  while ((iPoint += skip) < nPoints) {
390  const auto& point = track.LocationAtPoint(iPoint);
391  log << "\n [#" << iPoint << "] (" << point.X() << ", " << point.Y() << ", " << point.Z()
392  << ")";
393  } // while (iPoint)
394  } // if print way points
395  } // DumpTracks::DumpTrack()
std::string fOutputCategory
category for LogInfo output
Float_t track
Definition: plot.C:35
unsigned int fPrintWayPoints
number of printed way points
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

std::string recob::DumpTracks::fOutputCategory
private

category for LogInfo output

Definition at line 263 of file DumpTracks_module.cc.

Referenced by analyze(), and DumpTrack().

bool recob::DumpTracks::fPrintHits
private

prints the index of associated hits

Definition at line 269 of file DumpTracks_module.cc.

Referenced by analyze().

bool recob::DumpTracks::fPrintNHits
private

prints the number of associated hits

Definition at line 266 of file DumpTracks_module.cc.

Referenced by analyze().

bool recob::DumpTracks::fPrintNParticles
private

prints the number of associated PFParticles

Definition at line 268 of file DumpTracks_module.cc.

Referenced by analyze().

bool recob::DumpTracks::fPrintNSpacePoints
private

prints the number of associated space points

Definition at line 267 of file DumpTracks_module.cc.

Referenced by analyze().

bool recob::DumpTracks::fPrintParticles
private

prints the index of associated PFParticles

Definition at line 271 of file DumpTracks_module.cc.

Referenced by analyze().

bool recob::DumpTracks::fPrintSpacePoints
private

prints the index of associated space points

Definition at line 270 of file DumpTracks_module.cc.

Referenced by analyze().

unsigned int recob::DumpTracks::fPrintWayPoints
private

number of printed way points

Definition at line 264 of file DumpTracks_module.cc.

Referenced by DumpTrack().

art::InputTag recob::DumpTracks::fTrackModuleLabel
private

name of module that produced the tracks

Definition at line 262 of file DumpTracks_module.cc.

Referenced by analyze().


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