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 
14 #include "fhiclcpp/ParameterSet.h"
15 
16 #include <string>
17 
18 namespace art {
19 
21  public:
24 
25  explicit EDAnalyzer(fhicl::ParameterSet const& pset)
26  : detail::Analyzer{pset}
27  , detail::LegacyModule{pset.get<std::string>("module_label")}
28  {}
29 
30  template <typename Config>
31  explicit EDAnalyzer(Table<Config> const& config)
32  : EDAnalyzer{config.get_PSet()}
33  {}
34 
39 
40  std::string workerType() const;
41 
42  private:
43  void setupQueues(detail::SharedResources const&) override final;
44  void beginJobWithFrame(ProcessingFrame const&) override final;
45  void endJobWithFrame(ProcessingFrame const&) override final;
47  ProcessingFrame const&) override final;
49  FileBlock const&,
50  ProcessingFrame const&) override final;
52  FileBlock const&,
53  ProcessingFrame const&) override final;
55  FileBlock const&,
56  ProcessingFrame const&) override final;
57  void beginRunWithFrame(Run const&, ProcessingFrame const&) override final;
58  void endRunWithFrame(Run const&, ProcessingFrame const&) override final;
59  void beginSubRunWithFrame(SubRun const&,
60  ProcessingFrame const&) override final;
61  void endSubRunWithFrame(SubRun const&,
62  ProcessingFrame const&) override final;
63  void analyzeWithFrame(Event const&, ProcessingFrame const&) override final;
64 
65  virtual void beginJob();
66  virtual void endJob();
67  virtual void respondToOpenInputFile(FileBlock const&);
68  virtual void respondToCloseInputFile(FileBlock const&);
69  virtual void respondToOpenOutputFiles(FileBlock const&);
70  virtual void respondToCloseOutputFiles(FileBlock const&);
71  virtual void beginRun(Run const&);
72  virtual void endRun(Run const&);
73  virtual void beginSubRun(SubRun const&);
74  virtual void endSubRun(SubRun const&);
75  virtual void analyze(Event const&) = 0;
76  };
77 
78 } // namespace art
79 
80 #endif /* art_Framework_Core_EDAnalyzer_h */
81 
82 // Local Variables:
83 // mode: c++
84 // End:
base_engine_t & createEngine(seed_t seed)
virtual void beginRun(Run const &)
Definition: EDAnalyzer.cc:115
std::string string
Definition: nybbler.cc:12
virtual void analyze(Event const &)=0
virtual void respondToCloseInputFile(FileBlock const &)
Definition: EDAnalyzer.cc:103
void endRunWithFrame(Run const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:65
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:33
std::set< std::string > const & sharedResources() const
Definition: SharedModule.cc:28
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.h:25
virtual void endRun(Run const &)
Definition: EDAnalyzer.cc:119
void beginJobWithFrame(ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:47
virtual void endJob()
Definition: EDAnalyzer.cc:95
void analyzeWithFrame(Event const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:83
Definition: Run.h:17
virtual void endSubRun(SubRun const &)
Definition: EDAnalyzer.cc:127
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:40
virtual void beginJob()
Definition: EDAnalyzer.cc:91
void endJobWithFrame(ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:53
ScheduleID scheduleID() const noexcept
Definition: LegacyModule.cc:12
static Config * config
Definition: config.cpp:1054
std::string workerType() const
Definition: EDAnalyzer.cc:7
virtual void respondToCloseOutputFiles(FileBlock const &)
Definition: EDAnalyzer.cc:111
void endSubRunWithFrame(SubRun const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:77
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:31
virtual void beginSubRun(SubRun const &)
Definition: EDAnalyzer.cc:123
void setupQueues(detail::SharedResources const &) override final
Definition: EDAnalyzer.cc:13
auto const & get_PSet() const
Definition: Analyzer.h:68
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:19
void beginRunWithFrame(Run const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:59
virtual void respondToOpenOutputFiles(FileBlock const &)
Definition: EDAnalyzer.cc:107
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:26
virtual void respondToOpenInputFile(FileBlock const &)
Definition: EDAnalyzer.cc:99
void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &) override final
Definition: EDAnalyzer.cc:71
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain() const
Definition: SharedModule.cc:22