|
|
Go to the documentation of this file. 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 {
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>
191 template <
typename ProductType, BranchType B = InEvent>
193 TypeToGet tid = TypeToGet::make<ProductType>();
194 consumesMany<B>(tid);
199 template <BranchType B>
205 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
207 return esConsumes<ESProduct, ESRecord, Tr>(
ESInputTag{});
210 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
214 std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
217 eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
222 template <Transition Tr = Transition::Event>
227 template <Transition Tr = Transition::Event>
233 template <Transition Tr = Transition::Event>
275 unsigned short iDeltaToProductInstance,
276 unsigned short iDeltaToProcessName)
320 template <Transition TR>
323 template <
typename TYPE,
typename REC>
325 return m_consumer->template esConsumes<TYPE, REC, TR>();
336 template <Transition TR>
339 template <
typename TYPE,
typename REC>
354 template <BranchType B>
357 template <
typename TYPE>
void throwESConsumesCallAfterFrozen(eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &) const
unsigned int ProductResolverIndex
void consumesMany(const TypeToGet &id)
std::array< std::vector< ESRecordIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esRecordsToGetFromTransition_
bool registeredToConsumeMany(TypeID const &, BranchType) const
auto esConsumes(ESInputTag tag) noexcept
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
EDConsumerBaseWithTagESAdaptor(EDConsumerBase *iBase, ESInputTag iTag) noexcept
EDConsumerBase const & operator=(EDConsumerBase const &)=delete
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)
edm::SoATuple< ESTokenLookupInfo, ESProxyIndex > m_esTokenInfo
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
std::vector< ESProxyIndex > const & esGetTokenIndicesVector(edm::Transition iTrans) const
TokenLookupInfo(edm::TypeID const &iID, ProductResolverIndex iIndex, bool skipCurrentProcess, BranchType iBranch)
void itemsMayGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType iType) const
void throwConsumesCallAfterFrozen(TypeToGet const &, InputTag const &) const
bool registeredToConsume(ProductResolverIndex, bool, BranchType) const
unsigned int m_startOfComponentName
EDConsumerBaseESAdaptor(EDConsumerBase *iBase)
std::vector< char > m_tokenLabels
std::vector< ConsumesInfo > consumesInfo() const
EDConsumerBase * m_consumer
ProductResolverIndexAndSkipBit uncheckedIndexFrom(EDGetToken) const
const NameTag & name() const
std::vector< ESRecordIndex > const & esGetTokenRecordIndicesVector(edm::Transition iTrans) const
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
typename default_record< T >::RecordT default_record_t
const edm::InputTag m_tag
const char * value() const
void itemsToGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
auto esConsumes(ESInputTag const &tag)
static EventSetupRecordKey makeKey()
void throwESConsumesInProcessBlock() const
constexpr auto esConsumes() noexcept
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
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
ESGetTokenGeneric esConsumes(eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
Used with EventSetupRecord::doGet.
void selectInputProcessBlocks(ProductRegistry const &productRegistry, ProcessBlockHelperBase const &processBlockHelperBase)
eventsetup::DataKey m_key
eventsetup::EventSetupRecordKey m_record
unsigned short m_deltaToProcessName
void throwBadToken(edm::TypeID const &iType, EDGetToken iToken) const
const TypeTag & type() const
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
virtual ~EDConsumerBase() noexcept(false)
void consumesMany(const TypeToGet &id)
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypes > itemsToGetFromBranch_
EDConsumerBaseAdaptor< B > consumes(edm::InputTag tag) noexcept
bool containsCurrentProcessAlias_
EDConsumerBase * m_consumer
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
static const std::string B
ESGetToken< TYPE, REC > consumes()
EDConsumerBaseAdaptor(EDConsumerBase *iBase, edm::InputTag iTag) noexcept
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
EDGetTokenT< TYPE > consumes()
unsigned short m_deltaToProductInstance
const char * labelFor(ESTokenIndex) const
virtual void doSelectInputProcessBlocks(ProductRegistry const &, ProcessBlockHelperBase const &)
void throwBranchMismatch(BranchType, EDGetToken) const
LabelPlacement(unsigned int iStartOfModuleLabel, unsigned short iDeltaToProductInstance, unsigned short iDeltaToProcessName)
std::array< std::vector< ESProxyIndex >, static_cast< unsigned int >edm::Transition::NumberOfEventSetupTransitions)> esItemsToGetFromTransition_
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
ProductResolverIndexAndSkipBit m_index
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
ESTokenIndex recordESConsumes(Transition, eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &iTag)
EDGetToken consumes(const TypeToGet &id, edm::InputTag const &tag)
void throwTypeMismatch(edm::TypeID const &, EDGetToken) const
EDConsumerBase * m_consumer
const TypeTag & type() const
EDGetToken consumes(TypeToGet const &id, edm::InputTag const &tag)
ProductResolverIndexAndSkipBit indexFrom(EDGetToken, BranchType, TypeID const &) const
ESGetToken< TYPE, REC > consumes()
void convertCurrentProcessAlias(std::string const &processName)
Convert "@currentProcess" in InputTag process names to the actual current process name.
virtual void registerLateConsumes(eventsetup::ESRecordsToProxyIndices const &)
unsigned int m_startOfModuleLabel