CMS 3D CMS Logo

implementors.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_one_implementors_h
2 #define FWCore_Framework_one_implementors_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : implementors
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Thu, 09 May 2013 18:40:17 GMT
19 //
20 
21 // system include files
22 #include <string>
23 #include <set>
24 
25 // user include files
27 
28 // forward declarations
29 
30 namespace edm {
32 
33  namespace one {
34  namespace impl {
35 
36  template<typename T>
37  class SharedResourcesUser : public virtual T {
38  public:
39  template< typename... Args>
40  SharedResourcesUser(Args... args) : T(args...) {}
43 
44  virtual ~SharedResourcesUser() {}
45 
46  protected:
47 
48  void usesResource(std::string const& iName);
49  void usesResource();
50  private:
52  std::set<std::string> resourceNames_;
53  };
54 
55  template <typename T>
56  class RunWatcher : public virtual T {
57  public:
58  RunWatcher() = default;
59  RunWatcher(RunWatcher const&) = delete;
60  RunWatcher& operator=(RunWatcher const&) = delete;
62 
63  private:
64  void doBeginRun_(Run const& rp, EventSetup const& c) override final;
65  void doEndRun_(Run const& rp, EventSetup const& c) override final;
66 
67 
68  virtual void beginRun(edm::Run const&, edm::EventSetup const&) = 0;
69  virtual void endRun(edm::Run const&, edm::EventSetup const&) = 0;
70  };
71 
72  template <typename T>
73  class LuminosityBlockWatcher : public virtual T {
74  public:
75  LuminosityBlockWatcher() = default;
79 
80  private:
81  void doBeginLuminosityBlock_(LuminosityBlock const& rp, EventSetup const& c) override final;
82  void doEndLuminosityBlock_(LuminosityBlock const& rp, EventSetup const& c) override final;
83 
84  virtual void beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) = 0;
85  virtual void endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) = 0;
86  };
87 
88  template <typename T>
89  class BeginRunProducer : public virtual T {
90  public:
91  BeginRunProducer() = default;
92  BeginRunProducer( BeginRunProducer const&) = delete;
95 
96  private:
97  void doBeginRunProduce_(Run& rp, EventSetup const& c) override final;
98 
99  virtual void beginRunProduce(edm::Run&, edm::EventSetup const&) = 0;
100  };
101 
102  template <typename T>
103  class EndRunProducer : public virtual T {
104  public:
105  EndRunProducer() = default;
106  EndRunProducer( EndRunProducer const&) = delete;
107  EndRunProducer& operator=(EndRunProducer const&) = delete;
109 
110  private:
111 
112  void doEndRunProduce_(Run& rp, EventSetup const& c) override final;
113 
114  virtual void endRunProduce(edm::Run&, edm::EventSetup const&) = 0;
115  };
116 
117  template <typename T>
118  class BeginLuminosityBlockProducer : public virtual T {
119  public:
120  BeginLuminosityBlockProducer() = default;
124 
125  private:
126  void doBeginLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c) override final;
127 
128  virtual void beginLuminosityBlockProduce(edm::LuminosityBlock&, edm::EventSetup const&) = 0;
129  };
130 
131  template <typename T>
132  class EndLuminosityBlockProducer : public virtual T {
133  public:
134  EndLuminosityBlockProducer() = default;
138 
139  private:
140  void doEndLuminosityBlockProduce_(LuminosityBlock& lbp, EventSetup const& c) override final;
141 
142  virtual void endLuminosityBlockProduce(edm::LuminosityBlock&, edm::EventSetup const&) = 0;
143  };
144  }
145  }
146 }
147 
148 #endif
SharedResourcesUser & operator=(SharedResourcesUser const &)=delete
#define noexcept
~RunWatcher() noexcept(false)
Definition: implementors.h:61
~EndRunProducer() noexcept(false)
Definition: implementors.h:108
SharedResourcesAcquirer createAcquirer() override
std::set< std::string > resourceNames_
Definition: implementors.h:52
HLT enums.
~BeginRunProducer() noexcept(false)
Definition: implementors.h:94
long double T
Definition: Run.h:42