1 #ifndef FWCore_Framework_EDConsumerBase_h 2 #define FWCore_Framework_EDConsumerBase_h 51 class ModuleDescription;
52 class ProductResolverIndexHelper;
53 class ProductRegistry;
54 class ConsumesCollector;
58 namespace eventsetup {
64 EDConsumerBase() : m_tokenLabels{
'\0'}, frozen_(
false), containsCurrentProcessAlias_(
false) {}
79 void itemsToGet(
BranchType, std::vector<ProductResolverIndexAndSkipBit>&)
const;
80 void itemsMayGet(
BranchType, std::vector<ProductResolverIndexAndSkipBit>&)
const;
83 return itemsToGetFromBranch_[iType];
98 void labelsForToken(
EDGetToken iToken, Labels& oLabels)
const;
100 void modulesWhoseProductsAreConsumed(std::vector<ModuleDescription const*>&
modules,
102 std::map<std::string, ModuleDescription const*>
const& labelsToDesc,
108 std::vector<ConsumesInfo> consumesInfo()
const;
111 auto const&
v = esItemsToGetFromTransition_[
static_cast<unsigned int>(iTrans)];
115 return &(esItemsToGetFromTransition_[
static_cast<unsigned int>(iTrans)].front());
120 template <
typename T>
125 template <
typename ProductType, BranchType B = InEvent>
127 TypeToGet tid = TypeToGet::make<ProductType>();
135 template <BranchType B>
137 return EDGetToken{recordConsumes(
B,
id, checkIfEmpty(tag),
true)};
140 template <
typename ProductType, BranchType B = InEvent>
142 TypeToGet tid = TypeToGet::make<ProductType>();
148 template <BranchType B>
150 return EDGetToken{recordConsumes(
B,
id, checkIfEmpty(tag),
false)};
153 template <
typename ProductType, BranchType B = InEvent>
155 TypeToGet tid = TypeToGet::make<ProductType>();
156 consumesMany<B>(tid);
161 template <BranchType B>
167 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
169 return esConsumes<ESProduct, ESRecord, Tr>(
ESInputTag{});
172 template <
typename ESProduct,
typename ESRecord, Transition Tr = Transition::Event>
174 auto index = recordESConsumes(Tr,
176 std::conditional_t<std::is_same_v<ESRecord, edm::DefaultRecord>,
179 eventsetup::heterocontainer::HCTypeTag::make<ESProduct>(),
203 : m_type(iID), m_index(iIndex, skipCurrentProcess), m_branchType(iBranch) {}
211 unsigned short iDeltaToProductInstance,
212 unsigned short iDeltaToProcessName)
213 : m_startOfModuleLabel(iStartOfModuleLabel),
214 m_deltaToProductInstance(iDeltaToProductInstance),
215 m_deltaToProcessName(iDeltaToProcessName) {}
246 enum { kESLookupInfo, kESProxyIndex };
249 esItemsToGetFromTransition_;
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
unsigned int m_startOfComponentName
unsigned int ProductResolverIndex
eventsetup::EventSetupRecordKey m_record
void consumesMany(const TypeToGet &id)
LabelPlacement(unsigned int iStartOfModuleLabel, unsigned short iDeltaToProductInstance, unsigned short iDeltaToProcessName)
bool containsCurrentProcessAlias_
unsigned short m_deltaToProcessName
eventsetup::DataKey m_key
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
void consumesMany(const TypeToGet &id)
std::vector< ProductResolverIndexAndSkipBit > const & itemsToGetFrom(BranchType iType) const
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
typename default_record< T >::RecordT default_record_t
unsigned short m_deltaToProductInstance
ProductResolverIndexAndSkipBit m_index
EDGetToken mayConsume(const TypeToGet &id, edm::InputTag const &tag)
static const std::string B
std::vector< char > m_tokenLabels
EDGetToken consumes(TypeToGet const &id, edm::InputTag const &tag)
edm::SoATuple< ESTokenLookupInfo, ESProxyIndex > m_esTokenInfo
static EventSetupRecordKey makeKey()
auto esConsumes(ESInputTag const &tag)
TokenLookupInfo(edm::TypeID const &iID, ProductResolverIndex iIndex, bool skipCurrentProcess, BranchType iBranch)
EDGetTokenT< ProductType > mayConsume(edm::InputTag const &tag)
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypes > itemsToGetFromBranch_
unsigned int m_startOfModuleLabel
ESProxyIndex const * esGetTokenIndices(edm::Transition iTrans) const
EDGetToken consumes(const TypeToGet &id, edm::InputTag const &tag)