1 #ifndef FWCore_Framework_EDConsumerBase_h
2 #define FWCore_Framework_EDConsumerBase_h
55 class ModuleProcessName;
56 class ProductResolverIndexHelper;
57 class ConsumesCollector;
58 template <Transition Tr>
60 template <Transition Tr>
62 template <BranchType B>
67 namespace eventsetup {
115 std::vector<ModuleProcessName>& modulesInPreviousProcesses,
117 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
148 template <Transition Tr>
150 template <Transition Tr>
152 template <BranchType B>
154 template <
typename T>
159 template <
typename ProductType, BranchType B = InEvent>
161 TypeToGet tid = TypeToGet::make<ProductType>();
165 template <BranchType B = InEvent>
174 template <BranchType B>
179 template <
typename ProductType, BranchType B = InEvent>
181 TypeToGet tid = TypeToGet::make<ProductType>();
187 template <BranchType B>
192 template <
typename ProductType, BranchType B = InEvent>
194 TypeToGet tid = TypeToGet::make<ProductType>();
195 consumesMany<B>(tid);
200 template <BranchType B>
206 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
208 return esConsumes<ESProduct, ESRecord, Tr>(
ESInputTag{});
211 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
215 std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
218 eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
223 template <Transition Tr = Transition::Event>
228 template <Transition Tr = Transition::Event>
234 template <Transition Tr = Transition::Event>
279 unsigned short iDeltaToProductInstance,
280 unsigned short iDeltaToProcessName)
324 template <Transition TR>
327 template <
typename TYPE,
typename REC>
329 return m_consumer->template esConsumes<TYPE, REC, TR>();
340 template <Transition TR>
343 template <
typename TYPE,
typename REC>
358 template <BranchType B>
361 template <
typename TYPE>
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
unsigned int m_startOfComponentName
void throwESConsumesCallAfterFrozen(eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &) const
EDGetTokenT< TYPE > consumes()
std::vector< ConsumesInfo > consumesInfo() const
unsigned int ProductResolverIndex
uint16_t *__restrict__ id
virtual void doSelectInputProcessBlocks(ProductRegistry const &, ProcessBlockHelperBase const &)
eventsetup::EventSetupRecordKey m_record
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
edm::InputTag const m_tag
void consumesMany(const TypeToGet &id)
void throwTypeMismatch(edm::TypeID const &, EDGetToken) const
LabelPlacement(unsigned int iStartOfModuleLabel, unsigned short iDeltaToProductInstance, unsigned short iDeltaToProcessName)
void throwBadToken(edm::TypeID const &iType, EDGetToken iToken) const
bool containsCurrentProcessAlias_
unsigned short m_deltaToProcessName
std::vector< ESProxyIndex > const & esGetTokenIndicesVector(edm::Transition iTrans) const
void throwConsumesCallAfterFrozen(TypeToGet const &, InputTag const &) const
EDConsumerBaseESAdaptor(EDConsumerBase *iBase)
ESGetToken< TYPE, REC > consumes()
eventsetup::DataKey m_key
void selectInputProcessBlocks(ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
void consumesMany(const TypeToGet &id)
std::array< std::vector< ESProxyIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType iType) const
ProductResolverIndexAndSkipBit uncheckedIndexFrom(EDGetToken) const
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
const char * labelFor(ESTokenIndex) const
EDConsumerBaseWithTagESAdaptor(EDConsumerBase *iBase, ESInputTag iTag) noexcept
typename default_record< T >::RecordT default_record_t
ESGetTokenGeneric esConsumes(eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
Used with EventSetupRecord::doGet.
ProductResolverIndexAndSkipBit indexFrom(EDGetToken, BranchType, TypeID const &) const
bool registeredToConsume(ProductResolverIndex, bool, BranchType) const
void modulesWhoseProductsAreConsumed(std::array< std::vector< ModuleDescription const * > *, NumBranchTypes > &modulesAll, std::vector< ModuleProcessName > &modulesInPreviousProcesses, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
unsigned short m_deltaToProductInstance
void itemsToGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
ProductResolverIndexAndSkipBit m_index
ESGetToken< TYPE, REC > consumes()
void throwBranchMismatch(BranchType, EDGetToken) const
virtual void registerLateConsumes(eventsetup::ESRecordsToProxyIndices const &)
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
std::array< std::vector< ESRecordIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esRecordsToGetFromTransition_
void throwESConsumesInProcessBlock() const
constexpr auto esConsumes()
std::vector< char > m_tokenLabels
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)
EDConsumerBase const & operator=(EDConsumerBase const &)=delete
EDGetToken consumes(TypeToGet const &id, edm::InputTag const &tag)
bool registeredToConsumeMany(TypeID const &, BranchType) const
EDConsumerBase * m_consumer
void itemsMayGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
EDConsumerBaseAdaptor(EDConsumerBase *iBase, edm::InputTag iTag) noexcept
const TypeTag & type() const
edm::SoATuple< ESTokenLookupInfo, ESProxyIndex > m_esTokenInfo
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
const TypeTag & type() const
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector(edm::Transition iTrans) const
EDConsumerBase * m_consumer
const NameTag & name() const
static EventSetupRecordKey makeKey()
auto esConsumes(ESInputTag const &tag)
ESTokenIndex recordESConsumes(Transition, eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &iTag)
const char * value() const
TokenLookupInfo(edm::TypeID const &iID, ProductResolverIndex iIndex, bool skipCurrentProcess, BranchType iBranch)
EDConsumerBase * m_consumer
virtual ~EDConsumerBase() noexcept(false)
void resetItemsToGetFrom(BranchType iType)
void convertCurrentProcessAlias(std::string const &processName)
Convert "@currentProcess" in InputTag process names to the actual current process name...
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
EDConsumerBaseAdaptor< B > consumes(edm::InputTag tag) noexcept
auto esConsumes(ESInputTag tag)
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypes > itemsToGetFromBranch_
unsigned int m_startOfModuleLabel
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
EDGetToken consumes(const TypeToGet &id, edm::InputTag const &tag)