LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ReplicatedProducer.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_ReplicatedProducer_h
2 #define art_Framework_Core_ReplicatedProducer_h
3 // vim: set sw=2 expandtab :
4 
11 
12 #include <string>
13 
14 namespace art {
15  namespace detail {
16  class SharedResources;
17  }
18 
20  private detail::EngineCreator {
21  public:
23 
24  protected:
25  explicit ReplicatedProducer(fhicl::ParameterSet const& pset,
26  ProcessingFrame const& frame);
27 
28  template <typename Config>
29  explicit ReplicatedProducer(Table<Config> const& config,
30  ProcessingFrame const& frame)
31  : ReplicatedProducer{config.get_PSet(), frame}
32  {}
33 
35 
36  private:
37  std::unique_ptr<Worker> doMakeWorker(WorkerParams const& wp) final;
38  void setupQueues(detail::SharedResources const&) final;
39  void beginJobWithFrame(ProcessingFrame const&) final;
40  void endJobWithFrame(ProcessingFrame const&) final;
41  void respondToOpenInputFileWithFrame(FileBlock const&,
42  ProcessingFrame const&) final;
43  void respondToCloseInputFileWithFrame(FileBlock const&,
44  ProcessingFrame const&) final;
45  void respondToOpenOutputFilesWithFrame(FileBlock const&,
46  ProcessingFrame const&) final;
47  void respondToCloseOutputFilesWithFrame(FileBlock const&,
48  ProcessingFrame const&) final;
49  void beginRunWithFrame(Run&, ProcessingFrame const&) final;
50  void endRunWithFrame(Run&, ProcessingFrame const&) final;
51  void beginSubRunWithFrame(SubRun&, ProcessingFrame const&) final;
52  void endSubRunWithFrame(SubRun&, ProcessingFrame const&) final;
53  void produceWithFrame(Event&, ProcessingFrame const&) final;
54 
55  virtual void beginJob(ProcessingFrame const&);
56  virtual void endJob(ProcessingFrame const&);
57  virtual void respondToOpenInputFile(FileBlock const&,
58  ProcessingFrame const&);
59  virtual void respondToCloseInputFile(FileBlock const&,
60  ProcessingFrame const&);
61  virtual void respondToOpenOutputFiles(FileBlock const&,
62  ProcessingFrame const&);
63  virtual void respondToCloseOutputFiles(FileBlock const&,
64  ProcessingFrame const&);
65  virtual void beginRun(Run const&, ProcessingFrame const&);
66  virtual void endRun(Run const&, ProcessingFrame const&);
67  virtual void beginSubRun(SubRun const&, ProcessingFrame const&);
68  virtual void endSubRun(SubRun const&, ProcessingFrame const&);
69  virtual void produce(Event&, ProcessingFrame const&) = 0;
70  };
71 
72 } // namespace art
73 
74 #endif /* art_Framework_Core_ReplicatedProducer_h */
75 
76 // Local Variables:
77 // mode: c++
78 // End:
base_engine_t & createEngine(seed_t seed)
Definition: Run.h:37
void beginJob()
Definition: Breakpoints.cc:14
ReplicatedProducer(Table< Config > const &config, ProcessingFrame const &frame)
auto const & get_PSet() const
Definition: ProducerTable.h:47
Definition: MVAAlg.h:12