CMS 3D CMS Logo

ProductRegistry.cc
Go to the documentation of this file.
1 
12 
14 
21 
22 #include "TDictAttributeMap.h"
23 
24 #include <cassert>
25 #include <iterator>
26 #include <limits>
27 #include <set>
28 #include <sstream>
29 #include <ostream>
30 
31 namespace edm {
32 
34  productList_(),
35  transient_() {
36  }
37 
39  frozen_(false),
40  productProduced_(),
41  anyProductProduced_(false),
42  eventProductLookup_(new ProductResolverIndexHelper),
43  lumiProductLookup_(new ProductResolverIndexHelper),
44  runProductLookup_(new ProductResolverIndexHelper),
45  eventNextIndexValue_(0),
46  lumiNextIndexValue_(0),
47  runNextIndexValue_(0),
48 
49  branchIDToIndex_() {
50  for(bool& isProduced : productProduced_) isProduced = false;
51  }
52 
53  void
55  frozen_ = false;
56  for(bool& isProduced : productProduced_) isProduced = false;
57  anyProductProduced_ = false;
58 
59  // propagate_const<T> has no reset() function
60  eventProductLookup_ = std::make_unique<ProductResolverIndexHelper>();
61  lumiProductLookup_ = std::make_unique<ProductResolverIndexHelper>();
62  runProductLookup_ = std::make_unique<ProductResolverIndexHelper>();
63 
67 
68  branchIDToIndex_.clear();
69  }
70 
72  productList_(productList),
73  transient_() {
74  freezeIt(toBeFrozen);
75  }
76 
77  void
79  bool fromListener) {
80  assert(productDesc.produced());
81  throwIfFrozen();
82  std::pair<ProductList::iterator, bool> ret =
83  productList_.insert(std::make_pair(BranchKey(productDesc), productDesc));
84  if(!ret.second) {
85  auto const& previous = *productList_.find(BranchKey(productDesc));
86  if(previous.second.produced()) {
87  // Duplicate registration in current process
88  throw Exception(errors::LogicError , "Duplicate Product Identifier")
89  << "\nThe Framework requires a unique branch name for each product\n"
90  << "which consists of four parts: a friendly class name, module label,\n"
91  << "product instance name, and process name. A product has been\n"
92  << "registered with a duplicate branch name. The most common way\n"
93  << "to fix this error is to modify the product instance name in\n"
94  << "one of the offending 'produces' function calls. Another fix\n"
95  << "would be to delete one of them if they are for the same product.\n\n"
96  << " friendly class name = " << previous.second.friendlyClassName() << "\n"
97  << " module label = " << previous.second.moduleLabel() << "\n"
98  << " product instance name = " << previous.second.productInstanceName() << "\n"
99  << " process name = " << previous.second.processName() << "\n\n"
100  << "The following additional information is not used as part of\n"
101  << "the unique branch identifier.\n\n"
102  << " branch types = " << previous.second.branchType() << " " << productDesc.branchType() << "\n"
103  << " class name = " << previous.second.fullClassName() << "\n\n"
104  << "Note that if the four parts of the branch name are the same,\n"
105  << "then this error will occur even if the branch types differ!\n\n";
106  } else {
107  // Duplicate registration in previous process
108  throw Exception(errors::Configuration, "Duplicate Process Name.\n")
109  << "The process name " << productDesc.processName() << " was previously used for products in the input.\n"
110  << "This has caused branch name conflicts between input products and new products.\n"
111  << "Please modify the configuration file to use a distinct process name.\n"
112  << "Alternately, drop all input products using that process name and the\n"
113  << "descendants of those products.\n";
114  }
115  }
116  addCalled(productDesc, fromListener);
117  }
118 
119  void
121  std::string const& labelAlias,
122  std::string const& instanceAlias) {
123  assert(productDesc.produced());
124  assert(productDesc.branchID().isValid());
125  throwIfFrozen();
126  BranchDescription bd(productDesc, labelAlias, instanceAlias);
127  std::pair<ProductList::iterator, bool> ret =
128  productList_.insert(std::make_pair(BranchKey(bd), bd));
129  assert(ret.second);
130  transient_.aliasToOriginal_.emplace_back(labelAlias,
131  productDesc.moduleLabel());
132  addCalled(bd, false);
133  }
134 
135  void
137  assert(!productDesc.produced());
138  throwIfFrozen();
139  BranchKey k = BranchKey(productDesc);
140  ProductList::iterator iter = productList_.find(k);
141  if(iter == productList_.end()) {
142  productList_.insert(std::make_pair(k, productDesc));
143  } else {
144  assert(combinable(iter->second, productDesc));
145  iter->second.merge(productDesc);
146  }
147  }
148 
149  bool
152  for(ProductList::const_iterator it = productList_.begin(), itEnd = productList_.end();
153  it != itEnd; ++it) {
154  if(it->second.branchType() == brType) {
155  return true;
156  }
157  }
158  return false;
159  }
160 
161  std::shared_ptr<ProductResolverIndexHelper const>
163  if (branchType == InEvent) return transient_.eventProductLookup();
164  if (branchType == InLumi) return transient_.lumiProductLookup();
165  return transient_.runProductLookup();
166  }
167 
168  std::shared_ptr<ProductResolverIndexHelper>
170  if (branchType == InEvent) return transient_.eventProductLookup();
171  if (branchType == InLumi) return transient_.lumiProductLookup();
172  return transient_.runProductLookup();
173  }
174 
175  void
176  ProductRegistry::setFrozen(bool initializeLookupInfo) {
177  if(frozen()) return;
178  freezeIt();
179  if(initializeLookupInfo) {
180  initializeLookupTables(nullptr, nullptr, nullptr);
181  }
183  }
184 
185  void
186  ProductRegistry::setFrozen(std::set<TypeID> const& productTypesConsumed,
187  std::set<TypeID> const& elementTypesConsumed,
188  std::string const& processName) {
189  if(frozen()) return;
190  freezeIt();
191  initializeLookupTables(&productTypesConsumed, &elementTypesConsumed, &processName);
193  }
194 
195  void
197  if(frozen()) {
198  throw cms::Exception("ProductRegistry", "throwIfFrozen")
199  << "cannot modify the ProductRegistry because it is frozen\n";
200  }
201  }
202 
203  void
205  if(!frozen()) {
206  throw cms::Exception("ProductRegistry", "throwIfNotFrozen")
207  << "cannot read the ProductRegistry because it is not yet frozen\n";
208  }
209  }
210 
211  void
213  }
214 
215  std::vector<std::string>
217  std::vector<std::string> result;
218  result.reserve(productList().size());
219 
220  for(auto const& product : productList()) {
221  result.push_back(product.second.branchName());
222  }
223  return result;
224  }
225 
226  std::vector<BranchDescription const*>
228  std::vector<BranchDescription const*> result;
229  result.reserve(productList().size());
230 
231  for(auto const& product : productList()) {
232  result.push_back(&product.second);
233  }
234  return result;
235  }
236 
237  void
239  for(auto const& product : other) {
240  copyProduct(product.second);
241  }
242  }
243 
244  void
245  ProductRegistry::updateFromInput(std::vector<BranchDescription> const& other) {
246  for(BranchDescription const& branchDescription : other) {
247  copyProduct(branchDescription);
248  }
249  }
250 
253  std::string const& fileName,
254  BranchDescription::MatchMode branchesMustMatch) {
255  std::ostringstream differences;
256 
257  ProductRegistry::ProductList::iterator j = productList_.begin();
258  ProductRegistry::ProductList::iterator s = productList_.end();
259  ProductRegistry::ProductList::const_iterator i = other.productList().begin();
260  ProductRegistry::ProductList::const_iterator e = other.productList().end();
261 
262  // Loop over entries in the main product registry.
263  while(j != s || i != e) {
264  if(j != s && j->second.produced()) {
265  // Ignore branches just produced (i.e. not in input file).
266  ++j;
267  } else if(j == s || (i != e && i->first < j->first)) {
268  if(i->second.present()) {
269  differences << "Branch '" << i->second.branchName() << "' is in file '" << fileName << "'\n";
270  differences << " but not in previous files.\n";
271  } else {
272  productList_.insert(*i);
273  transient_.branchIDToIndex_[i->second.branchID()] = getNextIndexValue(i->second.branchType());
274  ++nextIndexValue(i->second.branchType());
275  }
276  ++i;
277  } else if(i == e || (j != s && j->first < i->first)) {
278  if(j->second.present() && branchesMustMatch == BranchDescription::Strict) {
279  differences << "Branch '" << j->second.branchName() << "' is in previous files\n";
280  differences << " but not in file '" << fileName << "'.\n";
281  }
282  ++j;
283  } else {
284  std::string difs = match(j->second, i->second, fileName);
285  if(difs.empty()) {
286  j->second.merge(i->second);
287  } else {
288  differences << difs;
289  }
290  ++i;
291  ++j;
292  }
293  }
294  return differences.str();
295  }
296 
297  void ProductRegistry::initializeLookupTables(std::set<TypeID> const* productTypesConsumed,
298  std::set<TypeID> const* elementTypesConsumed,
299  std::string const* processName) {
300 
301  std::map<TypeID, TypeID> containedTypeMap;
302  std::map<TypeID, std::vector<TypeWithDict> > containedTypeToBaseTypesMap;
303 
304  std::vector<std::string> missingDictionaries;
305  std::vector<std::string> branchNamesForMissing;
306  std::vector<std::string> producedTypes;
307 
309 
310  for(auto const& product : productList_) {
311  auto const& desc = product.second;
312 
313  checkForDuplicateProcessName(desc, processName);
314 
315  if(desc.produced() && !desc.transient()) {
316  setProductProduced(desc.branchType());
317  }
318 
319  //only do the following if the data is supposed to be available in the event
320  if(desc.present()) {
321 
322  // Check dictionaries (we already checked for the produced ones earlier somewhere else).
323  // We have to have the dictionaries to properly setup the lookup tables for support of
324  // Views. Also we need them to determine which present products are declared to be
325  // consumed in the case where the consumed type is a View<T>.
326  if (!desc.produced()) {
327  if (!checkDictionary(missingDictionaries, desc.className(), desc.unwrappedType())) {
328  checkDictionaryOfWrappedType(missingDictionaries, desc.className());
329  branchNamesForMissing.emplace_back(desc.branchName());
330  producedTypes.emplace_back(desc.className() + std::string(" (read from input)"));
331  continue;
332  }
333  }
334  TypeID typeID(desc.unwrappedType().typeInfo());
335 
336  auto iter = containedTypeMap.find(typeID);
337  bool alreadySawThisType = (iter != containedTypeMap.end());
338 
339  if (!desc.produced() && !alreadySawThisType) {
340  if (!checkDictionary(missingDictionaries, desc.wrappedName(), desc.wrappedType())) {
341  branchNamesForMissing.emplace_back(desc.branchName());
342  producedTypes.emplace_back(desc.className() + std::string(" (read from input)"));
343  continue;
344  }
345  }
346 
347  TypeID wrappedTypeID(desc.wrappedType().typeInfo());
348 
349  TypeID containedTypeID;
350  if (alreadySawThisType) {
351  containedTypeID = iter->second;
352  } else {
353  containedTypeID = productholderindexhelper::getContainedTypeFromWrapper(wrappedTypeID, typeID.className());
354  }
355  bool hasContainedType = (containedTypeID != TypeID(typeid(void)) && containedTypeID != TypeID());
356 
357  std::vector<TypeWithDict>* baseTypesOfContainedType = nullptr;
358 
359  if (!alreadySawThisType) {
360  bool alreadyCheckedConstituents = desc.produced() && !desc.transient();
361  if (!alreadyCheckedConstituents && !desc.transient()) {
362  // This checks dictionaries of the wrapped class and all its constituent classes
363  if (!checkClassDictionaries(missingDictionaries, desc.wrappedName(), desc.wrappedType())) {
364  branchNamesForMissing.emplace_back(desc.branchName());
365  producedTypes.emplace_back(desc.className() + std::string(" (read from input)"));
366  continue;
367  }
368  }
369 
370  if (hasContainedType) {
371  auto iter = containedTypeToBaseTypesMap.find(containedTypeID);
372  if (iter == containedTypeToBaseTypesMap.end()) {
373  std::vector<TypeWithDict> baseTypes;
374  if (!public_base_classes(missingDictionaries, containedTypeID, baseTypes)) {
375  branchNamesForMissing.emplace_back(desc.branchName());
376  if (desc.produced()) {
377  producedTypes.emplace_back(desc.className() + std::string(" (produced in current process)"));
378  } else {
379  producedTypes.emplace_back(desc.className() + std::string(" (read from input)"));
380  }
381  continue;
382  }
383  iter = containedTypeToBaseTypesMap.insert(std::make_pair(containedTypeID, baseTypes)).first;
384  }
385  baseTypesOfContainedType = &iter->second;
386  }
387 
388  // Do this after the dictionary checks of constituents so the list of branch names for missing types
389  // is complete
390  containedTypeMap.emplace(typeID, containedTypeID);
391  } else {
392  if (hasContainedType) {
393  auto iter = containedTypeToBaseTypesMap.find(containedTypeID);
394  if (iter != containedTypeToBaseTypesMap.end()) {
395  baseTypesOfContainedType = &iter->second;
396  }
397  }
398  }
399 
400  if(productTypesConsumed != nullptr && !desc.produced()) {
401  bool mainTypeConsumed = (productTypesConsumed->find(typeID) != productTypesConsumed->end());
402  bool containedTypeConsumed = hasContainedType && (elementTypesConsumed->find(containedTypeID) != elementTypesConsumed->end());
403  if(hasContainedType && !containedTypeConsumed && baseTypesOfContainedType != nullptr) {
404  for(TypeWithDict const& baseType : *baseTypesOfContainedType) {
405  if(elementTypesConsumed->find(TypeID(baseType.typeInfo())) != elementTypesConsumed->end()) {
406  containedTypeConsumed = true;
407  break;
408  }
409  }
410  }
411  if(!containedTypeConsumed) {
412  if(mainTypeConsumed) {
413  // The main type is consumed, but either
414  // there is no contained type, or if there is,
415  // neither it nor any of its base classes are consumed.
416  // Set the contained type, if there is one, to void,
417  if(hasContainedType) {
418  containedTypeID = TypeID(typeid(void));
419  }
420  } else {
421  // The main type is not consumed, and either
422  // there is no contained type, or if there is,
423  // neither it nor any of its base classes are consumed.
424  // Don't insert anything in the lookup tables.
425  continue;
426  }
427  }
428  }
430  productLookup(desc.branchType())->insert(typeID,
431  desc.moduleLabel().c_str(),
432  desc.productInstanceName().c_str(),
433  desc.processName().c_str(),
434  containedTypeID,
435  baseTypesOfContainedType);
436 
437  transient_.branchIDToIndex_[desc.branchID()] = index;
438  }
439  }
440  if (!missingDictionaries.empty()) {
441  std::string context("Calling ProductRegistry::initializeLookupTables");
442  throwMissingDictionariesException(missingDictionaries, context, producedTypes, branchNamesForMissing);
443  }
444 
445  productLookup(InEvent)->setFrozen();
446  productLookup(InLumi)->setFrozen();
447  productLookup(InRun)->setFrozen();
448 
450  transient_.lumiNextIndexValue_ = productLookup(InLumi)->nextIndexValue();
451  transient_.runNextIndexValue_ = productLookup(InRun)->nextIndexValue();
452 
453  for(auto const& product : productList_) {
454  auto const& desc = product.second;
455  if (transient_.branchIDToIndex_.find(desc.branchID()) == transient_.branchIDToIndex_.end()) {
456  transient_.branchIDToIndex_[desc.branchID()] = getNextIndexValue(desc.branchType());
457  ++nextIndexValue(desc.branchType());
458  }
459  }
460  checkDictionariesOfConsumedTypes(productTypesConsumed, elementTypesConsumed, containedTypeMap, containedTypeToBaseTypesMap);
461  }
462 
463  void
464  ProductRegistry::checkDictionariesOfConsumedTypes(std::set<TypeID> const* productTypesConsumed,
465  std::set<TypeID> const* elementTypesConsumed,
466  std::map<TypeID, TypeID> const& containedTypeMap,
467  std::map<TypeID, std::vector<TypeWithDict> >& containedTypeToBaseTypesMap) {
468 
469  std::vector<std::string> missingDictionaries;
470  std::set<std::string> consumedTypesWithMissingDictionaries;
471 
472  if (productTypesConsumed) {
473 
474 
475  // Check dictionaries for all classes declared to be consumed
476  for (auto const& consumedTypeID : *productTypesConsumed) {
477 
478  // We use the containedTypeMap to see which types have already
479  // had their dictionaries checked. We do not waste time rechecking
480  // those dictionaries.
481  if (containedTypeMap.find(consumedTypeID) == containedTypeMap.end()) {
482 
483  std::string wrappedName = wrappedClassName(consumedTypeID.className());
484  TypeWithDict wrappedType = TypeWithDict::byName(wrappedName);
485  if (!checkDictionary(missingDictionaries, wrappedName, wrappedType)) {
486  checkDictionary(missingDictionaries, consumedTypeID);
487  consumedTypesWithMissingDictionaries.emplace(consumedTypeID.className());
488  continue;
489  }
490  bool transient = false;
491  TDictAttributeMap* wp = wrappedType.getClass()->GetAttributeMap();
492  if (wp && wp->HasKey("persistent") && !strcmp(wp->GetPropertyAsString("persistent"), "false")) {
493  transient = true;
494  }
495  if (transient) {
496  if(!checkDictionary(missingDictionaries, consumedTypeID)) {
497  consumedTypesWithMissingDictionaries.emplace(consumedTypeID.className());
498  }
499 
500  TypeID containedTypeID = productholderindexhelper::getContainedTypeFromWrapper(TypeID(wrappedType.typeInfo()), consumedTypeID.className());
501  bool hasContainedType = (containedTypeID != TypeID(typeid(void)) && containedTypeID != TypeID());
502  if (hasContainedType) {
503  if (containedTypeToBaseTypesMap.find(containedTypeID) == containedTypeToBaseTypesMap.end()) {
504  std::vector<TypeWithDict> bases;
505  // Run this to check for missing dictionaries, bases is not really used
506  if (!public_base_classes(missingDictionaries, containedTypeID, bases)) {
507  consumedTypesWithMissingDictionaries.emplace(consumedTypeID.className());
508  }
509  containedTypeToBaseTypesMap.insert(std::make_pair(containedTypeID, bases));
510  }
511  }
512  } else {
513  if (!checkClassDictionaries(missingDictionaries, wrappedName, wrappedType)) {
514  consumedTypesWithMissingDictionaries.emplace(consumedTypeID.className());
515  }
516  }
517  }
518  }
519  if (!missingDictionaries.empty()) {
520  std::string context("Calling ProductRegistry::initializeLookupTables, checking dictionaries for consumed products");
521  throwMissingDictionariesException(missingDictionaries, context, consumedTypesWithMissingDictionaries, false);
522  }
523  }
524 
525  if (elementTypesConsumed) {
526  missingDictionaries.clear();
527  consumedTypesWithMissingDictionaries.clear();
528  for (auto const& consumedTypeID : *elementTypesConsumed) {
529  if (containedTypeToBaseTypesMap.find(consumedTypeID) == containedTypeToBaseTypesMap.end()) {
530  std::vector<TypeWithDict> bases;
531  // Run this to check for missing dictionaries, bases is not really used
532  if (!public_base_classes(missingDictionaries, consumedTypeID, bases)) {
533  consumedTypesWithMissingDictionaries.emplace(consumedTypeID.className());
534  }
535  }
536  }
537  if (!missingDictionaries.empty()) {
538  std::string context("Calling ProductRegistry::initializeLookupTables, checking dictionaries for elements of products consumed using View");
539  throwMissingDictionariesException(missingDictionaries, context, consumedTypesWithMissingDictionaries, true);
540  }
541  }
542  }
543 
545  std::string const* processName) const {
546  if (processName &&
547  !desc.produced() &&
548  (*processName == desc.processName())) {
549 
550  throw Exception(errors::Configuration, "Duplicate Process Name.\n")
551  << "The process name " << *processName << " was previously used for products in the input.\n"
552  << "Please modify the configuration file to use a distinct process name.\n"
553  << "Alternately, drop all input products using that process name and the\n"
554  << "descendants of those products.\n";
555  }
556  }
557 
559  std::map<BranchID, ProductResolverIndex>::const_iterator itFind = transient_.branchIDToIndex_.find(iID);
560  if(itFind == transient_.branchIDToIndex_.end()) {
562  }
563  return itFind->second;
564  }
565 
566  void ProductRegistry::print(std::ostream& os) const {
567  for(auto const& product: productList_) {
568  os << product.second << "\n-----\n";
569  }
570  }
571 
572  ProductResolverIndex const&
574  if (branchType == InEvent) return transient_.eventNextIndexValue_;
575  if (branchType == InLumi) return transient_.lumiNextIndexValue_;
577  }
578 
581  if (branchType == InEvent) return transient_.eventNextIndexValue_;
582  if (branchType == InLumi) return transient_.lumiNextIndexValue_;
584  }
585 }
edm::propagate_const< std::shared_ptr< ProductResolverIndexHelper > > lumiProductLookup_
void setProductProduced(BranchType branchType)
BranchType const & branchType() const
void throwMissingDictionariesException(std::vector< std::string > &missingDictionaries, std::string const &context)
unsigned int ProductResolverIndex
void throwIfNotFrozen() const
TypeID getContainedTypeFromWrapper(TypeID const &wrappedtypeID, std::string const &className)
std::vector< std::string > allBranchNames() const
std::map< BranchKey, BranchDescription > ProductList
bool public_base_classes(std::vector< std::string > &missingDictionaries, TypeID const &typeID, std::vector< TypeWithDict > &baseTypes)
bool anyProducts(BranchType const brType) const
std::string const & processName() const
std::shared_ptr< ProductResolverIndexHelper const > lumiProductLookup() const
ProductList::size_type size() const
bool isValid() const
Definition: BranchID.h:24
void addLabelAlias(BranchDescription const &productdesc, std::string const &labelAlias, std::string const &instanceAlias)
std::shared_ptr< ProductResolverIndexHelper const > eventProductLookup() const
BranchType
Definition: BranchType.h:11
virtual void addCalled(BranchDescription const &, bool iFromListener)
static TypeWithDict byName(std::string const &name)
Definition: TypeWithDict.cc:59
ProductList const & productList() const
void initializeLookupTables(std::set< TypeID > const *productTypesConsumed, std::set< TypeID > const *elementTypesConsumed, std::string const *processName)
std::string const & moduleLabel() const
ProductResolverIndex eventNextIndexValue_
bool combinable(BranchDescription const &a, BranchDescription const &b)
bool checkDictionary(std::vector< std::string > &missingDictionaries, TypeID const &typeID)
std::shared_ptr< ProductResolverIndexHelper const > runProductLookup() const
ProductResolverIndex lumiNextIndexValue_
void checkForDuplicateProcessName(BranchDescription const &desc, std::string const *processName) const
ProductResolverIndex & nextIndexValue(BranchType branchType)
bool checkClassDictionaries(std::vector< std::string > &missingDictionaries, TypeID const &typeID)
std::vector< BranchDescription const * > allBranchDescriptions() const
std::string merge(ProductRegistry const &other, std::string const &fileName, BranchDescription::MatchMode branchesMustMatch=BranchDescription::Permissive)
BranchID const & branchID() const
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
void setFrozen(bool initializeLookupInfo=true)
void freezeIt(bool frozen=true)
void print(std::ostream &os) const
int k[5][pyjets_maxn]
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:120
ProductResolverIndex runNextIndexValue_
std::string wrappedClassName(std::string const &iFullName)
std::vector< std::pair< std::string, std::string > > aliasToOriginal_
std::shared_ptr< ProductResolverIndexHelper const > productLookup(BranchType branchType) const
ProductResolverIndex const & getNextIndexValue(BranchType branchType) const
HLT enums.
void throwIfFrozen() const
std::string const & className() const
Definition: TypeID.cc:46
void updateFromInput(ProductList const &other)
bool checkDictionaryOfWrappedType(std::vector< std::string > &missingDictionaries, TypeID const &unwrappedTypeID)
std::array< bool, NumBranchTypes > productProduced_
void checkDictionariesOfConsumedTypes(std::set< TypeID > const *productTypesConsumed, std::set< TypeID > const *elementTypesConsumed, std::map< TypeID, TypeID > const &containedTypeMap, std::map< TypeID, std::vector< TypeWithDict > > &containedTypeToBaseTypesMap)
edm::propagate_const< std::shared_ptr< ProductResolverIndexHelper > > eventProductLookup_
ProductResolverIndex indexFrom(BranchID const &iID) const
void addProduct(BranchDescription const &productdesc, bool iFromListener=false)
std::map< BranchID, ProductResolverIndex > branchIDToIndex_
edm::propagate_const< std::shared_ptr< ProductResolverIndexHelper > > runProductLookup_
def branchType(schema, name)
Definition: revisionDML.py:112
void copyProduct(BranchDescription const &productdesc)
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)