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