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