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;
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;
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;
92  virtual ~RunSummaryCacheHolder() noexcept(false) {}
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;
147 
148  private:
151  };
152 
153  class ExternalWork {
154  public:
155  ExternalWork() = default;
156  ExternalWork(ExternalWork const&) = delete;
157  ExternalWork& operator=(ExternalWork const&) = delete;
158  virtual ~ExternalWork() noexcept(false){};
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
edm::stream::impl::LuminosityBlockSummaryCacheHolder::LuminosityBlockSummaryCacheHolder
LuminosityBlockSummaryCacheHolder()=default
edm::stream::impl::GlobalCacheHolder::cache_
C const * cache_
Definition: implementors.h:53
edm::stream::impl::BeginRunProducer::operator=
BeginRunProducer & operator=(BeginRunProducer const &)=delete
funct::false
false
Definition: Factorize.h:34
edm::stream::impl::RunSummaryCacheHolder::~RunSummaryCacheHolder
virtual ~RunSummaryCacheHolder() noexcept(false)
Definition: implementors.h:92
edm::stream::impl::EndRunProducer::EndRunProducer
EndRunProducer()=default
edm::stream::impl::RunCacheHolder::setRunCache
void setRunCache(C const *iCache)
Definition: implementors.h:62
edm::stream::impl::RunCacheHolder::cache_
C const * cache_
Definition: implementors.h:68
edm::LuminosityBlock
Definition: LuminosityBlock.h:50
edm::Run
Definition: Run.h:45
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::stream::impl::ExternalWork::operator=
ExternalWork & operator=(ExternalWork const &)=delete
edm::stream::impl::RunSummaryCacheHolder
Definition: implementors.h:87
cms::cuda::stream
cudaStream_t stream
Definition: HistoContainer.h:57
edm::stream::EDProducerBase
Definition: EDProducerBase.h:44
edm::stream::impl::GlobalCacheHolder::GlobalCacheHolder
GlobalCacheHolder()=default
edm::stream::impl::ExternalWork::~ExternalWork
virtual ~ExternalWork() noexcept(false)
Definition: implementors.h:158
edm::stream::impl::LuminosityBlockCacheHolder::LuminosityBlockCacheHolder
LuminosityBlockCacheHolder()=default
edm::stream::impl::RunSummaryCacheHolder::operator=
RunSummaryCacheHolder< C > & operator=(RunSummaryCacheHolder< C > const &)=delete
edm::stream::impl::LuminosityBlockSummaryCacheHolder::endLuminosityBlockSummary
virtual void endLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, C *) const =0
edm::stream::impl::BeginRunProducer::BeginRunProducer
BeginRunProducer()=default
edm::stream::impl::BeginLuminosityBlockProducer
Definition: implementors.h:131
edm::stream::impl::RunSummaryCacheHolder::endRunSummary
virtual void endRunSummary(edm::Run const &, edm::EventSetup const &, C *) const =0
edm::stream::impl::RunCacheHolder::RunCacheHolder
RunCacheHolder()=default
edm::WaitingTaskWithArenaHolder
Definition: WaitingTaskWithArenaHolder.h:31
edm::stream::impl::LuminosityBlockSummaryCacheHolder::~LuminosityBlockSummaryCacheHolder
virtual ~LuminosityBlockSummaryCacheHolder() noexcept(false)
Definition: implementors.h:104
edm::stream::impl::EndRunProducer::operator=
EndRunProducer & operator=(EndRunProducer const &)=delete
edm::stream::impl::ExternalWork::ExternalWork
ExternalWork()=default
edm::stream::impl::EndLuminosityBlockProducer::EndLuminosityBlockProducer
EndLuminosityBlockProducer()=default
edm::stream::impl::LuminosityBlockCacheHolder
Definition: implementors.h:72
edm::stream::impl::BeginLuminosityBlockProducer::operator=
BeginLuminosityBlockProducer & operator=(BeginLuminosityBlockProducer const &)=delete
edm::stream::impl::GlobalCacheHolder::setGlobalCache
void setGlobalCache(C const *iCache)
Definition: implementors.h:47
edm::stream::impl::Accumulator::operator=
Accumulator & operator=(Accumulator const &)=delete
edm::stream::impl::Accumulator::produce
void produce(Event &ev, EventSetup const &es) final
Definition: implementors.h:172
edm::stream::impl::LuminosityBlockSummaryCacheHolder::operator=
LuminosityBlockSummaryCacheHolder< C > & operator=(LuminosityBlockSummaryCacheHolder< C > const &)=delete
edm::stream::impl::GlobalCacheHolder::operator=
GlobalCacheHolder< C > & operator=(GlobalCacheHolder< C > const &)=delete
RunIndex.h
edm::stream::impl::GlobalCacheHolder
Definition: implementors.h:41
edm::stream::impl::EndLuminosityBlockProducer
Definition: implementors.h:142
edm::stream::impl::ExternalWork::acquire
virtual void acquire(Event const &, edm::EventSetup const &, WaitingTaskWithArenaHolder)=0
edm::stream::impl::LuminosityBlockSummaryCacheHolder
Definition: implementors.h:99
edm::EventSetup
Definition: EventSetup.h:57
edm::stream::impl::EndLuminosityBlockProducer::operator=
EndLuminosityBlockProducer & operator=(EndLuminosityBlockProducer const &)=delete
edm::stream::impl::LuminosityBlockCacheHolder::operator=
LuminosityBlockCacheHolder< C > & operator=(LuminosityBlockCacheHolder< C > const &)=delete
edm::stream::impl::RunCacheHolder
Definition: implementors.h:57
edm::stream::impl::LuminosityBlockCacheHolder::setLuminosityBlockCache
void setLuminosityBlockCache(C const *iCache)
Definition: implementors.h:77
impl
Definition: trackAlgoPriorityOrder.h:18
gen::C
C
Definition: PomwigHadronizer.cc:76
Frameworkfwd.h
edm::stream::impl::Accumulator::accumulate
virtual void accumulate(Event const &ev, EventSetup const &es)=0
ev
bool ev
Definition: Hydjet2Hadronizer.cc:95
edm::stream::impl::Accumulator::~Accumulator
~Accumulator() noexcept(false) override
Definition: implementors.h:168
edm::stream::impl::ExternalWork
Definition: implementors.h:153
edm::stream::impl::EmptyType
Definition: implementors.h:38
EDProducerBase.h
LuminosityBlockIndex.h
edm::stream::impl::RunCacheHolder::runCache
C const * runCache() const
Definition: implementors.h:65
edm::stream::impl::GlobalCacheHolder::globalCache
C const * globalCache() const
Definition: implementors.h:50
edm::stream::impl::LuminosityBlockCacheHolder::cache_
C const * cache_
Definition: implementors.h:83
edm::stream::impl::BeginLuminosityBlockProducer::BeginLuminosityBlockProducer
BeginLuminosityBlockProducer()=default
edm::stream::impl::RunCacheHolder::operator=
RunCacheHolder< C > & operator=(RunCacheHolder< C > const &)=delete
edm::Event
Definition: Event.h:73
StreamID.h
edm::stream::impl::RunSummaryCacheHolder::RunSummaryCacheHolder
RunSummaryCacheHolder()=default
edm::stream::impl::LuminosityBlockCacheHolder::luminosityBlockCache
C const * luminosityBlockCache() const
Definition: implementors.h:80
edm::stream::impl::BeginRunProducer
Definition: implementors.h:110
edm::stream::impl::Accumulator::Accumulator
Accumulator()=default
edm::stream::impl::EndRunProducer
Definition: implementors.h:120
edm::stream::impl::Accumulator
Definition: implementors.h:163