LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EDFilter.cc
Go to the documentation of this file.
2 // vim: set sw=2 expandtab :
3 
4 namespace art {
5 
7  : Filter{pset}, LegacyModule{pset.get<std::string>("module_label")}
8  {}
9 
10  std::unique_ptr<Worker>
12  {
13  return std::make_unique<WorkerT<EDFilter>>(this, wp);
14  }
15 
16  void
18  {
19  createQueues(resources);
20  }
21 
22  void
24  ProcessingFrame const&)
25  {
27  }
28 
29  void
31  ProcessingFrame const&)
32  {
34  }
35 
36  void
38  ProcessingFrame const&)
39  {
41  }
42 
43  void
45  ProcessingFrame const&)
46  {
48  }
49 
50  void
52  {
53  beginJob();
54  }
55 
56  void
58  {
59  endJob();
60  }
61 
62  bool
64  {
65  return beginRun(r);
66  }
67 
68  bool
70  {
71  return endRun(r);
72  }
73 
74  bool
76  {
77  return beginSubRun(sr);
78  }
79 
80  bool
82  {
83  return endSubRun(sr);
84  }
85 
86  bool
88  {
89  ScheduleIDSentry sentry{*this, frame.scheduleID()};
90  return filter(e);
91  }
92 
93  // Default implementations
94  void
96  {}
97 
98  void
100  {}
101 
102  void
104  {}
105 
106  void
108  {}
109 
110  void
112  {}
113 
114  void
116  {}
117 
118  bool
120  {
121  return true;
122  }
123 
124  bool
126  {
127  return true;
128  }
129 
130  bool
132  {
133  return true;
134  }
135 
136  bool
138  {
139  return true;
140  }
141 
142 } // namespace art
TRandom r
Definition: spectrum.C:23
void beginJobWithFrame(ProcessingFrame const &) final
Definition: EDFilter.cc:51
virtual void respondToOpenOutputFiles(FileBlock const &)
Definition: EDFilter.cc:111
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDFilter.cc:30
virtual bool beginRun(Run &)
Definition: EDFilter.cc:119
std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp) final
Definition: EDFilter.cc:11
bool beginRunWithFrame(Run &, ProcessingFrame const &) final
Definition: EDFilter.cc:63
virtual bool filter(Event &)=0
void setupQueues(detail::SharedResources const &resources) final
Definition: EDFilter.cc:17
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDFilter.cc:44
Definition: Run.h:37
auto scheduleID() const
bool endSubRunWithFrame(SubRun &, ProcessingFrame const &) final
Definition: EDFilter.cc:81
virtual bool beginSubRun(SubRun &)
Definition: EDFilter.cc:131
bool endRunWithFrame(Run &, ProcessingFrame const &) final
Definition: EDFilter.cc:69
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDFilter.cc:23
virtual void respondToCloseInputFile(FileBlock const &)
Definition: EDFilter.cc:107
virtual void beginJob()
Definition: EDFilter.cc:95
virtual bool endSubRun(SubRun &)
Definition: EDFilter.cc:137
TFile fb("Li6.root")
virtual void respondToCloseOutputFiles(FileBlock const &)
Definition: EDFilter.cc:115
void createQueues(SharedResources const &resources)
Definition: SharedModule.cc:34
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDFilter.cc:37
EDFilter(fhicl::ParameterSet const &pset)
Definition: EDFilter.cc:6
virtual void endJob()
Definition: EDFilter.cc:99
Definition: MVAAlg.h:12
virtual bool endRun(Run &)
Definition: EDFilter.cc:125
Float_t e
Definition: plot.C:35
bool filterWithFrame(Event &, ProcessingFrame const &) final
Definition: EDFilter.cc:87
void endJobWithFrame(ProcessingFrame const &) final
Definition: EDFilter.cc:57
virtual void respondToOpenInputFile(FileBlock const &)
Definition: EDFilter.cc:103
bool beginSubRunWithFrame(SubRun &, ProcessingFrame const &) final
Definition: EDFilter.cc:75