EDAnalyzer.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_EDAnalyzer_h
2 #define art_Framework_Core_EDAnalyzer_h
3 // vim: set sw=2 expandtab :
4 
5 // ===================================================
6 // The base class for all legacy analyzer modules.
7 // ===================================================
8 
16 #include "fhiclcpp/ParameterSet.h"
17 
18 #include <string>
19 
20 namespace art {
21 
23  public:
26 
27  explicit EDAnalyzer(fhicl::ParameterSet const& pset)
28  : detail::Analyzer{pset}
29  , detail::LegacyModule{pset.get<std::string>("module_label")}
30  {}
31 
32  template <typename Config>
33  explicit EDAnalyzer(Table<Config> const& config)
34  : EDAnalyzer{config.get_PSet()}
35  {}
36 
40 
41  std::string workerType() const;
42 
43  private:
44  void setupQueues() override final;
45  void beginJobWithFrame(ProcessingFrame const&) override final;
46  void endJobWithFrame(ProcessingFrame const&) override final;
48  ProcessingFrame const&) override final;
50  FileBlock const&,
51  ProcessingFrame const&) override final;
53  FileBlock const&,
54  ProcessingFrame const&) override final;
56  FileBlock const&,
57  ProcessingFrame const&) override final;
58  void beginRunWithFrame(Run const&, ProcessingFrame const&) override final;
59  void endRunWithFrame(Run const&, ProcessingFrame const&) override final;
60  void beginSubRunWithFrame(SubRun const&,
61  ProcessingFrame const&) override final;
62  void endSubRunWithFrame(SubRun const&,
63  ProcessingFrame const&) override final;
64  void analyzeWithFrame(Event const&, ProcessingFrame const&) override final;
65 
66  virtual void beginJob();
67  virtual void endJob();
68  virtual void respondToOpenInputFile(FileBlock const&);
69  virtual void respondToCloseInputFile(FileBlock const&);
70  virtual void respondToOpenOutputFiles(FileBlock const&);
71  virtual void respondToCloseOutputFiles(FileBlock const&);
72  virtual void beginRun(Run const&);
73  virtual void endRun(Run const&);
74  virtual void beginSubRun(SubRun const&);
75  virtual void endSubRun(SubRun const&);
76  virtual void analyze(Event const&) = 0;
77  };
78 
79 } // namespace art
80 
81 #endif /* art_Framework_Core_EDAnalyzer_h */
82 
83 // Local Variables:
84 // mode: c++
85 // End:
virtual void beginRun(Run const &)
virtual void analyze(Event const &)=0
void endRunWithFrame(Run const &, ProcessingFrame const &) override final
virtual void respondToCloseInputFile(FileBlock const &)
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: config.py:1
virtual void endRun(Run const &)
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:27
void beginJobWithFrame(ProcessingFrame const &) override final
void analyzeWithFrame(Event const &, ProcessingFrame const &) override final
Definition: Run.h:21
virtual void respondToOpenInputFile(FileBlock const &)
virtual void beginSubRun(SubRun const &)
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
base_engine_t & createEngine(seed_t seed)
void endJobWithFrame(ProcessingFrame const &) override final
ScheduleID scheduleID() const noexcept
virtual void respondToOpenOutputFiles(FileBlock const &)
std::string workerType() const
void endSubRunWithFrame(SubRun const &, ProcessingFrame const &) override final
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:33
virtual void endJob()
auto const & get_PSet() const
Definition: Analyzer.h:65
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
virtual void endSubRun(SubRun const &)
void beginRunWithFrame(Run const &, ProcessingFrame const &) override final
virtual void respondToCloseOutputFiles(FileBlock const &)
virtual void beginJob()
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
Service to store calibration data products (CDP) in the SQLite3 metadatabase of a file...
Definition: FillParentInfo.h:8
void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &) override final
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain() const
void setupQueues() override final
Analyzer(fhicl::ParameterSet const &pset)
enum BeamMode string