LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
RPWorker.h
Go to the documentation of this file.
1 #ifndef art_Framework_Principal_RPWorker_h
2 #define art_Framework_Principal_RPWorker_h
3 // RPWorker
5 //
6 // "Worker"-style wrapper base class for ResultsProducers.
7 //
8 // Allows for access to particular parameters and module descriptions
9 // without their having to be passed via the ResultsProducer
10 // constructor.
12 
15 
16 namespace art {
17  class RPWorker;
18 
19  class ResultsProducer; // Forward declaration.
20 }
21 
23 public:
24  RPWorker(RPParams const& p);
25  virtual ~RPWorker() = default;
26 
28  ResultsProducer const& rp() const;
29 
30  RPParams const& params() const;
31  ModuleDescription const& moduleDescription() const;
32 
35 
36 private:
37  virtual ResultsProducer& rp_() = 0;
38  virtual ResultsProducer const& rp_() const = 0;
39 
42 };
43 
44 inline art::RPWorker::RPWorker(RPParams const& p) : p_(p), md_() {}
45 
48 {
49  return rp_();
50 }
51 
52 inline art::ResultsProducer const&
54 {
55  return rp_();
56 }
57 
58 inline art::RPParams const&
60 {
61  return p_;
62 }
63 
64 inline art::ModuleDescription const&
66 {
67  return md_;
68 }
69 
70 inline void
72 {
73  md_ = md;
74 }
75 
76 inline void
78 {
79  md_ = std::move(md);
80 }
81 
82 #endif /* art_Framework_Principal_RPWorker_h */
83 
84 // Local Variables:
85 // mode: c++
86 // End:
virtual ~RPWorker()=default
ModuleDescription const & moduleDescription() const
Definition: RPWorker.h:65
ModuleDescription md_
Definition: RPWorker.h:41
void setModuleDescription(ModuleDescription const &)
Definition: RPWorker.h:71
ResultsProducer & rp()
Definition: RPWorker.h:47
virtual ResultsProducer & rp_()=0
RPParams p_
Definition: RPWorker.h:40
RPWorker(RPParams const &p)
Definition: RPWorker.h:44
HLT enums.
RPParams const & params() const
Definition: RPWorker.h:59