CMS 3D CMS Logo

Event.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_Event_h
2 #define FWCore_Framework_Event_h
3 
4 // -*- C++ -*-
5 //
6 // Package: Framework
7 // Class : Event
8 //
17 /*----------------------------------------------------------------------
18 ----------------------------------------------------------------------*/
19 
27 
32 
43 
44 #include <memory>
45 #include <string>
46 #include <unordered_set>
47 #include <typeinfo>
48 #include <type_traits>
49 #include <vector>
50 
51 class testEventGetRefBeforePut;
52 class testEvent;
53 
54 namespace edm {
55 
56  class BranchDescription;
57  class ModuleCallingContext;
59  class TriggerResults;
60  class TriggerNames;
61  class EDConsumerBase;
62  class EDProductGetter;
63  class ProducerBase;
65 
66  namespace stream {
67  template <typename T>
69  }
70 
71  class Event : public EventBase {
72  public:
73  Event(EventPrincipal const& ep, ModuleDescription const& md, ModuleCallingContext const*);
74  ~Event() override;
75 
76  //Used in conjunction with EDGetToken
77  void setConsumer(EDConsumerBase const* iConsumer);
78 
79  void setSharedResourcesAcquirer(SharedResourcesAcquirer* iResourceAcquirer);
80 
81  void setProducerCommon(ProducerBase const* iProd, std::vector<BranchID>* previousParentage);
82 
83  void setProducer(ProducerBase const* iProd,
84  std::vector<BranchID>* previousParentage,
85  std::vector<BranchID>* gotBranchIDsFromAcquire = nullptr);
86 
87  void setProducerForAcquire(ProducerBase const* iProd,
88  std::vector<BranchID>* previousParentage,
89  std::vector<BranchID>& gotBranchIDsFromAcquire);
90 
91  // AUX functions are defined in EventBase
92  EventAuxiliary const& eventAuxiliary() const override { return aux_; }
93 
95  StreamID streamID() const { return streamID_; }
96 
97  LuminosityBlock const& getLuminosityBlock() const { return *luminosityBlock_; }
98 
99  Run const& getRun() const;
100 
101  RunNumber_t run() const { return id().run(); }
102 
109  typedef unsigned long CacheIdentifier_t;
110  CacheIdentifier_t cacheIdentifier() const;
111 
112  template <typename PROD>
113  bool get(ProductID const& oid, Handle<PROD>& result) const;
114 
115  // Template member overload to deal with Views.
116  template <typename ELEMENT>
117  bool get(ProductID const& oid, Handle<View<ELEMENT>>& result) const;
118 
119  EventSelectionIDVector const& eventSelectionIDs() const;
120 
121  ProcessHistoryID const& processHistoryID() const;
122 
124  template <typename PROD>
125  OrphanHandle<PROD> put(std::unique_ptr<PROD> product) {
126  return put<PROD>(std::move(product), std::string());
127  }
128 
130  template <typename PROD>
131  OrphanHandle<PROD> put(std::unique_ptr<PROD> product, std::string const& productInstanceName);
132 
133  template <typename PROD>
134  OrphanHandle<PROD> put(EDPutToken token, std::unique_ptr<PROD> product);
135 
136  template <typename PROD>
137  OrphanHandle<PROD> put(EDPutTokenT<PROD> token, std::unique_ptr<PROD> product);
138 
140  template <typename PROD, typename... Args>
141  OrphanHandle<PROD> emplace(EDPutTokenT<PROD> token, Args&&... args);
142 
143  template <typename PROD, typename... Args>
144  OrphanHandle<PROD> emplace(EDPutToken token, Args&&... args);
145 
149  template <typename PROD>
151  return getRefBeforePut<PROD>(std::string());
152  }
153 
154  template <typename PROD>
155  RefProd<PROD> getRefBeforePut(std::string const& productInstanceName);
156 
157  template <typename PROD>
158  RefProd<PROD> getRefBeforePut(EDPutTokenT<PROD>);
159 
160  template <typename PROD>
161  RefProd<PROD> getRefBeforePut(EDPutToken);
162 
163  template <typename PROD>
164  bool getByLabel(InputTag const& tag, Handle<PROD>& result) const;
165 
166  template <typename PROD>
167  bool getByLabel(std::string const& label, Handle<PROD>& result) const;
168 
169  template <typename PROD>
170  bool getByLabel(std::string const& label, std::string const& productInstanceName, Handle<PROD>& result) const;
171 
172  template <typename PROD>
173  void getManyByType(std::vector<Handle<PROD>>& results) const;
174 
175  template <typename PROD>
176  bool getByToken(EDGetToken token, Handle<PROD>& result) const;
177 
178  template <typename PROD>
179  bool getByToken(EDGetTokenT<PROD> token, Handle<PROD>& result) const;
180 
181  template <typename PROD>
182  Handle<PROD> getHandle(EDGetTokenT<PROD> token) const;
183 
184  template <typename PROD>
185  PROD const& get(EDGetTokenT<PROD> token) const noexcept(false);
186 
187  // Template member overload to deal with Views.
188  template <typename ELEMENT>
189  bool getByLabel(std::string const& label, Handle<View<ELEMENT>>& result) const;
190 
191  template <typename ELEMENT>
192  bool getByLabel(std::string const& label,
193  std::string const& productInstanceName,
194  Handle<View<ELEMENT>>& result) const;
195 
196  template <typename ELEMENT>
197  bool getByLabel(InputTag const& tag, Handle<View<ELEMENT>>& result) const;
198 
199  template <typename ELEMENT>
200  bool getByToken(EDGetToken token, Handle<View<ELEMENT>>& result) const;
201 
202  template <typename ELEMENT>
203  bool getByToken(EDGetTokenT<View<ELEMENT>> token, Handle<View<ELEMENT>>& result) const;
204 
205  template <typename ELEMENT>
206  Handle<View<ELEMENT>> getHandle(EDGetTokenT<View<ELEMENT>> token) const;
207 
208  template <typename ELEMENT>
209  View<ELEMENT> const& get(EDGetTokenT<View<ELEMENT>> token) const noexcept(false);
210 
211  template <typename ELEMENT>
212  Handle<View<ELEMENT>> fillView_(BasicHandle& bh) const;
213 
214  Provenance getProvenance(BranchID const& theID) const;
215 
216  Provenance getProvenance(ProductID const& theID) const;
217 
218  // Get the provenance for all products that may be in the event
219  void getAllProvenance(std::vector<Provenance const*>& provenances) const;
220 
221  // Get the provenance for all products that may be in the event,
222  // excluding the per-event provenance (the parentage information).
223  // The excluded information may change from event to event.
224  void getAllStableProvenance(std::vector<StableProvenance const*>& provenances) const;
225 
226  // Return true if this Event has been subjected to a process with
227  // the given processName, and false otherwise.
228  // If true is returned, then ps is filled with the ParameterSet
229  // used to configure the identified process.
230  bool getProcessParameterSet(std::string const& processName, ParameterSet& ps) const;
231 
232  ProcessHistory const& processHistory() const override;
233 
234  edm::ParameterSet const* parameterSet(edm::ParameterSetID const& psID) const override;
235 
236  size_t size() const;
237 
238  edm::TriggerNames const& triggerNames(edm::TriggerResults const& triggerResults) const override;
239  TriggerResultsByName triggerResultsByName(edm::TriggerResults const& triggerResults) const override;
240 
241  ModuleCallingContext const* moduleCallingContext() const { return moduleCallingContext_; }
242 
243  void labelsForToken(EDGetToken const& iToken, ProductLabels& oLabels) const {
244  provRecorder_.labelsForToken(iToken, oLabels);
245  }
246 
247  typedef std::vector<edm::propagate_const<std::unique_ptr<WrapperBase>>> ProductPtrVec;
248 
249  EDProductGetter const& productGetter() const;
250 
251  private:
252  //for testing
253  friend class ::testEventGetRefBeforePut;
254  friend class ::testEvent;
255 
256  EventPrincipal const& eventPrincipal() const;
257 
258  ProductID makeProductID(BranchDescription const& desc) const;
259 
260  //override used by EventBase class
261  BasicHandle getByLabelImpl(std::type_info const& iWrapperType,
262  std::type_info const& iProductType,
263  InputTag const& iTag) const override;
264 
265  //override used by EventBase class
266  BasicHandle getImpl(std::type_info const& iProductType, ProductID const& pid) const override;
267 
268  template <typename PROD>
269  OrphanHandle<PROD> putImpl(EDPutToken::value_type token, std::unique_ptr<PROD> product);
270 
271  template <typename PROD, typename... Args>
272  OrphanHandle<PROD> emplaceImpl(EDPutToken::value_type token, Args&&... args);
273 
274  // commit_() is called to complete the transaction represented by
275  // this PrincipalGetAdapter. The friendships required seems gross, but any
276  // alternative is not great either. Putting it into the
277  // public interface is asking for trouble
278  friend class ProducerSourceBase;
279  friend class InputSource;
280  friend class RawInputSource;
281  friend class ProducerBase;
282  template <typename T>
284 
285  void commit_(std::vector<edm::ProductResolverIndex> const& iShouldPut, ParentageID* previousParentageId = nullptr);
286  void commit_aux(ProductPtrVec& products, ParentageID* previousParentageId = nullptr);
287 
288  BasicHandle getByProductID_(ProductID const& oid) const;
289 
290  ProductPtrVec& putProducts() { return putProducts_; }
291  ProductPtrVec const& putProducts() const { return putProducts_; }
292 
294 
295  // putProducts_ is a holding pen for EDProducts inserted into this
296  // PrincipalGetAdapter.
297  //
298  ProductPtrVec putProducts_;
299 
301  std::shared_ptr<LuminosityBlock const> const luminosityBlock_;
302 
303  // gotBranchIDs_ must be mutable because it records all 'gets',
304  // which do not logically modify the PrincipalGetAdapter. gotBranchIDs_ is
305  // merely a cache reflecting what has been retrieved from the
306  // Principal class.
307  typedef std::unordered_set<BranchID::value_type> BranchIDSet;
308  mutable BranchIDSet gotBranchIDs_;
309  mutable std::vector<bool> gotBranchIDsFromPrevious_;
310  std::vector<BranchID>* previousBranchIDs_ = nullptr;
311  std::vector<BranchID>* gotBranchIDsFromAcquire_ = nullptr;
312 
313  void addToGotBranchIDs(Provenance const& prov) const;
314  void addToGotBranchIDs(BranchID const& branchID) const;
315 
316  // We own the retrieved Views, and have to destroy them.
317  mutable std::vector<std::shared_ptr<ViewBase>> gotViews_;
318 
321 
322  static const std::string emptyString_;
323  };
324 
325  template <typename PROD>
326  bool Event::get(ProductID const& oid, Handle<PROD>& result) const {
327  result.clear();
328  BasicHandle bh = this->getByProductID_(oid);
329  result = convert_handle_check_type<PROD>(std::move(bh)); // throws on conversion error
330  if (result.failedToGet()) {
331  return false;
332  }
333  addToGotBranchIDs(*bh.provenance());
334  return true;
335  }
336 
337  template <typename ELEMENT>
338  bool Event::get(ProductID const& oid, Handle<View<ELEMENT>>& result) const {
339  result.clear();
340  BasicHandle bh = this->getByProductID_(oid);
341 
342  if (bh.failedToGet()) {
343  result = Handle<View<ELEMENT>>(makeHandleExceptionFactory([oid]() -> std::shared_ptr<cms::Exception> {
344  std::shared_ptr<cms::Exception> whyFailed = std::make_shared<edm::Exception>(edm::errors::ProductNotFound);
345  *whyFailed << "get View by ID failed: no product with ID = " << oid << "\n";
346  return whyFailed;
347  }));
348  return false;
349  }
350 
351  result = fillView_<ELEMENT>(bh);
352  return true;
353  }
354 
355  template <typename PROD>
357  // The following will call post_insert if T has such a function,
358  // and do nothing if T has no such function.
360  maybe_inserter(product.get());
361 
362  assert(index < putProducts().size());
363 
364  std::unique_ptr<Wrapper<PROD>> wp(new Wrapper<PROD>(std::move(product)));
365  PROD const* prod = wp->product();
366 
367  putProducts()[index] = std::move(wp);
368  auto const& prodID = provRecorder_.getProductID(index);
369  return (OrphanHandle<PROD>(prod, prodID));
370  }
371 
372  template <typename PROD>
373  OrphanHandle<PROD> Event::put(std::unique_ptr<PROD> product, std::string const& productInstanceName) {
374  if (UNLIKELY(product.get() == nullptr)) { // null pointer is illegal
375  TypeID typeID(typeid(PROD));
376  principal_get_adapter_detail::throwOnPutOfNullProduct("Event", typeID, productInstanceName);
377  }
378 
379  auto index = provRecorder_.getPutTokenIndex(TypeID(*product), productInstanceName);
380  return putImpl(index, std::move(product));
381  }
382 
383  template <typename PROD>
384  OrphanHandle<PROD> Event::put(EDPutTokenT<PROD> token, std::unique_ptr<PROD> product) {
385  if (UNLIKELY(product.get() == 0)) { // null pointer is illegal
386  TypeID typeID(typeid(PROD));
387  principal_get_adapter_detail::throwOnPutOfNullProduct("Event", typeID, provRecorder_.productInstanceLabel(token));
388  }
389  if (UNLIKELY(token.isUninitialized())) {
391  }
392  return putImpl(token.index(), std::move(product));
393  }
394 
395  template <typename PROD>
396  OrphanHandle<PROD> Event::put(EDPutToken token, std::unique_ptr<PROD> product) {
397  if (UNLIKELY(product.get() == 0)) { // null pointer is illegal
398  TypeID typeID(typeid(PROD));
399  principal_get_adapter_detail::throwOnPutOfNullProduct("Event", typeID, provRecorder_.productInstanceLabel(token));
400  }
401  if (UNLIKELY(token.isUninitialized())) {
403  }
404  if (UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
406  provRecorder_.getTypeIDForPutTokenIndex(token.index()));
407  }
408 
409  return putImpl(token.index(), std::move(product));
410  }
411 
412  template <typename PROD, typename... Args>
414  if (UNLIKELY(token.isUninitialized())) {
416  }
417  return emplaceImpl<PROD>(token.index(), std::forward<Args>(args)...);
418  }
419 
420  template <typename PROD, typename... Args>
422  if (UNLIKELY(token.isUninitialized())) {
424  }
425  if (UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
427  provRecorder_.getTypeIDForPutTokenIndex(token.index()));
428  }
429 
430  return emplaceImpl(token.index(), std::forward<Args>(args)...);
431  }
432 
433  template <typename PROD, typename... Args>
435  assert(index < putProducts().size());
436 
437  std::unique_ptr<Wrapper<PROD>> wp(new Wrapper<PROD>(WrapperBase::Emplace{}, std::forward<Args>(args)...));
438 
439  // The following will call post_insert if T has such a function,
440  // and do nothing if T has no such function.
442  maybe_inserter(&(wp->bareProduct()));
443 
444  PROD const* prod = wp->product();
445 
446  putProducts()[index] = std::move(wp);
447  auto const& prodID = provRecorder_.getProductID(index);
448  return (OrphanHandle<PROD>(prod, prodID));
449  }
450 
451  template <typename PROD>
452  RefProd<PROD> Event::getRefBeforePut(std::string const& productInstanceName) {
453  auto index = provRecorder_.getPutTokenIndex(TypeID{typeid(PROD)}, productInstanceName);
454 
455  //should keep track of what Ref's have been requested and make sure they are 'put'
456  return RefProd<PROD>(provRecorder_.getProductID(index), provRecorder_.prodGetter());
457  }
458 
459  template <typename PROD>
461  if (UNLIKELY(token.isUninitialized())) {
463  }
464  return RefProd<PROD>(provRecorder_.getProductID(token.index()), provRecorder_.prodGetter());
465  }
466 
467  template <typename PROD>
469  if (UNLIKELY(token.isUninitialized())) {
471  }
472  if (UNLIKELY(provRecorder_.getTypeIDForPutTokenIndex(token.index()) != TypeID{typeid(PROD)})) {
474  provRecorder_.getTypeIDForPutTokenIndex(token.index()));
475  }
476  return RefProd<PROD>(provRecorder_.getProductID(token.index()), provRecorder_.prodGetter());
477  }
478 
479  template <typename PROD>
481  result.clear();
482  BasicHandle bh = provRecorder_.getByLabel_(TypeID(typeid(PROD)), tag, moduleCallingContext_);
483  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
484  if
485  UNLIKELY(result.failedToGet()) { return false; }
486  addToGotBranchIDs(*result.provenance());
487  return true;
488  }
489 
490  template <typename PROD>
491  bool Event::getByLabel(std::string const& label, std::string const& productInstanceName, Handle<PROD>& result) const {
492  result.clear();
493  BasicHandle bh = provRecorder_.getByLabel_(
494  TypeID(typeid(PROD)), label, productInstanceName, emptyString_, moduleCallingContext_);
495  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
496  if
497  UNLIKELY(result.failedToGet()) { return false; }
498  addToGotBranchIDs(*result.provenance());
499  return true;
500  }
501 
502  template <typename PROD>
504  return getByLabel(label, emptyString_, result);
505  }
506 
507  template <typename PROD>
508  void Event::getManyByType(std::vector<Handle<PROD>>& results) const {
509  provRecorder_.getManyByType(results, moduleCallingContext_);
510  for (typename std::vector<Handle<PROD>>::const_iterator it = results.begin(), itEnd = results.end(); it != itEnd;
511  ++it) {
512  addToGotBranchIDs(*it->provenance());
513  }
514  }
515 
516  template <typename PROD>
518  result.clear();
519  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
520  result = convert_handle<PROD>(std::move(bh)); // throws on conversion error
521  if
522  UNLIKELY(result.failedToGet()) { return false; }
523  addToGotBranchIDs(*result.provenance());
524  return true;
525  }
526 
527  template <typename PROD>
529  result.clear();
530  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
531  result = convert_handle<PROD>(std::move(bh));
532  if
533  UNLIKELY(result.failedToGet()) { return false; }
534  addToGotBranchIDs(*result.provenance());
535  return true;
536  }
537 
538  template <typename PROD>
540  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
541  auto result = convert_handle<PROD>(std::move(bh));
542  if
543  LIKELY(not result.failedToGet()) { addToGotBranchIDs(*result.provenance()); }
544  return result;
545  }
546 
547  template <typename PROD>
548  PROD const& Event::get(EDGetTokenT<PROD> token) const noexcept(false) {
549  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(PROD)), PRODUCT_TYPE, token, moduleCallingContext_);
550  auto result = convert_handle<PROD>(std::move(bh));
551  if
552  LIKELY(not result.failedToGet()) { addToGotBranchIDs(*result.provenance()); }
553  return *result;
554  }
555 
556  template <typename ELEMENT>
558  result.clear();
559  BasicHandle bh = provRecorder_.getMatchingSequenceByLabel_(TypeID(typeid(ELEMENT)), tag, moduleCallingContext_);
560  if
561  UNLIKELY(bh.failedToGet()) {
563  h.swap(result);
564  return false;
565  }
566  result = fillView_<ELEMENT>(bh);
567  return true;
568  }
569 
570  template <typename ELEMENT>
571  bool Event::getByLabel(std::string const& moduleLabel,
572  std::string const& productInstanceName,
573  Handle<View<ELEMENT>>& result) const {
574  result.clear();
575  BasicHandle bh = provRecorder_.getMatchingSequenceByLabel_(
576  TypeID(typeid(ELEMENT)), moduleLabel, productInstanceName, emptyString_, moduleCallingContext_);
577  if
578  UNLIKELY(bh.failedToGet()) {
580  h.swap(result);
581  return false;
582  }
583  result = fillView_<ELEMENT>(bh);
584  return true;
585  }
586 
587  template <typename ELEMENT>
588  bool Event::getByLabel(std::string const& moduleLabel, Handle<View<ELEMENT>>& result) const {
589  return getByLabel(moduleLabel, emptyString_, result);
590  }
591 
592  template <typename ELEMENT>
594  result.clear();
595  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(ELEMENT)), ELEMENT_TYPE, token, moduleCallingContext_);
596  if
597  UNLIKELY(bh.failedToGet()) {
599  h.swap(result);
600  return false;
601  }
602  result = fillView_<ELEMENT>(bh);
603  return true;
604  }
605 
606  template <typename ELEMENT>
608  result.clear();
609  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(ELEMENT)), ELEMENT_TYPE, token, moduleCallingContext_);
610  if
611  UNLIKELY(bh.failedToGet()) {
613  h.swap(result);
614  return false;
615  }
616  result = fillView_<ELEMENT>(bh);
617  return true;
618  }
619 
620  template <typename ELEMENT>
622  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(ELEMENT)), ELEMENT_TYPE, token, moduleCallingContext_);
623  if
624  UNLIKELY(bh.failedToGet()) {
626  ;
627  }
628  return fillView_<ELEMENT>(bh);
629  }
630 
631  template <typename ELEMENT>
633  BasicHandle bh = provRecorder_.getByToken_(TypeID(typeid(ELEMENT)), ELEMENT_TYPE, token, moduleCallingContext_);
634  if
635  UNLIKELY(bh.failedToGet()) { bh.whyFailedFactory()->make()->raise(); }
636  return *fillView_<ELEMENT>(bh);
637  }
638 
639  template <typename ELEMENT>
641  std::vector<void const*> pointersToElements;
643  // the following must initialize the
644  // fill the helper vector
645  bh.wrapper()->fillView(bh.id(), pointersToElements, helpers);
646 
647  auto newview = std::make_shared<View<ELEMENT>>(pointersToElements, helpers, &(productGetter()));
648 
649  addToGotBranchIDs(*bh.provenance());
650  gotViews_.push_back(newview);
651  return Handle<View<ELEMENT>>(newview.get(), bh.provenance());
652  }
653 
654  // Free functions to retrieve a collection from the Event.
655  // Will throw an exception if the collection is not available.
656 
657  template <typename T>
658  T const& get(Event const& event, InputTag const& tag) noexcept(false) {
660  event.getByLabel(tag, handle);
661  // throw if the handle is not valid
662  return *handle.product();
663  }
664 
665  template <typename T>
666  T const& get(Event const& event, EDGetToken const& token) noexcept(false) {
668  event.getByToken(token, handle);
669  // throw if the handle is not valid
670  return *handle.product();
671  }
672 
673  template <typename T>
674  T const& get(Event const& event, EDGetTokenT<T> const& token) noexcept(false) {
675  return event.get(token);
676  }
677 
678 } // namespace edm
679 
680 #endif // FWCore_Framework_Event_h
size
Write out results.
void labelsForToken(EDGetToken const &iToken, ProductLabels &oLabels) const
Definition: Event.h:243
std::shared_ptr< LuminosityBlock const > const luminosityBlock_
Definition: Event.h:301
unsigned long CacheIdentifier_t
Definition: Event.h:109
WrapperBase const * wrapper() const (true)
Definition: BasicHandle.h:82
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
Definition: Event.h:125
EventAuxiliary const & eventAuxiliary() const override
Definition: Event.h:92
value_type index() const
Definition: EDPutToken.h:77
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
void throwOnPutOfUninitializedToken(char const *principalType, std::type_info const &productType)
BranchIDSet gotBranchIDs_
Definition: Event.h:308
#define LIKELY(x)
Definition: Likely.h:20
void getManyByType(std::vector< Handle< PROD >> &results) const
Definition: Event.h:508
Provenance const * provenance() const (true)
Definition: BasicHandle.h:86
EDProductGetter const * productGetter(std::atomic< void const * > const &iCache)
void fillView(ProductID const &id, std::vector< void const * > &view, FillViewHelperVector &helpers) const
Definition: WrapperBase.cc:14
ModuleCallingContext const * moduleCallingContext_
Definition: Event.h:320
value_type index() const
Definition: EDPutToken.h:50
OrphanHandle< PROD > putImpl(EDPutToken::value_type token, std::unique_ptr< PROD > product)
Definition: Event.h:356
std::vector< EventSelectionID > EventSelectionIDVector
ProductPtrVec const & putProducts() const
Definition: Event.h:291
ESProducts< std::remove_reference_t< TArgs >... > products(TArgs &&...args)
Definition: ESProducts.h:128
bool failedToGet() const (true)
Definition: BasicHandle.h:78
void put(edm::Event &evt, double value, const char *instanceName)
std::vector< std::shared_ptr< ViewBase > > gotViews_
Definition: Event.h:317
char const * label
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
Definition: Event.h:539
ModuleCallingContext const * moduleCallingContext() const
Definition: Event.h:241
bool isUninitialized() const
Definition: EDPutToken.h:51
PrincipalGetAdapter provRecorder_
Definition: Event.h:293
std::vector< bool > gotBranchIDsFromPrevious_
Definition: Event.h:309
std::shared_ptr< HandleExceptionFactory > makeHandleExceptionFactory(T &&iFunctor)
unsigned int value_type
Definition: EDPutToken.h:42
std::shared_ptr< HandleExceptionFactory > const & whyFailedFactory() const (true)
Definition: BasicHandle.h:98
RunNumber_t run() const
Definition: Event.h:101
bool get(ProductID const &oid, Handle< PROD > &result) const
Definition: Event.h:326
void throwOnPutOfWrongType(std::type_info const &wrongType, TypeID const &rightType)
LuminosityBlock const & getLuminosityBlock() const
Definition: Event.h:97
ProductPtrVec putProducts_
Definition: Event.h:298
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:480
RefProd< PROD > getRefBeforePut()
Definition: Event.h:150
void swap(HandleBase &other)
Definition: HandleBase.h:61
bool failedToGet() const
Definition: HandleBase.h:78
#define noexcept
EventAuxiliary const & aux_
Definition: Event.h:300
T const * product() const
Definition: Handle.h:74
OrphanHandle< PROD > emplace(EDPutTokenT< PROD > token, Args &&...args)
puts a new product
Definition: Event.h:413
static std::string const triggerResults("TriggerResults")
ProductPtrVec & putProducts()
Definition: Event.h:290
bool isUninitialized() const
Definition: EDPutToken.h:78
HLT enums.
#define PROD(A, B)
StreamID streamID() const
Definition: Event.h:95
OrphanHandle< PROD > emplaceImpl(EDPutToken::value_type token, Args &&...args)
Definition: Event.h:434
std::vector< edm::propagate_const< std::unique_ptr< WrapperBase > > > ProductPtrVec
Definition: Event.h:247
unsigned int RunNumber_t
#define UNLIKELY(x)
Definition: Likely.h:21
static const std::string emptyString_
Definition: Event.h:322
void throwOnPutOfNullProduct(char const *principalType, TypeID const &productType, std::string const &productInstanceName)
long double T
std::vector< std::pair< edm::ProductID, unsigned long > > FillViewHelperVector
ProductID id() const (true)
Definition: BasicHandle.h:90
std::unordered_set< BranchID::value_type > BranchIDSet
Definition: Event.h:307
ParameterSet const & parameterSet(Provenance const &provenance)
Definition: Provenance.cc:11
def move(src, dest)
Definition: eostools.py:511
Definition: Run.h:45
StreamID streamID_
Definition: Event.h:319
Provenance const * provenance() const
Definition: HandleBase.h:83
Handle< View< ELEMENT > > fillView_(BasicHandle &bh) const
Definition: Event.h:640