1 #ifndef FWCore_Framework_EDConsumerBase_h 2 #define FWCore_Framework_EDConsumerBase_h 56 class ModuleProcessName;
57 class ProductResolverIndexHelper;
58 class ConsumesCollector;
59 template <Transition Tr>
61 template <Transition Tr>
63 template <BranchType B>
68 namespace eventsetup {
114 std::vector<ModuleProcessName>& modulesInPreviousProcesses,
116 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
147 template <Transition Tr>
149 template <Transition Tr>
151 template <BranchType B>
153 template <
typename T>
158 template <
typename ProductType, BranchType B = InEvent>
160 TypeToGet tid = TypeToGet::make<ProductType>();
164 template <BranchType B = InEvent>
173 template <BranchType B>
178 template <
typename ProductType, BranchType B = InEvent>
180 TypeToGet tid = TypeToGet::make<ProductType>();
186 template <BranchType B>
192 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
194 return esConsumes<ESProduct, ESRecord, Tr>(
ESInputTag{});
197 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
201 std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
204 eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
209 template <Transition Tr = Transition::Event>
214 template <Transition Tr = Transition::Event>
220 template <Transition Tr = Transition::Event>
266 unsigned short iDeltaToProductInstance,
267 unsigned short iDeltaToProcessName)
311 template <Transition TR>
314 template <
typename TYPE,
typename REC>
316 return m_consumer->template esConsumes<TYPE, REC, TR>();
327 template <Transition TR>
330 template <
typename TYPE,
typename REC>
345 template <BranchType B>
348 template <
typename TYPE>
const TypeTag & type() const
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
unsigned int m_startOfComponentName
ProductResolverIndexAndSkipBit uncheckedIndexFrom(EDGetToken) const
EDGetTokenT< TYPE > consumes()
const char * labelFor(ESTokenIndex) const
unsigned int ProductResolverIndex
virtual void doSelectInputProcessBlocks(ProductRegistry const &, ProcessBlockHelperBase const &)
virtual void extendUpdateLookup(BranchType iBranchType, ProductResolverIndexHelper const &)
eventsetup::EventSetupRecordKey m_record
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
void throwESConsumesInProcessBlock() const
edm::InputTag const m_tag
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType iType) const
void throwTypeMismatch(edm::TypeID const &, EDGetToken) const
void itemsToGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
LabelPlacement(unsigned int iStartOfModuleLabel, unsigned short iDeltaToProductInstance, unsigned short iDeltaToProcessName)
ESGetToken< TYPE, REC > consumes()
bool containsCurrentProcessAlias_
ESGetToken< TYPE, REC > consumes()
ProductResolverIndexAndSkipBit indexFrom(EDGetToken, BranchType, TypeID const &) 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
unsigned short m_deltaToProcessName
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)
std::vector< ESResolverIndex > const & esGetTokenIndicesVector(edm::Transition iTrans) const
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
typename default_record< T >::RecordT default_record_t
ESGetTokenGeneric esConsumes(eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
Used with EventSetupRecord::doGet.
ESResolverIndex const * esGetTokenIndices(edm::Transition iTrans) const
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
unsigned short m_deltaToProductInstance
ProductResolverIndexAndSkipBit m_index
EDConsumerBase * m_consumer
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
EDConsumerBase * m_consumer
void throwESConsumesCallAfterFrozen(eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &) const
std::vector< ConsumesInfo > consumesInfo() const
std::array< std::vector< ESResolverIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_
std::array< std::vector< ESRecordIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esRecordsToGetFromTransition_
constexpr auto esConsumes()
bool registeredToConsume(ProductResolverIndex, bool, BranchType) const
const TypeTag & type() const
std::vector< char > m_tokenLabels
EDConsumerBase const & operator=(EDConsumerBase const &)=delete
EDGetToken consumes(TypeToGet const &id, edm::InputTag const &tag)
void throwBadToken(edm::TypeID const &iType, EDGetToken iToken) const
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector(edm::Transition iTrans) const
EDConsumerBaseAdaptor(EDConsumerBase *iBase, edm::InputTag iTag) noexcept
void itemsMayGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
void throwConsumesCallAfterFrozen(TypeToGet const &, InputTag const &) const
EDConsumerBase * m_consumer
static EventSetupRecordKey makeKey()
auto esConsumes(ESInputTag const &tag)
ESTokenIndex recordESConsumes(Transition, eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &iTag)
TokenLookupInfo(edm::TypeID const &iID, ProductResolverIndex iIndex, bool skipCurrentProcess, BranchType iBranch)
virtual void registerLateConsumes(eventsetup::ESRecordsToProductResolverIndices const &)
EDConsumerBaseESAdaptor(EDConsumerBase *iBase)
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)
virtual ~EDConsumerBase() noexcept(false)
void resetItemsToGetFrom(BranchType iType)
edm::SoATuple< ESTokenLookupInfo, ESResolverIndex > m_esTokenInfo
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
void throwBranchMismatch(BranchType, EDGetToken) const
const NameTag & name() const
auto esConsumes(ESInputTag tag)
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypes > itemsToGetFromBranch_
unsigned int m_startOfModuleLabel
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
EDConsumerBaseWithTagESAdaptor(EDConsumerBase *iBase, ESInputTag iTag) noexcept
const char * value() const
EDGetToken consumes(const TypeToGet &id, edm::InputTag const &tag)