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  template <Transition TR>
40  template <Transition TR>
42  template <BranchType B>
44 
46  public:
47  ConsumesCollector() = delete;
52 
53  // ---------- member functions ---------------------------
54  template <typename ProductType, BranchType B = InEvent>
56  return m_consumer->consumes<ProductType, B>(tag);
57  }
58 
59  template <BranchType B = InEvent>
62  }
63 
64  EDGetToken consumes(const TypeToGet& id, edm::InputTag const& tag) { return m_consumer->consumes(id, tag); }
65 
66  template <BranchType B>
68  return m_consumer->consumes<B>(id, tag);
69  }
70 
71  template <typename ProductType, BranchType B = InEvent>
73  return m_consumer->mayConsume<ProductType, B>(tag);
74  }
75 
76  EDGetToken mayConsume(const TypeToGet& id, edm::InputTag const& tag) { return m_consumer->mayConsume(id, tag); }
77 
78  template <BranchType B>
80  return m_consumer->mayConsume<B>(id, tag);
81  }
82 
83  // For consuming event-setup products
84  template <typename ESProduct, typename ESRecord, Transition Tr = Transition::Event>
85  auto esConsumes() {
86  return esConsumes<ESProduct, ESRecord, Tr>(ESInputTag{});
87  }
88 
89  template <typename ESProduct, typename ESRecord, Transition Tr = Transition::Event>
90  auto esConsumes(ESInputTag const& tag) {
91  return m_consumer->esConsumes<ESProduct, ESRecord, Tr>(tag);
92  }
93 
94  template <typename ESProduct, Transition Tr = Transition::Event>
96  return m_consumer->esConsumes<ESProduct, Tr>(key, tag);
97  }
98 
99  template <Transition Tr = Transition::Event>
100  [[nodiscard]] constexpr auto esConsumes() noexcept {
101  return ConsumesCollectorESAdaptor<Tr>(*this);
102  }
103 
104  template <Transition Tr = Transition::Event>
105  [[nodiscard]] auto esConsumes(ESInputTag tag) noexcept {
107  }
108 
109  private:
110  //only EDConsumerBase is allowed to make an instance of this class
111  friend class EDConsumerBase;
112 
113  ConsumesCollector(EDConsumerBase* iConsumer) : m_consumer(iConsumer) {}
114 
115  // ---------- member data --------------------------------
117  };
118 
119  template <Transition TR>
121  public:
122  template <typename TYPE, typename REC>
124  return m_consumer.template esConsumes<TYPE, REC, TR>();
125  }
126 
127  private:
128  //only ConsumesCollector is allowed to make an instance of this class
129  friend class ConsumesCollector;
130 
132 
134  };
135 
136  template <Transition TR>
138  public:
139  template <typename TYPE, typename REC>
141  return m_consumer.template esConsumes<TYPE, REC, TR>(m_tag);
142  }
143 
144  private:
145  //only ConsumesCollector is allowed to make an instance of this class
146  friend class ConsumesCollector;
147 
149  : m_consumer(std::move(iBase)), m_tag(std::move(iTag)) {}
150 
153  };
154 
155  template <BranchType B>
157  public:
158  template <typename TYPE>
160  return m_consumer.template consumes<TYPE, B>(m_tag);
161  }
162 
163  private:
164  //only ConsumesCollector is allowed to make an instance of this class
165  friend class ConsumesCollector;
166 
168 
171  };
172 
173 } // namespace edm
174 
175 #endif
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: APVGainStruct.h:7
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
ConsumesCollector(EDConsumerBase *iConsumer)
ESGetToken< TYPE, REC > consumes()
edm::propagate_const< EDConsumerBase * > m_consumer
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
ConsumesCollectorAdaptor(ConsumesCollector iBase, edm::InputTag iTag)
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
EDGetToken consumes(const TypeToGet &id, edm::InputTag const &tag)
auto esConsumes(ESInputTag tag) noexcept
ConsumesCollector & operator=(ConsumesCollector const &)
ConsumesCollectorWithTagESAdaptor(ConsumesCollector iBase, ESInputTag iTag)
constexpr auto esConsumes() noexcept
EDGetToken consumes(TypeToGet const &id, edm::InputTag const &tag)
HLT enums.
auto esConsumes(ESInputTag const &tag)
ConsumesCollectorAdaptor< B > consumes(edm::InputTag tag)
def move(src, dest)
Definition: eostools.py:511
auto esConsumes(eventsetup::EventSetupRecordKey const &key, ESInputTag const &tag)
EDGetTokenT< TYPE > consumes()
ConsumesCollectorESAdaptor(ConsumesCollector iBase)