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 {
116 std::vector<ModuleProcessName>& modulesInPreviousProcesses,
118 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
149 template <Transition Tr>
151 template <Transition Tr>
153 template <BranchType B>
155 template <
typename T>
160 template <
typename ProductType, BranchType B = InEvent>
162 TypeToGet tid = TypeToGet::make<ProductType>();
166 template <BranchType B = InEvent>
175 template <BranchType B>
180 template <
typename ProductType, BranchType B = InEvent>
182 TypeToGet tid = TypeToGet::make<ProductType>();
188 template <BranchType B>
193 template <
typename ProductType, BranchType B = InEvent>
195 TypeToGet tid = TypeToGet::make<ProductType>();
196 consumesMany<B>(tid);
201 template <BranchType B>
207 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
209 return esConsumes<ESProduct, ESRecord, Tr>(
ESInputTag{});
212 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
216 std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
219 eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
224 template <Transition Tr = Transition::Event>
229 template <Transition Tr = Transition::Event>
235 template <Transition Tr = Transition::Event>
281 unsigned short iDeltaToProductInstance,
282 unsigned short iDeltaToProcessName)
326 template <Transition TR>
329 template <
typename TYPE,
typename REC>
331 return m_consumer->template esConsumes<TYPE, REC, TR>();
342 template <Transition TR>
345 template <
typename TYPE,
typename REC>
360 template <BranchType B>
363 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
void consumesMany(const TypeToGet &id)
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
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) 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)
void consumesMany(const TypeToGet &id)
std::array< std::vector< ESProxyIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_
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.
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
unsigned short m_deltaToProductInstance
ProductResolverIndexAndSkipBit m_index
EDConsumerBase * m_consumer
virtual void registerLateConsumes(eventsetup::ESRecordsToProxyIndices const &)
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< 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::vector< ESProxyIndex > const & esGetTokenIndicesVector(edm::Transition iTrans) const
edm::SoATuple< ESTokenLookupInfo, ESProxyIndex > m_esTokenInfo
void itemsMayGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
bool registeredToConsumeMany(TypeID const &, BranchType) 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)
EDConsumerBaseESAdaptor(EDConsumerBase *iBase)
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)
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
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)