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  class ActivityRegistry;
51 
52  namespace limited {
53  namespace impl {
54  class EmptyType {
55  public:
57  };
58 
59  template <typename T, typename C>
60  class StreamCacheHolder : public virtual T {
61  public:
62  StreamCacheHolder(edm::ParameterSet const& iPSet) : T(iPSet) {}
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:
112  ~InputProcessBlockCacheHolder() noexcept(false) override {}
113 
114  std::tuple<CacheHandle<CacheTypes>...> processBlockCaches(Event const& event) const {
115  return cacheImpl_.processBlockCaches(event);
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(edm::ParameterSet const& iPSet) : T(iPSet) {}
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 
176  std::unique_ptr<std::shared_ptr<C>[]> caches_;
177  };
178 
179  template <typename T, typename C>
180  class LuminosityBlockCacheHolder : public virtual T {
181  public:
185  ~LuminosityBlockCacheHolder() noexcept(false) override{};
186 
187  protected:
188  C const* luminosityBlockCache(edm::LuminosityBlockIndex iID) const { return caches_[iID].get(); }
189 
190  private:
191  void preallocLumis(unsigned int iNLumis) final { caches_.reset(new std::shared_ptr<C>[iNLumis]); }
192 
193  void doBeginLuminosityBlock_(LuminosityBlock const& lp, EventSetup const& c) final {
194  caches_[lp.index()] = globalBeginLuminosityBlock(lp, c);
195  }
196  void doEndLuminosityBlock_(LuminosityBlock const& lp, EventSetup const& c) final {
198  caches_[lp.index()].reset();
199  }
200 
201  virtual std::shared_ptr<C> globalBeginLuminosityBlock(edm::LuminosityBlock const&,
202  edm::EventSetup const&) const = 0;
203  virtual void globalEndLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&) const = 0;
204 
205  std::unique_ptr<std::shared_ptr<C>[]> caches_;
206  };
207 
208  template <typename T, typename C>
210 
211  template <typename T, typename C>
212  class RunSummaryCacheHolder : public virtual T {
213  public:
214  RunSummaryCacheHolder(edm::ParameterSet const& iPSet) : T(iPSet) {}
217  ~RunSummaryCacheHolder() noexcept(false) override{};
218 
219  private:
220  void preallocRunsSummary(unsigned int iNRuns) final { caches_.reset(new std::shared_ptr<C>[iNRuns]); }
221 
222  friend class EndRunSummaryProducer<T, C>;
223  void doBeginRunSummary_(edm::Run const& rp, EventSetup const& c) final {
224  caches_[rp.index()] = globalBeginRunSummary(rp, c);
225  }
226  void doStreamEndRunSummary_(StreamID id, Run const& rp, EventSetup const& c) final {
227  //NOTE: in future this will need to be serialized
228  std::lock_guard<std::mutex> guard(mutex_);
229  streamEndRunSummary(id, rp, c, caches_[rp.index()].get());
230  }
231  void doEndRunSummary_(Run const& rp, EventSetup const& c) final {
232  globalEndRunSummary(rp, c, caches_[rp.index()].get());
233  maybeClearCache(rp);
234  }
235 
236  virtual std::shared_ptr<C> globalBeginRunSummary(edm::Run const&, edm::EventSetup const&) const = 0;
237  virtual void streamEndRunSummary(StreamID, edm::Run const&, edm::EventSetup const&, C*) const = 0;
238 
239  virtual void globalEndRunSummary(edm::Run const&, edm::EventSetup const&, C*) const = 0;
240 
241  virtual void maybeClearCache(Run const& rp) { caches_[rp.index()].reset(); }
242 
243  std::unique_ptr<std::shared_ptr<C>[]> caches_;
245  };
246 
247  template <typename T, typename C>
249 
250  template <typename T, typename C>
251  class LuminosityBlockSummaryCacheHolder : public virtual T {
252  public:
257 
258  private:
259  void preallocLumisSummary(unsigned int iNLumis) final { caches_.reset(new std::shared_ptr<C>[iNLumis]); }
260 
262 
264  caches_[lb.index()] = globalBeginLuminosityBlockSummary(lb, c);
265  }
266 
268  std::lock_guard<std::mutex> guard(mutex_);
269  streamEndLuminosityBlockSummary(id, lb, c, caches_[lb.index()].get());
270  }
272  globalEndLuminosityBlockSummary(lb, c, caches_[lb.index()].get());
273  maybeClearCache(lb);
274  }
275 
276  virtual std::shared_ptr<C> globalBeginLuminosityBlockSummary(edm::LuminosityBlock const&,
277  edm::EventSetup const&) const = 0;
279  edm::LuminosityBlock const&,
280  edm::EventSetup const&,
281  C*) const = 0;
282 
283  virtual void globalEndLuminosityBlockSummary(edm::LuminosityBlock const&, edm::EventSetup const&, C*) const = 0;
284 
285  virtual void maybeClearCache(LuminosityBlock const& lb) { caches_[lb.index()].reset(); }
286 
287  std::unique_ptr<std::shared_ptr<C>[]> caches_;
289  };
290 
291  template <typename T>
292  class WatchProcessBlock : public virtual T {
293  public:
294  WatchProcessBlock(edm::ParameterSet const& iPSet) : T(iPSet) {}
295  WatchProcessBlock(WatchProcessBlock const&) = delete;
297  ~WatchProcessBlock() noexcept(false) override{};
298 
299  private:
300  void doBeginProcessBlock_(ProcessBlock const&) final;
301  void doEndProcessBlock_(ProcessBlock const&) final;
302 
303  virtual void beginProcessBlock(ProcessBlock const&) {}
304  virtual void endProcessBlock(ProcessBlock const&) {}
305  };
306 
307  template <typename T>
308  class BeginProcessBlockProducer : public virtual T {
309  public:
313  ~BeginProcessBlockProducer() noexcept(false) override{};
314 
315  private:
317 
318  virtual void beginProcessBlockProduce(edm::ProcessBlock&) = 0;
319  };
320 
321  template <typename T>
322  class EndProcessBlockProducer : public virtual T {
323  public:
324  EndProcessBlockProducer(edm::ParameterSet const& iPSet) : T(iPSet) {}
327  ~EndProcessBlockProducer() noexcept(false) override{};
328 
329  private:
331 
332  virtual void endProcessBlockProduce(edm::ProcessBlock&) = 0;
333  };
334 
335  template <typename T>
336  class BeginRunProducer : public virtual T {
337  public:
338  BeginRunProducer(edm::ParameterSet const& iPSet) : T(iPSet) {}
339  BeginRunProducer(BeginRunProducer const&) = delete;
340  BeginRunProducer& operator=(BeginRunProducer const&) = delete;
341  ~BeginRunProducer() noexcept(false) override{};
342 
343  private:
344  void doBeginRunProduce_(Run& rp, EventSetup const& c) final;
345 
346  virtual void globalBeginRunProduce(edm::Run&, edm::EventSetup const&) const = 0;
347  };
348 
349  template <typename T>
350  class EndRunProducer : public virtual T {
351  public:
352  EndRunProducer(edm::ParameterSet const& iPSet) : T(iPSet) {}
353  EndRunProducer(EndRunProducer const&) = delete;
354  EndRunProducer& operator=(EndRunProducer const&) = delete;
355  ~EndRunProducer() noexcept(false) override{};
356 
357  private:
358  void doEndRunProduce_(Run& rp, EventSetup const& c) final;
359 
360  virtual void globalEndRunProduce(edm::Run&, edm::EventSetup const&) const = 0;
361  };
362 
363  template <typename T, typename C>
364  class EndRunSummaryProducer : public RunSummaryCacheHolder<T, C> {
365  public:
366  EndRunSummaryProducer(edm::ParameterSet const& iPSet) : T(iPSet), RunSummaryCacheHolder<T, C>(iPSet) {}
369  ~EndRunSummaryProducer() noexcept(false) override{};
370 
371  private:
372  void doEndRunProduce_(Run& rp, EventSetup const& c) final {
374  RunSummaryCacheHolder<T, C>::caches_[rp.index()].reset();
375  }
376 
377  virtual void globalEndRunProduce(edm::Run&, edm::EventSetup const&, C const*) const = 0;
378 
379  // Do nothing because the cache is cleared in doEndRunProduce_
380  void maybeClearCache(Run const&) final {}
381  };
382 
383  template <typename T>
384  class BeginLuminosityBlockProducer : public virtual T {
385  public:
389  ~BeginLuminosityBlockProducer() noexcept(false) override{};
390 
391  private:
394  };
395 
396  template <typename T>
397  class EndLuminosityBlockProducer : public virtual T {
398  public:
402  ~EndLuminosityBlockProducer() noexcept(false) override{};
403 
404  private:
407  };
408 
409  template <typename T, typename S>
410  class EndLuminosityBlockSummaryProducer : public LuminosityBlockSummaryCacheHolder<T, S> {
411  public:
413  : T(iPSet), LuminosityBlockSummaryCacheHolder<T, S>(iPSet) {}
417 
418  private:
422  }
423 
424  virtual void globalEndLuminosityBlockProduce(edm::LuminosityBlock&, edm::EventSetup const&, S const*) const = 0;
425 
426  // Do nothing because the cache is cleared in doEndLuminosityBlockProduce_
427  void maybeClearCache(LuminosityBlock const&) final {}
428  };
429 
430  template <typename T>
431  class Accumulator : public virtual T {
432  public:
433  Accumulator(edm::ParameterSet const& iPSet) : T(iPSet) {}
434  Accumulator() = default;
435  Accumulator(Accumulator const&) = delete;
436  Accumulator& operator=(Accumulator const&) = delete;
437  ~Accumulator() noexcept(false) override{};
438 
439  private:
440  bool hasAccumulator() const override { return true; }
441 
442  void produce(StreamID streamID, Event& ev, EventSetup const& es) const final { accumulate(streamID, ev, es); }
443 
444  virtual void accumulate(StreamID streamID, Event const& ev, EventSetup const& es) const = 0;
445  };
446 
447  template <typename T>
448  class Transformer : public virtual T, private TransformerBase {
449  public:
450  Transformer(edm::ParameterSet const& iPSet) : T(iPSet) {}
451  Transformer() = default;
452  Transformer(Transformer const&) = delete;
453  Transformer& operator=(Transformer const&) = delete;
454  ~Transformer() noexcept(false) override{};
455 
456  template <typename G, typename F>
458  F&& iF,
459  std::string productInstance = std::string()) {
460  registerTransform(edm::EDPutTokenT<G>(iSetter), std::forward<F>(iF), std::move(productInstance));
461  }
462 
463  template <typename G, typename F>
464  void registerTransform(edm::EDPutTokenT<G> iToken, F iF, std::string productInstance = std::string()) {
465  using ReturnTypeT = decltype(iF(std::declval<G>()));
466  TypeID returnType(typeid(ReturnTypeT));
468  *this,
469  EDPutToken(iToken),
470  returnType,
471  std::move(productInstance),
472  [f = std::move(iF)](std::any const& iGotProduct) {
473  auto pGotProduct = std::any_cast<edm::WrapperBase const*>(iGotProduct);
474  return std::make_unique<edm::Wrapper<ReturnTypeT>>(
475  WrapperBase::Emplace{}, f(*static_cast<edm::Wrapper<G> const*>(pGotProduct)->product()));
476  });
477  }
478 
479  template <typename G, typename P, typename F>
481  P iPre,
482  F iF,
483  std::string productInstance = std::string()) {
484  using CacheTypeT = decltype(iPre(std::declval<G>(), WaitingTaskWithArenaHolder()));
485  using ReturnTypeT = decltype(iF(std::declval<CacheTypeT>()));
486  TypeID returnType(typeid(ReturnTypeT));
488  *this,
489  EDPutToken(iToken),
490  returnType,
491  std::move(productInstance),
492  [p = std::move(iPre)](edm::WrapperBase const& iGotProduct, WaitingTaskWithArenaHolder iHolder) {
493  return std::any(p(*static_cast<edm::Wrapper<G> const&>(iGotProduct).product(), std::move(iHolder)));
494  },
495  [f = std::move(iF)](std::any const& iCache) {
496  auto cache = std::any_cast<CacheTypeT>(iCache);
497  return std::make_unique<edm::Wrapper<ReturnTypeT>>(WrapperBase::Emplace{}, f(cache));
498  });
499  }
500 
501  private:
502  size_t transformIndex_(edm::BranchDescription const& iBranch) const final {
503  return TransformerBase::findMatchingIndex(*this, iBranch);
504  }
505  ProductResolverIndex transformPrefetch_(std::size_t iIndex) const final {
506  return TransformerBase::prefetchImp(iIndex);
507  }
509  std::size_t iIndex,
511  edm::ActivityRegistry* iAct,
512  ServiceWeakToken const& iToken) const final {
513  return TransformerBase::transformImpAsync(std::move(iTask), iIndex, iAct, *this, iEvent);
514  }
515  void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const& iHelper) override {
516  if (iBranchType == InEvent) {
517  TransformerBase::extendUpdateLookup(*this, this->moduleDescription(), iHelper);
518  }
519  }
520  };
521  } // namespace impl
522  } // namespace limited
523 } // namespace edm
524 
525 #endif
void preallocLumisSummary(unsigned int iNLumis) final
Definition: implementors.h:259
~EndRunSummaryProducer() noexcept(false) override
Definition: implementors.h:369
virtual void globalEndLuminosityBlock(edm::LuminosityBlock const &, edm::EventSetup const &) const =0
std::tuple< CacheHandle< CacheTypes >... > processBlockCaches(Event const &event) const
Definition: implementors.h:114
EndLuminosityBlockSummaryProducer & operator=(EndLuminosityBlockSummaryProducer const &)=delete
void doBeginLuminosityBlockSummary_(edm::LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:263
edm::impl::InputProcessBlockCacheImpl< CacheTypes... > cacheImpl_
Definition: implementors.h:150
virtual std::unique_ptr< C > beginStream(edm::StreamID) const =0
void doEndStream_(StreamID id) final
Definition: implementors.h:77
EndProcessBlockProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:324
virtual void endProcessBlockProduce(edm::ProcessBlock &)=0
void produce(StreamID streamID, Event &ev, EventSetup const &es) const final
Definition: implementors.h:442
void doEndRun_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:168
unsigned int ProductResolverIndex
BeginProcessBlockProducer & operator=(BeginProcessBlockProducer const &)=delete
~EndLuminosityBlockProducer() noexcept(false) override
Definition: implementors.h:402
LuminosityBlockCacheHolder< T, C > & operator=(LuminosityBlockCacheHolder< T, C > const &)=delete
StreamCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:62
ProductResolverIndex transformPrefetch_(std::size_t iIndex) const final
Definition: implementors.h:505
virtual void endStream(edm::StreamID) const
Definition: implementors.h:100
void doEndRunSummary_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:231
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:36
static std::mutex mutex
Definition: Proxy.cc:8
void preallocRunsSummary(unsigned int iNRuns) final
Definition: implementors.h:220
RunCacheHolder< T, C > & operator=(RunCacheHolder< T, C > const &)=delete
C const * runCache(edm::RunIndex iID) const
Definition: implementors.h:164
InputProcessBlockCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:109
void maybeClearCache(Run const &) final
Definition: implementors.h:380
WatchProcessBlock & operator=(WatchProcessBlock const &)=delete
Transformer(edm::ParameterSet const &iPSet)
Definition: implementors.h:450
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:96
virtual void streamEndRunSummary(StreamID, edm::Run const &, edm::EventSetup const &, C *) const =0
virtual void endProcessBlock(ProcessBlock const &)
Definition: implementors.h:304
void registerTransform(ProductRegistryHelper::BranchAliasSetterT< G > iSetter, F &&iF, std::string productInstance=std::string())
Definition: implementors.h:457
void doStreamEndLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c) final
Definition: implementors.h:87
virtual void maybeClearCache(Run const &rp)
Definition: implementors.h:241
void doBeginRun_(Run const &rp, EventSetup const &c) final
Definition: implementors.h:167
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:205
C const * luminosityBlockCache(edm::LuminosityBlockIndex iID) const
Definition: implementors.h:188
BeginLuminosityBlockProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:386
EndProcessBlockProducer & operator=(EndProcessBlockProducer const &)=delete
void doEndLuminosityBlock_(LuminosityBlock const &lp, EventSetup const &c) final
Definition: implementors.h:196
BeginProcessBlockProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:310
void doAccessInputProcessBlock_(ProcessBlock const &pb) final
Definition: implementors.h:139
~BeginLuminosityBlockProducer() noexcept(false) override
Definition: implementors.h:389
virtual void globalEndLuminosityBlockSummary(edm::LuminosityBlock const &, edm::EventSetup const &, C *) const =0
void preallocStreams(unsigned int iNStreams) final
Definition: implementors.h:75
WatchProcessBlock(edm::ParameterSet const &iPSet)
Definition: implementors.h:294
~EndRunProducer() noexcept(false) override
Definition: implementors.h:355
LuminosityBlockSummaryCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:253
void doStreamBeginLuminosityBlock_(StreamID id, LuminosityBlock const &lbp, EventSetup const &c) final
Definition: implementors.h:84
ProductResolverIndex prefetchImp(std::size_t iIndex) const
~RunCacheHolder() noexcept(false) override
Definition: implementors.h:159
BranchType
Definition: BranchType.h:11
virtual void streamBeginLuminosityBlock(edm::StreamID, edm::LuminosityBlock const &, edm::EventSetup const &) const
Definition: implementors.h:93
void doStreamEndRun_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:83
~EndProcessBlockProducer() noexcept(false) override
Definition: implementors.h:327
void doEndLuminosityBlockSummary_(LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:271
InputProcessBlockCacheHolder & operator=(InputProcessBlockCacheHolder const &)=delete
EndRunSummaryProducer & operator=(EndRunSummaryProducer const &)=delete
EndRunSummaryProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:366
void transformImpAsync(WaitingTaskHolder iTask, std::size_t iIndex, edm::ActivityRegistry *iAct, ProducerBase const &iBase, edm::EventForTransformer &) const
EmptyType(edm::ParameterSet const &)
Definition: implementors.h:56
void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const &iHelper) override
Definition: implementors.h:515
LuminosityBlockCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:182
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:162
BeginRunProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:338
void transformAsync_(WaitingTaskHolder iTask, std::size_t iIndex, edm::EventForTransformer &iEvent, edm::ActivityRegistry *iAct, ServiceWeakToken const &iToken) const final
Definition: implementors.h:508
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:156
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:193
void extendUpdateLookup(ProducerBase const &, ModuleDescription const &iModuleDesc, ProductResolverIndexHelper const &iHelper)
RunSummaryCacheHolder(edm::ParameterSet const &iPSet)
Definition: implementors.h:214
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:243
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:92
RunSummaryCacheHolder< T, C > & operator=(RunSummaryCacheHolder< T, C > const &)=delete
void doEndRunProduce_(Run &rp, EventSetup const &c) final
Definition: implementors.h:372
Accumulator(edm::ParameterSet const &iPSet)
Definition: implementors.h:433
double f[11][100]
EndRunProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:352
void doBeginProcessBlockProduce_(ProcessBlock &) final
void maybeClearCache(LuminosityBlock const &) final
Definition: implementors.h:427
virtual void streamEndLuminosityBlockSummary(StreamID, edm::LuminosityBlock const &, edm::EventSetup const &, C *) const =0
~LuminosityBlockCacheHolder() noexcept(false) override
Definition: implementors.h:185
void doStreamEndLuminosityBlockSummary_(StreamID id, LuminosityBlock const &lb, EventSetup const &c) final
Definition: implementors.h:267
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:464
LuminosityBlockSummaryCacheHolder< T, C > & operator=(LuminosityBlockSummaryCacheHolder< T, C > const &)=delete
~Transformer() noexcept(false) override
Definition: implementors.h:454
virtual void accessInputProcessBlock(ProcessBlock const &)
Definition: implementors.h:146
void doBeginStream_(StreamID id) final
Definition: implementors.h:76
void doStreamEndRunSummary_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:226
EndLuminosityBlockSummaryProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:412
EndLuminosityBlockProducer(edm::ParameterSet const &iPSet)
Definition: implementors.h:399
~BeginRunProducer() noexcept(false) override
Definition: implementors.h:341
size_t transformIndex_(edm::BranchDescription const &iBranch) const final
Definition: implementors.h:502
~WatchProcessBlock() noexcept(false) override
Definition: implementors.h:297
void registerTransformAsyncImp(ProducerBase &, EDPutToken, const TypeID &id, std::string instanceName, PreTransformFunction, TransformFunction)
void registerProcessBlockCacheFiller(EDGetTokenT< DataType > const &token, Func &&func)
Definition: implementors.h:119
bool hasAccumulator() const override
Definition: implementors.h:440
void doSelectInputProcessBlocks(ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase) final
Definition: implementors.h:134
~BeginProcessBlockProducer() noexcept(false) override
Definition: implementors.h:313
virtual void globalBeginRunProduce(edm::Run &, edm::EventSetup const &) const =0
std::pair< OmniClusterRef, TrackingParticleRef > P
~EndLuminosityBlockSummaryProducer() noexcept(false) override
Definition: implementors.h:416
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:217
void doBeginLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
void doEndLuminosityBlockProduce_(LuminosityBlock &lb, EventSetup const &c) final
Definition: implementors.h:419
void registerTransformAsync(edm::EDPutTokenT< G > iToken, P iPre, F iF, std::string productInstance=std::string())
Definition: implementors.h:480
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:176
LuminosityBlockIndex index() const
C * streamCache(edm::StreamID iID) const
Definition: implementors.h:72
RunIndex index() const
Definition: Run.cc:28
void doStreamBeginRun_(StreamID id, Run const &rp, EventSetup const &c) final
Definition: implementors.h:82
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:223
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:437
virtual void streamEndRun(edm::StreamID, edm::Run const &, edm::EventSetup const &) const
Definition: implementors.h:99
virtual void maybeClearCache(LuminosityBlock const &lb)
Definition: implementors.h:285
unsigned int value() const
Definition: StreamID.h:43
std::unique_ptr< std::shared_ptr< C >[]> caches_
Definition: implementors.h:287
void registerTransformImp(ProducerBase &, EDPutToken, const TypeID &id, std::string instanceName, TransformFunction)
~LuminosityBlockSummaryCacheHolder() noexcept(false) override
Definition: implementors.h:256
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:303
~InputProcessBlockCacheHolder() noexcept(false) override
Definition: implementors.h:112
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:191
std::size_t findMatchingIndex(ProducerBase const &iBase, edm::BranchDescription const &) const