LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
SharedFilter.h
Go to the documentation of this file.
1 #ifndef art_Framework_Core_SharedFilter_h
2 #define art_Framework_Core_SharedFilter_h
3 // vim: set sw=2 expandtab :
4 
11 #include "fhiclcpp/ParameterSet.h"
12 
13 #include <string>
14 
15 namespace art {
16 
18  public:
20 
21  protected:
22  explicit SharedFilter(fhicl::ParameterSet const& pset);
23 
24  template <typename Config>
25  explicit SharedFilter(Table<Config> const& config)
26  : SharedFilter{config.get_PSet()}
27  {}
28 
29  private:
30  std::unique_ptr<Worker> doMakeWorker(WorkerParams const& wp) final;
31  void setupQueues(detail::SharedResources const& resources) final;
32  void beginJobWithFrame(ProcessingFrame const&) final;
33  void endJobWithFrame(ProcessingFrame const&) final;
35  ProcessingFrame const&) final;
37  ProcessingFrame const&) final;
39  ProcessingFrame const&) final;
41  ProcessingFrame const&) final;
42  bool beginRunWithFrame(Run&, ProcessingFrame const&) final;
43  bool endRunWithFrame(Run&, ProcessingFrame const&) final;
44  bool beginSubRunWithFrame(SubRun&, ProcessingFrame const&) final;
45  bool endSubRunWithFrame(SubRun&, ProcessingFrame const&) final;
46  bool filterWithFrame(Event&, ProcessingFrame const&) final;
47 
48  virtual void beginJob(ProcessingFrame const&);
49  virtual void endJob(ProcessingFrame const&);
50  virtual void respondToOpenInputFile(FileBlock const&,
51  ProcessingFrame const&);
52  virtual void respondToCloseInputFile(FileBlock const&,
53  ProcessingFrame const&);
54  virtual void respondToOpenOutputFiles(FileBlock const&,
55  ProcessingFrame const&);
56  virtual void respondToCloseOutputFiles(FileBlock const&,
57  ProcessingFrame const&);
58  virtual void beginRun(Run&, ProcessingFrame const&);
59  virtual void endRun(Run&, ProcessingFrame const&);
60  virtual void beginSubRun(SubRun&, ProcessingFrame const&);
61  virtual void endSubRun(SubRun&, ProcessingFrame const&);
62  virtual bool filter(Event&, ProcessingFrame const&) = 0;
63  };
64 
65 } // namespace art
66 
67 #endif /* art_Framework_Core_SharedFilter_h */
68 
69 // Local Variables:
70 // mode: c++
71 // End:
bool endSubRunWithFrame(SubRun &, ProcessingFrame const &) final
Definition: SharedFilter.cc:84
virtual void respondToOpenInputFile(FileBlock const &, ProcessingFrame const &)
bool filterWithFrame(Event &, ProcessingFrame const &) final
Definition: SharedFilter.cc:91
virtual void endSubRun(SubRun &, ProcessingFrame const &)
bool beginRunWithFrame(Run &, ProcessingFrame const &) final
Definition: SharedFilter.cc:63
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: SharedFilter.cc:30
void endJobWithFrame(ProcessingFrame const &) final
Definition: SharedFilter.cc:57
SharedFilter(fhicl::ParameterSet const &pset)
Definition: SharedFilter.cc:6
SharedFilter(Table< Config > const &config)
Definition: SharedFilter.h:25
virtual void endJob(ProcessingFrame const &)
Definition: Run.h:37
virtual void respondToOpenOutputFiles(FileBlock const &, ProcessingFrame const &)
void beginJobWithFrame(ProcessingFrame const &) final
Definition: SharedFilter.cc:51
bool endRunWithFrame(Run &, ProcessingFrame const &) final
Definition: SharedFilter.cc:70
virtual void respondToCloseOutputFiles(FileBlock const &, ProcessingFrame const &)
virtual void respondToCloseInputFile(FileBlock const &, ProcessingFrame const &)
virtual void endRun(Run &, ProcessingFrame const &)
void setupQueues(detail::SharedResources const &resources) final
Definition: SharedFilter.cc:17
virtual void beginRun(Run &, ProcessingFrame const &)
auto const & get_PSet() const
Definition: ProducerTable.h:47
std::unique_ptr< Worker > doMakeWorker(WorkerParams const &wp) final
Definition: SharedFilter.cc:11
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: SharedFilter.cc:37
virtual void beginSubRun(SubRun &, ProcessingFrame const &)
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: SharedFilter.cc:23
Definition: MVAAlg.h:12
bool beginSubRunWithFrame(SubRun &, ProcessingFrame const &) final
Definition: SharedFilter.cc:77
virtual void beginJob(ProcessingFrame const &)
Definition: SharedFilter.cc:98
virtual bool filter(Event &, ProcessingFrame const &)=0
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) final
Definition: SharedFilter.cc:44