CMS 3D CMS Logo

ConsumesCollector.h
Go to the documentation of this file.
1 #ifndef FWCore_Framework_ConsumesCollector_h
2 #define FWCore_Framework_ConsumesCollector_h
3 // -*- C++ -*-
4 //
5 // Package: FWCore/Framework
6 // Class : edm::ConsumesCollector
7 //
24 //
25 // Original Author: Chris Jones
26 // Created: Fri, 07 Jun 2013 12:44:47 GMT
27 //
28 
29 // system include files
30 
31 // user include files
34 
35 // forward declarations
36 namespace edm {
37  class EDConsumerBase;
38 
40  {
41 
42  public:
43 
44  ConsumesCollector() = delete;
45  ConsumesCollector(ConsumesCollector const&) = default;
49 
50  // ---------- member functions ---------------------------
51  template <typename ProductType, BranchType B=InEvent>
53  return m_consumer->consumes<ProductType,B>(tag);
54  }
55 
57  return m_consumer->consumes(id,tag);
58  }
59 
60  template <BranchType B>
62  return m_consumer->consumes<B>(id,tag);
63  }
64 
65  template <typename ProductType, BranchType B=InEvent>
67  return m_consumer->mayConsume<ProductType,B>(tag);
68  }
69 
70 
72  return m_consumer->mayConsume(id,tag);
73  }
74 
75  template <BranchType B>
77  return m_consumer->mayConsume<B>(id,tag);
78  }
79 
80  template <typename ProductType, BranchType B=InEvent>
81  void consumesMany() {
82  m_consumer->consumesMany<ProductType,B>();
83  }
84 
85 
86  void consumesMany(const TypeToGet& id) {
87  m_consumer->consumesMany(id);
88  }
89 
90  template <BranchType B>
91  void consumesMany(const TypeToGet& id) {
92  m_consumer->consumesMany<B>(id);
93  }
94 
95 
96  private:
97  //only EDConsumerBase is allowed to make an instance of this class
98  friend class EDConsumerBase;
99 
101  m_consumer(iConsumer) {}
102 
103  // ---------- member data --------------------------------
105 
106  };
107 }
108 
109 
110 #endif
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
ConsumesCollector & operator=(ConsumesCollector const &)=default
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
ConsumesCollector(EDConsumerBase *iConsumer)
void consumesMany(const TypeToGet &id)
edm::propagate_const< EDConsumerBase * > m_consumer
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
EDGetToken consumes(const TypeToGet &id, edm::InputTag const &tag)
void consumesMany(const TypeToGet &id)
EDGetToken consumes(TypeToGet const &id, edm::InputTag const &tag)
HLT enums.