CMS 3D CMS Logo

implementors.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_stream_implementors_h
2 #define FWCore_Framework_stream_implementors_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : implementors
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Fri, 02 Aug 2013 11:52:34 GMT
19 //
20 
21 // system include files
22 #include <memory>
23 
24 // user include files
30 
31 // forward declarations
32 namespace edm {
33 
34  class WaitingTaskWithArenaHolder;
35 
36  namespace stream {
37  namespace impl {
38  class EmptyType {};
39 
40  template <typename C>
42  public:
43  GlobalCacheHolder() = default;
44  GlobalCacheHolder(GlobalCacheHolder<C> const&) = delete;
45  GlobalCacheHolder<C>& operator=(GlobalCacheHolder<C> const&) = delete;
46 
47  void setGlobalCache(C const* iCache) { cache_ = iCache; }
48 
49  protected:
50  C const* globalCache() const { return cache_; }
51 
52  private:
53  C const* cache_;
54  };
55 
56  template <typename C>
58  public:
59  RunCacheHolder() = default;
60  RunCacheHolder(RunCacheHolder<C> const&) = delete;
61  RunCacheHolder<C>& operator=(RunCacheHolder<C> const&) = delete;
62  void setRunCache(C const* iCache) { cache_ = iCache; }
63 
64  protected:
65  C const* runCache() const { return cache_; }
66 
67  private:
68  C const* cache_;
69  };
70 
71  template <typename C>
73  public:
74  LuminosityBlockCacheHolder() = default;
77  void setLuminosityBlockCache(C const* iCache) { cache_ = iCache; }
78 
79  protected:
80  C const* luminosityBlockCache() const { return cache_; }
81 
82  private:
83  C const* cache_;
84  };
85 
86  template <typename C>
88  public:
89  RunSummaryCacheHolder() = default;
91  RunSummaryCacheHolder<C>& operator=(RunSummaryCacheHolder<C> const&) = delete;
93 
94  private:
95  virtual void endRunSummary(edm::Run const&, edm::EventSetup const&, C*) const = 0;
96  };
97 
98  template <typename C>
100  public:
105 
106  private:
107  virtual void endLuminosityBlockSummary(edm::LuminosityBlock const&, edm::EventSetup const&, C*) const = 0;
108  };
109 
111  public:
112  BeginRunProducer() = default;
113  BeginRunProducer(BeginRunProducer const&) = delete;
114  BeginRunProducer& operator=(BeginRunProducer const&) = delete;
115 
118  };
119 
121  public:
122  EndRunProducer() = default;
123  EndRunProducer(EndRunProducer const&) = delete;
124  EndRunProducer& operator=(EndRunProducer const&) = delete;
125 
126  private:
129  };
130 
132  public:
133  BeginLuminosityBlockProducer() = default;
136 
137  private:
140  };
141 
143  public:
144  EndLuminosityBlockProducer() = default;
146  EndLuminosityBlockProducer& operator=(EndLuminosityBlockProducer const&) = delete;
147 
148  private:
151  };
152 
153  class ExternalWork {
154  public:
155  ExternalWork() = default;
156  ExternalWork(ExternalWork const&) = delete;
157  ExternalWork& operator=(ExternalWork const&) = delete;
159 
160  virtual void acquire(Event const&, edm::EventSetup const&, WaitingTaskWithArenaHolder) = 0;
161  };
162 
163  class Accumulator : public EDProducerBase {
164  public:
165  Accumulator() = default;
166  Accumulator(Accumulator const&) = delete;
167  Accumulator& operator=(Accumulator const&) = delete;
168  ~Accumulator() noexcept(false) override{};
169 
170  virtual void accumulate(Event const& ev, EventSetup const& es) = 0;
171 
172  void produce(Event& ev, EventSetup const& es) final { accumulate(ev, es); }
173  };
174  } // namespace impl
175  } // namespace stream
176 } // namespace edm
177 
178 #endif
bool ev
void setGlobalCache(C const *iCache)
Definition: implementors.h:47
~Accumulator()(false) override
Definition: implementors.h:168
void setRunCache(C const *iCache)
Definition: implementors.h:62
#define noexcept
HLT enums.
void produce(Event &ev, EventSetup const &es) final
Definition: implementors.h:172
Definition: Run.h:45