LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
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 
12 #include "art/Framework/Core/fwd.h"
14 #include "fhiclcpp/ParameterSet.h"
15 
16 #include <string>
17 
18 namespace art {
19 
21  public:
23 
26 
27  protected:
28  explicit EDAnalyzer(fhicl::ParameterSet const& pset);
29 
30  template <typename Config>
31  explicit EDAnalyzer(Table<Config> const& config)
32  : EDAnalyzer{config.get_PSet()}
33  {}
34 
37 
38  private:
39  std::unique_ptr<Worker> doMakeWorker(WorkerParams const& wp) final;
40  void setupQueues(detail::SharedResources const&) final;
41  void beginJobWithFrame(ProcessingFrame const&) final;
42  void endJobWithFrame(ProcessingFrame const&) final;
44  ProcessingFrame const&) final;
46  ProcessingFrame const&) final;
48  ProcessingFrame const&) final;
50  ProcessingFrame const&) final;
51  void beginRunWithFrame(Run const&, ProcessingFrame const&) final;
52  void endRunWithFrame(Run const&, ProcessingFrame const&) final;
53  void beginSubRunWithFrame(SubRun const&, ProcessingFrame const&) final;
54  void endSubRunWithFrame(SubRun const&, ProcessingFrame const&) final;
55  void analyzeWithFrame(Event const&, ProcessingFrame const&) final;
56 
57  virtual void beginJob();
58  virtual void endJob();
59  virtual void respondToOpenInputFile(FileBlock const&);
60  virtual void respondToCloseInputFile(FileBlock const&);
61  virtual void respondToOpenOutputFiles(FileBlock const&);
62  virtual void respondToCloseOutputFiles(FileBlock const&);
63  virtual void beginRun(Run const&);
64  virtual void endRun(Run const&);
65  virtual void beginSubRun(SubRun const&);
66  virtual void endSubRun(SubRun const&);
67  virtual void analyze(Event const&) = 0;
68  };
69 
70 } // namespace art
71 
72 #endif /* art_Framework_Core_EDAnalyzer_h */
73 
74 // Local Variables:
75 // mode: c++
76 // End:
std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp) final
Definition: EDAnalyzer.cc:11
base_engine_t & createEngine(seed_t seed)
virtual void beginRun(Run const &)
Definition: EDAnalyzer.cc:119
void setupQueues(detail::SharedResources const &) final
Definition: EDAnalyzer.cc:17
void beginJobWithFrame(ProcessingFrame const &) final
Definition: EDAnalyzer.cc:51
virtual void analyze(Event const &)=0
virtual void respondToCloseInputFile(FileBlock const &)
Definition: EDAnalyzer.cc:107
void beginSubRunWithFrame(SubRun const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:75
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:23
std::set< std::string > const & sharedResources() const
Definition: SharedModule.cc:28
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:30
EDAnalyzer(fhicl::ParameterSet const &pset)
Definition: EDAnalyzer.cc:6
virtual void endRun(Run const &)
Definition: EDAnalyzer.cc:123
virtual void endJob()
Definition: EDAnalyzer.cc:99
Definition: Run.h:37
virtual void endSubRun(SubRun const &)
Definition: EDAnalyzer.cc:131
virtual void beginJob()
Definition: EDAnalyzer.cc:95
ScheduleID scheduleID() const noexcept
Definition: LegacyModule.cc:12
virtual void respondToCloseOutputFiles(FileBlock const &)
Definition: EDAnalyzer.cc:115
EDAnalyzer(Table< Config > const &config)
Definition: EDAnalyzer.h:31
virtual void beginSubRun(SubRun const &)
Definition: EDAnalyzer.cc:127
void endJobWithFrame(ProcessingFrame const &) final
Definition: EDAnalyzer.cc:57
auto const & get_PSet() const
Definition: Analyzer.h:67
void beginRunWithFrame(Run const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:63
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:44
virtual void respondToOpenOutputFiles(FileBlock const &)
Definition: EDAnalyzer.cc:111
virtual void respondToOpenInputFile(FileBlock const &)
Definition: EDAnalyzer.cc:103
Definition: MVAAlg.h:12
void analyzeWithFrame(Event const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:87
void endSubRunWithFrame(SubRun const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:81
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain() const
Definition: SharedModule.cc:22
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:37
void endRunWithFrame(Run const &, ProcessingFrame const &) final
Definition: EDAnalyzer.cc:69