LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
ReplicatedAnalyzer.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_ReplicatedAnalyzer_h
2 #define art_Framework_Core_ReplicatedAnalyzer_h
3 // vim: set sw=2 expandtab :
4 
5 // =====================================================
6 // The base class for all replicated analyzer modules.
7 // =====================================================
8 
13 #include "art/Framework/Core/fwd.h"
16 #include "fhiclcpp/ParameterSet.h"
17 
18 #include <string>
19 
20 namespace art {
21 
23  private detail::EngineCreator {
24  public:
26 
27  protected:
28  explicit ReplicatedAnalyzer(fhicl::ParameterSet const& pset,
29  ProcessingFrame const& frame);
30 
31  template <typename Config>
32  explicit ReplicatedAnalyzer(Table<Config> const& config,
33  ProcessingFrame const& frame)
34  : ReplicatedAnalyzer{config.get_PSet(), frame}
35  {}
36 
38 
39  private:
40  std::unique_ptr<Worker> doMakeWorker(WorkerParams const& wp) final;
41  void setupQueues(detail::SharedResources const& resources) final;
42  void beginJobWithFrame(ProcessingFrame const&) final;
43  void endJobWithFrame(ProcessingFrame const&) final;
45  ProcessingFrame const&) final;
47  ProcessingFrame const&) final;
49  ProcessingFrame const&) final;
51  ProcessingFrame const&) final;
52  void beginRunWithFrame(Run const&, ProcessingFrame const&) final;
53  void endRunWithFrame(Run const&, ProcessingFrame const&) final;
54  void beginSubRunWithFrame(SubRun const&, ProcessingFrame const&) final;
55  void endSubRunWithFrame(SubRun const&, ProcessingFrame const&) final;
56  void analyzeWithFrame(Event const&, ProcessingFrame const&) final;
57 
58  virtual void beginJob(ProcessingFrame const&);
59  virtual void endJob(ProcessingFrame const&);
60  virtual void respondToOpenInputFile(FileBlock const&,
61  ProcessingFrame const&);
62  virtual void respondToCloseInputFile(FileBlock const&,
63  ProcessingFrame const&);
64  virtual void respondToOpenOutputFiles(FileBlock const&,
65  ProcessingFrame const&);
66  virtual void respondToCloseOutputFiles(FileBlock const&,
67  ProcessingFrame const&);
68  virtual void beginRun(Run const&, ProcessingFrame const&);
69  virtual void endRun(Run const&, ProcessingFrame const&);
70  virtual void beginSubRun(SubRun const&, ProcessingFrame const&);
71  virtual void endSubRun(SubRun const&, ProcessingFrame const&);
72  virtual void analyze(Event const&, ProcessingFrame const&) = 0;
73  };
74 
75 } // namespace art
76 
77 #endif /* art_Framework_Core_ReplicatedAnalyzer_h */
78 
79 // Local Variables:
80 // mode: c++
81 // End:
base_engine_t & createEngine(seed_t seed)
virtual void respondToOpenOutputFiles(FileBlock const &, ProcessingFrame const &)
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
virtual void respondToCloseInputFile(FileBlock const &, ProcessingFrame const &)
std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp) final
void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &) final
void endJobWithFrame(ProcessingFrame const &) final
virtual void endRun(Run const &, ProcessingFrame const &)
virtual void respondToOpenInputFile(FileBlock const &, ProcessingFrame const &)
Definition: Run.h:37
virtual void analyze(Event const &, ProcessingFrame const &)=0
void beginJobWithFrame(ProcessingFrame const &) final
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
ReplicatedAnalyzer(fhicl::ParameterSet const &pset, ProcessingFrame const &frame)
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
void setupQueues(detail::SharedResources const &resources) final
virtual void respondToCloseOutputFiles(FileBlock const &, ProcessingFrame const &)
virtual void beginSubRun(SubRun const &, ProcessingFrame const &)
auto const & get_PSet() const
Definition: Analyzer.h:67
void endSubRunWithFrame(SubRun const &, ProcessingFrame const &) final
void beginRunWithFrame(Run const &, ProcessingFrame const &) final
virtual void beginRun(Run const &, ProcessingFrame const &)
virtual void beginJob(ProcessingFrame const &)
virtual void endSubRun(SubRun const &, ProcessingFrame const &)
void analyzeWithFrame(Event const &, ProcessingFrame const &) final
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: MVAAlg.h:12
void endRunWithFrame(Run const &, ProcessingFrame const &) final
virtual void endJob(ProcessingFrame const &)
ReplicatedAnalyzer(Table< Config > const &config, ProcessingFrame const &frame)