LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 
12 #include "art/Framework/Core/fwd.h"
15 #include "fhiclcpp/ParameterSet.h"
16 
17 #include <string>
18 
19 namespace art {
20 
22  public:
24 
25  protected:
26  explicit SharedAnalyzer(fhicl::ParameterSet const& pset);
27 
28  template <typename Config>
29  explicit SharedAnalyzer(Table<Config> const& config)
30  : SharedAnalyzer{config.get_PSet()}
31  {}
32 
33  private:
34  std::unique_ptr<Worker> doMakeWorker(WorkerParams const& wp) final;
35  void setupQueues(detail::SharedResources const& resources) final;
36  void beginJobWithFrame(ProcessingFrame const&) final;
37  void endJobWithFrame(ProcessingFrame const&) final;
39  ProcessingFrame const&) final;
41  ProcessingFrame const&) final;
43  ProcessingFrame const&) final;
45  ProcessingFrame const&) final;
46  void beginRunWithFrame(Run const&, ProcessingFrame const&) final;
47  void endRunWithFrame(Run const&, ProcessingFrame const&) final;
48  void beginSubRunWithFrame(SubRun const&, ProcessingFrame const&) final;
49  void endSubRunWithFrame(SubRun const&, ProcessingFrame const&) final;
50  void analyzeWithFrame(Event const&, ProcessingFrame const&) final;
51 
52  virtual void beginJob(ProcessingFrame const&);
53  virtual void endJob(ProcessingFrame const&);
54  virtual void respondToOpenInputFile(FileBlock const&,
55  ProcessingFrame const&);
56  virtual void respondToCloseInputFile(FileBlock const&,
57  ProcessingFrame const&);
58  virtual void respondToOpenOutputFiles(FileBlock const&,
59  ProcessingFrame const&);
60  virtual void respondToCloseOutputFiles(FileBlock const&,
61  ProcessingFrame const&);
62  virtual void beginRun(Run const&, ProcessingFrame const&);
63  virtual void endRun(Run const&, ProcessingFrame const&);
64  virtual void beginSubRun(SubRun const&, ProcessingFrame const&);
65  virtual void endSubRun(SubRun const&, ProcessingFrame const&);
66  virtual void analyze(Event const&, ProcessingFrame const&) = 0;
67  };
68 
69 } // namespace art
70 
71 #endif /* art_Framework_Core_SharedAnalyzer_h */
72 
73 // Local Variables:
74 // mode: c++
75 // End:
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
virtual void analyze(Event const &, ProcessingFrame const &)=0
std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp) final
void analyzeWithFrame(Event const &, ProcessingFrame const &) final
virtual void beginRun(Run const &, ProcessingFrame const &)
virtual void respondToCloseOutputFiles(FileBlock const &, ProcessingFrame const &)
void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &) final
Definition: Run.h:37
void endJobWithFrame(ProcessingFrame const &) final
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
SharedAnalyzer(fhicl::ParameterSet const &pset)
void beginJobWithFrame(ProcessingFrame const &) final
virtual void beginJob(ProcessingFrame const &)
virtual void endJob(ProcessingFrame const &)
virtual void beginSubRun(SubRun const &, ProcessingFrame const &)
auto const & get_PSet() const
Definition: Analyzer.h:67
void setupQueues(detail::SharedResources const &resources) final
virtual void endRun(Run const &, ProcessingFrame const &)
void endSubRunWithFrame(SubRun const &, ProcessingFrame const &) final
virtual void endSubRun(SubRun const &, ProcessingFrame const &)
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: MVAAlg.h:12
void beginRunWithFrame(Run const &, ProcessingFrame const &) final
SharedAnalyzer(Table< Config > const &config)
void endRunWithFrame(Run const &, ProcessingFrame const &) final
virtual void respondToOpenOutputFiles(FileBlock const &, ProcessingFrame const &)
virtual void respondToCloseInputFile(FileBlock const &, ProcessingFrame const &)
virtual void respondToOpenInputFile(FileBlock const &, ProcessingFrame const &)