SharedAnalyzer.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_SharedAnalyzer_h
2 #define art_Framework_Core_SharedAnalyzer_h
3 // vim: set sw=2 expandtab :
4 
5 // ================================================
6 // The base class for all shared analyzer modules.
7 // ================================================
8 
15 #include "fhiclcpp/ParameterSet.h"
16 
17 #include <string>
18 
19 namespace art {
20 
22  public:
25 
26  explicit SharedAnalyzer(fhicl::ParameterSet const& pset)
27  : detail::Analyzer{pset}
28  , detail::SharedModule{pset.get<std::string>("module_label")}
29  {}
30 
31  template <typename Config>
33  : SharedAnalyzer{config.get_PSet()}
34  {}
35 
36  std::string workerType() const;
37 
38  private:
39  void setupQueues(detail::SharedResources const& resources) override final;
40  void beginJobWithFrame(ProcessingFrame const&) override final;
41  void endJobWithFrame(ProcessingFrame const&) override final;
43  ProcessingFrame const&) override final;
45  FileBlock const&,
46  ProcessingFrame const&) override final;
48  FileBlock const&,
49  ProcessingFrame const&) override final;
51  FileBlock const&,
52  ProcessingFrame const&) override final;
53  void beginRunWithFrame(Run const&, ProcessingFrame const&) override final;
54  void endRunWithFrame(Run const&, ProcessingFrame const&) override final;
55  void beginSubRunWithFrame(SubRun const&,
56  ProcessingFrame const&) override final;
57  void endSubRunWithFrame(SubRun const&,
58  ProcessingFrame const&) override final;
59  void analyzeWithFrame(Event const&, ProcessingFrame const&) override final;
60 
61  virtual void beginJob(ProcessingFrame const&);
62  virtual void endJob(ProcessingFrame const&);
63  virtual void respondToOpenInputFile(FileBlock const&,
64  ProcessingFrame const&);
65  virtual void respondToCloseInputFile(FileBlock const&,
66  ProcessingFrame const&);
67  virtual void respondToOpenOutputFiles(FileBlock const&,
68  ProcessingFrame const&);
69  virtual void respondToCloseOutputFiles(FileBlock const&,
70  ProcessingFrame const&);
71  virtual void beginRun(Run const&, ProcessingFrame const&);
72  virtual void endRun(Run const&, ProcessingFrame const&);
73  virtual void beginSubRun(SubRun const&, ProcessingFrame const&);
74  virtual void endSubRun(SubRun const&, ProcessingFrame const&);
75  virtual void analyze(Event const&, ProcessingFrame const&) = 0;
76  };
77 
78 } // namespace art
79 
80 #endif /* art_Framework_Core_SharedAnalyzer_h */
81 
82 // Local Variables:
83 // mode: c++
84 // End:
void endSubRunWithFrame(SubRun const &, ProcessingFrame const &) override final
virtual void analyze(Event const &, ProcessingFrame const &)=0
std::string string
Definition: nybbler.cc:12
virtual void beginRun(Run const &, ProcessingFrame const &)
virtual void respondToCloseOutputFiles(FileBlock const &, ProcessingFrame const &)
void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &) override final
void endJobWithFrame(ProcessingFrame const &) override final
void beginRunWithFrame(Run const &, ProcessingFrame const &) override final
void setupQueues(detail::SharedResources const &resources) override final
Definition: Run.h:17
void endRunWithFrame(Run const &, ProcessingFrame const &) override final
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
SharedAnalyzer(fhicl::ParameterSet const &pset)
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
virtual void beginJob(ProcessingFrame const &)
static Config * config
Definition: config.cpp:1054
virtual void endJob(ProcessingFrame const &)
virtual void beginSubRun(SubRun const &, ProcessingFrame const &)
std::string workerType() const
void analyzeWithFrame(Event const &, ProcessingFrame const &) override final
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
auto const & get_PSet() const
Definition: Analyzer.h:68
virtual void endRun(Run const &, ProcessingFrame const &)
virtual void endSubRun(SubRun const &, ProcessingFrame const &)
SharedAnalyzer(Table< Config > const &config)
virtual void respondToOpenOutputFiles(FileBlock const &, ProcessingFrame const &)
void beginJobWithFrame(ProcessingFrame const &) override final
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
virtual void respondToCloseInputFile(FileBlock const &, ProcessingFrame const &)
virtual void respondToOpenInputFile(FileBlock const &, ProcessingFrame const &)