EDProducer.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_EDProducer_h
2 #define art_Framework_Core_EDProducer_h
3 // vim: set sw=2 expandtab :
4 
10 
11 #include <string>
12 
13 namespace art {
14 
16  public:
19 
20  explicit EDProducer(fhicl::ParameterSet const& pset)
21  : detail::Producer{pset}
22  , detail::LegacyModule{pset.get<std::string>("module_label")}
23  {}
24 
25  template <typename Config>
26  explicit EDProducer(Table<Config> const& config)
27  : EDProducer{config.get_PSet()}
28  {}
29 
34 
35  std::string workerType() const;
36 
37  private:
38  void setupQueues(detail::SharedResources const& resources) override final;
39  void beginJobWithFrame(ProcessingFrame const&) override final;
40  void endJobWithFrame(ProcessingFrame const&) override final;
42  ProcessingFrame const&) override final;
44  FileBlock const&,
45  ProcessingFrame const&) override final;
47  FileBlock const&,
48  ProcessingFrame const&) override final;
50  FileBlock const&,
51  ProcessingFrame const&) override final;
52  void beginRunWithFrame(Run&, ProcessingFrame const&) override final;
53  void endRunWithFrame(Run&, ProcessingFrame const&) override final;
54  void beginSubRunWithFrame(SubRun&, ProcessingFrame const&) override final;
55  void endSubRunWithFrame(SubRun&, ProcessingFrame const&) override final;
56  void produceWithFrame(Event&, ProcessingFrame const&) override final;
57 
58  virtual void beginJob();
59  virtual void endJob();
60  virtual void respondToOpenInputFile(FileBlock const&);
61  virtual void respondToCloseInputFile(FileBlock const&);
62  virtual void respondToOpenOutputFiles(FileBlock const&);
63  virtual void respondToCloseOutputFiles(FileBlock const&);
64  virtual void beginRun(Run&);
65  virtual void endRun(Run&);
66  virtual void beginSubRun(SubRun&);
67  virtual void endSubRun(SubRun&);
68  virtual void produce(Event&) = 0;
69  };
70 
71 } // namespace art
72 
73 #endif /* art_Framework_Core_EDProducer_h */
74 
75 // Local Variables:
76 // mode: c++
77 // End:
base_engine_t & createEngine(seed_t seed)
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: EDProducer.cc:26
virtual void endRun(Run &)
Definition: EDProducer.cc:119
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: EDProducer.cc:19
std::string string
Definition: nybbler.cc:12
EDProducer(fhicl::ParameterSet const &pset)
Definition: EDProducer.h:20
virtual void respondToCloseOutputFiles(FileBlock const &)
Definition: EDProducer.cc:111
std::set< std::string > const & sharedResources() const
Definition: SharedModule.cc:28
virtual void beginRun(Run &)
Definition: EDProducer.cc:115
virtual void respondToOpenInputFile(FileBlock const &)
Definition: EDProducer.cc:99
void beginRunWithFrame(Run &, ProcessingFrame const &) override final
Definition: EDProducer.cc:59
std::string workerType() const
Definition: EDProducer.cc:7
void endRunWithFrame(Run &, ProcessingFrame const &) override final
Definition: EDProducer.cc:65
Definition: Run.h:17
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: EDProducer.cc:33
ScheduleID scheduleID() const noexcept
Definition: LegacyModule.cc:12
static Config * config
Definition: config.cpp:1054
virtual void endJob()
Definition: EDProducer.cc:95
auto const & get_PSet() const
Definition: ProducerTable.h:47
virtual void endSubRun(SubRun &)
Definition: EDProducer.cc:127
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: EDProducer.cc:40
virtual void beginJob()
Definition: EDProducer.cc:91
void endSubRunWithFrame(SubRun &, ProcessingFrame const &) override final
Definition: EDProducer.cc:77
virtual void respondToCloseInputFile(FileBlock const &)
Definition: EDProducer.cc:103
void beginSubRunWithFrame(SubRun &, ProcessingFrame const &) override final
Definition: EDProducer.cc:71
void produceWithFrame(Event &, ProcessingFrame const &) override final
Definition: EDProducer.cc:83
void setupQueues(detail::SharedResources const &resources) override final
Definition: EDProducer.cc:13
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain() const
Definition: SharedModule.cc:22
virtual void produce(Event &)=0
void endJobWithFrame(ProcessingFrame const &) override final
Definition: EDProducer.cc:53
void beginJobWithFrame(ProcessingFrame const &) override final
Definition: EDProducer.cc:47
virtual void beginSubRun(SubRun &)
Definition: EDProducer.cc:123
EDProducer(Table< Config > const &config)
Definition: EDProducer.h:26
virtual void respondToOpenOutputFiles(FileBlock const &)
Definition: EDProducer.cc:107