|
|
Go to the documentation of this file. 1 #ifndef FWCore_Framework_EDConsumerBase_h
2 #define FWCore_Framework_EDConsumerBase_h
53 class ModuleDescription;
54 class ProductResolverIndexHelper;
55 class ProductRegistry;
56 class ConsumesCollector;
57 template <Transition Tr>
59 template <Transition Tr>
61 template <BranchType B>
66 namespace eventsetup {
110 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
141 template <Transition Tr>
143 template <Transition Tr>
145 template <BranchType B>
147 template <
typename T>
152 template <
typename ProductType, BranchType B = InEvent>
154 TypeToGet tid = TypeToGet::make<ProductType>();
158 template <BranchType B = InEvent>
167 template <BranchType B>
172 template <
typename ProductType, BranchType B = InEvent>
174 TypeToGet tid = TypeToGet::make<ProductType>();
180 template <BranchType B>
185 template <
typename ProductType, BranchType B = InEvent>
187 TypeToGet tid = TypeToGet::make<ProductType>();
188 consumesMany<B>(tid);
193 template <BranchType B>
199 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
201 return esConsumes<ESProduct, ESRecord, Tr>(
ESInputTag{});
204 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
208 std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
211 eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
216 template <Transition Tr = Transition::Event>
221 template <Transition Tr = Transition::Event>
227 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>
void throwESConsumesCallAfterFrozen(eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &) const
void modulesWhoseProductsAreConsumed(std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) 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
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
ESGetTokenGeneric esConsumes(eventsetup::EventSetupRecordKey const &iRecord, eventsetup::DataKey const &iKey)
Used with EventSetupRecord::doGet.
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
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