LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ReplicatedProducer.cc
Go to the documentation of this file.
2 // vim: set sw=2 expandtab :
3 
4 using namespace std;
5 
6 namespace art {
7 
8  // Only the TriggerResults module is allowed to have no
9  // module_label parameter. We provide a default empty string for
10  // only that reason.
11  ReplicatedProducer::ReplicatedProducer(fhicl::ParameterSet const& pset,
12  ProcessingFrame const& frame)
13  : Producer{pset}
14  , EngineCreator{pset.get<std::string>("module_label", {}),
15  frame.scheduleID()}
16  {}
17 
18  std::unique_ptr<Worker>
20  {
21  return std::make_unique<WorkerT<ReplicatedProducer>>(this, wp);
22  }
23 
24  void
26  {
27  // For art 3.0, replicated modules will not have queues.
28  }
29 
30  void
32  FileBlock const& fb,
33  ProcessingFrame const& frame)
34  {
35  respondToOpenInputFile(fb, frame);
36  }
37 
38  void
40  FileBlock const& fb,
41  ProcessingFrame const& frame)
42  {
43  respondToCloseInputFile(fb, frame);
44  }
45 
46  void
48  FileBlock const& fb,
49  ProcessingFrame const& frame)
50  {
51  respondToOpenOutputFiles(fb, frame);
52  }
53 
54  void
56  FileBlock const& fb,
57  ProcessingFrame const& frame)
58  {
59  respondToCloseOutputFiles(fb, frame);
60  }
61 
62  void
64  {
65  beginJob(frame);
66  }
67 
68  void
70  {
71  endJob(frame);
72  }
73 
74  void
76  {
77  beginRun(r, frame);
78  }
79 
80  void
82  {
83  endRun(r, frame);
84  }
85 
86  void
88  ProcessingFrame const& frame)
89  {
90  beginSubRun(sr, frame);
91  }
92 
93  void
95  ProcessingFrame const& frame)
96  {
97  endSubRun(sr, frame);
98  }
99 
100  void
102  {
103  produce(e, frame);
104  }
105 
106  // Default implementations
107  void
109  {}
110 
111  void
113  {}
114 
115  void
117  ProcessingFrame const&)
118  {}
119 
120  void
122  ProcessingFrame const&)
123  {}
124 
125  void
127  ProcessingFrame const&)
128  {}
129 
130  void
132  ProcessingFrame const&)
133  {}
134 
135  void
137  {}
138 
139  void
141  {}
142 
143  void
145  {}
146 
147  void
149  {}
150 
151 } // namespace art
virtual void beginSubRun(SubRun const &, ProcessingFrame const &)
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
TRandom r
Definition: spectrum.C:23
void beginSubRunWithFrame(SubRun &, ProcessingFrame const &) final
virtual void endJob(ProcessingFrame const &)
void endRunWithFrame(Run &, ProcessingFrame const &) final
virtual void endRun(Run const &, ProcessingFrame const &)
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
void setupQueues(detail::SharedResources const &) final
STL namespace.
void beginJobWithFrame(ProcessingFrame const &) final
Definition: Run.h:37
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
void endJobWithFrame(ProcessingFrame const &) final
TFile fb("Li6.root")
void endSubRunWithFrame(SubRun &, ProcessingFrame const &) final
void produceWithFrame(Event &, ProcessingFrame const &) final
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
virtual void respondToOpenOutputFiles(FileBlock const &, ProcessingFrame const &)
void beginRunWithFrame(Run &, ProcessingFrame const &) final
virtual void endSubRun(SubRun const &, ProcessingFrame const &)
Definition: MVAAlg.h:12
virtual void respondToOpenInputFile(FileBlock const &, ProcessingFrame const &)
std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp) final
virtual void respondToCloseInputFile(FileBlock const &, ProcessingFrame const &)
virtual void respondToCloseOutputFiles(FileBlock const &, ProcessingFrame const &)
virtual void beginRun(Run const &, ProcessingFrame const &)
Float_t e
Definition: plot.C:35
virtual void produce(Event &, ProcessingFrame const &)=0
virtual void beginJob(ProcessingFrame const &)