CMS 3D CMS Logo

implementors.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_limited_implementors_h
2 #define FWCore_Framework_limited_implementors_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : implementors
7 //
16 //
17 // Original Author: Chris Jones
18 // Created: Thu, 18 Jul 2013 11:52:34 GMT
19 //
20 
21 // system include files
22 #include <memory>
23 #include <mutex>
24 #include <string>
25 #include <tuple>
26 #include <utility>
27 #include <vector>
28 
29 // user include files
46 
47 // forward declarations
48 namespace edm {
49  class ServiceWeakToken;
50 
51  namespace limited {
52  namespace impl {
53  class EmptyType {
54  public:
56  };
57 
58  template <typename T, typename C>
59  class StreamCacheHolder : public virtual T {
60  public:
61  StreamCacheHolder(edm::ParameterSet const& iPSet) : T(iPSet) {}
64  ~StreamCacheHolder() override {
65  for (auto c : caches_) {
66  delete c;
67  }
68  }
69 
70  protected:
71  C* streamCache(edm::StreamID iID) const { return caches_[iID.value()]; }
72 
73  private:
74  void preallocStreams(unsigned int iNStreams) final { caches_.resize(iNStreams, static_cast<C*>(nullptr)); }
75  void doBeginStream_(StreamID id) final { caches_[id.value()] = beginStream(id).release(); }
76  void doEndStream_(StreamID id) final {
77  endStream(id);
78  delete caches_[id.value()];
79  caches_[id.value()] = nullptr;
80  }
81  void doStreamBeginRun_(StreamID id, Run const& rp, EventSetup const& c) final { streamBeginRun(id, rp, c); }
82  void doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) final { streamEndRun(id, rp, c); }
83  void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c) final {
84  streamBeginLuminosityBlock(id, lbp, c);
85  }
86  void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c) final {
87  streamEndLuminosityBlock(id, lbp, c);
88  }
89 
90  virtual std::unique_ptr<C> beginStream(edm::StreamID) const = 0;
91  virtual void streamBeginRun(edm::StreamID, edm::Run const&, edm::EventSetup const&) const {}
93  edm::LuminosityBlock const&,
94  edm::EventSetup const&) const {}
96  edm::LuminosityBlock const&,
97  edm::EventSetup const&) const {}
98  virtual void streamEndRun(edm::StreamID, edm::Run const&, edm::EventSetup const&) const {}
99  virtual void endStream(edm::StreamID) const {}
100 
101  //When threaded we will have a container for N items whre N is # of streams
102  std::vector<C*> caches_;
103  };
104 
105  template <typename T, typename... CacheTypes>
106  class InputProcessBlockCacheHolder : public virtual T {
107  public:
111  ~InputProcessBlockCacheHolder() noexcept(false) override {}
112 
113  std::tuple<CacheHandle<CacheTypes>...> processBlockCaches(Event const& event) const {
114  return cacheImpl_.processBlockCaches(event);
115  }
116 
117  template <std::size_t ICacheType, typename DataType, typename Func>
119  cacheImpl_.template registerProcessBlockCacheFiller<ICacheType, DataType, Func>(token,
120  std::forward<Func>(func));
121  }
122 
123  template <typename CacheType, typename DataType, typename Func>
125  cacheImpl_.template registerProcessBlockCacheFiller<CacheType, DataType, Func>(token,
126  std::forward<Func>(func));
127  }
128 
129  // This is intended for use by Framework unit tests only
130  unsigned int cacheSize() const { return cacheImpl_.cacheSize(); }
131 
132  private:
133  void doSelectInputProcessBlocks(ProductRegistry const& productRegistry,
134  ProcessBlockHelperBase const& processBlockHelperBase) final {
135  cacheImpl_.selectInputProcessBlocks(productRegistry, processBlockHelperBase, *this);
136  }
137 
138  void doAccessInputProcessBlock_(ProcessBlock const& pb) final {
139  cacheImpl_.accessInputProcessBlock(pb);
141  }
142 
143  // Alternate method to access ProcessBlocks without using the caches
144  // Mostly intended for unit testing, but might have other uses...
145  virtual void accessInputProcessBlock(ProcessBlock const&) {}
146 
147  void clearInputProcessBlockCaches() final { cacheImpl_.clearCaches(); }
148 
150  };
151 
152  template <typename T, typename C>
153  class RunCacheHolder : public virtual T {
154  public:
155  RunCacheHolder(edm::ParameterSet const& iPSet) : T(iPSet) {}
156  RunCacheHolder(RunCacheHolder<T, C> const&) = delete;
158  ~RunCacheHolder() noexcept(false) override{};
159 
160  protected:
161  void preallocRuns(unsigned int iNRuns) final { caches_.reset(new std::shared_ptr<C>[iNRuns]); }
162 
163  C const* runCache(edm::RunIndex iID) const { return caches_[iID].get(); }
164 
165  private:
166  void doBeginRun_(Run const& rp, EventSetup const& c) final { caches_[rp.index()] = globalBeginRun(rp, c); }
167  void doEndRun_(Run const& rp, EventSetup const& c) final {
168  globalEndRun(rp, c);
169  caches_[rp.index()].reset();
170  }
171 
172  virtual std::shared_ptr<C> globalBeginRun(edm::Run const&, edm::EventSetup const&) const = 0;
173  virtual void globalEndRun(edm::Run const&, edm::EventSetup const&) const = 0;
174 
175  std::unique_ptr<std::shared_ptr<C>[]> caches_;
176  };
177 
178  template <typename T, typename C>
179  class LuminosityBlockCacheHolder : public virtual T {
180  public:
184  ~LuminosityBlockCacheHolder() noexcept(false) override{};
185 
186  protected:
187  C const* luminosityBlockCache(edm::LuminosityBlockIndex iID) const { return caches_[iID].get(); }
188 
189  private:
190  void preallocLumis(unsigned int iNLumis) final { caches_.reset(new std::shared_ptr<C>[iNLumis]); }
191 
192  void doBeginLuminosityBlock_(LuminosityBlock const& lp, EventSetup const& c) final {
193  caches_[lp.index()] = globalBeginLuminosityBlock(lp, c);
194  }
195  void doEndLuminosityBlock_(LuminosityBlock const& lp, EventSetup const& c) final {
197  caches_[lp.index()].reset();
198  }
199 
200  virtual std::shared_ptr<C> globalBeginLuminosityBlock(edm::LuminosityBlock const&,
201  edm::EventSetup const&) const = 0;
202  virtual void globalEndLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) const = 0;
203 
204  std::unique_ptr<std::shared_ptr<C>[]> caches_;
205  };
206 
207  template <typename T, typename C>
209 
210  template <typename T, typename C>
211  class RunSummaryCacheHolder : public virtual T {
212  public:
213  RunSummaryCacheHolder(edm::ParameterSet const& iPSet) : T(iPSet) {}
216  ~RunSummaryCacheHolder() noexcept(false) override{};
217 
218  private:
219  void preallocRunsSummary(unsigned int iNRuns) final { caches_.reset(new std::shared_ptr<C>[iNRuns]); }
220 
221  friend class EndRunSummaryProducer<T, C>;
222  void doBeginRunSummary_(edm::Run const& rp, EventSetup const& c) final {
223  caches_[rp.index()] = globalBeginRunSummary(rp, c);
224  }
225  void doStreamEndRunSummary_(StreamID id, Run const& rp, EventSetup const& c) final {
226  //NOTE: in future this will need to be serialized
227  std::lock_guard<std::mutex> guard(mutex_);
228  streamEndRunSummary(id, rp, c, caches_[rp.index()].get());
229  }
230  void doEndRunSummary_(Run const& rp, EventSetup const& c) final {
231  globalEndRunSummary(rp, c, caches_[rp.index()].get());
232  maybeClearCache(rp);
233  }
234 
235  virtual std::shared_ptr<C> globalBeginRunSummary(edm::Run const&, edm::EventSetup const&) const = 0;
236  virtual void streamEndRunSummary(StreamID, edm::Run const&, edm::EventSetup const&, C*) const = 0;
237 
238  virtual void globalEndRunSummary(edm::Run const&, edm::EventSetup const&, C*) const = 0;
239 
240  virtual void maybeClearCache(Run const& rp) { caches_[rp.index()].reset(); }
241 
242  std::unique_ptr<std::shared_ptr<C>[]> caches_;
244  };
245 
246  template <typename T, typename C>
248 
249  template <typename T, typename C>
250  class LuminosityBlockSummaryCacheHolder : public virtual T {
251  public:
256 
257  private:
258  void preallocLumisSummary(unsigned int iNLumis) final { caches_.reset(new std::shared_ptr<C>[iNLumis]); }
259 
261 
263  caches_[lb.index()] = globalBeginLuminosityBlockSummary(lb, c);
264  }
265 
267  std::lock_guard<std::mutex> guard(mutex_);
268  streamEndLuminosityBlockSummary(id, lb, c, caches_[lb.index()].get());
269  }
271  globalEndLuminosityBlockSummary(lb, c, caches_[lb.index()].get());
272  maybeClearCache(lb);
273  }
274 
275  virtual std::shared_ptr<C> globalBeginLuminosityBlockSummary(edm::LuminosityBlock const&,
276  edm::EventSetup const&) const = 0;
278  edm::LuminosityBlock const&,
279  edm::EventSetup const&,
280  C*) const = 0;
281 
282  virtual void globalEndLuminosityBlockSummary(edm::LuminosityBlock const&, edm::EventSetup const&, C*) const = 0;
283 
284  virtual void maybeClearCache(LuminosityBlock const& lb) { caches_[lb.index()].reset(); }
285 
286  std::unique_ptr<std::shared_ptr<C>[]> caches_;
288  };
289 
290  template <typename T>
291  class WatchProcessBlock : public virtual T {
292  public:
293  WatchProcessBlock(edm::ParameterSet const& iPSet) : T(iPSet) {}
294  WatchProcessBlock(WatchProcessBlock const&) = delete;
296  ~WatchProcessBlock() noexcept(false) override{};
297 
298  private:
299  void doBeginProcessBlock_(ProcessBlock const&) final;
300  void doEndProcessBlock_(ProcessBlock const&) final;
301 
302  virtual void beginProcessBlock(ProcessBlock const&) {}
303  virtual void endProcessBlock(ProcessBlock const&) {}
304  };
305 
306  template <typename T>
307  class BeginProcessBlockProducer : public virtual T {
308  public:
312  ~BeginProcessBlockProducer() noexcept(false) override{};
313 
314  private:
316 
317  virtual void beginProcessBlockProduce(edm::ProcessBlock&) = 0;
318  };
319 
320  template <typename T>
321  class EndProcessBlockProducer : public virtual T {
322  public:
323  EndProcessBlockProducer(edm::ParameterSet const& iPSet) : T(iPSet) {}
326  ~EndProcessBlockProducer() noexcept(false) override{};
327 
328  private:
330 
331  virtual void endProcessBlockProduce(edm::ProcessBlock&) = 0;
332  };
333 
334  template <typename T>
335  class BeginRunProducer : public virtual T {
336  public:
337  BeginRunProducer(edm::ParameterSet const& iPSet) : T(iPSet) {}
338  BeginRunProducer(BeginRunProducer const&) = delete;
339  BeginRunProducer& operator=(BeginRunProducer const&) = delete;
340  ~BeginRunProducer() noexcept(false) override{};
341 
342  private:
343  void doBeginRunProduce_(Run& rp, EventSetup const& c) final;
344 
345  virtual void globalBeginRunProduce(edm::Run&, edm::EventSetup const&) const = 0;
346  };
347 
348  template <typename T>
349  class EndRunProducer : public virtual T {
350  public:
351  EndRunProducer(edm::ParameterSet const& iPSet) : T(iPSet) {}
352  EndRunProducer(EndRunProducer const&) = delete;
353  EndRunProducer& operator=(EndRunProducer const&) = delete;
354  ~EndRunProducer() noexcept(false) override{};
355 
356  private:
357  void doEndRunProduce_(Run& rp, EventSetup const& c) final;
358 
359  virtual void globalEndRunProduce(edm::Run&, edm::EventSetup const&) const = 0;
360  };
361 
362  template <typename T, typename C>
363  class EndRunSummaryProducer : public RunSummaryCacheHolder<T, C> {
364  public:
365  EndRunSummaryProducer(edm::ParameterSet const& iPSet) : T(iPSet), RunSummaryCacheHolder<T, C>(iPSet) {}
368  ~EndRunSummaryProducer() noexcept(false) override{};
369 
370  private:
371  void doEndRunProduce_(Run& rp, EventSetup const& c) final {
373  RunSummaryCacheHolder<T, C>::caches_[rp.index()].reset();
374  }
375 
376  virtual void globalEndRunProduce(edm::Run&, edm::EventSetup const&, C const*) const = 0;
377 
378  // Do nothing because the cache is cleared in doEndRunProduce_
379  void maybeClearCache(Run const&) final {}
380  };
381 
382  template <typename T>
383  class BeginLuminosityBlockProducer : public virtual T {
384  public:
388  ~BeginLuminosityBlockProducer() noexcept(false) override{};
389 
390  private:
393  };
394 
395  template <typename T>
396  class EndLuminosityBlockProducer : public virtual T {
397  public:
401  ~EndLuminosityBlockProducer() noexcept(false) override{};
402 
403  private:
406  };
407 
408  template <typename T, typename S>
409  class EndLuminosityBlockSummaryProducer : public LuminosityBlockSummaryCacheHolder<T, S> {
410  public:
412  : T(iPSet), LuminosityBlockSummaryCacheHolder<T, S>(iPSet) {}
416 
417  private:
421  }
422 
423  virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock&, edm::EventSetup const&, S const*) const = 0;
424 
425  // Do nothing because the cache is cleared in doEndLuminosityBlockProduce_
426  void maybeClearCache(LuminosityBlock const&) final {}
427  };
428 
429  template <typename T>
430  class Accumulator : public virtual T {
431  public:
432  Accumulator(edm::ParameterSet const& iPSet) : T(iPSet) {}
433  Accumulator() = default;
434  Accumulator(Accumulator const&) = delete;
435  Accumulator& operator=(Accumulator const&) = delete;
436  ~Accumulator() noexcept(false) override{};
437 
438  private:
439  bool hasAccumulator() const override { return true; }
440 
441  void produce(StreamID streamID, Event& ev, EventSetup const& es) const final { accumulate(streamID, ev, es); }
442 
443  virtual void accumulate(StreamID streamID, Event const& ev, EventSetup const& es) const = 0;
444  };
445 
446  template <typename T>
447  class Transformer : public virtual T, private TransformerBase {
448  public:
449  Transformer(edm::ParameterSet const& iPSet) : T(iPSet) {}
450  Transformer() = default;
451  Transformer(Transformer const&) = delete;
452  Transformer& operator=(Transformer const&) = delete;
453  ~Transformer() noexcept(false) override{};
454 
455  template <typename G, typename F>
457  F&& iF,
458  std::string productInstance = std::string()) {
459  registerTransform(edm::EDPutTokenT<G>(iSetter), std::forward<F>(iF), std::move(productInstance));
460  }
461 
462  template <typename G, typename F>
463  void registerTransform(edm::EDPutTokenT<G> iToken, F iF, std::string productInstance = std::string()) {
464  using ReturnTypeT = decltype(iF(std::declval<G>()));
465  TypeID returnType(typeid(ReturnTypeT));
467  *this,
468  EDPutToken(iToken),
469  returnType,
470  std::move(productInstance),
471  [f = std::move(iF)](std::any const& iGotProduct) {
472  auto pGotProduct = std::any_cast<edm::WrapperBase const*>(iGotProduct);
473  return std::make_unique<edm::Wrapper<ReturnTypeT>>(
474  WrapperBase::Emplace{}, f(*static_cast<edm::Wrapper<G> const*>(pGotProduct)->product()));
475  });
476  }
477 
478  template <typename G, typename P, typename F>
480  P iPre,
481  F iF,
482  std::string productInstance = std::string()) {
483  using CacheTypeT = decltype(iPre(std::declval<G>(), WaitingTaskWithArenaHolder()));
484  using ReturnTypeT = decltype(iF(std::declval<CacheTypeT>()));
485  TypeID returnType(typeid(ReturnTypeT));
487  *this,
488  EDPutToken(iToken),
489  returnType,
490  std::move(productInstance),
491  [p = std::move(iPre)](edm::WrapperBase const& iGotProduct, WaitingTaskWithArenaHolder iHolder) {
492  return std::any(p(*static_cast<edm::Wrapper<G> const&>(iGotProduct).product(), std::move(iHolder)));
493  },
494  [f = std::move(iF)](std::any const& iCache) {
495  auto cache = std::any_cast<CacheTypeT>(iCache);
496  return std::make_unique<edm::Wrapper<ReturnTypeT>>(WrapperBase::Emplace{}, f(cache));
497  });
498  }
499 
500  private:
501  size_t transformIndex_(edm::BranchDescription const& iBranch) const final {
502  return TransformerBase::findMatchingIndex(*this, iBranch);
503  }
504  ProductResolverIndex transformPrefetch_(std::size_t iIndex) const final {
505  return TransformerBase::prefetchImp(iIndex);
506  }
508  std::size_t iIndex,
510  ServiceWeakToken const& iToken) const final {
511  return TransformerBase::transformImpAsync(std::move(iTask), iIndex, *this, iEvent);
512  }
513  void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const& iHelper) override {
514  if (iBranchType == InEvent) {
515  TransformerBase::extendUpdateLookup(*this, this->moduleDescription(), iHelper);
516  }
517  }
518  };
519  } // namespace impl
520  } // namespace limited
521 } // namespace edm
522 
523 #endif
void transformImpAsync(WaitingTaskHolder iTask, std::size_t iIndex, ProducerBase const &iBase, edm::EventForTransformer &) const
void preallocLumisSummary(unsigned int iNLumis) final
Definition: implementors.h:258
~EndRunSummaryProducer() noexcept(false) override
Definition: implementors.h:368
virtual void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const =0
std::tuple< CacheHandle< CacheTypes >... > processBlockCaches(Event const &event) const
Definition: implementors.h:113
void transformAsync_(WaitingTaskHolder iTask, std::size_t iIndex, edm::EventForTransformer &iEvent, ServiceWeakToken const &iToken) const final
Definition: implementors.h:507
EndLuminosityBlockSummaryProducer & operator=(EndLuminosityBlockSummaryProducer const &)=delete
void doBeginLuminosityBlockSummary_(edm::LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:262
edm::impl::InputProcessBlockCacheImpl< CacheTypes... > cacheImpl_
Definition: implementors.h:149
virtual std::unique_ptr< C > beginStream(edm::StreamID) const =0
void doEndStream_(StreamID id) final
Definition: implementors.h:76
EndProcessBlockProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:323
virtual void endProcessBlockProduce(edm::ProcessBlock &)=0
void produce(StreamID streamID, Event &ev, EventSetup const &es) const final
Definition: implementors.h:441
void doEndRun_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:167
unsigned int ProductResolverIndex
BeginProcessBlockProducer & operator=(BeginProcessBlockProducer const &)=delete
~EndLuminosityBlockProducer() noexcept(false) override
Definition: implementors.h:401
LuminosityBlockCacheHolder< T, C > & operator=(LuminosityBlockCacheHolder< T, C > const &)=delete
StreamCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:61
ProductResolverIndex transformPrefetch_(std::size_t iIndex) const final
Definition: implementors.h:504
virtual void endStream(edm::StreamID) const
Definition: implementors.h:99
void doEndRunSummary_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:230
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
static std::mutex mutex
Definition: Proxy.cc:8
void preallocRunsSummary(unsigned int iNRuns) final
Definition: implementors.h:219
RunCacheHolder< T, C > & operator=(RunCacheHolder< T, C > const &)=delete
C const * runCache(edm::RunIndex iID) const
Definition: implementors.h:163
InputProcessBlockCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:108
void maybeClearCache(Run const &) final
Definition: implementors.h:379
WatchProcessBlock & operator=(WatchProcessBlock const &)=delete
Transformer(edm::ParameterSet const &iPSet)
Definition: implementors.h:449
Transformer & operator=(Transformer const &)=delete
EndRunProducer & operator=(EndRunProducer const &)=delete
virtual void streamEndLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const
Definition: implementors.h:95
virtual void streamEndRunSummary(StreamID, edm::Run const &, edm::EventSetup const &, C *) const =0
virtual void endProcessBlock(ProcessBlock const &)
Definition: implementors.h:303
void registerTransform(ProductRegistryHelper::BranchAliasSetterT< G > iSetter, F &&iF, std::string productInstance=std::string())
Definition: implementors.h:456
void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c) final
Definition: implementors.h:86
virtual void maybeClearCache(Run const &rp)
Definition: implementors.h:240
void doBeginRun_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:166
virtual void globalEndRun(edm::Run const &, edm::EventSetup const &) const =0
Accumulator & operator=(Accumulator const &)=delete
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:204
C const * luminosityBlockCache(edm::LuminosityBlockIndex iID) const
Definition: implementors.h:187
BeginLuminosityBlockProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:385
EndProcessBlockProducer & operator=(EndProcessBlockProducer const &)=delete
void doEndLuminosityBlock_(LuminosityBlock const &lp, EventSetup const &c) final
Definition: implementors.h:195
BeginProcessBlockProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:309
void doAccessInputProcessBlock_(ProcessBlock const &pb) final
Definition: implementors.h:138
~BeginLuminosityBlockProducer() noexcept(false) override
Definition: implementors.h:388
virtual void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, C *) const =0
void preallocStreams(unsigned int iNStreams) final
Definition: implementors.h:74
WatchProcessBlock(edm::ParameterSet const &iPSet)
Definition: implementors.h:293
~EndRunProducer() noexcept(false) override
Definition: implementors.h:354
LuminosityBlockSummaryCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:252
void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c) final
Definition: implementors.h:83
ProductResolverIndex prefetchImp(std::size_t iIndex) const
~RunCacheHolder() noexcept(false) override
Definition: implementors.h:158
BranchType
Definition: BranchType.h:11
virtual void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const
Definition: implementors.h:92
void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:82
~EndProcessBlockProducer() noexcept(false) override
Definition: implementors.h:326
void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:270
InputProcessBlockCacheHolder & operator=(InputProcessBlockCacheHolder const &)=delete
EndRunSummaryProducer & operator=(EndRunSummaryProducer const &)=delete
EndRunSummaryProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:365
EmptyType(edm::ParameterSet const &)
Definition: implementors.h:55
void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const &iHelper) override
Definition: implementors.h:513
LuminosityBlockCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:181
virtual void globalBeginLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &) const =0
virtual std::shared_ptr< C > globalBeginRun(edm::Run const &, edm::EventSetup const &) const =0
void preallocRuns(unsigned int iNRuns) final
Definition: implementors.h:161
BeginRunProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:337
int iEvent
Definition: GenABIO.cc:224
virtual void beginProcessBlockProduce(edm::ProcessBlock &)=0
virtual void globalEndRunSummary(edm::Run const &, edm::EventSetup const &, C *) const =0
RunCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:155
virtual std::shared_ptr< C > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const =0
edm::TypeWithDict returnType(const edm::FunctionWithDict &)
Definition: returnType.cc:16
virtual std::shared_ptr< C > globalBeginRunSummary(edm::Run const &, edm::EventSetup const &) const =0
void doBeginLuminosityBlock_(LuminosityBlock const &lp, EventSetup const &c) final
Definition: implementors.h:192
void extendUpdateLookup(ProducerBase const &, ModuleDescription const &iModuleDesc, ProductResolverIndexHelper const &iHelper)
RunSummaryCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:213
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:242
void doEndLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
BeginLuminosityBlockProducer & operator=(BeginLuminosityBlockProducer const &)=delete
StreamCacheHolder< T, C > & operator=(StreamCacheHolder< T, C > const &)=delete
virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &) const =0
void doEndProcessBlockProduce_(ProcessBlock &) final
virtual void streamBeginRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const
Definition: implementors.h:91
RunSummaryCacheHolder< T, C > & operator=(RunSummaryCacheHolder< T, C > const &)=delete
void doEndRunProduce_(Run &rp, EventSetup const &c) final
Definition: implementors.h:371
Accumulator(edm::ParameterSet const &iPSet)
Definition: implementors.h:432
double f[11][100]
EndRunProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:351
void doBeginProcessBlockProduce_(ProcessBlock &) final
void maybeClearCache(LuminosityBlock const &) final
Definition: implementors.h:426
virtual void streamEndLuminosityBlockSummary(StreamID, edm::LuminosityBlock const &, edm::EventSetup const &, C *) const =0
~LuminosityBlockCacheHolder() noexcept(false) override
Definition: implementors.h:184
void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:266
virtual void globalEndRunProduce(edm::Run &, edm::EventSetup const &) const =0
void registerTransform(edm::EDPutTokenT< G > iToken, F iF, std::string productInstance=std::string())
Definition: implementors.h:463
LuminosityBlockSummaryCacheHolder< T, C > & operator=(LuminosityBlockSummaryCacheHolder< T, C > const &)=delete
~Transformer() noexcept(false) override
Definition: implementors.h:453
virtual void accessInputProcessBlock(ProcessBlock const &)
Definition: implementors.h:145
void doBeginStream_(StreamID id) final
Definition: implementors.h:75
void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:225
EndLuminosityBlockSummaryProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:411
EndLuminosityBlockProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:398
~BeginRunProducer() noexcept(false) override
Definition: implementors.h:340
size_t transformIndex_(edm::BranchDescription const &iBranch) const final
Definition: implementors.h:501
~WatchProcessBlock() noexcept(false) override
Definition: implementors.h:296
void registerTransformAsyncImp(ProducerBase &, EDPutToken, const TypeID &id, std::string instanceName, PreTransformFunction, TransformFunction)
void registerProcessBlockCacheFiller(EDGetTokenT< DataType > const &token, Func &&func)
Definition: implementors.h:118
bool hasAccumulator() const override
Definition: implementors.h:439
void doSelectInputProcessBlocks(ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) final
Definition: implementors.h:133
~BeginProcessBlockProducer() noexcept(false) override
Definition: implementors.h:312
virtual void globalBeginRunProduce(edm::Run &, edm::EventSetup const &) const =0
std::pair< OmniClusterRef, TrackingParticleRef > P
~EndLuminosityBlockSummaryProducer() noexcept(false) override
Definition: implementors.h:415
virtual std::shared_ptr< C > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &) const =0
BeginRunProducer & operator=(BeginRunProducer const &)=delete
~RunSummaryCacheHolder() noexcept(false) override
Definition: implementors.h:216
void doBeginLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
void doEndLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
Definition: implementors.h:418
void registerTransformAsync(edm::EDPutTokenT< G > iToken, P iPre, F iF, std::string productInstance=std::string())
Definition: implementors.h:479
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:175
LuminosityBlockIndex index() const
C * streamCache(edm::StreamID iID) const
Definition: implementors.h:71
RunIndex index() const
Definition: Run.cc:28
void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:81
HLT enums.
virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &, S const *) const =0
void doBeginRunSummary_(edm::Run const &rp, EventSetup const &c) final
Definition: implementors.h:222
def cache(function)
Definition: utilities.py:3
virtual void globalEndRunProduce(edm::Run &, edm::EventSetup const &, C const *) const =0
~Accumulator() noexcept(false) override
Definition: implementors.h:436
virtual void streamEndRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const
Definition: implementors.h:98
virtual void maybeClearCache(LuminosityBlock const &lb)
Definition: implementors.h:284
unsigned int value() const
Definition: StreamID.h:43
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:286
void registerTransformImp(ProducerBase &, EDPutToken, const TypeID &id, std::string instanceName, TransformFunction)
~LuminosityBlockSummaryCacheHolder() noexcept(false) override
Definition: implementors.h:255
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
void doEndRunProduce_(Run &rp, EventSetup const &c) final
void doEndProcessBlock_(ProcessBlock const &) final
long double T
void doBeginRunProduce_(Run &rp, EventSetup const &c) final
virtual void beginProcessBlock(ProcessBlock const &)
Definition: implementors.h:302
~InputProcessBlockCacheHolder() noexcept(false) override
Definition: implementors.h:111
def move(src, dest)
Definition: eostools.py:511
EndLuminosityBlockProducer & operator=(EndLuminosityBlockProducer const &)=delete
Definition: event.py:1
Definition: Run.h:45
virtual void accumulate(StreamID streamID, Event const &ev, EventSetup const &es) const =0
void doBeginProcessBlock_(ProcessBlock const &) final
void preallocLumis(unsigned int iNLumis) final
Definition: implementors.h:190
std::size_t findMatchingIndex(ProducerBase const &iBase, edm::BranchDescription const &) const