LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
EDFilter.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_EDFilter_h
2 #define art_Framework_Core_EDFilter_h
3 // vim: set sw=2 expandtab :
4 
10 #include "fhiclcpp/ParameterSet.h"
11 
12 #include <string>
13 
14 namespace art {
15 
16  class EDFilter : public detail::Filter, private detail::LegacyModule {
17  public:
19 
22 
23  protected:
24  explicit EDFilter(fhicl::ParameterSet const& pset);
25 
26  template <typename Config>
27  explicit EDFilter(Table<Config> const& config) : EDFilter{config.get_PSet()}
28  {}
29 
32 
33  private:
34  std::unique_ptr<Worker> doMakeWorker(WorkerParams const& wp) final;
35  void setupQueues(detail::SharedResources const& resources) final;
36  void beginJobWithFrame(ProcessingFrame const&) final;
37  void endJobWithFrame(ProcessingFrame const&) final;
39  ProcessingFrame const&) final;
41  ProcessingFrame const&) final;
43  ProcessingFrame const&) final;
45  ProcessingFrame const&) final;
46  bool beginRunWithFrame(Run&, ProcessingFrame const&) final;
47  bool endRunWithFrame(Run&, ProcessingFrame const&) final;
48  bool beginSubRunWithFrame(SubRun&, ProcessingFrame const&) final;
49  bool endSubRunWithFrame(SubRun&, ProcessingFrame const&) final;
50  bool filterWithFrame(Event&, ProcessingFrame const&) final;
51 
52  virtual void beginJob();
53  virtual void endJob();
54  virtual void respondToOpenInputFile(FileBlock const&);
55  virtual void respondToCloseInputFile(FileBlock const&);
56  virtual void respondToOpenOutputFiles(FileBlock const&);
57  virtual void respondToCloseOutputFiles(FileBlock const&);
58  virtual bool beginRun(Run&);
59  virtual bool endRun(Run&);
60  virtual bool beginSubRun(SubRun&);
61  virtual bool endSubRun(SubRun&);
62  virtual bool filter(Event&) = 0;
63  };
64 
65 } // namespace art
66 
67 #endif /* art_Framework_Core_EDFilter_h */
68 
69 // Local Variables:
70 // mode: c++
71 // End:
base_engine_t & createEngine(seed_t seed)
void beginJobWithFrame(ProcessingFrame const &) final
Definition: EDFilter.cc:51
virtual void respondToOpenOutputFiles(FileBlock const &)
Definition: EDFilter.cc:111
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDFilter.cc:30
virtual bool beginRun(Run &)
Definition: EDFilter.cc:119
EDFilter(Table< Config > const &config)
Definition: EDFilter.h:27
std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp) final
Definition: EDFilter.cc:11
std::set< std::string > const & sharedResources() const
Definition: SharedModule.cc:28
bool beginRunWithFrame(Run &, ProcessingFrame const &) final
Definition: EDFilter.cc:63
virtual bool filter(Event &)=0
void setupQueues(detail::SharedResources const &resources) final
Definition: EDFilter.cc:17
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDFilter.cc:44
Definition: Run.h:37
bool endSubRunWithFrame(SubRun &, ProcessingFrame const &) final
Definition: EDFilter.cc:81
virtual bool beginSubRun(SubRun &)
Definition: EDFilter.cc:131
bool endRunWithFrame(Run &, ProcessingFrame const &) final
Definition: EDFilter.cc:69
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDFilter.cc:23
virtual void respondToCloseInputFile(FileBlock const &)
Definition: EDFilter.cc:107
ScheduleID scheduleID() const noexcept
Definition: LegacyModule.cc:12
virtual void beginJob()
Definition: EDFilter.cc:95
auto const & get_PSet() const
Definition: ProducerTable.h:47
virtual bool endSubRun(SubRun &)
Definition: EDFilter.cc:137
virtual void respondToCloseOutputFiles(FileBlock const &)
Definition: EDFilter.cc:115
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: EDFilter.cc:37
EDFilter(fhicl::ParameterSet const &pset)
Definition: EDFilter.cc:6
virtual void endJob()
Definition: EDFilter.cc:99
Definition: MVAAlg.h:12
virtual bool endRun(Run &)
Definition: EDFilter.cc:125
hep::concurrency::SerialTaskQueueChain * serialTaskQueueChain() const
Definition: SharedModule.cc:22
bool filterWithFrame(Event &, ProcessingFrame const &) final
Definition: EDFilter.cc:87
void endJobWithFrame(ProcessingFrame const &) final
Definition: EDFilter.cc:57
virtual void respondToOpenInputFile(FileBlock const &)
Definition: EDFilter.cc:103
bool beginSubRunWithFrame(SubRun &, ProcessingFrame const &) final
Definition: EDFilter.cc:75