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:
22 
23  std::string workerType() const;
24 
25  explicit ReplicatedFilter(fhicl::ParameterSet const& pset,
26  ProcessingFrame const& frame)
27  : detail::Filter{pset}
28  , detail::EngineCreator{pset.get<std::string>("module_label"),
29  frame.scheduleID()}
30  {}
31 
32  template <typename Config>
34  ProcessingFrame const& frame)
35  : ReplicatedFilter{config.get_PSet(), frame}
36  {}
37 
39 
40  private:
41  void setupQueues(detail::SharedResources const&) override final;
42  void beginJobWithFrame(ProcessingFrame const&) override final;
43  void endJobWithFrame(ProcessingFrame const&) override final;
45  ProcessingFrame const&) override final;
47  FileBlock const&,
48  ProcessingFrame const&) override final;
50  FileBlock const&,
51  ProcessingFrame const&) override final;
53  FileBlock const&,
54  ProcessingFrame const&) override final;
55  bool beginRunWithFrame(Run&, ProcessingFrame const&) override final;
56  bool endRunWithFrame(Run&, ProcessingFrame const&) override final;
57  bool beginSubRunWithFrame(SubRun&, ProcessingFrame const&) override final;
58  bool endSubRunWithFrame(SubRun&, ProcessingFrame const&) override final;
59  bool filterWithFrame(Event&, ProcessingFrame const&) override final;
60 
61  virtual void beginJob(ProcessingFrame const&);
62  virtual void endJob(ProcessingFrame const&);
63  virtual void respondToOpenInputFile(FileBlock const&,
64  ProcessingFrame const&);
65  virtual void respondToCloseInputFile(FileBlock const&,
66  ProcessingFrame const&);
67  virtual void respondToOpenOutputFiles(FileBlock const&,
68  ProcessingFrame const&);
69  virtual void respondToCloseOutputFiles(FileBlock const&,
70  ProcessingFrame const&);
71  virtual void beginRun(Run const&, ProcessingFrame const&);
72  virtual void endRun(Run const&, ProcessingFrame const&);
73  virtual void beginSubRun(SubRun const&, ProcessingFrame const&);
74  virtual void endSubRun(SubRun const&, ProcessingFrame const&);
75  virtual bool filter(Event&, ProcessingFrame const&) = 0;
76  };
77 
78 } // namespace art
79 
80 #endif /* art_Framework_Core_ReplicatedFilter_h */
81 
82 // Local Variables:
83 // mode: c++
84 // End:
base_engine_t & createEngine(seed_t seed)
bool endRunWithFrame(Run &, ProcessingFrame const &) override final
std::string string
Definition: nybbler.cc:12
void setupQueues(detail::SharedResources const &) override final
bool beginSubRunWithFrame(SubRun &, ProcessingFrame const &) override final
bool beginRunWithFrame(Run &, ProcessingFrame const &) override final
void respondToOpenOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override 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:17
std::string workerType() const
bool filterWithFrame(Event &, ProcessingFrame const &) override final
virtual void beginRun(Run const &, ProcessingFrame const &)
static Config * config
Definition: config.cpp:1054
void respondToCloseInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
virtual void respondToCloseInputFile(FileBlock const &, ProcessingFrame const &)
virtual void endJob(ProcessingFrame const &)
void respondToOpenInputFileWithFrame(FileBlock const &, ProcessingFrame const &) override final
void beginJobWithFrame(ProcessingFrame const &) override final
auto const & get_PSet() const
Definition: ProducerTable.h:47
void respondToCloseOutputFilesWithFrame(FileBlock const &, ProcessingFrame const &) override final
bool endSubRunWithFrame(SubRun &, ProcessingFrame const &) override final
virtual void beginSubRun(SubRun const &, ProcessingFrame const &)
ReplicatedFilter(fhicl::ParameterSet const &pset, ProcessingFrame const &frame)
virtual void beginJob(ProcessingFrame const &)
void endJobWithFrame(ProcessingFrame const &) override final
virtual void respondToOpenOutputFiles(FileBlock const &, ProcessingFrame const &)
virtual void respondToCloseOutputFiles(FileBlock const &, ProcessingFrame const &)
virtual void endRun(Run const &, ProcessingFrame const &)
virtual bool filter(Event &, ProcessingFrame const &)=0