|
|
Go to the documentation of this file. 1 #ifndef FWCore_Framework_EDConsumerBase_h
2 #define FWCore_Framework_EDConsumerBase_h
53 class ModuleDescription;
54 class ModuleProcessName;
55 class ProductResolverIndexHelper;
56 class ProductRegistry;
57 class ConsumesCollector;
58 template <Transition Tr>
60 template <Transition Tr>
62 template <BranchType B>
67 namespace eventsetup {
110 std::vector<ModuleProcessName>& modulesInPreviousProcesses,
112 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
143 template <Transition Tr>
145 template <Transition Tr>
147 template <BranchType B>
149 template <
typename T>
154 template <
typename ProductType, BranchType B = InEvent>
156 TypeToGet tid = TypeToGet::make<ProductType>();
160 template <BranchType B = InEvent>
169 template <BranchType B>
174 template <
typename ProductType, BranchType B = InEvent>
176 TypeToGet tid = TypeToGet::make<ProductType>();
182 template <BranchType B>
187 template <
typename ProductType, BranchType B = InEvent>
189 TypeToGet tid = TypeToGet::make<ProductType>();
190 consumesMany<B>(tid);
195 template <BranchType B>
201 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
203 return esConsumes<ESProduct, ESRecord, Tr>(
ESInputTag{});
206 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
210 std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
213 eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
218 template <Transition Tr = Transition::Event>
223 template <Transition Tr = Transition::Event>
229 template <Transition Tr = Transition::Event>
268 unsigned short iDeltaToProductInstance,
269 unsigned short iDeltaToProcessName)
313 template <Transition TR>
316 template <
typename TYPE,
typename REC>
318 return m_consumer->template esConsumes<TYPE, REC, TR>();
329 template <Transition TR>
332 template <
typename TYPE,
typename REC>
347 template <BranchType B>
350 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.
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