CMS 3D CMS Logo

implementors.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_global_implementors_h
2 #define FWCore_Framework_global_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 <cstddef>
23 #include <memory>
24 #include <mutex>
25 #include <string>
26 #include <tuple>
27 #include <utility>
28 #include <vector>
29 
30 // user include files
47 
48 // forward declarations
49 namespace edm {
50 
51  class WaitingTaskWithArenaHolder;
52  class ServiceWeakToken;
53  class ActivityRegistry;
54 
55  namespace global {
56  namespace impl {
57  class EmptyType {};
58 
59  template <typename T, typename C>
60  class StreamCacheHolder : public virtual T {
61  public:
62  StreamCacheHolder() = default;
65  ~StreamCacheHolder() override {
66  for (auto c : caches_) {
67  delete c;
68  }
69  }
70 
71  protected:
72  C* streamCache(edm::StreamID iID) const { return caches_[iID.value()]; }
73 
74  private:
75  void preallocStreams(unsigned int iNStreams) final { caches_.resize(iNStreams, static_cast<C*>(nullptr)); }
76  void doBeginStream_(StreamID id) final { caches_[id.value()] = beginStream(id).release(); }
77  void doEndStream_(StreamID id) final {
78  endStream(id);
79  delete caches_[id.value()];
80  caches_[id.value()] = nullptr;
81  }
82  void doStreamBeginRun_(StreamID id, Run const& rp, EventSetup const& c) final { streamBeginRun(id, rp, c); }
83  void doStreamEndRun_(StreamID id, Run const& rp, EventSetup const& c) final { streamEndRun(id, rp, c); }
84  void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c) final {
85  streamBeginLuminosityBlock(id, lbp, c);
86  }
87  void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const& lbp, EventSetup const& c) final {
88  streamEndLuminosityBlock(id, lbp, c);
89  }
90 
91  virtual std::unique_ptr<C> beginStream(edm::StreamID) const = 0;
92  virtual void streamBeginRun(edm::StreamID, edm::Run const&, edm::EventSetup const&) const {}
94  edm::LuminosityBlock const&,
95  edm::EventSetup const&) const {}
97  edm::LuminosityBlock const&,
98  edm::EventSetup const&) const {}
99  virtual void streamEndRun(edm::StreamID, edm::Run const&, edm::EventSetup const&) const {}
100  virtual void endStream(edm::StreamID) const {}
101 
102  //When threaded we will have a container for N items whre N is # of streams
103  std::vector<C*> caches_;
104  };
105 
106  template <typename T, typename... CacheTypes>
107  class InputProcessBlockCacheHolder : public virtual T {
108  public:
109  InputProcessBlockCacheHolder() = default;
113 
114  std::tuple<CacheHandle<CacheTypes>...> processBlockCaches(Event const& event) const {
116  }
117 
118  template <std::size_t ICacheType, typename DataType, typename Func>
120  cacheImpl_.template registerProcessBlockCacheFiller<ICacheType, DataType, Func>(token,
121  std::forward<Func>(func));
122  }
123 
124  template <typename CacheType, typename DataType, typename Func>
126  cacheImpl_.template registerProcessBlockCacheFiller<CacheType, DataType, Func>(token,
127  std::forward<Func>(func));
128  }
129 
130  // This is intended for use by Framework unit tests only
131  unsigned int cacheSize() const { return cacheImpl_.cacheSize(); }
132 
133  private:
134  void doSelectInputProcessBlocks(ProductRegistry const& productRegistry,
135  ProcessBlockHelperBase const& processBlockHelperBase) final {
136  cacheImpl_.selectInputProcessBlocks(productRegistry, processBlockHelperBase, *this);
137  }
138 
139  void doAccessInputProcessBlock_(ProcessBlock const& pb) final {
140  cacheImpl_.accessInputProcessBlock(pb);
142  }
143 
144  // Alternate method to access ProcessBlocks without using the caches
145  // Mostly intended for unit testing, but might have other uses...
146  virtual void accessInputProcessBlock(ProcessBlock const&) {}
147 
148  void clearInputProcessBlockCaches() final { cacheImpl_.clearCaches(); }
149 
151  };
152 
153  template <typename T, typename C>
154  class RunCacheHolder : public virtual T {
155  public:
156  RunCacheHolder() = default;
157  RunCacheHolder(RunCacheHolder<T, C> const&) = delete;
159  ~RunCacheHolder() noexcept(false) override{};
160 
161  protected:
162  void preallocRuns(unsigned int iNRuns) final { caches_.reset(new std::shared_ptr<C>[iNRuns]); }
163 
164  C const* runCache(edm::RunIndex iID) const { return caches_[iID].get(); }
165 
166  private:
167  void doBeginRun_(Run const& rp, EventSetup const& c) final { caches_[rp.index()] = globalBeginRun(rp, c); }
168  void doEndRun_(Run const& rp, EventSetup const& c) final {
169  globalEndRun(rp, c);
170  caches_[rp.index()].reset();
171  }
172 
173  virtual std::shared_ptr<C> globalBeginRun(edm::Run const&, edm::EventSetup const&) const = 0;
174  virtual void globalEndRun(edm::Run const&, edm::EventSetup const&) const = 0;
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:
181  LuminosityBlockCacheHolder() = default;
184  ~LuminosityBlockCacheHolder() noexcept(false) override{};
185 
186  protected:
187  void preallocLumis(unsigned int iNLumis) final { caches_.reset(new std::shared_ptr<C>[iNLumis]); }
188 
189  C const* luminosityBlockCache(edm::LuminosityBlockIndex iID) const { return caches_[iID].get(); }
190 
191  private:
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  std::unique_ptr<std::shared_ptr<C>[]> caches_;
204  };
205 
206  template <typename T, typename C>
208 
209  template <typename T, typename C>
210  class RunSummaryCacheHolder : public virtual T {
211  public:
212  RunSummaryCacheHolder() = default;
215  ~RunSummaryCacheHolder() noexcept(false) override{};
216 
217  private:
218  void preallocRunsSummary(unsigned int iNRuns) final { caches_.reset(new std::shared_ptr<C>[iNRuns]); }
219 
220  friend class EndRunSummaryProducer<T, C>;
221 
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() = default;
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:
309  BeginProcessBlockProducer() = default;
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() = default;
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() = default;
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() = default;
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() = default;
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:
385  BeginLuminosityBlockProducer() = default;
388  ~BeginLuminosityBlockProducer() noexcept(false) override{};
389 
390  private:
393  };
394 
395  template <typename T>
396  class EndLuminosityBlockProducer : public virtual T {
397  public:
398  EndLuminosityBlockProducer() = default;
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:
415 
416  private:
420  }
421 
422  virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock&, edm::EventSetup const&, S const*) const = 0;
423 
424  // Do nothing because the cache is cleared in doEndLuminosityBlockProduce_
425  void maybeClearCache(LuminosityBlock const&) final {}
426  };
427 
428  template <typename T>
429  class ExternalWork : public virtual T {
430  public:
431  ExternalWork() = default;
432  ExternalWork(ExternalWork const&) = delete;
433  ExternalWork& operator=(ExternalWork const&) = delete;
434  ~ExternalWork() noexcept(false) override{};
435 
436  private:
437  bool hasAcquire() const noexcept override { return true; }
438 
440 
441  virtual void acquire(StreamID, Event const&, edm::EventSetup const&, WaitingTaskWithArenaHolder) const = 0;
442  };
443 
444  template <typename T>
445  class Accumulator : public virtual T {
446  public:
447  Accumulator() = default;
448  Accumulator(Accumulator const&) = delete;
449  Accumulator& operator=(Accumulator const&) = delete;
450  ~Accumulator() noexcept(false) override{};
451 
452  private:
453  bool hasAccumulator() const noexcept override { return true; }
454 
455  void produce(StreamID streamID, Event& ev, EventSetup const& es) const final { accumulate(streamID, ev, es); }
456 
457  virtual void accumulate(StreamID streamID, Event const& ev, EventSetup const& es) const = 0;
458  };
459 
460  template <typename T>
461  class Transformer : public virtual T, private TransformerBase {
462  public:
463  Transformer() = default;
464  Transformer(Transformer const&) = delete;
465  Transformer& operator=(Transformer const&) = delete;
466  ~Transformer() noexcept(false) override{};
467 
468  template <typename G, typename F>
470  F&& iF,
471  std::string productInstance = std::string()) {
472  registerTransform(edm::EDPutTokenT<G>(iSetter), std::forward<F>(iF), std::move(productInstance));
473  }
474 
475  template <typename G, typename F>
476  void registerTransform(edm::EDPutTokenT<G> iToken, F iF, std::string productInstance = std::string()) {
477  using ReturnTypeT = decltype(iF(std::declval<G>()));
478  TypeID returnType(typeid(ReturnTypeT));
480  *this,
481  EDPutToken(iToken),
482  returnType,
483  std::move(productInstance),
484  [f = std::move(iF)](std::any const& iGotProduct) {
485  auto pGotProduct = std::any_cast<edm::WrapperBase const*>(iGotProduct);
486  return std::make_unique<edm::Wrapper<ReturnTypeT>>(
487  WrapperBase::Emplace{}, f(*static_cast<edm::Wrapper<G> const*>(pGotProduct)->product()));
488  });
489  }
490 
491  template <typename G, typename P, typename F>
493  P iPre,
494  F iF,
495  std::string productInstance = std::string()) {
496  using CacheTypeT = decltype(iPre(std::declval<G>(), WaitingTaskWithArenaHolder()));
497  using ReturnTypeT = decltype(iF(std::declval<CacheTypeT>()));
498  TypeID returnType(typeid(ReturnTypeT));
500  *this,
501  EDPutToken(iToken),
502  returnType,
503  std::move(productInstance),
504  [p = std::move(iPre)](edm::WrapperBase const& iGotProduct, WaitingTaskWithArenaHolder iHolder) {
505  return std::any(p(*static_cast<edm::Wrapper<G> const&>(iGotProduct).product(), std::move(iHolder)));
506  },
507  [f = std::move(iF)](std::any const& iCache) {
508  return std::make_unique<edm::Wrapper<ReturnTypeT>>(WrapperBase::Emplace{},
509  f(std::any_cast<CacheTypeT>(iCache)));
510  });
511  }
512 
513  private:
514  size_t transformIndex_(edm::BranchDescription const& iBranch) const noexcept final {
515  return TransformerBase::findMatchingIndex(*this, iBranch);
516  }
517  ProductResolverIndex transformPrefetch_(std::size_t iIndex) const noexcept final {
518  return TransformerBase::prefetchImp(iIndex);
519  }
521  std::size_t iIndex,
523  edm::ActivityRegistry* iAct,
524  ServiceWeakToken const& iToken) const noexcept final {
525  return TransformerBase::transformImpAsync(std::move(iTask), iIndex, iAct, *this, iEvent);
526  }
527  void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const& iHelper) override {
528  if (iBranchType == InEvent) {
529  TransformerBase::extendUpdateLookup(*this, this->moduleDescription(), iHelper);
530  }
531  }
532  };
533  } // namespace impl
534  } // namespace global
535 } // namespace edm
536 
537 #endif
void preallocLumisSummary(unsigned int iNLumis) final
Definition: implementors.h:258
void doBeginLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
~Transformer() noexcept(false) override
Definition: implementors.h:466
EndLuminosityBlockSummaryProducer & operator=(EndLuminosityBlockSummaryProducer const &)=delete
InputProcessBlockCacheHolder & operator=(InputProcessBlockCacheHolder const &)=delete
~LuminosityBlockSummaryCacheHolder() noexcept(false) override
Definition: implementors.h:255
unsigned int ProductResolverIndex
void registerTransform(edm::EDPutTokenT< G > iToken, F iF, std::string productInstance=std::string())
Definition: implementors.h:476
size_t transformIndex_(edm::BranchDescription const &iBranch) const noexcept final
Definition: implementors.h:514
void doEndRunProduce_(Run &rp, EventSetup const &c) final
~EndRunProducer() noexcept(false) override
Definition: implementors.h:354
virtual void globalEndRun(edm::Run const &, edm::EventSetup const &) const =0
void preallocRunsSummary(unsigned int iNRuns) final
Definition: implementors.h:218
StreamCacheHolder< T, C > & operator=(StreamCacheHolder< T, C > const &)=delete
virtual void accumulate(StreamID streamID, Event const &ev, EventSetup const &es) const =0
void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const &iHelper) override
Definition: implementors.h:527
virtual void streamEndRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const
Definition: implementors.h:99
void doEndLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
RunCacheHolder< T, C > & operator=(RunCacheHolder< T, C > const &)=delete
~EndRunSummaryProducer() noexcept(false) override
Definition: implementors.h:368
virtual void globalBeginRunProduce(edm::Run &, edm::EventSetup const &) const =0
~BeginProcessBlockProducer() noexcept(false) override
Definition: implementors.h:312
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:37
void doBeginRunProduce_(Run &rp, EventSetup const &c) final
static std::mutex mutex
Definition: Proxy.cc:8
void registerTransform(ProductRegistryHelper::BranchAliasSetterT< G > iSetter, F &&iF, std::string productInstance=std::string())
Definition: implementors.h:469
void maybeClearCache(LuminosityBlock const &) final
Definition: implementors.h:425
void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c) final
Definition: implementors.h:87
virtual void acquire(StreamID, Event const &, edm::EventSetup const &, WaitingTaskWithArenaHolder) const =0
void transformAsync_(WaitingTaskHolder iTask, std::size_t iIndex, edm::EventForTransformer &iEvent, edm::ActivityRegistry *iAct, ServiceWeakToken const &iToken) const noexcept final
Definition: implementors.h:520
~EndLuminosityBlockProducer() noexcept(false) override
Definition: implementors.h:401
C * streamCache(edm::StreamID iID) const
Definition: implementors.h:72
~EndProcessBlockProducer() noexcept(false) override
Definition: implementors.h:326
EndProcessBlockProducer & operator=(EndProcessBlockProducer const &)=delete
void selectInputProcessBlocks(ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase, EDConsumerBase const &edConsumerBase)
ExternalWork & operator=(ExternalWork const &)=delete
void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:225
void maybeClearCache(Run const &) final
Definition: implementors.h:379
void doBeginLuminosityBlockSummary_(edm::LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:262
virtual std::shared_ptr< C > globalBeginLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &) const =0
WatchProcessBlock & operator=(WatchProcessBlock const &)=delete
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:175
void doEndRunSummary_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:230
~Accumulator() noexcept(false) override
Definition: implementors.h:450
virtual void globalEndRunProduce(edm::Run &, edm::EventSetup const &, C const *) const =0
virtual void globalBeginLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &) const =0
virtual void endProcessBlockProduce(edm::ProcessBlock &)=0
virtual void streamEndRunSummary(StreamID, edm::Run const &, edm::EventSetup const &, C *) const =0
virtual std::unique_ptr< C > beginStream(edm::StreamID) const =0
BranchType
Definition: BranchType.h:11
EndRunProducer & operator=(EndRunProducer const &)=delete
virtual void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const =0
virtual void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, C *) const =0
~BeginRunProducer() noexcept(false) override
Definition: implementors.h:340
void preallocStreams(unsigned int iNStreams) final
Definition: implementors.h:75
void doEndStream_(StreamID id) final
Definition: implementors.h:77
~RunSummaryCacheHolder() noexcept(false) override
Definition: implementors.h:215
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:286
virtual void beginProcessBlockProduce(edm::ProcessBlock &)=0
void doEndRunProduce_(Run &rp, EventSetup const &c) final
Definition: implementors.h:371
void doBeginProcessBlock_(ProcessBlock const &) final
bool hasAccumulator() const noexcept override
Definition: implementors.h:453
int iEvent
Definition: GenABIO.cc:224
virtual std::shared_ptr< C > globalBeginRun(edm::Run const &, edm::EventSetup const &) const =0
Transformer & operator=(Transformer const &)=delete
EndRunSummaryProducer & operator=(EndRunSummaryProducer const &)=delete
void doEndProcessBlock_(ProcessBlock const &) final
EndLuminosityBlockProducer & operator=(EndLuminosityBlockProducer const &)=delete
edm::TypeWithDict returnType(const edm::FunctionWithDict &)
Definition: returnType.cc:16
void doAcquire_(StreamID, Event const &, edm::EventSetup const &, WaitingTaskWithArenaHolder &) final
void extendUpdateLookup(ProducerBase const &, ModuleDescription const &iModuleDesc, ProductResolverIndexHelper const &iHelper)
virtual void streamEndLuminosityBlockSummary(StreamID, edm::LuminosityBlock const &, edm::EventSetup const &, C *) const =0
C const * luminosityBlockCache(edm::LuminosityBlockIndex iID) const
Definition: implementors.h:189
LuminosityBlockCacheHolder< T, C > & operator=(LuminosityBlockCacheHolder< T, C > const &)=delete
void doEndRun_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:168
void doBeginProcessBlockProduce_(ProcessBlock &) final
void registerTransformAsync(edm::EDPutTokenT< G > iToken, P iPre, F iF, std::string productInstance=std::string())
Definition: implementors.h:492
double f[11][100]
virtual void maybeClearCache(Run const &rp)
Definition: implementors.h:240
virtual void beginProcessBlock(ProcessBlock const &)
Definition: implementors.h:302
bool hasAcquire() const noexcept override
Definition: implementors.h:437
virtual void streamEndLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const
Definition: implementors.h:96
virtual void endStream(edm::StreamID) const
Definition: implementors.h:100
~RunCacheHolder() noexcept(false) override
Definition: implementors.h:159
LuminosityBlockSummaryCacheHolder< T, C > & operator=(LuminosityBlockSummaryCacheHolder< T, C > const &)=delete
BeginLuminosityBlockProducer & operator=(BeginLuminosityBlockProducer const &)=delete
Accumulator & operator=(Accumulator const &)=delete
virtual std::shared_ptr< C > globalBeginRunSummary(edm::Run const &, edm::EventSetup const &) const =0
C const * runCache(edm::RunIndex iID) const
Definition: implementors.h:164
void doEndLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
Definition: implementors.h:417
void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:83
void doBeginLuminosityBlock_(LuminosityBlock const &lp, EventSetup const &c) final
Definition: implementors.h:192
RunSummaryCacheHolder< T, C > & operator=(RunSummaryCacheHolder< T, C > const &)=delete
void doEndLuminosityBlock_(LuminosityBlock const &lp, EventSetup const &c) final
Definition: implementors.h:195
std::size_t findMatchingIndex(ProducerBase const &iBase, edm::BranchDescription const &) const noexcept
virtual void endProcessBlock(ProcessBlock const &)
Definition: implementors.h:303
virtual void globalEndRunProduce(edm::Run &, edm::EventSetup const &) const =0
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:203
void doSelectInputProcessBlocks(ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) final
Definition: implementors.h:134
void transformImpAsync(WaitingTaskHolder iTask, std::size_t iIndex, edm::ActivityRegistry *iAct, ProducerBase const &iBase, edm::EventForTransformer &) const noexcept
edm::impl::InputProcessBlockCacheImpl< CacheTypes... > cacheImpl_
Definition: implementors.h:150
~EndLuminosityBlockSummaryProducer() noexcept(false) override
Definition: implementors.h:414
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:242
void doEndProcessBlockProduce_(ProcessBlock &) final
void registerTransformAsyncImp(ProducerBase &, EDPutToken, const TypeID &id, std::string instanceName, PreTransformFunction, TransformFunction)
BeginRunProducer & operator=(BeginRunProducer const &)=delete
void doBeginRun_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:167
virtual void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const
Definition: implementors.h:93
void registerProcessBlockCacheFiller(EDGetTokenT< DataType > const &token, Func &&func)
Definition: implementors.h:119
virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &, S const *) const =0
void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c) final
Definition: implementors.h:84
std::pair< OmniClusterRef, TrackingParticleRef > P
virtual void maybeClearCache(LuminosityBlock const &lb)
Definition: implementors.h:284
virtual void streamBeginRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const
Definition: implementors.h:92
~LuminosityBlockCacheHolder() noexcept(false) override
Definition: implementors.h:184
virtual void globalEndRunSummary(edm::Run const &, edm::EventSetup const &, C *) const =0
LuminosityBlockIndex index() const
std::tuple< CacheHandle< CacheTypes >... > processBlockCaches(Event const &event) const
RunIndex index() const
Definition: Run.cc:28
HLT enums.
BeginProcessBlockProducer & operator=(BeginProcessBlockProducer const &)=delete
void preallocLumis(unsigned int iNLumis) final
Definition: implementors.h:187
void doBeginStream_(StreamID id) final
Definition: implementors.h:76
void doBeginRunSummary_(edm::Run const &rp, EventSetup const &c) final
Definition: implementors.h:222
~ExternalWork() noexcept(false) override
Definition: implementors.h:434
ProductResolverIndex transformPrefetch_(std::size_t iIndex) const noexcept final
Definition: implementors.h:517
unsigned int value() const
Definition: StreamID.h:43
void registerTransformImp(ProducerBase &, EDPutToken, const TypeID &id, std::string instanceName, TransformFunction)
void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:266
void doAccessInputProcessBlock_(ProcessBlock const &pb) final
Definition: implementors.h:139
std::tuple< CacheHandle< CacheTypes >... > processBlockCaches(Event const &event) const
Definition: implementors.h:114
static uInt32 F(BLOWFISH_CTX *ctx, uInt32 x)
Definition: blowfish.cc:163
virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock &, edm::EventSetup const &) const =0
~WatchProcessBlock() noexcept(false) override
Definition: implementors.h:296
virtual void accessInputProcessBlock(ProcessBlock const &)
Definition: implementors.h:146
long double T
ProductResolverIndex prefetchImp(std::size_t iIndex) const noexcept
~BeginLuminosityBlockProducer() noexcept(false) override
Definition: implementors.h:388
void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:270
void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:82
virtual std::shared_ptr< C > globalBeginLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const =0
def move(src, dest)
Definition: eostools.py:511
void produce(StreamID streamID, Event &ev, EventSetup const &es) const final
Definition: implementors.h:455
Definition: event.py:1
Definition: Run.h:45
void preallocRuns(unsigned int iNRuns) final
Definition: implementors.h:162