CMS 3D CMS Logo

EDConsumerBase.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FWCore/Framework
4 // Class : EDConsumerBase
5 //
6 // Implementation:
7 // [Notes on implementation]
8 //
9 // Original Author: Chris Jones
10 // Created: Tue, 02 Apr 2013 21:36:06 GMT
11 //
12 
13 // system include files
14 #include <algorithm>
15 #include <cassert>
16 #include <cstring>
17 #include <set>
18 #include <utility>
19 
20 // user include files
31 
32 using namespace edm;
33 
34 //
35 // constants, enums and typedefs
36 //
37 
38 //
39 // static data member definitions
40 //
41 
42 //
43 // constructors and destructor
44 //
45 //EDConsumerBase::EDConsumerBase()
46 //{
47 //}
48 
49 // EDConsumerBase::EDConsumerBase(const EDConsumerBase& rhs)
50 // {
51 // // do actual copying here;
52 // }
53 
55 
56 //
57 // assignment operators
58 //
59 // const EDConsumerBase& EDConsumerBase::operator=(const EDConsumerBase& rhs)
60 // {
61 // //An exception safe implementation is
62 // EDConsumerBase temp(rhs);
63 // swap(rhs);
64 //
65 // return *this;
66 // }
67 
68 //
69 // member functions
70 //
72  ConsumesCollector c{this};
73  return c;
74 }
75 
76 static const edm::InputTag kWasEmpty("@EmptyLabel@");
77 
79  if (iTag.label().empty()) {
80  return kWasEmpty;
81  }
82  return iTag;
83 }
84 
86  TypeToGet const& iType,
87  edm::InputTag const& iTag,
88  bool iAlwaysGets) {
89  if (frozen_) {
90  throwConsumesCallAfterFrozen(iType, iTag);
91  }
92 
93  unsigned int index = m_tokenInfo.size();
94 
95  bool skipCurrentProcess = iTag.willSkipCurrentProcess();
96 
97  const size_t labelSize = iTag.label().size();
98  const size_t productInstanceSize = iTag.instance().size();
99  unsigned int labelStart = m_tokenLabels.size();
100  unsigned short delta1 = labelSize + 1;
101  unsigned short delta2 = labelSize + 2 + productInstanceSize;
102  m_tokenInfo.emplace_back(TokenLookupInfo{iType.type(), ProductResolverIndexInvalid, skipCurrentProcess, iBranch},
103  iAlwaysGets,
104  LabelPlacement{labelStart, delta1, delta2},
105  iType.kind());
106 
107  const size_t additionalSize = skipCurrentProcess ? labelSize + productInstanceSize + 3
108  : labelSize + productInstanceSize + iTag.process().size() + 3;
109 
110  m_tokenLabels.reserve(m_tokenLabels.size() + additionalSize);
111  {
112  const std::string& m = iTag.label();
113  m_tokenLabels.insert(m_tokenLabels.end(), m.begin(), m.end());
114  m_tokenLabels.push_back('\0');
115  }
116  {
117  const std::string& m = iTag.instance();
118  m_tokenLabels.insert(m_tokenLabels.end(), m.begin(), m.end());
119  m_tokenLabels.push_back('\0');
120  }
121  {
122  const std::string& m = iTag.process();
123  if (m == InputTag::kCurrentProcess) {
125  }
126  if (!skipCurrentProcess) {
127  m_tokenLabels.insert(m_tokenLabels.end(), m.begin(), m.end());
128  m_tokenLabels.push_back('\0');
129  } else {
130  m_tokenLabels.push_back('\0');
131  }
132  }
133  return index;
134 }
135 
137  ProductResolverIndexHelper const& iHelper,
138  bool iPrefetchMayGet) {
139  frozen_ = true;
141  {
142  auto itKind = m_tokenInfo.begin<kKind>();
143  auto itLabels = m_tokenInfo.begin<kLabels>();
144  for (auto itInfo = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); itInfo != itEnd;
145  ++itInfo, ++itKind, ++itLabels) {
146  if (itInfo->m_branchType == iBranchType) {
147  const unsigned int labelStart = itLabels->m_startOfModuleLabel;
148  const char* moduleLabel = &(m_tokenLabels[labelStart]);
149  itInfo->m_index = ProductResolverIndexAndSkipBit(iHelper.index(*itKind,
150  itInfo->m_type,
151  moduleLabel,
152  moduleLabel + itLabels->m_deltaToProductInstance,
153  moduleLabel + itLabels->m_deltaToProcessName),
154  itInfo->m_index.skipCurrentProcess());
155  }
156  }
157  }
158 
159  //now add resolved requests to get many to the end of our list
160  // a get many will have an empty module label
161  for (size_t i = 0, iEnd = m_tokenInfo.size(); i != iEnd; ++i) {
162  //need to copy since pointer could be invalidated by emplace_back
163  auto const info = m_tokenInfo.get<kLookupInfo>(i);
164  if (info.m_branchType == iBranchType && info.m_index.productResolverIndex() == ProductResolverIndexInvalid &&
165  m_tokenLabels[m_tokenInfo.get<kLabels>(i).m_startOfModuleLabel] == '\0') {
166  //find all matching types
167  const auto kind = m_tokenInfo.get<kKind>(i);
168  auto matches = iHelper.relatedIndexes(kind, info.m_type);
169 
170  //NOTE: This could be changed to contain the true labels for what is being
171  // requested but for now I want to remember these are part of a get many
172  const LabelPlacement labels = m_tokenInfo.get<kLabels>(i);
173  bool alwaysGet = m_tokenInfo.get<kAlwaysGets>(i);
174  for (unsigned int j = 0; j != matches.numberOfMatches(); ++j) {
175  //only keep the ones that are for a specific data item and not a collection
176  if (matches.isFullyResolved(j)) {
177  auto index = matches.index(j);
178  m_tokenInfo.emplace_back(
179  TokenLookupInfo{info.m_type, index, info.m_index.skipCurrentProcess(), info.m_branchType},
180  alwaysGet,
181  labels,
182  kind);
183  }
184  }
185  }
186  }
187  m_tokenInfo.shrink_to_fit();
188 
189  itemsToGet(iBranchType, itemsToGetFromBranch_[iBranchType]);
190  if (iPrefetchMayGet) {
191  itemsMayGet(iBranchType, itemsToGetFromBranch_[iBranchType]);
192  }
193 }
194 
196  unsigned int index = 0;
197  for (auto it = m_esTokenInfo.begin<kESLookupInfo>(); it != m_esTokenInfo.end<kESLookupInfo>(); ++it, ++index) {
198  auto indexInRecord = iPI.indexInRecord(it->m_record, it->m_key);
200  const char* componentName = &(m_tokenLabels[it->m_startOfComponentName]);
201  if (*componentName) {
202  auto component = iPI.component(it->m_record, it->m_key);
203  if (component->label_.empty()) {
204  if (component->type_ != componentName) {
206  }
207  } else if (component->label_ != componentName) {
209  }
210  }
211  }
212  m_esTokenInfo.get<kESProxyIndex>(index) = indexInRecord;
213 
214  int negIndex = -1 * (index + 1);
215  for (auto& items : esItemsToGetFromTransition_) {
216  for (auto& itemIndex : items) {
217  if (itemIndex.value() == negIndex) {
218  itemIndex = indexInRecord;
219  negIndex = 1;
220  break;
221  }
222  }
223  if (negIndex > 0) {
224  break;
225  }
226  }
227  }
228 }
229 
231  eventsetup::EventSetupRecordKey const& iRecord,
233  edm::ESInputTag const& iTag) {
234  //m_tokenLabels first entry is a null. Since most ES data requests have
235  // empty labels we will assume we can reuse the first entry
236  unsigned int startOfComponentName = 0;
237  if (not iTag.module().empty()) {
238  startOfComponentName = m_tokenLabels.size();
239 
240  m_tokenLabels.reserve(m_tokenLabels.size() + iTag.module().size() + 1);
241  {
242  const std::string& m = iTag.module();
243  m_tokenLabels.insert(m_tokenLabels.end(), m.begin(), m.end());
244  m_tokenLabels.push_back('\0');
245  }
246  }
247 
248  auto index = static_cast<ESProxyIndex::Value_t>(m_esTokenInfo.size());
249  m_esTokenInfo.emplace_back(
250  ESTokenLookupInfo{iRecord, eventsetup::DataKey{iDataType, iTag.data().c_str()}, startOfComponentName},
251  ESProxyIndex{-1});
252  auto indexForToken = esItemsToGetFromTransition_[static_cast<unsigned int>(iTrans)].size();
253  esItemsToGetFromTransition_[static_cast<unsigned int>(iTrans)].push_back(ESProxyIndex{-1 * (index + 1)});
254  return ESTokenIndex{static_cast<ESTokenIndex::Value_t>(indexForToken)};
255 }
256 
257 //
258 // const member functions
259 //
261  BranchType iBranch,
262  TypeID const& iType) const {
263  if (UNLIKELY(iToken.index() >= m_tokenInfo.size())) {
264  throwBadToken(iType, iToken);
265  }
266  const auto& info = m_tokenInfo.get<kLookupInfo>(iToken.index());
267  if (LIKELY(iBranch == info.m_branchType)) {
268  if (LIKELY(iType == info.m_type)) {
269  return info.m_index;
270  } else {
271  throwTypeMismatch(iType, iToken);
272  }
273  } else {
274  throwBranchMismatch(iBranch, iToken);
275  }
277 }
278 
280  return m_tokenInfo.get<kLookupInfo>(iToken.index()).m_index;
281 }
282 
283 void EDConsumerBase::itemsToGet(BranchType iBranch, std::vector<ProductResolverIndexAndSkipBit>& oIndices) const {
284  //how many are we adding?
285  unsigned int count = 0;
286  {
287  auto itAlwaysGet = m_tokenInfo.begin<kAlwaysGets>();
288  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd;
289  ++it, ++itAlwaysGet) {
290  if (iBranch == it->m_branchType) {
291  if (it->m_index.productResolverIndex() != ProductResolverIndexInvalid) {
292  if (*itAlwaysGet) {
293  ++count;
294  }
295  }
296  }
297  }
298  }
299  oIndices.reserve(oIndices.size() + count);
300  {
301  auto itAlwaysGet = m_tokenInfo.begin<kAlwaysGets>();
302  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd;
303  ++it, ++itAlwaysGet) {
304  if (iBranch == it->m_branchType) {
305  if (it->m_index.productResolverIndex() != ProductResolverIndexInvalid) {
306  if (*itAlwaysGet) {
307  oIndices.push_back(it->m_index);
308  }
309  }
310  }
311  }
312  }
313 }
314 
315 void EDConsumerBase::itemsMayGet(BranchType iBranch, std::vector<ProductResolverIndexAndSkipBit>& oIndices) const {
316  //how many are we adding?
317  unsigned int count = 0;
318  {
319  auto itAlwaysGet = m_tokenInfo.begin<kAlwaysGets>();
320  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd;
321  ++it, ++itAlwaysGet) {
322  if (iBranch == it->m_branchType) {
323  if (it->m_index.productResolverIndex() != ProductResolverIndexInvalid) {
324  if (not*itAlwaysGet) {
325  ++count;
326  }
327  }
328  }
329  }
330  }
331  oIndices.reserve(oIndices.size() + count);
332  {
333  auto itAlwaysGet = m_tokenInfo.begin<kAlwaysGets>();
334  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd;
335  ++it, ++itAlwaysGet) {
336  if (iBranch == it->m_branchType) {
337  if (it->m_index.productResolverIndex() != ProductResolverIndexInvalid) {
338  if (not*itAlwaysGet) {
339  oIndices.push_back(it->m_index);
340  }
341  }
342  }
343  }
344  }
345 }
346 
347 void EDConsumerBase::labelsForToken(EDGetToken iToken, Labels& oLabels) const {
348  unsigned int index = iToken.index();
349  auto labels = m_tokenInfo.get<kLabels>(index);
350  unsigned int start = labels.m_startOfModuleLabel;
351  oLabels.module = &(m_tokenLabels[start]);
352  oLabels.productInstance = oLabels.module + labels.m_deltaToProductInstance;
353  oLabels.process = oLabels.module + labels.m_deltaToProcessName;
354 }
355 
357  bool skipCurrentProcess,
358  BranchType iBranch) const {
359  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd; ++it) {
360  if (it->m_index.productResolverIndex() == iIndex and it->m_index.skipCurrentProcess() == skipCurrentProcess and
361  it->m_branchType == iBranch) {
362  return true;
363  }
364  }
365  return false;
366 }
367 
368 bool EDConsumerBase::registeredToConsumeMany(TypeID const& iType, BranchType iBranch) const {
369  for (auto it = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); it != itEnd; ++it) {
370  //consumesMany entries do not have their index resolved
371  if (it->m_index.productResolverIndex() == ProductResolverIndexInvalid and it->m_type == iType and
372  it->m_branchType == iBranch) {
373  return true;
374  }
375  }
376  return false;
377 }
378 
379 void EDConsumerBase::throwTypeMismatch(edm::TypeID const& iType, EDGetToken iToken) const {
380  throw cms::Exception("TypeMismatch") << "A get using a EDGetToken used the C++ type '" << iType.className()
381  << "' but the consumes call was for type '"
382  << m_tokenInfo.get<kLookupInfo>(iToken.index()).m_type.className()
383  << "'.\n Please modify either the consumes or get call so the types match.";
384 }
386  throw cms::Exception("BranchTypeMismatch")
387  << "A get using a EDGetToken was done in " << BranchTypeToString(iBranch) << " but the consumes call was for "
388  << BranchTypeToString(m_tokenInfo.get<kLookupInfo>(iToken.index()).m_branchType)
389  << ".\n Please modify the consumes call to use the correct branch type.";
390 }
391 
392 void EDConsumerBase::throwBadToken(edm::TypeID const& iType, EDGetToken iToken) const {
393  if (iToken.isUninitialized()) {
394  throw cms::Exception("BadToken") << "A get using a EDGetToken with the C++ type '" << iType.className()
395  << "' was made using an uninitialized token.\n Please check that the variable is "
396  "being initialized from a 'consumes' call.";
397  }
398  throw cms::Exception("BadToken")
399  << "A get using a EDGetToken with the C++ type '" << iType.className() << "' was made using a token with a value "
400  << iToken.index()
401  << " which is beyond the range used by this module.\n Please check that the variable is being initialized from a "
402  "'consumes' call from this module.\n You can not share EDGetToken values between modules.";
403 }
404 
406  throw cms::Exception("LogicError") << "A module declared it consumes a product after its constructor.\n"
407  << "This must be done in the contructor\n"
408  << "The product type was: " << typeToGet.type() << "\n"
409  << "and " << inputTag << "\n";
410 }
411 
412 namespace {
413  struct CharStarComp {
414  bool operator()(const char* iLHS, const char* iRHS) const { return strcmp(iLHS, iRHS) < 0; }
415  };
416 } // namespace
417 
418 namespace {
419  void insertFoundModuleLabel(const char* consumedModuleLabel,
420  std::vector<ModuleDescription const*>& modules,
421  std::set<std::string>& alreadyFound,
422  std::map<std::string, ModuleDescription const*> const& labelsToDesc,
423  ProductRegistry const& preg) {
424  // Convert from label string to module description, eliminate duplicates,
425  // then insert into the vector of modules
426  auto it = labelsToDesc.find(consumedModuleLabel);
427  if (it != labelsToDesc.end()) {
428  if (alreadyFound.insert(consumedModuleLabel).second) {
429  modules.push_back(it->second);
430  }
431  return;
432  }
433  // Deal with EDAlias's by converting to the original module label first
434  std::vector<std::pair<std::string, std::string> > const& aliasToOriginal = preg.aliasToOriginal();
435  std::pair<std::string, std::string> target(consumedModuleLabel, std::string());
436  auto iter = std::lower_bound(aliasToOriginal.begin(), aliasToOriginal.end(), target);
437  if (iter != aliasToOriginal.end() && iter->first == consumedModuleLabel) {
438  std::string const& originalModuleLabel = iter->second;
439  auto iter2 = labelsToDesc.find(originalModuleLabel);
440  if (iter2 != labelsToDesc.end()) {
441  if (alreadyFound.insert(originalModuleLabel).second) {
442  modules.push_back(iter2->second);
443  }
444  return;
445  }
446  }
447  // Ignore the source products, we are only interested in module products.
448  // As far as I know, it should never be anything else so throw if something
449  // unknown gets passed in.
450  if (std::string(consumedModuleLabel) != "source") {
451  throw cms::Exception("EDConsumerBase", "insertFoundModuleLabel")
452  << "Couldn't find ModuleDescription for the consumed module label: " << std::string(consumedModuleLabel)
453  << "\n";
454  }
455  }
456 } // namespace
457 
458 void EDConsumerBase::modulesWhoseProductsAreConsumed(std::vector<ModuleDescription const*>& modules,
459  ProductRegistry const& preg,
460  std::map<std::string, ModuleDescription const*> const& labelsToDesc,
461  std::string const& processName) const {
462  ProductResolverIndexHelper const& iHelper = *preg.productLookup(InEvent);
463 
464  std::set<std::string> alreadyFound;
465 
466  auto itKind = m_tokenInfo.begin<kKind>();
467  auto itLabels = m_tokenInfo.begin<kLabels>();
468  for (auto itInfo = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); itInfo != itEnd;
469  ++itInfo, ++itKind, ++itLabels) {
470  if (itInfo->m_branchType == InEvent and (not itInfo->m_index.skipCurrentProcess())) {
471  const unsigned int labelStart = itLabels->m_startOfModuleLabel;
472  const char* consumedModuleLabel = &(m_tokenLabels[labelStart]);
473  const char* consumedProcessName = consumedModuleLabel + itLabels->m_deltaToProcessName;
474 
475  if (*consumedModuleLabel != '\0') { // not a consumesMany
476  if (*consumedProcessName != '\0') { // process name is specified in consumes call
477  if (processName == consumedProcessName &&
478  iHelper.index(*itKind,
479  itInfo->m_type,
480  consumedModuleLabel,
481  consumedModuleLabel + itLabels->m_deltaToProductInstance,
482  consumedModuleLabel + itLabels->m_deltaToProcessName) != ProductResolverIndexInvalid) {
483  insertFoundModuleLabel(consumedModuleLabel, modules, alreadyFound, labelsToDesc, preg);
484  }
485  } else { // process name was empty
486  auto matches = iHelper.relatedIndexes(
487  *itKind, itInfo->m_type, consumedModuleLabel, consumedModuleLabel + itLabels->m_deltaToProductInstance);
488  for (unsigned int j = 0; j < matches.numberOfMatches(); ++j) {
489  if (processName == matches.processName(j)) {
490  insertFoundModuleLabel(consumedModuleLabel, modules, alreadyFound, labelsToDesc, preg);
491  }
492  }
493  }
494  // consumesMany case
495  } else if (itInfo->m_index.productResolverIndex() == ProductResolverIndexInvalid) {
496  auto matches = iHelper.relatedIndexes(*itKind, itInfo->m_type);
497  for (unsigned int j = 0; j < matches.numberOfMatches(); ++j) {
498  if (processName == matches.processName(j)) {
499  insertFoundModuleLabel(matches.moduleLabel(j), modules, alreadyFound, labelsToDesc, preg);
500  }
501  }
502  }
503  }
504  }
505 }
506 
508  frozen_ = true;
509 
512 
513  std::vector<char> newTokenLabels;
514 
515  // first calculate the size of the new vector and reserve memory for it
516  std::vector<char>::size_type newSize = 0;
517  std::string newProcessName;
518  for (auto iter = m_tokenInfo.begin<kLabels>(), itEnd = m_tokenInfo.end<kLabels>(); iter != itEnd; ++iter) {
519  newProcessName = &m_tokenLabels[iter->m_startOfModuleLabel + iter->m_deltaToProcessName];
520  if (newProcessName == InputTag::kCurrentProcess) {
521  newProcessName = processName;
522  }
523  newSize += (iter->m_deltaToProcessName + newProcessName.size() + 1);
524  }
525  newTokenLabels.reserve(newSize);
526 
527  unsigned int newStartOfModuleLabel = 0;
528  for (auto iter = m_tokenInfo.begin<kLabels>(), itEnd = m_tokenInfo.end<kLabels>(); iter != itEnd; ++iter) {
529  unsigned int startOfModuleLabel = iter->m_startOfModuleLabel;
530  unsigned short deltaToProcessName = iter->m_deltaToProcessName;
531 
532  iter->m_startOfModuleLabel = newStartOfModuleLabel;
533 
534  newProcessName = &m_tokenLabels[startOfModuleLabel + deltaToProcessName];
535  if (newProcessName == InputTag::kCurrentProcess) {
536  newProcessName = processName;
537  }
538 
539  newStartOfModuleLabel += (deltaToProcessName + newProcessName.size() + 1);
540 
541  // Copy in both the module label and instance, they are the same
542  newTokenLabels.insert(newTokenLabels.end(),
543  m_tokenLabels.begin() + startOfModuleLabel,
544  m_tokenLabels.begin() + (startOfModuleLabel + deltaToProcessName));
545 
546  newTokenLabels.insert(newTokenLabels.end(), newProcessName.begin(), newProcessName.end());
547  newTokenLabels.push_back('\0');
548  }
549  m_tokenLabels = std::move(newTokenLabels);
550  }
551 }
552 
553 std::vector<ConsumesInfo> EDConsumerBase::consumesInfo() const {
554  // Use this to eliminate duplicate entries related
555  // to consumesMany items where only the type was specified
556  // and the there are multiple matches. In these cases the
557  // label, instance, and process will be empty.
558  std::set<edm::TypeID> alreadySeenTypes;
559 
560  std::vector<ConsumesInfo> result;
561  auto itAlways = m_tokenInfo.begin<kAlwaysGets>();
562  auto itKind = m_tokenInfo.begin<kKind>();
563  auto itLabels = m_tokenInfo.begin<kLabels>();
564  for (auto itInfo = m_tokenInfo.begin<kLookupInfo>(), itEnd = m_tokenInfo.end<kLookupInfo>(); itInfo != itEnd;
565  ++itInfo, ++itKind, ++itLabels, ++itAlways) {
566  const unsigned int labelStart = itLabels->m_startOfModuleLabel;
567  const char* consumedModuleLabel = &(m_tokenLabels[labelStart]);
568  const char* consumedInstance = consumedModuleLabel + itLabels->m_deltaToProductInstance;
569  const char* consumedProcessName = consumedModuleLabel + itLabels->m_deltaToProcessName;
570 
571  // consumesMany case
572  if (*consumedModuleLabel == '\0') {
573  if (!alreadySeenTypes.insert(itInfo->m_type).second) {
574  continue;
575  }
576  }
577 
578  // Just copy the information into the ConsumesInfo data structure
579  result.emplace_back(itInfo->m_type,
580  consumedModuleLabel,
581  consumedInstance,
582  consumedProcessName,
583  itInfo->m_branchType,
584  *itKind,
585  *itAlways,
586  itInfo->m_index.skipCurrentProcess());
587  }
588  return result;
589 }
590 
591 const char* EDConsumerBase::labelFor(ESTokenIndex iIndex) const {
592  return m_esTokenInfo.get<kESLookupInfo>(iIndex.value()).m_key.name().value();
593 }
Likely.h
SummaryClient_cfi.labels
labels
Definition: SummaryClient_cfi.py:61
edm::InputTag::kCurrentProcess
static const std::string kCurrentProcess
Definition: InputTag.h:54
edm::ESTokenIndex
Definition: ESIndices.h:54
ProductResolverIndexHelper.h
edm::EDConsumerBase::modulesWhoseProductsAreConsumed
void modulesWhoseProductsAreConsumed(std::vector< ModuleDescription const * > &modules, ProductRegistry const &preg, std::map< std::string, ModuleDescription const * > const &labelsToDesc, std::string const &processName) const
Definition: EDConsumerBase.cc:458
edm::ProductResolverIndex
unsigned int ProductResolverIndex
Definition: ProductResolverIndex.h:8
mps_fire.i
i
Definition: mps_fire.py:355
edm::ESInputTag
Definition: ESInputTag.h:87
start
Definition: start.py:1
LogMessageMonitor_cff.modules
modules
Definition: LogMessageMonitor_cff.py:7
MessageLogger.h
edm::eventsetup::ESRecordsToProxyIndices
Definition: ESRecordsToProxyIndices.h:35
funct::false
false
Definition: Factorize.h:34
edm::EDConsumerBase::registeredToConsumeMany
bool registeredToConsumeMany(TypeID const &, BranchType) const
Definition: EDConsumerBase.cc:368
BranchType.h
edm::InputTag::instance
std::string const & instance() const
Definition: InputTag.h:37
edm::EDConsumerBase::esItemsToGetFromTransition_
std::array< std::vector< ESProxyIndex >, static_cast< unsigned int >edm::Transition::NumberOfTransitions)> esItemsToGetFromTransition_
Definition: EDConsumerBase.h:249
edm::EDConsumerBase::recordConsumes
unsigned int recordConsumes(BranchType iBranch, TypeToGet const &iType, edm::InputTag const &iTag, bool iAlwaysGets)
Definition: EDConsumerBase.cc:85
edm::EDConsumerBase::ESTokenLookupInfo
Definition: EDConsumerBase.h:231
modules
Definition: ZHLTMatchFilter.cc:17
edm::ProductResolverIndexAndSkipBit
Definition: ProductResolverIndexAndSkipBit.h:28
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::ProductLabels::module
char const * module
Definition: ProductLabels.h:5
edm::ESInputTag::data
const std::string & data() const
Definition: ESInputTag.h:104
edm::EDConsumerBase::checkIfEmpty
edm::InputTag const & checkIfEmpty(edm::InputTag const &tag)
Definition: EDConsumerBase.cc:78
edm::EDConsumerBase::kLookupInfo
Definition: EDConsumerBase.h:222
ComponentDescription.h
edm::EDConsumerBase::m_esTokenInfo
edm::SoATuple< ESTokenLookupInfo, ESProxyIndex > m_esTokenInfo
Definition: EDConsumerBase.h:247
cms::cuda::assert
assert(be >=bs)
edm::EDConsumerBase::consumesCollector
ConsumesCollector consumesCollector()
Use a ConsumesCollector to gather consumes information from helper functions.
Definition: EDConsumerBase.cc:71
edm::ProductResolverIndexHelper::index
ProductResolverIndex index(KindOfType kindOfType, TypeID const &typeID, char const *moduleLabel, char const *instance, char const *process=nullptr) const
Definition: ProductResolverIndexHelper.cc:81
edm::InputTag::process
std::string const & process() const
Definition: InputTag.h:40
edm::eventsetup::DataKey
Definition: DataKey.h:29
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:152
edm::EDConsumerBase::kESProxyIndex
Definition: EDConsumerBase.h:246
edm::ProductRegistry::productLookup
std::shared_ptr< ProductResolverIndexHelper const > productLookup(BranchType branchType) const
Definition: ProductRegistry.cc:149
ESRecordsToProxyIndices.h
ProductRegistry.h
edm::ProductResolverIndexHelper::relatedIndexes
Matches relatedIndexes(KindOfType kindOfType, TypeID const &typeID, char const *moduleLabel, char const *instance) const
Definition: ProductResolverIndexHelper.cc:142
edm::ProductResolverIndexHelper
Definition: ProductResolverIndexHelper.h:89
edm::EDConsumerBase::itemsMayGet
void itemsMayGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
Definition: EDConsumerBase.cc:315
edm::EDConsumerBase::throwConsumesCallAfterFrozen
void throwConsumesCallAfterFrozen(TypeToGet const &, InputTag const &) const
Definition: EDConsumerBase.cc:405
edm::eventsetup::EventSetupRecordKey
Definition: EventSetupRecordKey.h:30
edm::EDConsumerBase::registeredToConsume
bool registeredToConsume(ProductResolverIndex, bool, BranchType) const
Definition: EDConsumerBase.cc:356
edm::BranchType
BranchType
Definition: BranchType.h:11
edm::ESProxyIndex
Definition: ESIndices.h:29
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
edm::EDConsumerBase::m_tokenLabels
std::vector< char > m_tokenLabels
Definition: EDConsumerBase.h:227
edm::ProductLabels::process
char const * process
Definition: ProductLabels.h:7
edm::InputTag::willSkipCurrentProcess
bool willSkipCurrentProcess() const
Definition: InputTag.h:42
edm::EDConsumerBase::consumesInfo
std::vector< ConsumesInfo > consumesInfo() const
Definition: EDConsumerBase.cc:553
edm::ProductRegistry
Definition: ProductRegistry.h:34
edm::EDConsumerBase::kESLookupInfo
Definition: EDConsumerBase.h:246
edm::InputTag::label
std::string const & label() const
Definition: InputTag.h:36
edm::EDConsumerBase::uncheckedIndexFrom
ProductResolverIndexAndSkipBit uncheckedIndexFrom(EDGetToken) const
Definition: EDConsumerBase.cc:279
UNLIKELY
#define UNLIKELY(x)
Definition: Likely.h:21
kWasEmpty
static const edm::InputTag kWasEmpty("@EmptyLabel@")
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:72
edm::ESTokenIndex::value
constexpr Value_t value() const noexcept
Definition: ESIndices.h:69
edm::EDGetToken::isUninitialized
bool isUninitialized() const
Definition: EDGetToken.h:46
edm::EDConsumerBase::itemsToGet
void itemsToGet(BranchType, std::vector< ProductResolverIndexAndSkipBit > &) const
Definition: EDConsumerBase.cc:283
edm::InEvent
Definition: BranchType.h:11
edm::EDConsumerBase::TokenLookupInfo
Definition: EDConsumerBase.h:201
cuda_std::lower_bound
__host__ constexpr __device__ RandomIt lower_bound(RandomIt first, RandomIt last, const T &value, Compare comp={})
Definition: cudastdAlgorithm.h:27
edm::eventsetup::ESRecordsToProxyIndices::missingProxyIndex
static constexpr ESProxyIndex missingProxyIndex() noexcept
Definition: ESRecordsToProxyIndices.h:48
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::EDConsumerBase::m_tokenInfo
edm::SoATuple< TokenLookupInfo, bool, LabelPlacement, edm::KindOfType > m_tokenInfo
Definition: EDConsumerBase.h:223
edm::eventsetup::ESRecordsToProxyIndices::indexInRecord
ESProxyIndex indexInRecord(EventSetupRecordKey const &iRK, DataKey const &iDK) const noexcept
If the index is not found, returns missingProxyIndex()
Definition: ESRecordsToProxyIndices.cc:50
edm::Transition
Transition
Definition: Transition.h:12
EDConsumerBase.h
edm::EDGetToken::index
unsigned int index() const
Definition: EDGetToken.h:45
KineDebug3::count
void count()
Definition: KinematicConstrainedVertexUpdatorT.h:21
edm::eventsetup::heterocontainer::HCTypeTag
Definition: HCTypeTag.h:38
edm::EDConsumerBase::throwBadToken
void throwBadToken(edm::TypeID const &iType, EDGetToken iToken) const
Definition: EDConsumerBase.cc:392
edm::ProductResolverIndexInvalid
Definition: ProductResolverIndex.h:16
edm::EDConsumerBase::updateLookup
void updateLookup(BranchType iBranchType, ProductResolverIndexHelper const &, bool iPrefetchMayGet)
Definition: EDConsumerBase.cc:136
edm::EDConsumerBase::~EDConsumerBase
virtual ~EDConsumerBase() noexcept(false)
Definition: EDConsumerBase.cc:54
edm::EDConsumerBase::kLabels
Definition: EDConsumerBase.h:222
edm::EDConsumerBase::itemsToGetFromBranch_
std::array< std::vector< ProductResolverIndexAndSkipBit >, edm::NumBranchTypes > itemsToGetFromBranch_
Definition: EDConsumerBase.h:229
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
edm::EDConsumerBase::containsCurrentProcessAlias_
bool containsCurrentProcessAlias_
Definition: EDConsumerBase.h:251
edm::EDGetToken
Definition: EDGetToken.h:35
CalibrationSummaryClient_cfi.kind
kind
Definition: CalibrationSummaryClient_cfi.py:37
edm::TypeToGet::type
TypeID const & type() const
Definition: TypeToGet.h:41
SimL1EmulatorRepack_CalouGT_cff.processName
processName
Definition: SimL1EmulatorRepack_CalouGT_cff.py:17
edm::TypeID::className
std::string const & className() const
Definition: TypeID.cc:40
edm::EDConsumerBase::labelsForToken
void labelsForToken(EDGetToken iToken, Labels &oLabels) const
Definition: EDConsumerBase.cc:347
edm::ESInputTag::module
const std::string & module() const
Definition: ESInputTag.h:99
edm::EDConsumerBase::kKind
Definition: EDConsumerBase.h:222
edm::ProductLabels::productInstance
char const * productInstance
Definition: ProductLabels.h:6
edm::TypeID
Definition: TypeID.h:22
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::ProductRegistry::aliasToOriginal
std::vector< std::pair< std::string, std::string > > const & aliasToOriginal() const
Definition: ProductRegistry.h:121
edm::EDConsumerBase::frozen_
bool frozen_
Definition: EDConsumerBase.h:250
LIKELY
#define LIKELY(x)
Definition: Likely.h:20
Exception
Definition: hltDiff.cc:246
edm::EDConsumerBase::labelFor
const char * labelFor(ESTokenIndex) const
Definition: EDConsumerBase.cc:591
edm::EDConsumerBase::throwBranchMismatch
void throwBranchMismatch(BranchType, EDGetToken) const
Definition: EDConsumerBase.cc:385
Exception.h
patCandidatesForDimuonsSequences_cff.matches
matches
Definition: patCandidatesForDimuonsSequences_cff.py:131
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
edm::eventsetup::ESRecordsToProxyIndices::component
ComponentDescription const * component(EventSetupRecordKey const &iRK, DataKey const &iDK) const noexcept
Definition: ESRecordsToProxyIndices.cc:77
mps_fire.result
result
Definition: mps_fire.py:303
ConsumesCollector.h
command_line.start
start
Definition: command_line.py:167
HerwigMaxPtPartonFilter_cfi.moduleLabel
moduleLabel
Definition: HerwigMaxPtPartonFilter_cfi.py:4
edm::EDConsumerBase::LabelPlacement
Definition: EDConsumerBase.h:209
edm::EDConsumerBase::recordESConsumes
ESTokenIndex recordESConsumes(Transition, eventsetup::EventSetupRecordKey const &, eventsetup::heterocontainer::HCTypeTag const &, edm::ESInputTag const &iTag)
Definition: EDConsumerBase.cc:230
edm::TypeToGet
Definition: TypeToGet.h:32
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
edm::TypeToGet::kind
KindOfType kind() const
Definition: TypeToGet.h:42
SimL1EmulatorRepack_Full_cff.inputTag
inputTag
Definition: SimL1EmulatorRepack_Full_cff.py:56
edm::BranchTypeToString
std::string const & BranchTypeToString(BranchType const &branchType)
Definition: BranchType.cc:98
edm::EDConsumerBase::kAlwaysGets
Definition: EDConsumerBase.h:222
edm::EDConsumerBase::throwTypeMismatch
void throwTypeMismatch(edm::TypeID const &, EDGetToken) const
Definition: EDConsumerBase.cc:379
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:39
edm::EDConsumerBase::indexFrom
ProductResolverIndexAndSkipBit indexFrom(EDGetToken, BranchType, TypeID const &) const
Definition: EDConsumerBase.cc:260
edm::ProductLabels
Definition: ProductLabels.h:4
edm::EDConsumerBase::convertCurrentProcessAlias
void convertCurrentProcessAlias(std::string const &processName)
Convert "@currentProcess" in InputTag process names to the actual current process name.
Definition: EDConsumerBase.cc:507