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 
16 #include "fhiclcpp/ParameterSet.h"
17 
18 #include <string>
19 
20 namespace art {
21 
23  private detail::EngineCreator {
24  public:
27 
29  ProcessingFrame const& frame)
30  : detail::Analyzer{pset}
31  , detail::EngineCreator{pset.get<std::string>("module_label"),
32  frame.scheduleID()}
33  {}
34 
35  template <typename Config>
37  ProcessingFrame const& frame)
38  : ReplicatedAnalyzer{config.get_PSet(), frame}
39  {}
40 
42 
43  std::string workerType() const;
44 
45  private:
46  void setupQueues(detail::SharedResources const& resources) override final;
47  void beginJobWithFrame(ProcessingFrame const&) override final;
48  void endJobWithFrame(ProcessingFrame const&) override final;
50  ProcessingFrame const&) override final;
52  FileBlock const&,
53  ProcessingFrame const&) override final;
55  FileBlock const&,
56  ProcessingFrame const&) override final;
58  FileBlock const&,
59  ProcessingFrame const&) override final;
60  void beginRunWithFrame(Run const&, ProcessingFrame const&) override final;
61  void endRunWithFrame(Run const&, ProcessingFrame const&) override final;
62  void beginSubRunWithFrame(SubRun const&,
63  ProcessingFrame const&) override final;
64  void endSubRunWithFrame(SubRun const&,
65  ProcessingFrame const&) override final;
66  void analyzeWithFrame(Event const&, ProcessingFrame const&) override final;
67 
68  virtual void beginJob(ProcessingFrame const&);
69  virtual void endJob(ProcessingFrame const&);
70  virtual void respondToOpenInputFile(FileBlock const&,
71  ProcessingFrame const&);
72  virtual void respondToCloseInputFile(FileBlock const&,
73  ProcessingFrame const&);
74  virtual void respondToOpenOutputFiles(FileBlock const&,
75  ProcessingFrame const&);
76  virtual void respondToCloseOutputFiles(FileBlock const&,
77  ProcessingFrame const&);
78  virtual void beginRun(Run const&, ProcessingFrame const&);
79  virtual void endRun(Run const&, ProcessingFrame const&);
80  virtual void beginSubRun(SubRun const&, ProcessingFrame const&);
81  virtual void endSubRun(SubRun const&, ProcessingFrame const&);
82  virtual void analyze(Event const&, ProcessingFrame const&) = 0;
83  };
84 
85 } // namespace art
86 
87 #endif /* art_Framework_Core_ReplicatedAnalyzer_h */
88 
89 // Local Variables:
90 // mode: c++
91 // End:
base_engine_t & createEngine(seed_t seed)
virtual void respondToOpenOutputFiles(FileBlock const &, ProcessingFrame const &)
void endJobWithFrame(ProcessingFrame const &) override final
std::string workerType() const
void setupQueues(detail::SharedResources const &resources) override final
virtual void respondToCloseInputFile(FileBlock const &, ProcessingFrame const &)
std::string string
Definition: nybbler.cc:12
virtual void endRun(Run const &, ProcessingFrame const &)
virtual void respondToOpenInputFile(FileBlock const &, ProcessingFrame const &)
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: Run.h:17
virtual void analyze(Event const &, ProcessingFrame const &)=0
ReplicatedAnalyzer(fhicl::ParameterSet const &pset, ProcessingFrame const &frame)
static Config * config
Definition: config.cpp:1054
void endSubRunWithFrame(SubRun const &, ProcessingFrame const &) override final
virtual void respondToCloseOutputFiles(FileBlock const &, ProcessingFrame const &)
virtual void beginSubRun(SubRun const &, ProcessingFrame const &)
void analyzeWithFrame(Event const &, ProcessingFrame const &) override final
auto const & get_PSet() const
Definition: Analyzer.h:68
void beginRunWithFrame(Run const &, ProcessingFrame const &) override final
virtual void beginRun(Run const &, ProcessingFrame const &)
virtual void beginJob(ProcessingFrame const &)
void endRunWithFrame(Run const &, ProcessingFrame const &) override final
virtual void endSubRun(SubRun const &, ProcessingFrame const &)
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
void beginJobWithFrame(ProcessingFrame const &) override final
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
virtual void endJob(ProcessingFrame const &)
ReplicatedAnalyzer(Table< Config > const &config, ProcessingFrame const &frame)
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &) override final