1 #ifndef FWCore_Framework_EDConsumerBase_h 2 #define FWCore_Framework_EDConsumerBase_h 57 class ModuleProcessName;
58 class ProductResolverIndexHelper;
59 class ConsumesCollector;
60 template <Transition Tr>
62 template <Transition Tr>
64 template <BranchType B>
69 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>
193 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
195 return esConsumes<ESProduct, ESRecord, Tr>(
ESInputTag{});
198 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
200 auto [
index, productLabel] =
203 std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
206 eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
211 template <Transition Tr = Transition::Event>
216 template <Transition Tr = Transition::Event>
222 template <Transition Tr = Transition::Event>
265 unsigned short iDeltaToProductInstance,
266 unsigned short iDeltaToProcessName)
310 template <Transition TR>
313 template <
typename TYPE,
typename REC>
315 return m_consumer->template esConsumes<TYPE, REC, TR>();
326 template <Transition TR>
329 template <
typename TYPE,
typename REC>
344 template <BranchType B>
347 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()
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
std::tuple< ESTokenIndex, char const * > recordESConsumes(Transition, eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &iTag)
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)
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)