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:
22 
23  explicit SharedProducer(fhicl::ParameterSet const& pset)
24  : detail::Producer{pset}
25  , detail::SharedModule{pset.get<std::string>("module_label", {})}
26  {}
27 
28  template <typename Config>
30  : SharedProducer{config.get_PSet()}
31  {}
32 
33  std::string workerType() const;
34 
35  private:
36  void setupQueues(detail::SharedResources const&) override final;
37  void beginJobWithFrame(ProcessingFrame const&) override final;
38  void endJobWithFrame(ProcessingFrame const&) override final;
39  void respondToOpenInputFileWithFrame(FileBlock const&,
40  ProcessingFrame const&) override final;
41  void respondToCloseInputFileWithFrame(
42  FileBlock const&,
43  ProcessingFrame const&) override final;
44  void respondToOpenOutputFilesWithFrame(
45  FileBlock const&,
46  ProcessingFrame const&) override final;
47  void respondToCloseOutputFilesWithFrame(
48  FileBlock const&,
49  ProcessingFrame const&) override final;
50  void beginRunWithFrame(Run&, ProcessingFrame const&) override final;
51  void endRunWithFrame(Run&, ProcessingFrame const&) override final;
52  void beginSubRunWithFrame(SubRun&, ProcessingFrame const&) override final;
53  void endSubRunWithFrame(SubRun&, ProcessingFrame const&) override final;
54  void produceWithFrame(Event&, ProcessingFrame const&) override final;
55 
56  virtual void beginJob(ProcessingFrame const&);
57  virtual void endJob(ProcessingFrame const&);
58  virtual void respondToOpenInputFile(FileBlock const&,
59  ProcessingFrame const&);
60  virtual void respondToCloseInputFile(FileBlock const&,
61  ProcessingFrame const&);
62  virtual void respondToOpenOutputFiles(FileBlock const&,
63  ProcessingFrame const&);
64  virtual void respondToCloseOutputFiles(FileBlock const&,
65  ProcessingFrame const&);
66  virtual void beginRun(Run&, ProcessingFrame const&);
67  virtual void endRun(Run&, ProcessingFrame const&);
68  virtual void beginSubRun(SubRun&, ProcessingFrame const&);
69  virtual void endSubRun(SubRun&, ProcessingFrame const&);
70  virtual void produce(Event&, ProcessingFrame const&) = 0;
71  };
72 
73 } // namespace art
74 
75 #endif /* art_Framework_Core_SharedProducer_h */
76 
77 // Local Variables:
78 // mode: c++
79 // End:
std::string string
Definition: nybbler.cc:12
SharedProducer(Table< Config > const &config)
Definition: Run.h:17
void beginJob()
Definition: Breakpoints.cc:14
SharedProducer(fhicl::ParameterSet const &pset)
static Config * config
Definition: config.cpp:1054
auto const & get_PSet() const
Definition: ProducerTable.h:47