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 
54  namespace global {
55  namespace impl {
56  class EmptyType {};
57 
58  template <typename T, typename C>
59  class StreamCacheHolder : public virtual T {
60  public:
61  StreamCacheHolder() = default;
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:
108  InputProcessBlockCacheHolder() = default;
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() = default;
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  std::unique_ptr<std::shared_ptr<C>[]> caches_;
175  };
176 
177  template <typename T, typename C>
178  class LuminosityBlockCacheHolder : public virtual T {
179  public:
180  LuminosityBlockCacheHolder() = default;
183  ~LuminosityBlockCacheHolder() noexcept(false) override{};
184 
185  protected:
186  void preallocLumis(unsigned int iNLumis) final { caches_.reset(new std::shared_ptr<C>[iNLumis]); }
187 
188  C const* luminosityBlockCache(edm::LuminosityBlockIndex iID) const { return caches_[iID].get(); }
189 
190  private:
191  void doBeginLuminosityBlock_(LuminosityBlock const& lp, EventSetup const& c) final {
192  caches_[lp.index()] = globalBeginLuminosityBlock(lp, c);
193  }
194  void doEndLuminosityBlock_(LuminosityBlock const& lp, EventSetup const& c) final {
196  caches_[lp.index()].reset();
197  }
198 
199  virtual std::shared_ptr<C> globalBeginLuminosityBlock(edm::LuminosityBlock const&,
200  edm::EventSetup const&) const = 0;
201  virtual void globalEndLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) const = 0;
202  std::unique_ptr<std::shared_ptr<C>[]> caches_;
203  };
204 
205  template <typename T, typename C>
207 
208  template <typename T, typename C>
209  class RunSummaryCacheHolder : public virtual T {
210  public:
211  RunSummaryCacheHolder() = default;
214  ~RunSummaryCacheHolder() noexcept(false) override{};
215 
216  private:
217  void preallocRunsSummary(unsigned int iNRuns) final { caches_.reset(new std::shared_ptr<C>[iNRuns]); }
218 
219  friend class EndRunSummaryProducer<T, C>;
220 
221  void doBeginRunSummary_(edm::Run const& rp, EventSetup const& c) final {
222  caches_[rp.index()] = globalBeginRunSummary(rp, c);
223  }
224  void doStreamEndRunSummary_(StreamID id, Run const& rp, EventSetup const& c) final {
225  //NOTE: in future this will need to be serialized
226  std::lock_guard<std::mutex> guard(mutex_);
227  streamEndRunSummary(id, rp, c, caches_[rp.index()].get());
228  }
229  void doEndRunSummary_(Run const& rp, EventSetup const& c) final {
230  globalEndRunSummary(rp, c, caches_[rp.index()].get());
231  maybeClearCache(rp);
232  }
233 
234  virtual std::shared_ptr<C> globalBeginRunSummary(edm::Run const&, edm::EventSetup const&) const = 0;
235  virtual void streamEndRunSummary(StreamID, edm::Run const&, edm::EventSetup const&, C*) const = 0;
236 
237  virtual void globalEndRunSummary(edm::Run const&, edm::EventSetup const&, C*) const = 0;
238 
239  virtual void maybeClearCache(Run const& rp) { caches_[rp.index()].reset(); }
240 
241  std::unique_ptr<std::shared_ptr<C>[]> caches_;
243  };
244 
245  template <typename T, typename C>
247 
248  template <typename T, typename C>
249  class LuminosityBlockSummaryCacheHolder : public virtual T {
250  public:
255 
256  private:
257  void preallocLumisSummary(unsigned int iNLumis) final { caches_.reset(new std::shared_ptr<C>[iNLumis]); }
258 
260 
262  caches_[lb.index()] = globalBeginLuminosityBlockSummary(lb, c);
263  }
264 
266  std::lock_guard<std::mutex> guard(mutex_);
267  streamEndLuminosityBlockSummary(id, lb, c, caches_[lb.index()].get());
268  }
270  globalEndLuminosityBlockSummary(lb, c, caches_[lb.index()].get());
271  maybeClearCache(lb);
272  }
273 
274  virtual std::shared_ptr<C> globalBeginLuminosityBlockSummary(edm::LuminosityBlock const&,
275  edm::EventSetup const&) const = 0;
277  edm::LuminosityBlock const&,
278  edm::EventSetup const&,
279  C*) const = 0;
280 
281  virtual void globalEndLuminosityBlockSummary(edm::LuminosityBlock const&, edm::EventSetup const&, C*) const = 0;
282 
283  virtual void maybeClearCache(LuminosityBlock const& lb) { caches_[lb.index()].reset(); }
284 
285  std::unique_ptr<std::shared_ptr<C>[]> caches_;
287  };
288 
289  template <typename T>
290  class WatchProcessBlock : public virtual T {
291  public:
292  WatchProcessBlock() = default;
293  WatchProcessBlock(WatchProcessBlock const&) = delete;
295  ~WatchProcessBlock() noexcept(false) override {}
296 
297  private:
298  void doBeginProcessBlock_(ProcessBlock const&) final;
299  void doEndProcessBlock_(ProcessBlock const&) final;
300 
301  virtual void beginProcessBlock(ProcessBlock const&) {}
302  virtual void endProcessBlock(ProcessBlock const&) {}
303  };
304 
305  template <typename T>
306  class BeginProcessBlockProducer : public virtual T {
307  public:
308  BeginProcessBlockProducer() = default;
311  ~BeginProcessBlockProducer() noexcept(false) override{};
312 
313  private:
315 
316  virtual void beginProcessBlockProduce(edm::ProcessBlock&) = 0;
317  };
318 
319  template <typename T>
320  class EndProcessBlockProducer : public virtual T {
321  public:
322  EndProcessBlockProducer() = default;
325  ~EndProcessBlockProducer() noexcept(false) override{};
326 
327  private:
329 
330  virtual void endProcessBlockProduce(edm::ProcessBlock&) = 0;
331  };
332 
333  template <typename T>
334  class BeginRunProducer : public virtual T {
335  public:
336  BeginRunProducer() = default;
337  BeginRunProducer(BeginRunProducer const&) = delete;
338  BeginRunProducer& operator=(BeginRunProducer const&) = delete;
339  ~BeginRunProducer() noexcept(false) override{};
340 
341  private:
342  void doBeginRunProduce_(Run& rp, EventSetup const& c) final;
343 
344  virtual void globalBeginRunProduce(edm::Run&, edm::EventSetup const&) const = 0;
345  };
346 
347  template <typename T>
348  class EndRunProducer : public virtual T {
349  public:
350  EndRunProducer() = default;
351  EndRunProducer(EndRunProducer const&) = delete;
352  EndRunProducer& operator=(EndRunProducer const&) = delete;
353  ~EndRunProducer() noexcept(false) override{};
354 
355  private:
356  void doEndRunProduce_(Run& rp, EventSetup const& c) final;
357 
358  virtual void globalEndRunProduce(edm::Run&, edm::EventSetup const&) const = 0;
359  };
360 
361  template <typename T, typename C>
362  class EndRunSummaryProducer : public RunSummaryCacheHolder<T, C> {
363  public:
364  EndRunSummaryProducer() = default;
367  ~EndRunSummaryProducer() noexcept(false) override{};
368 
369  private:
370  void doEndRunProduce_(Run& rp, EventSetup const& c) final {
372  RunSummaryCacheHolder<T, C>::caches_[rp.index()].reset();
373  }
374 
375  virtual void globalEndRunProduce(edm::Run&, edm::EventSetup const&, C const*) const = 0;
376 
377  // Do nothing because the cache is cleared in doEndRunProduce_
378  void maybeClearCache(Run const&) final {}
379  };
380 
381  template <typename T>
382  class BeginLuminosityBlockProducer : public virtual T {
383  public:
384  BeginLuminosityBlockProducer() = default;
387  ~BeginLuminosityBlockProducer() noexcept(false) override{};
388 
389  private:
392  };
393 
394  template <typename T>
395  class EndLuminosityBlockProducer : public virtual T {
396  public:
397  EndLuminosityBlockProducer() = default;
400  ~EndLuminosityBlockProducer() noexcept(false) override{};
401 
402  private:
405  };
406 
407  template <typename T, typename S>
408  class EndLuminosityBlockSummaryProducer : public LuminosityBlockSummaryCacheHolder<T, S> {
409  public:
414 
415  private:
419  }
420 
421  virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock&, edm::EventSetup const&, S const*) const = 0;
422 
423  // Do nothing because the cache is cleared in doEndLuminosityBlockProduce_
424  void maybeClearCache(LuminosityBlock const&) final {}
425  };
426 
427  template <typename T>
428  class ExternalWork : public virtual T {
429  public:
430  ExternalWork() = default;
431  ExternalWork(ExternalWork const&) = delete;
432  ExternalWork& operator=(ExternalWork const&) = delete;
433  ~ExternalWork() noexcept(false) override{};
434 
435  private:
436  bool hasAcquire() const override { return true; }
437 
439 
440  virtual void acquire(StreamID, Event const&, edm::EventSetup const&, WaitingTaskWithArenaHolder) const = 0;
441  };
442 
443  template <typename T>
444  class Accumulator : public virtual T {
445  public:
446  Accumulator() = default;
447  Accumulator(Accumulator const&) = delete;
448  Accumulator& operator=(Accumulator const&) = delete;
449  ~Accumulator() noexcept(false) override{};
450 
451  private:
452  bool hasAccumulator() const override { return true; }
453 
454  void produce(StreamID streamID, Event& ev, EventSetup const& es) const final { accumulate(streamID, ev, es); }
455 
456  virtual void accumulate(StreamID streamID, Event const& ev, EventSetup const& es) const = 0;
457  };
458 
459  template <typename T>
460  class Transformer : public virtual T, private TransformerBase {
461  public:
462  Transformer() = default;
463  Transformer(Transformer const&) = delete;
464  Transformer& operator=(Transformer const&) = delete;
465  ~Transformer() noexcept(false) override{};
466 
467  template <typename G, typename F>
469  F&& iF,
470  std::string productInstance = std::string()) {
471  registerTransform(edm::EDPutTokenT<G>(iSetter), std::forward<F>(iF), std::move(productInstance));
472  }
473 
474  template <typename G, typename F>
475  void registerTransform(edm::EDPutTokenT<G> iToken, F iF, std::string productInstance = std::string()) {
476  using ReturnTypeT = decltype(iF(std::declval<G>()));
477  TypeID returnType(typeid(ReturnTypeT));
479  *this,
480  EDPutToken(iToken),
481  returnType,
482  std::move(productInstance),
483  [f = std::move(iF)](std::any const& iGotProduct) {
484  auto pGotProduct = std::any_cast<edm::WrapperBase const*>(iGotProduct);
485  return std::make_unique<edm::Wrapper<ReturnTypeT>>(
486  WrapperBase::Emplace{}, f(*static_cast<edm::Wrapper<G> const*>(pGotProduct)->product()));
487  });
488  }
489 
490  template <typename G, typename P, typename F>
492  P iPre,
493  F iF,
494  std::string productInstance = std::string()) {
495  using CacheTypeT = decltype(iPre(std::declval<G>(), WaitingTaskWithArenaHolder()));
496  using ReturnTypeT = decltype(iF(std::declval<CacheTypeT>()));
497  TypeID returnType(typeid(ReturnTypeT));
499  *this,
500  EDPutToken(iToken),
501  returnType,
502  std::move(productInstance),
503  [p = std::move(iPre)](edm::WrapperBase const& iGotProduct, WaitingTaskWithArenaHolder iHolder) {
504  return std::any(p(*static_cast<edm::Wrapper<G> const&>(iGotProduct).product(), std::move(iHolder)));
505  },
506  [f = std::move(iF)](std::any const& iCache) {
507  return std::make_unique<edm::Wrapper<ReturnTypeT>>(WrapperBase::Emplace{},
508  f(std::any_cast<CacheTypeT>(iCache)));
509  });
510  }
511 
512  private:
513  size_t transformIndex_(edm::BranchDescription const& iBranch) const final {
514  return TransformerBase::findMatchingIndex(*this, iBranch);
515  }
516  ProductResolverIndex transformPrefetch_(std::size_t iIndex) const final {
517  return TransformerBase::prefetchImp(iIndex);
518  }
520  std::size_t iIndex,
522  ServiceWeakToken const& iToken) const final {
523  return TransformerBase::transformImpAsync(std::move(iTask), iIndex, *this, iEvent);
524  }
525  void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const& iHelper) override {
526  if (iBranchType == InEvent) {
527  TransformerBase::extendUpdateLookup(*this, this->moduleDescription(), iHelper);
528  }
529  }
530  };
531  } // namespace impl
532  } // namespace global
533 } // namespace edm
534 
535 #endif
void preallocLumisSummary(unsigned int iNLumis) final
Definition: implementors.h:257
void transformImpAsync(WaitingTaskHolder iTask, std::size_t iIndex, ProducerBase const &iBase, edm::EventForTransformer &) const
void doBeginLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
~Transformer() noexcept(false) override
Definition: implementors.h:465
bool hasAcquire() const override
Definition: implementors.h:436
EndLuminosityBlockSummaryProducer & operator=(EndLuminosityBlockSummaryProducer const &)=delete
InputProcessBlockCacheHolder & operator=(InputProcessBlockCacheHolder const &)=delete
~LuminosityBlockSummaryCacheHolder() noexcept(false) override
Definition: implementors.h:254
unsigned int ProductResolverIndex
void registerTransform(edm::EDPutTokenT< G > iToken, F iF, std::string productInstance=std::string())
Definition: implementors.h:475
void doEndRunProduce_(Run &rp, EventSetup const &c) final
~EndRunProducer() noexcept(false) override
Definition: implementors.h:353
virtual void globalEndRun(edm::Run const &, edm::EventSetup const &) const =0
void preallocRunsSummary(unsigned int iNRuns) final
Definition: implementors.h:217
StreamCacheHolder< T, C > & operator=(StreamCacheHolder< T, C > const &)=delete
ProductResolverIndex transformPrefetch_(std::size_t iIndex) const final
Definition: implementors.h:516
virtual void accumulate(StreamID streamID, Event const &ev, EventSetup const &es) const =0
void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const &iHelper) override
Definition: implementors.h:525
virtual void streamEndRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const
Definition: implementors.h:98
void doEndLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
RunCacheHolder< T, C > & operator=(RunCacheHolder< T, C > const &)=delete
~EndRunSummaryProducer() noexcept(false) override
Definition: implementors.h:367
virtual void globalBeginRunProduce(edm::Run &, edm::EventSetup const &) const =0
~BeginProcessBlockProducer() noexcept(false) override
Definition: implementors.h:311
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:468
void maybeClearCache(LuminosityBlock const &) final
Definition: implementors.h:424
void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c) final
Definition: implementors.h:86
virtual void acquire(StreamID, Event const &, edm::EventSetup const &, WaitingTaskWithArenaHolder) const =0
~EndLuminosityBlockProducer() noexcept(false) override
Definition: implementors.h:400
C * streamCache(edm::StreamID iID) const
Definition: implementors.h:71
~EndProcessBlockProducer() noexcept(false) override
Definition: implementors.h:325
EndProcessBlockProducer & operator=(EndProcessBlockProducer const &)=delete
ExternalWork & operator=(ExternalWork const &)=delete
void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:224
void maybeClearCache(Run const &) final
Definition: implementors.h:378
void doBeginLuminosityBlockSummary_(edm::LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:261
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:174
void doEndRunSummary_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:229
~Accumulator() noexcept(false) override
Definition: implementors.h:449
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
ProductResolverIndex prefetchImp(std::size_t iIndex) const
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:339
void preallocStreams(unsigned int iNStreams) final
Definition: implementors.h:74
void doEndStream_(StreamID id) final
Definition: implementors.h:76
~RunSummaryCacheHolder() noexcept(false) override
Definition: implementors.h:214
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:285
virtual void beginProcessBlockProduce(edm::ProcessBlock &)=0
void doEndRunProduce_(Run &rp, EventSetup const &c) final
Definition: implementors.h:370
void doBeginProcessBlock_(ProcessBlock const &) final
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:188
LuminosityBlockCacheHolder< T, C > & operator=(LuminosityBlockCacheHolder< T, C > const &)=delete
void doEndRun_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:167
void doBeginProcessBlockProduce_(ProcessBlock &) final
void registerTransformAsync(edm::EDPutTokenT< G > iToken, P iPre, F iF, std::string productInstance=std::string())
Definition: implementors.h:491
double f[11][100]
virtual void maybeClearCache(Run const &rp)
Definition: implementors.h:239
virtual void beginProcessBlock(ProcessBlock const &)
Definition: implementors.h:301
virtual void streamEndLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const
Definition: implementors.h:95
virtual void endStream(edm::StreamID) const
Definition: implementors.h:99
~RunCacheHolder() noexcept(false) override
Definition: implementors.h:158
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:163
void doEndLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
Definition: implementors.h:416
void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:82
void doBeginLuminosityBlock_(LuminosityBlock const &lp, EventSetup const &c) final
Definition: implementors.h:191
size_t transformIndex_(edm::BranchDescription const &iBranch) const final
Definition: implementors.h:513
RunSummaryCacheHolder< T, C > & operator=(RunSummaryCacheHolder< T, C > const &)=delete
void doEndLuminosityBlock_(LuminosityBlock const &lp, EventSetup const &c) final
Definition: implementors.h:194
bool hasAccumulator() const override
Definition: implementors.h:452
virtual void endProcessBlock(ProcessBlock const &)
Definition: implementors.h:302
virtual void globalEndRunProduce(edm::Run &, edm::EventSetup const &) const =0
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:202
void doSelectInputProcessBlocks(ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) final
Definition: implementors.h:133
edm::impl::InputProcessBlockCacheImpl< CacheTypes... > cacheImpl_
Definition: implementors.h:149
~EndLuminosityBlockSummaryProducer() noexcept(false) override
Definition: implementors.h:413
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:241
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:166
virtual void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const
Definition: implementors.h:92
void registerProcessBlockCacheFiller(EDGetTokenT< DataType > const &token, Func &&func)
Definition: implementors.h:118
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:83
std::pair< OmniClusterRef, TrackingParticleRef > P
virtual void maybeClearCache(LuminosityBlock const &lb)
Definition: implementors.h:283
virtual void streamBeginRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const
Definition: implementors.h:91
~LuminosityBlockCacheHolder() noexcept(false) override
Definition: implementors.h:183
virtual void globalEndRunSummary(edm::Run const &, edm::EventSetup const &, C *) const =0
LuminosityBlockIndex index() const
void transformAsync_(WaitingTaskHolder iTask, std::size_t iIndex, edm::EventForTransformer &iEvent, ServiceWeakToken const &iToken) const final
Definition: implementors.h:519
RunIndex index() const
Definition: Run.cc:28
HLT enums.
BeginProcessBlockProducer & operator=(BeginProcessBlockProducer const &)=delete
void preallocLumis(unsigned int iNLumis) final
Definition: implementors.h:186
void doBeginStream_(StreamID id) final
Definition: implementors.h:75
void doBeginRunSummary_(edm::Run const &rp, EventSetup const &c) final
Definition: implementors.h:221
~ExternalWork() noexcept(false) override
Definition: implementors.h:433
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:265
void doAccessInputProcessBlock_(ProcessBlock const &pb) final
Definition: implementors.h:138
std::tuple< CacheHandle< CacheTypes >... > processBlockCaches(Event const &event) const
Definition: implementors.h:113
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:295
virtual void accessInputProcessBlock(ProcessBlock const &)
Definition: implementors.h:145
long double T
~BeginLuminosityBlockProducer() noexcept(false) override
Definition: implementors.h:387
void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:269
void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:81
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:454
Definition: event.py:1
Definition: Run.h:45
void preallocRuns(unsigned int iNRuns) final
Definition: implementors.h:161
std::size_t findMatchingIndex(ProducerBase const &iBase, edm::BranchDescription const &) const