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