76 if (iTag.
label().empty()) {
93 const size_t labelSize = iTag.
label().size();
94 const size_t productInstanceSize = iTag.
instance().size();
96 unsigned short delta1 = labelSize+1;
97 unsigned short delta2 = labelSize+2+productInstanceSize;
103 const size_t additionalSize =
105 labelSize+productInstanceSize+3 :
106 labelSize+productInstanceSize+iTag.
process().size()+3;
120 if (!skipCurrentProcess) {
140 itInfo != itEnd; ++itInfo,++itKind,++itLabels) {
141 if(itInfo->m_branchType == iBranchType) {
142 const unsigned int labelStart = itLabels->m_startOfModuleLabel;
147 moduleLabel+itLabels->m_deltaToProductInstance,
148 moduleLabel+itLabels->m_deltaToProcessName),
149 itInfo->m_index.skipCurrentProcess());
159 if(
info.m_branchType == iBranchType &&
170 for(
unsigned int j=0;
j!=matches.numberOfMatches();++
j) {
172 if(matches.isFullyResolved(
j)) {
173 auto index =matches.index(
j);
215 unsigned int count=0;
220 it != itEnd; ++it,++itAlwaysGet) {
221 if(iBranch==it->m_branchType) {
230 oIndices.reserve(oIndices.size()+
count);
235 it != itEnd; ++it,++itAlwaysGet) {
236 if(iBranch==it->m_branchType) {
239 oIndices.push_back(it->m_index);
251 unsigned int count=0;
256 it != itEnd; ++it,++itAlwaysGet) {
257 if(iBranch==it->m_branchType) {
259 if(not *itAlwaysGet) {
266 oIndices.reserve(oIndices.size()+
count);
271 it != itEnd; ++it,++itAlwaysGet) {
272 if(iBranch==it->m_branchType) {
274 if(not *itAlwaysGet) {
275 oIndices.push_back(it->m_index);
300 if(it->m_index.productHolderIndex() == iIndex and
301 it->m_index.skipCurrentProcess() == skipCurrentProcess and
302 it->m_branchType == iBranch) {
325 it->m_type == iType and
326 it->m_branchType == iBranch) {
345 throw cms::Exception(
"TypeMismatch")<<
"A get using a EDGetToken used the C++ type '"<<iType.
className()<<
"' but the consumes call was for type '"<<
m_tokenInfo.get<
kLookupInfo>(iToken.
index()).m_type.className()<<
"'.\n Please modify either the consumes or get call so the types match.";
356 throw cms::Exception(
"BadToken")<<
"A get using a EDGetToken with the C++ type '"<<iType.
className()<<
"' was made using an uninitialized token.\n Please check that the variable is being initialized from a 'consumes' call.";
358 throw cms::Exception(
"BadToken")<<
"A get using a EDGetToken with the C++ type '"<<iType.
className()<<
"' was made using a token with a value "<<iToken.
index()<<
" which is beyond the range used by this module.\n Please check that the variable is being initialized from a 'consumes' call from this module.\n You can not share EDGetToken values between modules.";
363 throw cms::Exception(
"LogicError") <<
"A module declared it consumes a product after its constructor.\n"
364 <<
"This must be done in the contructor\n"
365 <<
"The product type was: " << typeToGet.
type() <<
"\n"
366 <<
"and " << inputTag <<
"\n";
370 struct CharStarComp {
371 bool operator()(
const char* iLHS,
const char* iRHS)
const {
372 return strcmp(iLHS,iRHS) < 0;
379 std::vector<const char*>& oModuleLabels
382 std::set<const char*, CharStarComp> uniqueModules;
385 if( not
info.m_index.skipCurrentProcess() ) {
389 if( (not processName)
or processName[0]==0
or
390 iProcessName == processName) {
396 oModuleLabels = std::vector<const char*>(uniqueModules.begin(),uniqueModules.end());
Matches relatedIndexes(KindOfType kindOfType, TypeID const &typeID, char const *moduleLabel, char const *instance) const
tuple start
Check for commandline option errors.
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
void updateLookup(BranchType iBranchType, ProductHolderIndexHelper const &)
ProductHolderIndex index(KindOfType kindOfType, TypeID const &typeID, char const *moduleLabel, char const *instance, char const *process=0) const
void itemsToGet(BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
void itemsMayGet(BranchType, std::vector< ProductHolderIndexAndSkipBit > &) const
void throwTypeMismatch(edm::TypeID const &, EDGetToken) const
void throwBadToken(edm::TypeID const &iType, EDGetToken iToken) const
ProductHolderIndexAndSkipBit indexFrom(EDGetToken, BranchType, TypeID const &) const
const char * productInstance
unsigned int ProductHolderIndex
void throwConsumesCallAfterFrozen(TypeToGet const &, InputTag const &) const
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
void throwBranchMismatch(BranchType, EDGetToken) const
bool isUninitialized() const
std::vector< char > m_tokenLabels
void modulesDependentUpon(const std::string &iProcessName, std::vector< const char * > &oModuleLabels) const
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)
static const edm::InputTag kWasEmpty("@EmptyLabel@")
bool registeredToConsumeMany(TypeID const &, BranchType) const
virtual ~EDConsumerBase()
std::string const & BranchTypeToString(BranchType const &branchType)
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
bool registeredToConsume(ProductHolderIndex, bool, BranchType) const
TypeID const & type() const
std::vector< ProductHolderIndexAndSkipBit > itemsToGetFromEvent_
std::string const & className() const
unsigned int index() const