CMS 3D CMS Logo

RootFile.cc
Go to the documentation of this file.
1 /*----------------------------------------------------------------------
2 ----------------------------------------------------------------------*/
3 
4 #include "RootFile.h"
5 #include "DuplicateChecker.h"
6 #include "InputFile.h"
7 #include "ProvenanceAdaptor.h"
8 #include "RunHelper.h"
9 
50 
53 
54 //used for backward compatibility
59 
60 #include "Rtypes.h"
61 #include "TClass.h"
62 #include "TString.h"
63 #include "TTree.h"
64 #include "TTreeCache.h"
65 
66 #include <algorithm>
67 #include <list>
68 
69 namespace edm {
70 
71  // Algorithm classes for making ProvenanceReader:
73  public:
74  std::unique_ptr<ProvenanceReaderBase> makeReader(RootTree& eventTree,
75  DaqProvenanceHelper const* daqProvenanceHelper) const override;
76  };
78  public:
79  MakeOldProvenanceReader(std::unique_ptr<EntryDescriptionMap>&& entryDescriptionMap)
80  : MakeProvenanceReader(), entryDescriptionMap_(std::move(entryDescriptionMap)) {}
81  std::unique_ptr<ProvenanceReaderBase> makeReader(RootTree& eventTree,
82  DaqProvenanceHelper const* daqProvenanceHelper) const override;
83 
84  private:
86  };
88  public:
89  std::unique_ptr<ProvenanceReaderBase> makeReader(RootTree& eventTree,
90  DaqProvenanceHelper const* daqProvenanceHelper) const override;
91  };
93  public:
94  MakeReducedProvenanceReader(std::vector<ParentageID> const& parentageIDLookup)
95  : parentageIDLookup_(parentageIDLookup) {}
96  std::unique_ptr<ProvenanceReaderBase> makeReader(RootTree& eventTree,
97  DaqProvenanceHelper const* daqProvenanceHelper) const override;
98 
99  private:
100  std::vector<ParentageID> const& parentageIDLookup_;
101  };
102 
103  namespace {
104  void checkReleaseVersion(std::vector<ProcessHistory> processHistoryVector, std::string const& fileName) {
105  std::string releaseVersion = getReleaseVersion();
106  releaseversion::DecomposedReleaseVersion currentRelease(releaseVersion);
107  for (auto const& ph : processHistoryVector) {
108  for (auto const& pc : ph) {
109  if (releaseversion::isEarlierRelease(currentRelease, pc.releaseVersion())) {
111  << "The release you are using, " << getReleaseVersion() << " , predates\n"
112  << "a release (" << pc.releaseVersion() << ") used in writing the input file, " << fileName << ".\n"
113  << "Forward compatibility cannot be supported.\n";
114  }
115  }
116  }
117  }
118  } // namespace
119 
120  // This is a helper class for IndexIntoFile.
122  public:
123  explicit RootFileEventFinder(RootTree& eventTree) : eventTree_(eventTree) {}
124  ~RootFileEventFinder() override {}
125 
129  EventAuxiliary eventAux;
130  EventAuxiliary* pEvAux = &eventAux;
132  eventTree_.setEntryNumber(saveEntry);
133  return eventAux.event();
134  }
135 
136  private:
138  };
139 
140  //---------------------------------------------------------------------
142  ProcessConfiguration const& processConfiguration,
143  std::string const& logicalFileName,
144  std::shared_ptr<InputFile> filePtr,
145  std::shared_ptr<EventSkipperByID> eventSkipperByID,
146  bool skipAnyEvents,
147  int remainingEvents,
148  int remainingLumis,
149  unsigned int nStreams,
150  unsigned int treeCacheSize,
151  int treeMaxVirtualSize,
153  RunHelperBase* runHelper,
154  bool noEventSort,
155  ProductSelectorRules const& productSelectorRules,
156  InputType inputType,
157  std::shared_ptr<BranchIDListHelper> branchIDListHelper,
158  std::shared_ptr<ThinnedAssociationsHelper> thinnedAssociationsHelper,
159  std::vector<BranchID> const* associationsFromSecondary,
160  std::shared_ptr<DuplicateChecker> duplicateChecker,
161  bool dropDescendants,
162  ProcessHistoryRegistry& processHistoryRegistry,
163  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
164  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile,
165  std::vector<ProcessHistoryID>& orderedProcessHistoryIDs,
166  bool bypassVersionCheck,
167  bool labelRawDataLikeMC,
168  bool usingGoToEvent,
169  bool enablePrefetching,
170  bool enforceGUIDInFileName)
171  : file_(fileName),
172  logicalFile_(logicalFileName),
173  processConfiguration_(processConfiguration),
174  processHistoryRegistry_(&processHistoryRegistry),
175  filePtr_(filePtr),
176  eventSkipperByID_(eventSkipperByID),
177  fileFormatVersion_(),
178  fid_(),
179  indexIntoFileSharedPtr_(new IndexIntoFile),
180  indexIntoFile_(*indexIntoFileSharedPtr_),
181  orderedProcessHistoryIDs_(orderedProcessHistoryIDs),
182  indexIntoFileBegin_(
183  indexIntoFile_.begin(noEventSort ? IndexIntoFile::firstAppearanceOrder : IndexIntoFile::numericalOrder)),
184  indexIntoFileEnd_(indexIntoFileBegin_),
185  indexIntoFileIter_(indexIntoFileBegin_),
186  storedMergeableRunProductMetadata_((inputType == InputType::Primary) ? new StoredMergeableRunProductMetadata
187  : nullptr),
188  eventProcessHistoryIDs_(),
189  eventProcessHistoryIter_(eventProcessHistoryIDs_.begin()),
190  savedRunAuxiliary_(),
191  skipAnyEvents_(skipAnyEvents),
192  noEventSort_(noEventSort),
193  enforceGUIDInFileName_(enforceGUIDInFileName),
194  whyNotFastClonable_(0),
195  hasNewlyDroppedBranch_(),
196  branchListIndexesUnchanged_(false),
197  eventAuxCache_(),
198  eventTree_(filePtr,
199  InEvent,
200  nStreams,
201  treeMaxVirtualSize,
202  treeCacheSize,
203  roottree::defaultLearningEntries,
204  enablePrefetching,
205  inputType),
206  lumiTree_(filePtr,
207  InLumi,
208  1,
209  treeMaxVirtualSize,
210  roottree::defaultNonEventCacheSize,
212  enablePrefetching,
213  inputType),
214  runTree_(filePtr,
215  InRun,
216  1,
217  treeMaxVirtualSize,
218  roottree::defaultNonEventCacheSize,
220  enablePrefetching,
221  inputType),
222  treePointers_(),
223  lastEventEntryNumberRead_(IndexIntoFile::invalidEntry),
224  productRegistry_(),
225  branchIDLists_(),
226  branchIDListHelper_(branchIDListHelper),
227  fileThinnedAssociationsHelper_(),
228  thinnedAssociationsHelper_(thinnedAssociationsHelper),
229  processingMode_(processingMode),
230  runHelper_(runHelper),
231  newBranchToOldBranch_(),
232  eventHistoryTree_(nullptr),
233  history_(),
234  branchChildren_(new BranchChildren),
235  duplicateChecker_(duplicateChecker),
236  provenanceAdaptor_(),
237  provenanceReaderMaker_(),
238  eventProductProvenanceRetrievers_(),
239  parentageIDLookup_(),
240  daqProvenanceHelper_(),
241  edProductClass_(TypeWithDict::byName("edm::WrapperBase").getClass()),
242  inputType_(inputType) {
243  hasNewlyDroppedBranch_.fill(false);
244 
248  treePointers_[InProcess] = nullptr;
249 
250  // Read the metadata tree.
251  // We use a smart pointer so the tree will be deleted after use, and not kept for the life of the file.
252  std::unique_ptr<TTree> metaDataTree(dynamic_cast<TTree*>(filePtr_->Get(poolNames::metaDataTreeName().c_str())));
253  if (nullptr == metaDataTree.get()) {
255  << "Could not find tree " << poolNames::metaDataTreeName() << " in the input file.\n";
256  }
257 
258  // To keep things simple, we just read in every possible branch that exists.
259  // We don't pay attention to which branches exist in which file format versions
260 
262  if (metaDataTree->FindBranch(poolNames::fileFormatVersionBranchName().c_str()) != nullptr) {
263  TBranch* fft = metaDataTree->GetBranch(poolNames::fileFormatVersionBranchName().c_str());
264  fft->SetAddress(&fftPtr);
265  roottree::getEntry(fft, 0);
266  metaDataTree->SetBranchAddress(poolNames::fileFormatVersionBranchName().c_str(), &fftPtr);
267  }
268 
269  FileID* fidPtr = &fid_;
270  if (metaDataTree->FindBranch(poolNames::fileIdentifierBranchName().c_str()) != nullptr) {
271  metaDataTree->SetBranchAddress(poolNames::fileIdentifierBranchName().c_str(), &fidPtr);
272  }
273 
274  IndexIntoFile* iifPtr = &indexIntoFile_;
275  if (metaDataTree->FindBranch(poolNames::indexIntoFileBranchName().c_str()) != nullptr) {
276  metaDataTree->SetBranchAddress(poolNames::indexIntoFileBranchName().c_str(), &iifPtr);
277  }
278 
279  StoredMergeableRunProductMetadata* smrc = nullptr;
280  if (inputType == InputType::Primary) {
282  if (metaDataTree->FindBranch(poolNames::mergeableRunProductMetadataBranchName().c_str()) != nullptr) {
283  metaDataTree->SetBranchAddress(poolNames::mergeableRunProductMetadataBranchName().c_str(), &smrc);
284  }
285  }
286 
287  // Need to read to a temporary registry so we can do a translation of the BranchKeys.
288  // This preserves backward compatibility against friendly class name algorithm changes.
289  ProductRegistry inputProdDescReg;
290  ProductRegistry* ppReg = &inputProdDescReg;
291  metaDataTree->SetBranchAddress(poolNames::productDescriptionBranchName().c_str(), (&ppReg));
292 
293  typedef std::map<ParameterSetID, ParameterSetBlob> PsetMap;
294  PsetMap psetMap;
295  PsetMap* psetMapPtr = &psetMap;
296  if (metaDataTree->FindBranch(poolNames::parameterSetMapBranchName().c_str()) != nullptr) {
297  //backward compatibility
298  assert(!fileFormatVersion().parameterSetsTree());
299  metaDataTree->SetBranchAddress(poolNames::parameterSetMapBranchName().c_str(), &psetMapPtr);
300  } else {
301  assert(fileFormatVersion().parameterSetsTree());
302  // We use a smart pointer so the tree will be deleted after use, and not kept for the life of the file.
303  std::unique_ptr<TTree> psetTree(dynamic_cast<TTree*>(filePtr_->Get(poolNames::parameterSetsTreeName().c_str())));
304  if (nullptr == psetTree.get()) {
306  << "Could not find tree " << poolNames::parameterSetsTreeName() << " in the input file.\n";
307  }
308 
309  typedef std::pair<ParameterSetID, ParameterSetBlob> IdToBlobs;
310  IdToBlobs idToBlob;
311  IdToBlobs* pIdToBlob = &idToBlob;
312  psetTree->SetBranchAddress(poolNames::idToParameterSetBlobsBranchName().c_str(), &pIdToBlob);
313 
314  std::unique_ptr<TTreeCache> psetTreeCache =
316  psetTreeCache->SetEnablePrefetching(false);
317  filePtr_->SetCacheRead(psetTreeCache.get());
318  for (Long64_t i = 0; i != psetTree->GetEntries(); ++i) {
319  psetTree->GetEntry(i);
320  psetMap.insert(idToBlob);
321  }
322  filePtr_->SetCacheRead(nullptr);
323  }
324 
325  // backward compatibility
327  ProcessHistoryRegistry::collection_type* pHistMapPtr = &pHistMap;
328  if (metaDataTree->FindBranch(poolNames::processHistoryMapBranchName().c_str()) != nullptr) {
329  metaDataTree->SetBranchAddress(poolNames::processHistoryMapBranchName().c_str(), &pHistMapPtr);
330  }
331 
333  ProcessHistoryRegistry::vector_type* pHistVectorPtr = &pHistVector;
334  if (metaDataTree->FindBranch(poolNames::processHistoryBranchName().c_str()) != nullptr) {
335  metaDataTree->SetBranchAddress(poolNames::processHistoryBranchName().c_str(), &pHistVectorPtr);
336  }
337 
338  // backward compatibility
339  ProcessConfigurationVector processConfigurations;
340  ProcessConfigurationVector* procConfigVectorPtr = &processConfigurations;
341  if (metaDataTree->FindBranch(poolNames::processConfigurationBranchName().c_str()) != nullptr) {
342  metaDataTree->SetBranchAddress(poolNames::processConfigurationBranchName().c_str(), &procConfigVectorPtr);
343  }
344 
345  auto branchIDListsAPtr = std::make_unique<BranchIDLists>();
346  BranchIDLists* branchIDListsPtr = branchIDListsAPtr.get();
347  if (metaDataTree->FindBranch(poolNames::branchIDListBranchName().c_str()) != nullptr) {
348  metaDataTree->SetBranchAddress(poolNames::branchIDListBranchName().c_str(), &branchIDListsPtr);
349  }
350 
351  if (inputType != InputType::SecondarySource) {
353  std::make_unique<ThinnedAssociationsHelper>(); // propagate_const<T> has no reset() function
354  ThinnedAssociationsHelper* thinnedAssociationsHelperPtr = fileThinnedAssociationsHelper_.get();
355  if (metaDataTree->FindBranch(poolNames::thinnedAssociationsHelperBranchName().c_str()) != nullptr) {
356  metaDataTree->SetBranchAddress(poolNames::thinnedAssociationsHelperBranchName().c_str(),
357  &thinnedAssociationsHelperPtr);
358  }
359  }
360 
361  BranchChildren* branchChildrenBuffer = branchChildren_.get();
362  if (metaDataTree->FindBranch(poolNames::productDependenciesBranchName().c_str()) != nullptr) {
363  metaDataTree->SetBranchAddress(poolNames::productDependenciesBranchName().c_str(), &branchChildrenBuffer);
364  }
365 
366  // backward compatibility
367  std::vector<EventProcessHistoryID>* eventHistoryIDsPtr = &eventProcessHistoryIDs_;
368  if (metaDataTree->FindBranch(poolNames::eventHistoryBranchName().c_str()) != nullptr) {
369  metaDataTree->SetBranchAddress(poolNames::eventHistoryBranchName().c_str(), &eventHistoryIDsPtr);
370  }
371 
372  if (metaDataTree->FindBranch(poolNames::moduleDescriptionMapBranchName().c_str()) != nullptr) {
373  if (metaDataTree->GetBranch(poolNames::moduleDescriptionMapBranchName().c_str())->GetSplitLevel() != 0) {
374  metaDataTree->SetBranchStatus((poolNames::moduleDescriptionMapBranchName() + ".*").c_str(), false);
375  } else {
376  metaDataTree->SetBranchStatus(poolNames::moduleDescriptionMapBranchName().c_str(), false);
377  }
378  }
379 
380  // Here we read the metadata tree
381  roottree::getEntry(metaDataTree.get(), 0);
382 
384 
385  // Here we read the event history tree, if we have one.
387 
389  if (!fileFormatVersion().triggerPathsTracked()) {
390  ParameterSetConverter converter(psetMap, psetIdConverter, fileFormatVersion().parameterSetsByReference());
391  } else {
392  // Merge into the parameter set registry.
393  pset::Registry& psetRegistry = *pset::Registry::instance();
394  for (auto const& psetEntry : psetMap) {
395  ParameterSet pset(psetEntry.second.pset());
396  pset.setID(psetEntry.first);
397  // For thread safety, don't update global registries when a secondary source opens a file.
398  if (inputType != InputType::SecondarySource) {
399  psetRegistry.insertMapped(pset);
400  }
401  }
402  }
403  if (!fileFormatVersion().splitProductIDs()) {
404  // Old provenance format input file. Create a provenance adaptor.
405  // propagate_const<T> has no reset() function
406  provenanceAdaptor_ = std::make_unique<ProvenanceAdaptor>(
407  inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter, true);
408  // Fill in the branchIDLists branch from the provenance adaptor
409  branchIDLists_ = provenanceAdaptor_->branchIDLists();
410  } else {
411  if (!fileFormatVersion().triggerPathsTracked()) {
412  // New provenance format, but change in ParameterSet Format. Create a provenance adaptor.
413  // propagate_const<T> has no reset() function
414  provenanceAdaptor_ = std::make_unique<ProvenanceAdaptor>(
415  inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter, false);
416  }
417  // New provenance format input file. The branchIDLists branch was read directly from the input file.
418  if (metaDataTree->FindBranch(poolNames::branchIDListBranchName().c_str()) == nullptr) {
419  throw Exception(errors::EventCorruption) << "Failed to find branchIDLists branch in metaData tree.\n";
420  }
421  branchIDLists_.reset(branchIDListsAPtr.release());
422  }
423 
425  if (metaDataTree->FindBranch(poolNames::thinnedAssociationsHelperBranchName().c_str()) == nullptr) {
427  << "Failed to find thinnedAssociationsHelper branch in metaData tree.\n";
428  }
429  }
430 
431  if (!bypassVersionCheck) {
432  checkReleaseVersion(pHistVector, file());
433  }
434 
435  if (labelRawDataLikeMC) {
436  std::string const rawData("FEDRawDataCollection");
437  std::string const source("source");
438  ProductRegistry::ProductList& pList = inputProdDescReg.productListUpdator();
439  BranchKey finder(rawData, source, "", "");
440  ProductRegistry::ProductList::iterator it = pList.lower_bound(finder);
441  if (it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() == source) {
442  // We found raw data with a module label of source.
443  // We need to change the module label and process name.
444  // Create helper.
445  it->second.init();
446  // propagate_const<T> has no reset() function
447  daqProvenanceHelper_ = std::make_unique<DaqProvenanceHelper>(it->second.unwrappedTypeID());
448  // Create the new branch description
449  BranchDescription const& newBD = daqProvenanceHelper_->branchDescription();
450  // Save info from the old and new branch descriptions
451  daqProvenanceHelper_->saveInfo(it->second, newBD);
452  // Map the new branch name to the old branch name.
453  newBranchToOldBranch_.insert(std::make_pair(newBD.branchName(), it->second.branchName()));
454  // Remove the old branch description from the product Registry.
455  pList.erase(it);
456  // Check that there was only one.
457  it = pList.lower_bound(finder);
458  assert(!(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() == source));
459  // Insert the new branch description into the product registry.
460  inputProdDescReg.copyProduct(newBD);
461  // Fix up other per file metadata.
462  daqProvenanceHelper_->fixMetaData(processConfigurations, pHistVector);
463  daqProvenanceHelper_->fixMetaData(*branchIDLists_);
464  daqProvenanceHelper_->fixMetaData(*branchChildren_);
465  }
466  }
467 
468  for (auto const& history : pHistVector) {
469  processHistoryRegistry.registerProcessHistory(history);
470  }
471 
473 
474  // Update the branch id info. This has to be done before validateFile since
475  // depending on the file format, the branchIDListHelper_ may have its fixBranchListIndexes call made
476  if (inputType == InputType::Primary) {
478  }
479 
480  validateFile(inputType, usingGoToEvent);
481 
482  // Here, we make the class that will make the ProvenanceReader
483  // It reads whatever trees it needs.
484  // propagate_const<T> has no reset() function
485  provenanceReaderMaker_ = std::unique_ptr<MakeProvenanceReader>(makeProvenanceReaderMaker(inputType).release());
486 
487  // Merge into the hashed registries.
488  if (eventSkipperByID_ && eventSkipperByID_->somethingToSkip()) {
490  }
491 
492  initializeDuplicateChecker(indexesIntoFiles, currentIndexIntoFile);
499 
500  // Set product presence information in the product registry.
501  ProductRegistry::ProductList& pList = inputProdDescReg.productListUpdator();
502  for (auto& product : pList) {
503  BranchDescription& prod = product.second;
504  prod.init();
505  if (prod.branchType() == InProcess) {
506  // ProcessBlock input not implemented yet
507  continue;
508  }
509  treePointers_[prod.branchType()]->setPresence(prod, newBranchToOldBranch(prod.branchName()));
510  }
511 
512  auto newReg = std::make_unique<ProductRegistry>();
513 
514  // Do the translation from the old registry to the new one
515  {
516  ProductRegistry::ProductList const& prodList = inputProdDescReg.productList();
517  for (auto const& product : prodList) {
518  BranchDescription const& prod = product.second;
519  std::string newFriendlyName = friendlyname::friendlyName(prod.className());
520  if (newFriendlyName == prod.friendlyClassName()) {
521  newReg->copyProduct(prod);
522  } else {
523  if (fileFormatVersion().splitProductIDs()) {
525  << "Cannot change friendly class name algorithm without more development work\n"
526  << "to update BranchIDLists and ThinnedAssociationsHelper. Contact the framework group.\n";
527  }
528  BranchDescription newBD(prod);
529  newBD.updateFriendlyClassName();
530  newReg->copyProduct(newBD);
531  newBranchToOldBranch_.insert(std::make_pair(newBD.branchName(), prod.branchName()));
532  }
533  }
534  dropOnInput(*newReg, productSelectorRules, dropDescendants, inputType);
535  if (inputType == InputType::SecondaryFile) {
536  thinnedAssociationsHelper->updateFromSecondaryInput(*fileThinnedAssociationsHelper_,
537  *associationsFromSecondary);
538  } else if (inputType == InputType::Primary) {
539  thinnedAssociationsHelper->updateFromPrimaryInput(*fileThinnedAssociationsHelper_);
540  }
541 
542  if (inputType == InputType::Primary) {
543  for (auto& product : newReg->productListUpdator()) {
544  setIsMergeable(product.second);
545  }
546  }
547  //inform system we want to use DelayedReader
548  for (auto& product : newReg->productListUpdator()) {
549  product.second.setOnDemand(true);
550  }
551 
552  // freeze the product registry
553  newReg->setFrozen(inputType != InputType::Primary);
554  productRegistry_.reset(newReg.release());
555  }
556 
557  // Set up information from the product registry.
558  ProductRegistry::ProductList const& prodList = productRegistry()->productList();
559 
560  {
561  std::array<size_t, NumBranchTypes> nBranches;
562  nBranches.fill(0);
563  for (auto const& product : prodList) {
564  ++nBranches[product.second.branchType()];
565  }
566 
567  int i = 0;
568  for (auto t : treePointers_) {
569  if (t == nullptr) {
570  // ProcessBlock input not implemented yet
571  continue;
572  }
573  t->numberOfBranchesToAdd(nBranches[i]);
574  ++i;
575  }
576  }
577  for (auto const& product : prodList) {
578  BranchDescription const& prod = product.second;
579  if (prod.branchType() == InProcess) {
580  // ProcessBlock input not implemented yet
581  continue;
582  }
583  treePointers_[prod.branchType()]->addBranch(prod, newBranchToOldBranch(prod.branchName()));
584  }
585 
586  // Determine if this file is fast clonable.
587  setIfFastClonable(remainingEvents, remainingLumis);
588 
589  // We are done with our initial reading of EventAuxiliary.
591 
592  // Tell the event tree to begin training at the next read.
594 
595  // Train the run and lumi trees.
596  runTree_.trainCache("*");
597  lumiTree_.trainCache("*");
598  }
599 
601 
602  void RootFile::readEntryDescriptionTree(EntryDescriptionMap& entryDescriptionMap, InputType inputType) {
603  // Called only for old format files.
604  // We use a smart pointer so the tree will be deleted after use, and not kept for the life of the file.
605  std::unique_ptr<TTree> entryDescriptionTree(
606  dynamic_cast<TTree*>(filePtr_->Get(poolNames::entryDescriptionTreeName().c_str())));
607  if (nullptr == entryDescriptionTree.get()) {
609  << "Could not find tree " << poolNames::entryDescriptionTreeName() << " in the input file.\n";
610  }
611 
612  EntryDescriptionID idBuffer;
613  EntryDescriptionID* pidBuffer = &idBuffer;
614  entryDescriptionTree->SetBranchAddress(poolNames::entryDescriptionIDBranchName().c_str(), &pidBuffer);
615 
616  EventEntryDescription entryDescriptionBuffer;
617  EventEntryDescription* pEntryDescriptionBuffer = &entryDescriptionBuffer;
618  entryDescriptionTree->SetBranchAddress(poolNames::entryDescriptionBranchName().c_str(), &pEntryDescriptionBuffer);
619 
620  // Fill in the parentage registry.
622 
623  for (Long64_t i = 0, numEntries = entryDescriptionTree->GetEntries(); i < numEntries; ++i) {
624  roottree::getEntry(entryDescriptionTree.get(), i);
625  if (idBuffer != entryDescriptionBuffer.id()) {
626  throw Exception(errors::EventCorruption) << "Corruption of EntryDescription tree detected.\n";
627  }
628  entryDescriptionMap.insert(std::make_pair(entryDescriptionBuffer.id(), entryDescriptionBuffer));
630  parents.setParents(entryDescriptionBuffer.parents());
631  if (daqProvenanceHelper_) {
632  ParentageID const oldID = parents.id();
633  daqProvenanceHelper_->fixMetaData(parents.parentsForUpdate());
634  ParentageID newID = parents.id();
635  if (newID != oldID) {
636  daqProvenanceHelper_->setOldParentageIDToNew(oldID, newID);
637  }
638  }
639  // For thread safety, don't update global registries when a secondary source opens a file.
640  if (inputType != InputType::SecondarySource) {
641  registry.insertMapped(parents);
642  }
643  }
644  entryDescriptionTree->SetBranchAddress(poolNames::entryDescriptionIDBranchName().c_str(), nullptr);
645  entryDescriptionTree->SetBranchAddress(poolNames::entryDescriptionBranchName().c_str(), nullptr);
646  }
647 
649  // New format file
650  // We use a smart pointer so the tree will be deleted after use, and not kept for the life of the file.
651  std::unique_ptr<TTree> parentageTree(dynamic_cast<TTree*>(filePtr_->Get(poolNames::parentageTreeName().c_str())));
652  if (nullptr == parentageTree.get()) {
654  << "Could not find tree " << poolNames::parentageTreeName() << " in the input file.\n";
655  }
656 
658  Parentage* pParentageBuffer = &parents;
659  parentageTree->SetBranchAddress(poolNames::parentageBranchName().c_str(), &pParentageBuffer);
660 
662 
663  parentageIDLookup_.reserve(parentageTree->GetEntries());
664  for (Long64_t i = 0, numEntries = parentageTree->GetEntries(); i < numEntries; ++i) {
665  roottree::getEntry(parentageTree.get(), i);
666  if (daqProvenanceHelper_) {
667  ParentageID const oldID = parents.id();
668  daqProvenanceHelper_->fixMetaData(parents.parentsForUpdate());
669  ParentageID newID = parents.id();
670  if (newID != oldID) {
671  daqProvenanceHelper_->setOldParentageIDToNew(oldID, newID);
672  }
673  }
674  // For thread safety, don't update global registries when a secondary source opens a file.
675  if (inputType != InputType::SecondarySource) {
676  registry.insertMapped(parents);
677  }
678  parentageIDLookup_.push_back(parents.id());
679  }
680  parentageTree->SetBranchAddress(poolNames::parentageBranchName().c_str(), nullptr);
681  }
682 
683  void RootFile::setIfFastClonable(int remainingEvents, int remainingLumis) {
684  if (fileFormatVersion().noMetaDataTrees() and !fileFormatVersion().storedProductProvenanceUsed()) {
685  //we must avoid copying the old branch which stored the per product per event provenance
687  return;
688  }
689  if (!fileFormatVersion().splitProductIDs()) {
691  return;
692  }
695  return;
696  }
697  // Find entry for first event in file
699  while (it != indexIntoFileEnd_ && it.getEntryType() != IndexIntoFile::kEvent) {
700  ++it;
701  }
702  if (it == indexIntoFileEnd_) {
704  return;
705  }
706 
707  // From here on, record all reasons we can't fast clone.
708  IndexIntoFile::SortOrder sortOrder =
712  }
713  if (skipAnyEvents_) {
715  }
716  if (remainingEvents >= 0 && eventTree_.entries() > remainingEvents) {
718  }
719  if (remainingLumis >= 0 && lumiTree_.entries() > remainingLumis) {
721  }
722  if (duplicateChecker_ && !duplicateChecker_->checkDisabled() && !duplicateChecker_->noDuplicatesInFile()) {
724  }
725  }
726 
727  std::unique_ptr<FileBlock> RootFile::createFileBlock() const {
728  return std::make_unique<FileBlock>(fileFormatVersion(),
729  eventTree_.tree(),
731  lumiTree_.tree(),
733  runTree_.tree(),
734  runTree_.metaTree(),
737  file_,
739  modifiedIDs(),
740  branchChildren());
741  }
742 
743  std::string const& RootFile::newBranchToOldBranch(std::string const& newBranch) const {
744  std::map<std::string, std::string>::const_iterator it = newBranchToOldBranch_.find(newBranch);
745  if (it != newBranchToOldBranch_.end()) {
746  return it->second;
747  }
748  return newBranch;
749  }
750 
752 
755  }
756 
757  void RootFile::initAssociationsFromSecondary(std::vector<BranchID> const& associationsFromSecondary) {
758  thinnedAssociationsHelper_->initAssociationsFromSecondary(associationsFromSecondary,
760  }
761 
764  return false;
765  }
766 
767  if (eventSkipperByID_ && eventSkipperByID_->somethingToSkip()) {
768  // See first if the entire lumi or run is skipped, so we won't have to read the event Auxiliary in that case.
770  return true;
771  }
772 
773  // The Lumi is not skipped. If this is an event, see if the event is skipped.
775  auto eventAux = fillEventAuxiliary(indexIntoFileIter_.entry());
776  if (eventSkipperByID_->skipIt(indexIntoFileIter_.run(), indexIntoFileIter_.lumi(), eventAux.id().event())) {
777  return true;
778  }
779  }
780 
781  // Skip runs with no lumis if either lumisToSkip or lumisToProcess have been set to select lumis
783  // There are no lumis in this run, not even ones we will skip
785  return true;
786  }
787  // If we get here there are lumis in the run, check to see if we are skipping all of them
788  do {
790  return false;
791  }
792  } while (indexIntoFileIter_.skipLumiInRun());
793  return true;
794  }
795  }
796  return false;
797  }
798 
801  if (duplicateChecker_.get() == nullptr) {
802  return false;
803  }
804  auto const eventAux = fillEventAuxiliary(indexIntoFileIter_.entry());
805  return duplicateChecker_->isDuplicateAndCheckActive(indexIntoFileIter_.processHistoryIDIndex(),
808  eventAux.id().event(),
809  file_);
810  }
811 
814  }
815 
818  EventNumber_t& event) {
819  // First, account for consecutive skipped entries.
820  while (skipThisEntry()) {
825  } else {
827  }
828  }
829  // OK, we have an entry that is not skipped.
831  if (entryType == IndexIntoFile::kEnd) {
832  return IndexIntoFile::kEnd;
833  }
834  if (entryType == IndexIntoFile::kRun) {
836  runHelper_->checkForNewRun(run, indexIntoFileIter_.peekAheadAtLumi());
837  return IndexIntoFile::kRun;
838  } else if (processingMode_ == InputSource::Runs) {
840  return getNextItemType(run, lumi, event);
841  }
842  if (entryType == IndexIntoFile::kLumi) {
845  return IndexIntoFile::kLumi;
848  return getNextItemType(run, lumi, event);
849  }
850  if (isDuplicateEvent()) {
852  return getNextItemType(run, lumi, event);
853  }
856  auto eventAux = fillEventAuxiliary(indexIntoFileIter_.entry());
857  event = eventAux.event();
858  return IndexIntoFile::kEvent;
859  }
860 
863  itr.advanceToEvent();
864  return itr.getEntryType() == IndexIntoFile::kEnd;
865  }
866 
869  int phIndex;
872  IndexIntoFile::EntryNumber_t eventEntry;
873  itr.skipEventBackward(phIndex, run, lumi, eventEntry);
874  itr.skipEventBackward(phIndex, run, lumi, eventEntry);
875  return eventEntry == IndexIntoFile::invalidEntry;
876  }
877 
878  namespace {
879  struct RunItem {
880  RunItem(ProcessHistoryID const& phid, RunNumber_t const& run) : phid_(phid), run_(run) {}
881  ProcessHistoryID phid_;
882  RunNumber_t run_;
883  };
884  struct RunItemSortByRun {
885  bool operator()(RunItem const& a, RunItem const& b) const { return a.run_ < b.run_; }
886  };
887  struct RunItemSortByRunPhid {
888  bool operator()(RunItem const& a, RunItem const& b) const {
889  return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
890  }
891  };
892  struct LumiItem {
893  LumiItem(ProcessHistoryID const& phid,
894  RunNumber_t const& run,
897  : phid_(phid),
898  run_(run),
899  lumi_(lumi),
900  firstEventEntry_(entry),
901  lastEventEntry_(entry == IndexIntoFile::invalidEntry ? IndexIntoFile::invalidEntry : entry + 1) {}
902  ProcessHistoryID phid_;
903  RunNumber_t run_;
905  IndexIntoFile::EntryNumber_t firstEventEntry_;
906  IndexIntoFile::EntryNumber_t lastEventEntry_;
907  };
908  struct LumiItemSortByRunLumi {
909  bool operator()(LumiItem const& a, LumiItem const& b) const {
910  return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
911  }
912  };
913  struct LumiItemSortByRunLumiPhid {
914  bool operator()(LumiItem const& a, LumiItem const& b) const {
915  if (a.run_ < b.run_)
916  return true;
917  if (b.run_ < a.run_)
918  return false;
919  if (a.lumi_ < b.lumi_)
920  return true;
921  if (b.lumi_ < a.lumi_)
922  return false;
923  return a.phid_ < b.phid_;
924  }
925  };
926  } // namespace
927 
929  // This function is for backward compatibility.
930  // If reading a current format file, indexIntoFile_ is read from the input
931  // file and should always be there. Note that the algorithm below will work
932  // sometimes but often fail with the new format introduced in release 3_8_0.
933  // If it ever becomes necessary to rebuild IndexIntoFile from the new format,
934  // probably a separate function should be written to deal with the task.
935  // This is possible just not implemented yet.
936  assert(!fileFormatVersion().hasIndexIntoFile());
937 
938  typedef std::list<LumiItem> LumiList;
939  LumiList lumis; // (declare 1)
940 
941  typedef std::set<LuminosityBlockID> RunLumiSet;
942  RunLumiSet runLumiSet; // (declare 2)
943 
944  typedef std::list<RunItem> RunList;
945  RunList runs; // (declare 5)
946 
947  typedef std::set<RunNumber_t> RunSet;
948  RunSet runSet; // (declare 4)
949 
950  typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
951  RunItemSet runItemSet; // (declare 3)
952 
953  typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
954  PHIDMap phidMap;
955 
956  RunNumber_t prevRun = 0;
957  LuminosityBlockNumber_t prevLumi = 0;
958  ProcessHistoryID prevPhid;
959  bool iFirst = true;
960 
961  indexIntoFile_.unsortedEventNumbers().clear(); // should already be empty, just being careful
963 
964  // First, loop through the event tree.
965  EventSelectionIDVector eventSelectionIDs;
966  BranchListIndexes branchListIndexes;
967  while (eventTree_.next()) {
968  bool newRun = false;
969  bool newLumi = false;
970  auto evtAux = fillThisEventAuxiliary();
971  fillEventHistory(evtAux, eventSelectionIDs, branchListIndexes);
972 
973  // Save the event numbers as we loop through the event auxiliary to avoid
974  // having to read through the event auxiliary again later. These event numbers
975  // are not actually used in this function, but could be needed elsewhere.
976  indexIntoFile_.unsortedEventNumbers().push_back(evtAux.event());
977 
978  ProcessHistoryID reducedPHID = processHistoryRegistry_->reducedProcessHistoryID(evtAux.processHistoryID());
979 
980  if (iFirst || prevPhid != reducedPHID || prevRun != evtAux.run()) {
981  iFirst = false;
982  newRun = newLumi = true;
983  } else if (prevLumi != evtAux.luminosityBlock()) {
984  newLumi = true;
985  }
986  prevPhid = reducedPHID;
987  prevRun = evtAux.run();
988  prevLumi = evtAux.luminosityBlock();
989  if (newLumi) {
990  lumis.emplace_back(
991  reducedPHID, evtAux.run(), evtAux.luminosityBlock(), eventTree_.entryNumber()); // (insert 1)
992  runLumiSet.insert(LuminosityBlockID(evtAux.run(), evtAux.luminosityBlock())); // (insert 2)
993  } else {
994  LumiItem& currentLumi = lumis.back();
995  assert(currentLumi.lastEventEntry_ == eventTree_.entryNumber());
996  ++currentLumi.lastEventEntry_;
997  }
998  if (newRun) {
999  // Insert run in list if it is not already there.
1000  RunItem item(reducedPHID, evtAux.run());
1001  if (runItemSet.insert(item).second) { // (check 3, insert 3)
1002  runs.push_back(std::move(item)); // (insert 5)
1003  runSet.insert(evtAux.run()); // (insert 4)
1004  phidMap.insert(std::make_pair(evtAux.run(), reducedPHID));
1005  }
1006  }
1007  }
1008  // now clean up.
1011 
1012  // Loop over run entries and fill information.
1013 
1014  typedef std::map<RunNumber_t, IndexIntoFile::EntryNumber_t> RunMap;
1015  RunMap runMap; // (declare 11)
1016 
1017  typedef std::vector<RunItem> RunVector;
1018  RunVector emptyRuns; // (declare 12)
1019 
1020  if (runTree_.isValid()) {
1021  while (runTree_.next()) {
1022  // Note: adjacent duplicates will be skipped without an explicit check.
1023 
1024  std::shared_ptr<RunAuxiliary> runAux = fillRunAuxiliary();
1025  ProcessHistoryID reducedPHID = processHistoryRegistry_->reducedProcessHistoryID(runAux->processHistoryID());
1026 
1027  if (runSet.insert(runAux->run()).second) { // (check 4, insert 4)
1028  // This run was not associated with any events.
1029  emptyRuns.emplace_back(reducedPHID, runAux->run()); // (insert 12)
1030  }
1031  runMap.insert(std::make_pair(runAux->run(), runTree_.entryNumber())); // (insert 11)
1032  phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
1033  }
1034  // now clean up.
1036  }
1037 
1038  // Insert the ordered empty runs into the run list.
1039  RunItemSortByRun runItemSortByRun;
1040  stable_sort_all(emptyRuns, runItemSortByRun);
1041 
1042  RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
1043  for (auto const& emptyRun : emptyRuns) {
1044  for (; itRuns != endRuns; ++itRuns) {
1045  if (runItemSortByRun(emptyRun, *itRuns)) {
1046  break;
1047  }
1048  }
1049  runs.insert(itRuns, emptyRun);
1050  }
1051 
1052  // Loop over luminosity block entries and fill information.
1053 
1054  typedef std::vector<LumiItem> LumiVector;
1055  LumiVector emptyLumis; // (declare 7)
1056 
1057  typedef std::map<LuminosityBlockID, IndexIntoFile::EntryNumber_t> RunLumiMap;
1058  RunLumiMap runLumiMap; // (declare 6)
1059 
1060  if (lumiTree_.isValid()) {
1061  while (lumiTree_.next()) {
1062  // Note: adjacent duplicates will be skipped without an explicit check.
1063  std::shared_ptr<LuminosityBlockAuxiliary> lumiAux = fillLumiAuxiliary();
1064  LuminosityBlockID lumiID = LuminosityBlockID(lumiAux->run(), lumiAux->luminosityBlock());
1065  if (runLumiSet.insert(lumiID).second) { // (check 2, insert 2)
1066  // This lumi was not associated with any events.
1067  // Use the process history ID from the corresponding run. In cases of practical
1068  // importance, this should be the correct process history ID, but it is possible
1069  // to construct files where this is not the correct process history ID ...
1070  PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
1071  assert(iPhidMap != phidMap.end());
1072  emptyLumis.emplace_back(
1073  iPhidMap->second, lumiAux->run(), lumiAux->luminosityBlock(), IndexIntoFile::invalidEntry); // (insert 7)
1074  }
1075  runLumiMap.insert(std::make_pair(lumiID, lumiTree_.entryNumber()));
1076  }
1077  // now clean up.
1079  }
1080 
1081  // Insert the ordered empty lumis into the lumi list.
1082  LumiItemSortByRunLumi lumiItemSortByRunLumi;
1083  stable_sort_all(emptyLumis, lumiItemSortByRunLumi);
1084 
1085  LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
1086  for (auto const& emptyLumi : emptyLumis) {
1087  for (; itLumis != endLumis; ++itLumis) {
1088  if (lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
1089  break;
1090  }
1091  }
1092  lumis.insert(itLumis, emptyLumi);
1093  }
1094 
1095  // Create a map of RunItems that gives the order of first appearance in the list.
1096  // Also fill in the vector of process history IDs
1097  typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
1098  RunCountMap runCountMap; // Declare (17)
1099  std::vector<ProcessHistoryID>& phids = indexIntoFile_.setProcessHistoryIDs();
1100  assert(phids.empty());
1101  std::vector<IndexIntoFile::RunOrLumiEntry>& entries = indexIntoFile_.setRunOrLumiEntries();
1102  assert(entries.empty());
1103  int rcount = 0;
1104  for (auto& run : runs) {
1105  RunCountMap::const_iterator countMapItem = runCountMap.find(run);
1106  if (countMapItem == runCountMap.end()) {
1107  countMapItem = runCountMap.insert(std::make_pair(run, rcount)).first; // Insert (17)
1108  assert(countMapItem != runCountMap.end());
1109  ++rcount;
1110  }
1111  std::vector<ProcessHistoryID>::const_iterator phidItem = find_in_all(phids, run.phid_);
1112  if (phidItem == phids.end()) {
1113  phids.push_back(run.phid_);
1114  phidItem = phids.end() - 1;
1115  }
1116  entries.emplace_back(countMapItem->second, // use (17)
1118  runMap[run.run_], // use (11)
1119  phidItem - phids.begin(),
1120  run.run_,
1121  0U,
1124  }
1125 
1126  // Create a map of LumiItems that gives the order of first appearance in the list.
1127  typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1128  LumiCountMap lumiCountMap; // Declare (19)
1129  int lcount = 0;
1130  for (auto& lumi : lumis) {
1131  RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(lumi.phid_, lumi.run_));
1132  assert(runCountMapItem != runCountMap.end());
1133  LumiCountMap::const_iterator countMapItem = lumiCountMap.find(lumi);
1134  if (countMapItem == lumiCountMap.end()) {
1135  countMapItem = lumiCountMap.insert(std::make_pair(lumi, lcount)).first; // Insert (17)
1136  assert(countMapItem != lumiCountMap.end());
1137  ++lcount;
1138  }
1139  std::vector<ProcessHistoryID>::const_iterator phidItem = find_in_all(phids, lumi.phid_);
1140  assert(phidItem != phids.end());
1141  entries.emplace_back(runCountMapItem->second,
1142  countMapItem->second,
1143  runLumiMap[LuminosityBlockID(lumi.run_, lumi.lumi_)],
1144  phidItem - phids.begin(),
1145  lumi.run_,
1146  lumi.lumi_,
1147  lumi.firstEventEntry_,
1148  lumi.lastEventEntry_);
1149  }
1150  stable_sort_all(entries);
1151  }
1152 
1153  void RootFile::validateFile(InputType inputType, bool usingGoToEvent) {
1154  if (!fid_.isValid()) {
1156  }
1157  if (!eventTree_.isValid()) {
1158  throw Exception(errors::EventCorruption) << "'Events' tree is corrupted or not present\n"
1159  << "in the input file.\n";
1160  }
1161  if (enforceGUIDInFileName_) {
1162  auto guidFromName = stemFromPath(file_);
1163  if (guidFromName != fid_.fid()) {
1165  << "GUID " << guidFromName << " extracted from file name " << file_
1166  << " is inconsistent with the GUID read from the file " << fid_.fid();
1167  }
1168  }
1169 
1170  if (fileFormatVersion().hasIndexIntoFile()) {
1171  if (runTree().entries() > 0) {
1173  }
1175  if (daqProvenanceHelper_) {
1176  std::vector<ProcessHistoryID>& phidVec = indexIntoFile_.setProcessHistoryIDs();
1177  for (auto& phid : phidVec) {
1178  phid = daqProvenanceHelper_->mapProcessHistoryID(phid);
1179  }
1180  }
1182  }
1183  } else {
1186  }
1187 
1191  std::shared_ptr<IndexIntoFile::EventFinder>(std::make_shared<RootFileEventFinder>(eventTree_)));
1192  // We fill the event numbers explicitly if we need to find events in closed files,
1193  // such as for secondary files (or secondary sources) or if duplicate checking across files.
1194  bool needEventNumbers = false;
1195  bool needIndexesForDuplicateChecker =
1196  duplicateChecker_ && duplicateChecker_->checkingAllFiles() && !duplicateChecker_->checkDisabled();
1197  if (inputType != InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1198  needEventNumbers = true;
1199  }
1200  bool needEventEntries = false;
1201  if (inputType != InputType::Primary || !noEventSort_) {
1202  // We need event entries for sorting or for secondary files or sources.
1203  needEventEntries = true;
1204  }
1205  indexIntoFile_.fillEventNumbersOrEntries(needEventNumbers, needEventEntries);
1206  }
1207 
1208  void RootFile::reportOpened(std::string const& inputType) {
1209  // Report file opened.
1210  std::string const label = "source";
1211  std::string moduleName = "PoolSource";
1212  filePtr_->inputFileOpened(logicalFile_, inputType, moduleName, label, fid_.fid(), eventTree_.branchNames());
1213  }
1214 
1216  // Just to play it safe, zero all pointers to objects in the InputFile to be closed.
1217  eventHistoryTree_ = nullptr;
1218  for (auto& treePointer : treePointers_) {
1219  if (treePointer == nullptr) {
1220  // ProcessBlock input not implemented yet
1221  continue;
1222  }
1223  treePointer->close();
1224  treePointer = nullptr;
1225  }
1226  filePtr_->Close();
1227  filePtr_ = nullptr; // propagate_const<T> has no reset() function
1228  }
1229 
1232  // Already read.
1233  return eventAuxCache_;
1234  }
1235  if (fileFormatVersion().newAuxiliary()) {
1236  EventAuxiliary* pEvAux = &eventAuxCache_;
1238  } else {
1239  // for backward compatibility.
1240  EventAux eventAux;
1241  EventAux* pEvAux = &eventAux;
1242  eventTree_.fillAux<EventAux>(pEvAux);
1243  conversion(eventAux, eventAuxCache_);
1244  }
1246  return eventAuxCache_;
1247  }
1248 
1251  return fillThisEventAuxiliary();
1252  }
1253 
1255  EventSelectionIDVector& eventSelectionIDs,
1256  BranchListIndexes& branchListIndexes) {
1257  // We could consider doing delayed reading, but because we have to
1258  // store this History object in a different tree than the event
1259  // data tree, this is too hard to do in this first version.
1260  if (fileFormatVersion().eventHistoryBranch()) {
1261  // Lumi block number was not in EventID for the relevant releases.
1262  EventID id(evtAux.id().run(), 0, evtAux.id().event());
1263  if (eventProcessHistoryIter_->eventID() != id) {
1266  assert(eventProcessHistoryIter_->eventID() == id);
1267  }
1268  evtAux.setProcessHistoryID(eventProcessHistoryIter_->processHistoryID());
1270  } else if (fileFormatVersion().eventHistoryTree()) {
1271  // for backward compatibility.
1272  History* pHistory = history_.get();
1273  TBranch* eventHistoryBranch = eventHistoryTree_->GetBranch(poolNames::eventHistoryBranchName().c_str());
1274  if (!eventHistoryBranch) {
1275  throw Exception(errors::EventCorruption) << "Failed to find history branch in event history tree.\n";
1276  }
1277  eventHistoryBranch->SetAddress(&pHistory);
1279  evtAux.setProcessHistoryID(history_->processHistoryID());
1280  eventSelectionIDs.swap(history_->eventSelectionIDs());
1281  branchListIndexes.swap(history_->branchListIndexes());
1282  } else if (fileFormatVersion().noMetaDataTrees()) {
1283  // Current format
1284  EventSelectionIDVector* pESV = &eventSelectionIDs;
1285  TBranch* eventSelectionIDBranch = eventTree_.tree()->GetBranch(poolNames::eventSelectionsBranchName().c_str());
1286  assert(eventSelectionIDBranch != nullptr);
1287  eventTree_.fillBranchEntry(eventSelectionIDBranch, pESV);
1288  BranchListIndexes* pBLI = &branchListIndexes;
1289  TBranch* branchListIndexesBranch = eventTree_.tree()->GetBranch(poolNames::branchListIndexesBranchName().c_str());
1290  assert(branchListIndexesBranch != nullptr);
1291  eventTree_.fillBranchEntry(branchListIndexesBranch, pBLI);
1292  }
1293  if (provenanceAdaptor_) {
1294  evtAux.setProcessHistoryID(provenanceAdaptor_->convertID(evtAux.processHistoryID()));
1295  for (auto& esID : eventSelectionIDs) {
1296  esID = provenanceAdaptor_->convertID(esID);
1297  }
1298  }
1299  if (daqProvenanceHelper_) {
1300  evtAux.setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(evtAux.processHistoryID()));
1301  }
1303  // old format. branchListIndexes_ must be filled in from the ProvenanceAdaptor.
1304  provenanceAdaptor_->branchListIndexes(branchListIndexes);
1305  }
1306  if (branchIDListHelper_) {
1307  branchIDListHelper_->fixBranchListIndexes(branchListIndexes);
1308  }
1309  }
1310 
1311  std::shared_ptr<LuminosityBlockAuxiliary> RootFile::fillLumiAuxiliary() {
1312  auto lumiAuxiliary = std::make_shared<LuminosityBlockAuxiliary>();
1313  if (fileFormatVersion().newAuxiliary()) {
1314  LuminosityBlockAuxiliary* pLumiAux = lumiAuxiliary.get();
1316  } else {
1317  LuminosityBlockAux lumiAux;
1318  LuminosityBlockAux* pLumiAux = &lumiAux;
1320  conversion(lumiAux, *lumiAuxiliary);
1321  }
1322  if (provenanceAdaptor_) {
1323  lumiAuxiliary->setProcessHistoryID(provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1324  }
1325  if (daqProvenanceHelper_) {
1326  lumiAuxiliary->setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1327  }
1328  if (lumiAuxiliary->luminosityBlock() == 0 && !fileFormatVersion().runsAndLumis()) {
1329  lumiAuxiliary->id() = LuminosityBlockID(RunNumber_t(1), LuminosityBlockNumber_t(1));
1330  }
1331  return lumiAuxiliary;
1332  }
1333 
1334  std::shared_ptr<RunAuxiliary> RootFile::fillRunAuxiliary() {
1335  auto runAuxiliary = std::make_shared<RunAuxiliary>();
1336  if (fileFormatVersion().newAuxiliary()) {
1337  RunAuxiliary* pRunAux = runAuxiliary.get();
1338  runTree_.fillAux<RunAuxiliary>(pRunAux);
1339  } else {
1340  RunAux runAux;
1341  RunAux* pRunAux = &runAux;
1342  runTree_.fillAux<RunAux>(pRunAux);
1343  conversion(runAux, *runAuxiliary);
1344  }
1345  if (provenanceAdaptor_) {
1346  runAuxiliary->setProcessHistoryID(provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1347  }
1348  if (daqProvenanceHelper_) {
1349  runAuxiliary->setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1350  }
1351  return runAuxiliary;
1352  }
1353 
1355  while (offset > 0 && indexIntoFileIter_ != indexIntoFileEnd_) {
1356  int phIndexOfSkippedEvent = IndexIntoFile::invalidIndex;
1357  RunNumber_t runOfSkippedEvent = IndexIntoFile::invalidRun;
1360 
1362  phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1363 
1364  // At the end of the file and there were no more events to skip
1365  if (skippedEventEntry == IndexIntoFile::invalidEntry)
1366  break;
1367 
1368  if (eventSkipperByID_ && eventSkipperByID_->somethingToSkip()) {
1369  auto const evtAux = fillEventAuxiliary(skippedEventEntry);
1370  if (eventSkipperByID_->skipIt(runOfSkippedEvent, lumiOfSkippedEvent, evtAux.id().event())) {
1371  continue;
1372  }
1373  }
1374  if (duplicateChecker_ && !duplicateChecker_->checkDisabled() && !duplicateChecker_->noDuplicatesInFile()) {
1375  auto const evtAux = fillEventAuxiliary(skippedEventEntry);
1376  if (duplicateChecker_->isDuplicateAndCheckActive(
1377  phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, evtAux.id().event(), file_)) {
1378  continue;
1379  }
1380  }
1381  --offset;
1382  }
1383 
1384  while (offset < 0) {
1385  if (duplicateChecker_) {
1386  duplicateChecker_->disable();
1387  }
1388 
1389  int phIndexOfEvent = IndexIntoFile::invalidIndex;
1393 
1394  indexIntoFileIter_.skipEventBackward(phIndexOfEvent, runOfEvent, lumiOfEvent, eventEntry);
1395 
1396  if (eventEntry == IndexIntoFile::invalidEntry)
1397  break;
1398 
1399  if (eventSkipperByID_ && eventSkipperByID_->somethingToSkip()) {
1400  auto const evtAux = fillEventAuxiliary(eventEntry);
1401  if (eventSkipperByID_->skipIt(runOfEvent, lumiOfEvent, evtAux.id().event())) {
1402  continue;
1403  }
1404  }
1405  ++offset;
1406  }
1408  }
1409 
1410  bool RootFile::goToEvent(EventID const& eventID) {
1412 
1413  if (duplicateChecker_) {
1414  duplicateChecker_->disable();
1415  }
1416 
1418  if (noEventSort_)
1420 
1422  indexIntoFile_.findPosition(sortOrder, eventID.run(), eventID.luminosityBlock(), eventID.event());
1423 
1424  if (iter == indexIntoFile_.end(sortOrder)) {
1425  return false;
1426  }
1427  indexIntoFileIter_ = iter;
1428  return true;
1429  }
1430 
1431  // readEvent() is responsible for creating, and setting up, the
1432  // EventPrincipal.
1433  //
1434  // 1. create an EventPrincipal with a unique EventID
1435  // 2. For each entry in the provenance, put in one ProductResolver,
1436  // holding the Provenance for the corresponding EDProduct.
1437  // 3. set up the the EventPrincipal to know about this ProductResolver.
1438  //
1439  // We do *not* create the EDProduct instance (the equivalent of reading
1440  // the branch containing this EDProduct. That will be done by the Delayed Reader,
1441  // when it is asked to do so.
1442  //
1446  // read the event
1447  readCurrentEvent(principal);
1448  auto const& evtAux = principal.aux();
1449 
1450  runHelper_->checkRunConsistency(evtAux.run(), indexIntoFileIter_.run());
1451  runHelper_->checkLumiConsistency(evtAux.luminosityBlock(), indexIntoFileIter_.lumi());
1452 
1454  }
1455 
1456  // Reads event at the current entry in the event tree
1458  if (!eventTree_.current()) {
1459  return false;
1460  }
1461  auto evtAux = fillThisEventAuxiliary();
1462  if (!fileFormatVersion().lumiInEventID()) {
1463  //ugly, but will disappear when the backward compatibility is done with schema evolution.
1464  const_cast<EventID&>(evtAux.id()).setLuminosityBlockNumber(evtAux.oldLuminosityBlock());
1465  evtAux.resetObsoleteInfo();
1466  }
1467  EventSelectionIDVector eventSelectionIDs;
1468  BranchListIndexes branchListIndexes;
1469  fillEventHistory(evtAux, eventSelectionIDs, branchListIndexes);
1470  runHelper_->overrideRunNumber(evtAux.id(), evtAux.isRealData());
1471 
1472  // We're not done ... so prepare the EventPrincipal
1474  auto history = processHistoryRegistry_->getMapped(evtAux.processHistoryID());
1475  principal.fillEventPrincipal(evtAux,
1476  history,
1477  std::move(eventSelectionIDs),
1478  std::move(branchListIndexes),
1479  *(makeProductProvenanceRetriever(principal.streamID().value())),
1481 
1482  // If this next assert shows up in performance profiling or significantly affects memory, then these three lines should be deleted.
1483  // The IndexIntoFile should guarantee that it never fails.
1485  ? *daqProvenanceHelper_->oldProcessHistoryID()
1486  : evtAux.processHistoryID());
1487  ProcessHistoryID const& reducedPHID = processHistoryRegistry_->reducedProcessHistoryID(idToCheck);
1489 
1490  // report event read from file
1491  filePtr_->eventReadFromFile();
1492  return true;
1493  }
1494 
1496 
1497  std::shared_ptr<RunAuxiliary> RootFile::readRunAuxiliary_() {
1498  if (runHelper_->fakeNewRun()) {
1499  auto runAuxiliary = std::make_shared<RunAuxiliary>(*savedRunAuxiliary());
1500  runHelper_->overrideRunNumber(runAuxiliary->id());
1501  return runAuxiliary;
1502  }
1505 
1506  // Begin code for backward compatibility before the existence of run trees.
1507  if (!runTree_.isValid()) {
1508  // prior to the support of run trees.
1509  // RunAuxiliary did not contain a valid timestamp. Take it from the next event.
1511  assert(eventEntry != IndexIntoFile::invalidEntry);
1512  assert(eventTree_.current(eventEntry));
1513  auto const evtAux = fillEventAuxiliary(eventEntry);
1514 
1516  runHelper_->overrideRunNumber(run);
1517  savedRunAuxiliary_ = std::make_shared<RunAuxiliary>(run.run(), evtAux.time(), Timestamp::invalidTimestamp());
1518  return savedRunAuxiliary();
1519  }
1520  // End code for backward compatibility before the existence of run trees.
1522  std::shared_ptr<RunAuxiliary> runAuxiliary = fillRunAuxiliary();
1523  assert(runAuxiliary->run() == indexIntoFileIter_.run());
1524  runHelper_->overrideRunNumber(runAuxiliary->id());
1525  filePtr_->reportInputRunNumber(runAuxiliary->run());
1526  // If RunAuxiliary did not contain a valid begin timestamp, invalidate any end timestamp.
1527  if (runAuxiliary->beginTime() == Timestamp::invalidTimestamp()) {
1528  runAuxiliary->setEndTime(Timestamp::invalidTimestamp());
1529  }
1530 
1531  // If RunAuxiliary did not contain a valid timestamp, or if this an old format file from
1532  // when the Run's ProcessHistory included only processes where products were added to the Run itself,
1533  // we attempt to read the first event in the run to get appropriate info.
1534  if (runAuxiliary->beginTime() == Timestamp::invalidTimestamp() ||
1537  // If we have a valid event, use its information.
1538  if (eventEntry != IndexIntoFile::invalidEntry) {
1539  assert(eventTree_.current(eventEntry));
1540  auto evtAux = fillEventAuxiliary(eventEntry);
1541 
1542  // RunAuxiliary did not contain a valid timestamp. Take it from the next event in this run if there is one.
1543  if (runAuxiliary->beginTime() == Timestamp::invalidTimestamp()) {
1544  runAuxiliary->setBeginTime(evtAux.time());
1545  }
1546 
1547  // For backwards compatibility when the Run's ProcessHistory included only processes where products were added to the
1548  // Run, and then the Run and Event auxiliaries could be different. Use the event ProcessHistoryID if there is one. It should
1549  // almost always be correct by the current definition (processes included if any products are added. This makes the run, lumi,
1550  // and event ProcessHistory's always be the same if no file merging occurs).
1552  EventSelectionIDVector eventSelectionIDs;
1553  BranchListIndexes branchListIndexes;
1554  fillEventHistory(evtAux, eventSelectionIDs, branchListIndexes);
1555  runAuxiliary->setProcessHistoryID(evtAux.processHistoryID());
1556  }
1557  }
1558  }
1559  savedRunAuxiliary_ = runAuxiliary;
1560  return runAuxiliary;
1561  }
1562 
1563  void RootFile::readRun_(RunPrincipal& runPrincipal) {
1564  MergeableRunProductMetadata* mergeableRunProductMetadata = nullptr;
1565  if (inputType_ == InputType::Primary) {
1566  mergeableRunProductMetadata = runPrincipal.mergeableRunProductMetadata();
1567  RootTree::EntryNumber const& entryNumber = runTree_.entryNumber();
1568  assert(entryNumber >= 0);
1569  mergeableRunProductMetadata->readRun(
1571  }
1572 
1573  if (!runHelper_->fakeNewRun()) {
1577  }
1578  // Begin code for backward compatibility before the existence of run trees.
1579  if (!runTree_.isValid()) {
1580  return;
1581  }
1582  // End code for backward compatibility before the existence of run trees.
1583  // NOTE: we use 0 for the index since do not do delayed reads for RunPrincipals
1586  // Read in all the products now.
1587  runPrincipal.readAllFromSourceAndMergeImmediately(mergeableRunProductMetadata);
1588  }
1589 
1590  std::shared_ptr<LuminosityBlockAuxiliary> RootFile::readLuminosityBlockAuxiliary_() {
1593  // Begin code for backward compatibility before the existence of lumi trees.
1594  if (!lumiTree_.isValid()) {
1596  assert(eventEntry != IndexIntoFile::invalidEntry);
1597  assert(eventTree_.current(eventEntry));
1598  auto const evtAux = fillEventAuxiliary(eventEntry);
1599 
1601  runHelper_->overrideRunNumber(lumi);
1602  return std::make_shared<LuminosityBlockAuxiliary>(
1603  lumi.run(), lumi.luminosityBlock(), evtAux.time(), Timestamp::invalidTimestamp());
1604  }
1605  // End code for backward compatibility before the existence of lumi trees.
1607  std::shared_ptr<LuminosityBlockAuxiliary> lumiAuxiliary = fillLumiAuxiliary();
1608  assert(lumiAuxiliary->run() == indexIntoFileIter_.run());
1609  assert(lumiAuxiliary->luminosityBlock() == indexIntoFileIter_.lumi());
1610  runHelper_->overrideRunNumber(lumiAuxiliary->id());
1611  filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1612  if (lumiAuxiliary->beginTime() == Timestamp::invalidTimestamp()) {
1614  if (eventEntry != IndexIntoFile::invalidEntry) {
1615  assert(eventTree_.current(eventEntry));
1616  auto const evtAux = fillEventAuxiliary(eventEntry);
1617 
1618  lumiAuxiliary->setBeginTime(evtAux.time());
1619  }
1620  lumiAuxiliary->setEndTime(Timestamp::invalidTimestamp());
1621  }
1622  if (!fileFormatVersion().processHistorySameWithinRun() && savedRunAuxiliary_) {
1623  lumiAuxiliary->setProcessHistoryID(savedRunAuxiliary_->processHistoryID());
1624  }
1625  return lumiAuxiliary;
1626  }
1627 
1631  // Begin code for backward compatibility before the existence of lumi trees.
1632  if (!lumiTree_.isValid()) {
1634  return;
1635  }
1636  // End code for backward compatibility before the existence of lumi trees.
1638  // NOTE: we use 0 for the index since do not do delayed reads for LuminosityBlockPrincipals
1640  auto history = processHistoryRegistry_->getMapped(lumiPrincipal.aux().processHistoryID());
1642  // Read in all the products now.
1643  lumiPrincipal.readAllFromSourceAndMergeImmediately();
1645  }
1646 
1650  return false;
1652  return true;
1653  }
1654 
1658  return false;
1660  return true;
1661  }
1662 
1666  return false;
1668  return true;
1669  }
1670 
1674  }
1677  return false;
1678  if (run != indexIntoFileIter_.run())
1679  return false;
1680  if (lumi != indexIntoFileIter_.lumi())
1681  return false;
1682  //The following is used for its side effect of advancing the
1683  // eventTree entry.
1685  return true;
1686  }
1687 
1689  // Read in the event history tree, if we have one...
1690  if (fileFormatVersion().eventHistoryTree()) {
1691  history_ = std::make_unique<History>(); // propagate_const<T> has no reset() function
1692  eventHistoryTree_ = dynamic_cast<TTree*>(filePtr_->Get(poolNames::eventHistoryTreeName().c_str()));
1693  if (!eventHistoryTree_) {
1694  throw Exception(errors::EventCorruption) << "Failed to find the event history tree.\n";
1695  }
1696  }
1697  }
1698 
1700  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
1701  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile) {
1702  if (duplicateChecker_ && !duplicateChecker_->checkDisabled()) {
1703  if (eventTree_.next()) {
1704  auto const evtAux = fillThisEventAuxiliary();
1705 
1706  duplicateChecker_->inputFileOpened(evtAux.isRealData(), indexIntoFile_, indexesIntoFiles, currentIndexIntoFile);
1707  }
1709  }
1710  }
1711 
1712  void RootFile::markBranchToBeDropped(bool dropDescendants,
1713  BranchDescription const& branch,
1714  std::set<BranchID>& branchesToDrop,
1715  std::map<BranchID, BranchID> const& droppedToKeptAlias) const {
1716  if (dropDescendants) {
1717  branchChildren_->appendToDescendants(branch, branchesToDrop, droppedToKeptAlias);
1718  } else {
1719  branchesToDrop.insert(branch.branchID());
1720  }
1721  }
1722 
1724  ProductSelectorRules const& rules,
1725  bool dropDescendants,
1726  InputType inputType) {
1727  // This is the selector for drop on input.
1728  ProductSelector productSelector;
1729  productSelector.initialize(rules, reg.allBranchDescriptions());
1730 
1731  std::vector<BranchDescription const*> associationDescriptions;
1732 
1734  // Do drop on input. On the first pass, just fill in a set of branches to be dropped.
1735  std::set<BranchID> branchesToDrop;
1736  std::map<BranchID, BranchID> droppedToKeptAlias;
1737  for (auto const& product : prodList) {
1738  BranchDescription const& prod = product.second;
1739  if (prod.branchID() != prod.originalBranchID() && prod.present()) {
1740  droppedToKeptAlias[prod.originalBranchID()] = prod.branchID();
1741  }
1742  }
1743  for (auto const& product : prodList) {
1744  BranchDescription const& prod = product.second;
1745  // Special handling for ThinnedAssociations
1746  if (prod.unwrappedType() == typeid(ThinnedAssociation) && prod.present()) {
1747  if (inputType != InputType::SecondarySource) {
1748  associationDescriptions.push_back(&prod);
1749  } else {
1750  markBranchToBeDropped(dropDescendants, prod, branchesToDrop, droppedToKeptAlias);
1751  }
1752  } else if (!productSelector.selected(prod)) {
1753  markBranchToBeDropped(dropDescendants, prod, branchesToDrop, droppedToKeptAlias);
1754  }
1755  }
1756 
1757  if (inputType != InputType::SecondarySource) {
1758  // Decide whether to keep the thinned associations and corresponding
1759  // entries in the helper. For secondary source they are all dropped,
1760  // but in other cases we look for thinned collections the associations
1761  // redirect a Ref or Ptr to when dereferencing them.
1762 
1763  // Need a list of kept products in order to determine which thinned associations
1764  // are kept.
1765  std::set<BranchID> keptProductsInEvent;
1766  for (auto const& product : prodList) {
1767  BranchDescription const& prod = product.second;
1768  if (branchesToDrop.find(prod.branchID()) == branchesToDrop.end() && prod.present() &&
1769  prod.branchType() == InEvent) {
1770  keptProductsInEvent.insert(prod.branchID());
1771  }
1772  }
1773 
1774  // Decide which ThinnedAssociations to keep and store the decision in keepAssociation
1775  std::map<BranchID, bool> keepAssociation;
1776  fileThinnedAssociationsHelper_->selectAssociationProducts(
1777  associationDescriptions, keptProductsInEvent, keepAssociation);
1778 
1779  for (auto association : associationDescriptions) {
1780  if (!keepAssociation[association->branchID()]) {
1781  markBranchToBeDropped(dropDescendants, *association, branchesToDrop, droppedToKeptAlias);
1782  }
1783  }
1784 
1785  // Also delete the dropped associations from the ThinnedAssociationsHelper
1786  auto temp = std::make_unique<ThinnedAssociationsHelper>();
1787  for (auto const& associationBranches : fileThinnedAssociationsHelper_->data()) {
1788  auto iter = keepAssociation.find(associationBranches.association());
1789  if (iter != keepAssociation.end() && iter->second) {
1790  temp->addAssociation(associationBranches);
1791  }
1792  }
1793  // propagate_const<T> has no reset() function
1794  fileThinnedAssociationsHelper_ = std::unique_ptr<ThinnedAssociationsHelper>(temp.release());
1795  }
1796 
1797  // On this pass, actually drop the branches.
1798  std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1799  for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1800  BranchDescription const& prod = it->second;
1801  bool drop = branchesToDrop.find(prod.branchID()) != branchesToDropEnd;
1802  if (drop) {
1803  if (!prod.dropped()) {
1804  if (productSelector.selected(prod) && prod.unwrappedType() != typeid(ThinnedAssociation)) {
1805  LogWarning("RootFile") << "Branch '" << prod.branchName() << "' is being dropped from the input\n"
1806  << "of file '" << file_ << "' because it is dependent on a branch\n"
1807  << "that was explicitly dropped.\n";
1808  }
1809  // ProcessBlock input is not implemented yet
1810  if (prod.branchType() != InProcess) {
1811  treePointers_[prod.branchType()]->dropBranch(newBranchToOldBranch(prod.branchName()));
1812  }
1813  hasNewlyDroppedBranch_[prod.branchType()] = true;
1814  }
1815  ProductRegistry::ProductList::iterator icopy = it;
1816  ++it;
1817  prodList.erase(icopy);
1818  } else {
1819  ++it;
1820  }
1821  }
1822 
1823  // Drop on input mergeable run and lumi products, this needs to be invoked for secondary file input
1824  if (inputType == InputType::SecondaryFile) {
1825  TString tString;
1826  for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1827  BranchDescription const& prod = it->second;
1828  if (prod.branchType() != InEvent && prod.branchType() != InProcess) {
1829  TClass* cp = prod.wrappedType().getClass();
1830  void* p = cp->New();
1831  int offset = cp->GetBaseClassOffset(edProductClass_);
1832  std::unique_ptr<WrapperBase> edp = getWrapperBasePtr(p, offset);
1833  if (edp->isMergeable()) {
1834  treePointers_[prod.branchType()]->dropBranch(newBranchToOldBranch(prod.branchName()));
1835  ProductRegistry::ProductList::iterator icopy = it;
1836  ++it;
1837  prodList.erase(icopy);
1838  } else {
1839  ++it;
1840  }
1841  } else
1842  ++it;
1843  }
1844  }
1845  }
1846 
1848  signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* preEventReadSource,
1849  signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* postEventReadSource) {
1850  eventTree_.setSignals(preEventReadSource, postEventReadSource);
1851  }
1852 
1853  std::unique_ptr<MakeProvenanceReader> RootFile::makeProvenanceReaderMaker(InputType inputType) {
1855  readParentageTree(inputType);
1856  return std::make_unique<MakeReducedProvenanceReader>(parentageIDLookup_);
1857  } else if (fileFormatVersion_.splitProductIDs()) {
1858  readParentageTree(inputType);
1859  return std::make_unique<MakeFullProvenanceReader>();
1860  } else if (fileFormatVersion_.perEventProductIDs()) {
1861  auto entryDescriptionMap = std::make_unique<EntryDescriptionMap>();
1862  readEntryDescriptionTree(*entryDescriptionMap, inputType);
1863  return std::make_unique<MakeOldProvenanceReader>(std::move(entryDescriptionMap));
1864  } else {
1865  return std::make_unique<MakeDummyProvenanceReader>();
1866  }
1867  }
1868 
1869  std::shared_ptr<ProductProvenanceRetriever> RootFile::makeProductProvenanceRetriever(unsigned int iStreamID) {
1870  if (eventProductProvenanceRetrievers_.size() <= iStreamID) {
1871  eventProductProvenanceRetrievers_.resize(iStreamID + 1);
1872  }
1873  if (!eventProductProvenanceRetrievers_[iStreamID]) {
1874  // propagate_const<T> has no reset() function
1875  eventProductProvenanceRetrievers_[iStreamID] = std::make_shared<ProductProvenanceRetriever>(
1877  }
1878  eventProductProvenanceRetrievers_[iStreamID]->reset();
1879  return eventProductProvenanceRetriever(iStreamID);
1880  }
1881 
1883  public:
1884  ReducedProvenanceReader(RootTree* iRootTree,
1885  std::vector<ParentageID> const& iParentageIDLookup,
1886  DaqProvenanceHelper const* daqProvenanceHelper);
1887 
1888  std::set<ProductProvenance> readProvenance(unsigned int) const override;
1889 
1890  private:
1892  ModuleCallingContext const* moduleCallingContext,
1893  unsigned int transitionIndex,
1894  std::atomic<const std::set<ProductProvenance>*>& writeTo) const override;
1895 
1900  std::vector<ParentageID> const& parentageIDLookup_;
1902  std::shared_ptr<std::recursive_mutex> mutex_;
1904  };
1905 
1907  std::vector<ParentageID> const& iParentageIDLookup,
1908  DaqProvenanceHelper const* daqProvenanceHelper)
1910  rootTree_(iRootTree),
1911  pProvVector_(&provVector_),
1912  parentageIDLookup_(iParentageIDLookup),
1913  daqProvenanceHelper_(daqProvenanceHelper),
1914  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
1915  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {
1916  provBranch_ =
1917  rootTree_->tree()->GetBranch(BranchTypeToProductProvenanceBranchName(rootTree_->branchType()).c_str());
1918  }
1919 
1920  namespace {
1921  using SignalType = signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)>;
1922  template <typename R>
1923  void readProvenanceAsyncImpl(R const* iThis,
1926  unsigned int transitionIndex,
1927  std::atomic<const std::set<ProductProvenance>*>& writeTo,
1928  ModuleCallingContext const* iContext,
1929  SignalType const* pre,
1930  SignalType const* post) {
1931  if (nullptr == writeTo.load()) {
1932  //need to be sure the task isn't run until after the read
1933  WaitingTaskHolder taskHolder{task};
1934  auto pWriteTo = &writeTo;
1935 
1936  auto serviceToken = ServiceRegistry::instance().presentToken();
1937 
1938  chain.push(
1939  *taskHolder.group(),
1940  [holder = std::move(taskHolder),
1941  pWriteTo,
1942  iThis,
1943  transitionIndex,
1944  iContext,
1945  pre,
1946  post,
1947  serviceToken]() mutable {
1948  if (nullptr == pWriteTo->load()) {
1949  ServiceRegistry::Operate operate(serviceToken);
1950  std::unique_ptr<const std::set<ProductProvenance>> prov;
1951  try {
1952  if (pre) {
1953  pre->emit(*(iContext->getStreamContext()), *iContext);
1954  }
1955  prov = std::make_unique<const std::set<ProductProvenance>>(iThis->readProvenance(transitionIndex));
1956  if (post) {
1957  post->emit(*(iContext->getStreamContext()), *iContext);
1958  }
1959 
1960  } catch (...) {
1961  if (post) {
1962  post->emit(*(iContext->getStreamContext()), *iContext);
1963  }
1964 
1965  holder.doneWaiting(std::current_exception());
1966  return;
1967  }
1968  const std::set<ProductProvenance>* expected = nullptr;
1969 
1970  if (pWriteTo->compare_exchange_strong(expected, prov.get())) {
1971  prov.release();
1972  }
1973  }
1974  holder.doneWaiting(std::exception_ptr());
1975  });
1976  }
1977  }
1978  } // namespace
1979 
1981  ModuleCallingContext const* moduleCallingContext,
1982  unsigned int transitionIndex,
1983  std::atomic<const std::set<ProductProvenance>*>& writeTo) const {
1984  readProvenanceAsyncImpl(this,
1986  task,
1987  transitionIndex,
1988  writeTo,
1989  moduleCallingContext,
1990  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
1991  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
1992  }
1993 
1994  std::set<ProductProvenance> ReducedProvenanceReader::readProvenance(unsigned int transitionIndex) const {
1995  {
1996  std::lock_guard<std::recursive_mutex> guard(*mutex_);
1997  ReducedProvenanceReader* me = const_cast<ReducedProvenanceReader*>(this);
1998  me->rootTree_->fillBranchEntry(
1999  me->provBranch_, me->rootTree_->entryNumberForIndex(transitionIndex), me->pProvVector_);
2000  }
2001  std::set<ProductProvenance> retValue;
2002  if (daqProvenanceHelper_) {
2003  for (auto const& prov : provVector_) {
2004  BranchID bid(prov.branchID_);
2005  retValue.emplace(daqProvenanceHelper_->mapBranchID(BranchID(prov.branchID_)),
2006  daqProvenanceHelper_->mapParentageID(parentageIDLookup_[prov.parentageIDIndex_]));
2007  }
2008  } else {
2009  for (auto const& prov : provVector_) {
2010  if (prov.parentageIDIndex_ >= parentageIDLookup_.size()) {
2012  << "ReducedProvenanceReader::ReadProvenance\n"
2013  << "The parentage ID index value " << prov.parentageIDIndex_
2014  << " is out of bounds. The maximum value is " << parentageIDLookup_.size() - 1 << ".\n"
2015  << "This should never happen.\n"
2016  << "Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
2017  }
2018  retValue.emplace(BranchID(prov.branchID_), parentageIDLookup_[prov.parentageIDIndex_]);
2019  }
2020  }
2021  return retValue;
2022  }
2023 
2025  public:
2026  explicit FullProvenanceReader(RootTree* rootTree, DaqProvenanceHelper const* daqProvenanceHelper);
2028  std::set<ProductProvenance> readProvenance(unsigned int transitionIndex) const override;
2029 
2030  private:
2032  ModuleCallingContext const* moduleCallingContext,
2033  unsigned int transitionIndex,
2034  std::atomic<const std::set<ProductProvenance>*>& writeTo) const override;
2035 
2038  //All access to a ROOT file is serialized
2041  std::shared_ptr<std::recursive_mutex> mutex_;
2043  };
2044 
2047  rootTree_(rootTree),
2048  infoVector_(),
2049  pInfoVector_(&infoVector_),
2050  daqProvenanceHelper_(daqProvenanceHelper),
2051  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2052  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
2053 
2055  ModuleCallingContext const* moduleCallingContext,
2056  unsigned int transitionIndex,
2057  std::atomic<const std::set<ProductProvenance>*>& writeTo) const {
2058  readProvenanceAsyncImpl(this,
2060  task,
2061  transitionIndex,
2062  writeTo,
2063  moduleCallingContext,
2066  }
2067 
2068  std::set<ProductProvenance> FullProvenanceReader::readProvenance(unsigned int transitionIndex) const {
2069  {
2070  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2073  }
2074  std::set<ProductProvenance> retValue;
2075  if (daqProvenanceHelper_) {
2076  for (auto const& info : infoVector_) {
2077  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2078  daqProvenanceHelper_->mapParentageID(info.parentageID()));
2079  }
2080  } else {
2081  for (auto const& info : infoVector_) {
2082  retValue.emplace(info);
2083  }
2084  }
2085  return retValue;
2086  }
2087 
2089  public:
2090  explicit OldProvenanceReader(RootTree* rootTree,
2091  EntryDescriptionMap const& theMap,
2092  DaqProvenanceHelper const* daqProvenanceHelper);
2093  ~OldProvenanceReader() override {}
2094  std::set<ProductProvenance> readProvenance(unsigned int transitionIndex) const override;
2095 
2096  private:
2098  ModuleCallingContext const* moduleCallingContext,
2099  unsigned int transitionIndex,
2100  std::atomic<const std::set<ProductProvenance>*>& writeTo) const override;
2101 
2103  std::vector<EventEntryInfo> infoVector_;
2104  //All access to ROOT file are serialized
2105  CMS_SA_ALLOW mutable std::vector<EventEntryInfo>* pInfoVector_;
2108  std::shared_ptr<std::recursive_mutex> mutex_;
2110  };
2111 
2113  EntryDescriptionMap const& theMap,
2114  DaqProvenanceHelper const* daqProvenanceHelper)
2116  rootTree_(rootTree),
2117  infoVector_(),
2118  pInfoVector_(&infoVector_),
2119  entryDescriptionMap_(theMap),
2120  daqProvenanceHelper_(daqProvenanceHelper),
2121  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2122  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
2123 
2125  ModuleCallingContext const* moduleCallingContext,
2126  unsigned int transitionIndex,
2127  std::atomic<const std::set<ProductProvenance>*>& writeTo) const {
2128  readProvenanceAsyncImpl(this,
2130  task,
2131  transitionIndex,
2132  writeTo,
2133  moduleCallingContext,
2134  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2135  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2136  }
2137 
2138  std::set<ProductProvenance> OldProvenanceReader::readProvenance(unsigned int transitionIndex) const {
2139  {
2140  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2141  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
2142  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
2143  }
2144  std::set<ProductProvenance> retValue;
2145  for (auto const& info : infoVector_) {
2146  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
2147  assert(iter != entryDescriptionMap_.end());
2148  Parentage parentage(iter->second.parents());
2149  if (daqProvenanceHelper_) {
2150  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2151  daqProvenanceHelper_->mapParentageID(parentage.id()));
2152  } else {
2153  retValue.emplace(info.branchID(), parentage.id());
2154  }
2155  }
2156  return retValue;
2157  }
2158 
2160  public:
2163 
2164  private:
2165  std::set<ProductProvenance> readProvenance(unsigned int) const override;
2167  ModuleCallingContext const* moduleCallingContext,
2168  unsigned int transitionIndex,
2169  std::atomic<const std::set<ProductProvenance>*>& writeTo) const override;
2170  };
2171 
2173 
2174  std::set<ProductProvenance> DummyProvenanceReader::readProvenance(unsigned int) const {
2175  // Not providing parentage!!!
2176  return std::set<ProductProvenance>{};
2177  }
2179  ModuleCallingContext const* moduleCallingContext,
2180  unsigned int transitionIndex,
2181  std::atomic<const std::set<ProductProvenance>*>& writeTo) const {
2182  if (nullptr == writeTo.load()) {
2183  auto emptyProv = std::make_unique<const std::set<ProductProvenance>>();
2184  const std::set<ProductProvenance>* expected = nullptr;
2185  if (writeTo.compare_exchange_strong(expected, emptyProv.get())) {
2186  emptyProv.release();
2187  }
2188  }
2189  }
2190 
2191  std::unique_ptr<ProvenanceReaderBase> MakeDummyProvenanceReader::makeReader(RootTree&,
2192  DaqProvenanceHelper const*) const {
2193  return std::make_unique<DummyProvenanceReader>();
2194  }
2195 
2196  std::unique_ptr<ProvenanceReaderBase> MakeOldProvenanceReader::makeReader(
2197  RootTree& rootTree, DaqProvenanceHelper const* daqProvenanceHelper) const {
2198  return std::make_unique<OldProvenanceReader>(&rootTree, *entryDescriptionMap_, daqProvenanceHelper);
2199  }
2200 
2201  std::unique_ptr<ProvenanceReaderBase> MakeFullProvenanceReader::makeReader(
2202  RootTree& rootTree, DaqProvenanceHelper const* daqProvenanceHelper) const {
2203  return std::make_unique<FullProvenanceReader>(&rootTree, daqProvenanceHelper);
2204  }
2205 
2206  std::unique_ptr<ProvenanceReaderBase> MakeReducedProvenanceReader::makeReader(
2207  RootTree& rootTree, DaqProvenanceHelper const* daqProvenanceHelper) const {
2208  return std::make_unique<ReducedProvenanceReader>(&rootTree, parentageIDLookup_, daqProvenanceHelper);
2209  }
2210 } // namespace edm
edm::poolNames::idToParameterSetBlobsBranchName
std::string const & idToParameterSetBlobsBranchName()
Definition: BranchType.cc:206
edm::SharedResourcesAcquirer::serialQueueChain
SerialTaskQueueChain & serialQueueChain() const
Definition: SharedResourcesAcquirer.h:54
edm::IndexIntoFile::IndexIntoFileItr::copyPosition
void copyPosition(IndexIntoFileItr const &position)
Copy the position without modifying the pointer to the IndexIntoFile or size.
Definition: IndexIntoFile.cc:1760
edm::pset::Registry::instance
static Registry * instance()
Definition: Registry.cc:12
edm::FullProvenanceReader::pInfoVector_
ProductProvenanceVector * pInfoVector_
Definition: RootFile.cc:2039
edm::IndexIntoFile::doneFileInitialization
void doneFileInitialization()
Clears the temporary vector of event numbers to reduce memory usage.
Definition: IndexIntoFile.cc:306
edm::RootTree::tree
TTree const * tree() const
Definition: RootTree.h:182
edm::FileFormatVersion::hasThinnedAssociations
bool hasThinnedAssociations() const
Definition: FileFormatVersion.cc:45
ParameterSetConverter.h
edm::RootFileEventFinder::~RootFileEventFinder
~RootFileEventFinder() override
Definition: RootFile.cc:124
edm::SharedResourcesAcquirer
Definition: SharedResourcesAcquirer.h:34
RunAux.h
edm::IndexIntoFile::IndexIntoFileItr::run
RunNumber_t run() const
Definition: IndexIntoFile.h:702
ThinnedAssociationsHelper.h
edm::RunNumber_t
unsigned int RunNumber_t
Definition: RunLumiEventNumber.h:14
edm::source
static const std::string source("source")
edm::EventAuxiliary::event
EventNumber_t event() const
Definition: EventAuxiliary.h:72
edm::IndexIntoFile::kLumi
Definition: IndexIntoFile.h:238
ProcessHistoryID.h
FriendlyName.h
edm::IndexIntoFile::IndexIntoFileItr::firstEventEntryThisLumi
EntryNumber_t firstEventEntryThisLumi()
Definition: IndexIntoFile.h:720
edm::RootFile::eventSkipperByID_
edm::propagate_const< std::shared_ptr< EventSkipperByID > > eventSkipperByID_
Definition: RootFile.h:318
edm::poolNames::branchIDListBranchName
std::string const & branchIDListBranchName()
Definition: BranchType.cc:176
edm::EventPrincipal::aux
EventAuxiliary const & aux() const
Definition: EventPrincipal.h:104
edm::RootFileEventFinder
Definition: RootFile.cc:121
edm::RootTree::trainCache
void trainCache(char const *branchNames)
Definition: RootTree.cc:461
ModuleCallingContext.h
edm::FileID::isValid
bool isValid() const
Definition: FileID.h:18
RunHelper.h
edm::ProcessHistoryRegistry::registerProcessHistory
bool registerProcessHistory(ProcessHistory const &processHistory)
Definition: ProcessHistoryRegistry.cc:11
benchmark-oval_cfg.noEventSort
noEventSort
Definition: benchmark-oval_cfg.py:19
edm::EventEntryDescription
Definition: EventEntryDescription.h:28
mps_fire.i
i
Definition: mps_fire.py:428
edm::IndexIntoFile::IndexIntoFileItr::lumi
LuminosityBlockNumber_t lumi() const
Definition: IndexIntoFile.h:703
edm::RootTree::setEntryNumber
void setEntryNumber(EntryNumber theEntryNumber)
Definition: RootTree.cc:202
edm::RootFile::eventProductProvenanceRetrievers_
std::vector< edm::propagate_const< std::shared_ptr< ProductProvenanceRetriever > > > eventProductProvenanceRetrievers_
Definition: RootFile.h:358
edm::FileFormatVersion::useReducedProcessHistoryID
bool useReducedProcessHistoryID() const
Definition: FileFormatVersion.cc:43
edm::RootTree::rootDelayedReader
DelayedReader * rootDelayedReader() const
Definition: RootTree.cc:128
edm::RootFile::eventProcessHistoryIter_
std::vector< EventProcessHistoryID >::const_iterator eventProcessHistoryIter_
Definition: RootFile.h:329
edm::RootFile::makeProductProvenanceRetriever
std::shared_ptr< ProductProvenanceRetriever > makeProductProvenanceRetriever(unsigned int iStreamIndex)
Definition: RootFile.cc:1869
edm::RootTree::EntryNumber
roottree::EntryNumber EntryNumber
Definition: RootTree.h:106
DuplicateChecker.h
edm::poolNames::fileFormatVersionBranchName
std::string const & fileFormatVersionBranchName()
Definition: BranchType.cc:182
edm::FileFormatVersion::splitProductIDs
bool splitProductIDs() const
Definition: FileFormatVersion.cc:21
ServiceRegistry.h
edm::ReducedProvenanceReader::provBranch_
edm::propagate_const< TBranch * > provBranch_
Definition: RootFile.cc:1897
MessageLogger.h
edm::find_in_all
ForwardSequence::const_iterator find_in_all(ForwardSequence const &s, Datum const &d)
wrappers for std::find
Definition: Algorithms.h:26
funct::false
false
Definition: Factorize.h:29
edm::conversion
void conversion(EventAux const &from, EventAuxiliary &to)
Definition: EventAux.cc:9
edm::roottree::trainCache
std::unique_ptr< TTreeCache > trainCache(TTree *tree, InputFile &file, unsigned int cacheSize, char const *branchNames)
Definition: RootTree.cc:516
edm::getWrapperBasePtr
std::unique_ptr< WrapperBase > getWrapperBasePtr(void *p, int offset)
Definition: getWrapperBasePtr.h:8
edm::roottree::defaultNonEventLearningEntries
unsigned const int defaultNonEventLearningEntries
Definition: RootTree.h:50
edm::IndexIntoFile::iterationWillBeInEntryOrder
bool iterationWillBeInEntryOrder(SortOrder sortOrder) const
Used to determine whether or not to disable fast cloning.
Definition: IndexIntoFile.cc:474
edm::OldProvenanceReader::readProvenanceAsync
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
Definition: RootFile.cc:2124
edm::RootFile::productRegistry
std::shared_ptr< ProductRegistry const > productRegistry() const
Definition: RootFile.h:215
edm::DaqProvenanceHelper::mapParentageID
ParentageID const & mapParentageID(ParentageID const &phid) const
Definition: DaqProvenanceHelper.cc:182
edm::ReducedProvenanceReader::provVector_
StoredProductProvenanceVector provVector_
Definition: RootFile.cc:1898
edm::RootFile::lumiTree_
RootTree lumiTree_
Definition: RootFile.h:339
edm::RunID
Definition: RunID.h:28
edm::RootFile::processHistoryRegistry_
edm::propagate_const< ProcessHistoryRegistry * > processHistoryRegistry_
Definition: RootFile.h:316
edm::RootFile::indexIntoFileEnd_
IndexIntoFile::IndexIntoFileItr indexIntoFileEnd_
Definition: RootFile.h:325
edm::RootFile::daqProvenanceHelper_
edm::propagate_const< std::unique_ptr< DaqProvenanceHelper > > daqProvenanceHelper_
Definition: RootFile.h:360
edm::IndexIntoFile::findRunPosition
IndexIntoFileItr findRunPosition(RunNumber_t run) const
Same as findPosition.
Definition: IndexIntoFile.cc:692
edm::RootFile::runHelper_
edm::propagate_const< RunHelperBase * > runHelper_
Definition: RootFile.h:350
LumiList
Definition: LumiList.py:1
edm::RootFile::readParentageTree
void readParentageTree(InputType inputType)
Definition: RootFile.cc:648
getWrapperBasePtr.h
edm::OldProvenanceReader::infoVector_
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2103
edm::setIsMergeable
void setIsMergeable(BranchDescription &)
Definition: setIsMergeable.cc:15
edm::FullProvenanceReader::daqProvenanceHelper_
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2040
HLT_FULL_cff.finder
finder
Definition: HLT_FULL_cff.py:51935
RunList
Definition: RunList.h:16
edm::RootFile::eventHistoryTree_
edm::propagate_const< TTree * > eventHistoryTree_
Definition: RootFile.h:352
edm::RootFile::reportOpened
void reportOpened(std::string const &inputType)
Definition: RootFile.cc:1208
edm::RootFile::readLuminosityBlock_
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: RootFile.cc:1628
edm::errors::LogicError
Definition: EDMException.h:37
edm::FileID::fid
std::string const & fid() const
Definition: FileID.h:19
BranchIDListHelper.h
edm::RootFile::branchListIndexesUnchanged
bool branchListIndexesUnchanged() const
Definition: RootFile.h:225
edm::IndexIntoFile::kEvent
Definition: IndexIntoFile.h:238
converter
Definition: CandidateProducer.h:25
WaitingTaskHolder.h
edm::ProvenanceReaderBase
Definition: ProductProvenanceRetriever.h:45
edm::RootFile::close
void close()
Definition: RootFile.cc:1215
edm::IndexIntoFile::setNumberOfEvents
void setNumberOfEvents(EntryNumber_t nevents)
Definition: IndexIntoFile.h:945
edm::IndexIntoFile::IndexIntoFileItr::peekAheadAtLumi
LuminosityBlockNumber_t peekAheadAtLumi() const
Definition: IndexIntoFile.h:708
edm::IndexIntoFile::numericalOrder
Definition: IndexIntoFile.h:266
MicroEventContent_cff.branch
branch
Definition: MicroEventContent_cff.py:169
edm::RootFile::runTree
RootTree const & runTree() const
Definition: RootFile.h:221
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::FullProvenanceReader::acquirer_
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2042
edm::Principal::readAllFromSourceAndMergeImmediately
void readAllFromSourceAndMergeImmediately(MergeableRunProductMetadata const *mergeableRunProductMetadata=nullptr)
Definition: Principal.cc:964
mps_splice.entry
entry
Definition: mps_splice.py:68
edm::RootFileEventFinder::RootFileEventFinder
RootFileEventFinder(RootTree &eventTree)
Definition: RootFile.cc:123
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
ParameterSetBlob.h
edm::RootFile::indexIntoFileIter_
IndexIntoFile::IndexIntoFileItr indexIntoFileIter_
Definition: RootFile.h:326
edm::MakeDummyProvenanceReader
Definition: RootFile.cc:72
edm::ProductSelector::initialize
void initialize(ProductSelectorRules const &rules, std::vector< BranchDescription const * > const &branchDescriptions)
Definition: ProductSelector.cc:20
edm::errors::EventCorruption
Definition: EDMException.h:43
edm::ParentageRegistry::instance
static ParentageRegistry * instance()
Definition: ParentageRegistry.cc:4
edm::RootFile::readRunAuxiliary_
std::shared_ptr< RunAuxiliary > readRunAuxiliary_()
Definition: RootFile.cc:1497
edm::moduleName
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
edm::IndexIntoFile::invalidEntry
static constexpr EntryNumber_t invalidEntry
Definition: IndexIntoFile.h:236
edm::RootFile::readCurrentEvent
bool readCurrentEvent(EventPrincipal &cache)
Definition: RootFile.cc:1457
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:162
edm::IndexIntoFile::processHistoryID
ProcessHistoryID const & processHistoryID(int i) const
Definition: IndexIntoFile.cc:55
edm::poolNames::parameterSetsTreeName
std::string const & parameterSetsTreeName()
Definition: BranchType.cc:204
edm::DaqProvenanceHelper
Definition: DaqProvenanceHelper.h:27
edm::FileBlock::NotProcessingEvents
Definition: FileBlock.h:29
writedatasetfile.runs
runs
Definition: writedatasetfile.py:27
StoredMergeableRunProductMetadata.h
edm::IndexIntoFile::unsortedEventNumbers
std::vector< EventNumber_t > & unsortedEventNumbers()
Definition: IndexIntoFile.h:994
edm::LuminosityBlockPrincipal
Definition: LuminosityBlockPrincipal.h:31
edm::BranchListIndexes
std::vector< BranchListIndex > BranchListIndexes
Definition: BranchListIndex.h:18
edm::ThinnedAssociation
Definition: ThinnedAssociation.h:15
edm::IndexIntoFile
Definition: IndexIntoFile.h:225
Algorithms.h
cms::cuda::assert
assert(be >=bs)
edm::FileBlock::RunOrLumiNotContiguous
Definition: FileBlock.h:36
edm::RootFile::branchIDListHelper_
edm::propagate_const< std::shared_ptr< BranchIDListHelper > > branchIDListHelper_
Definition: RootFile.h:346
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:222
edm::poolNames::indexIntoFileBranchName
std::string const & indexIntoFileBranchName()
Definition: BranchType.cc:191
edm::InputType::SecondaryFile
edm::RootFile::eventTree_
RootTree eventTree_
Definition: RootFile.h:338
edm::ProductSelector::selected
bool selected(BranchDescription const &desc) const
Definition: ProductSelector.cc:55
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
edm::RootFileEventFinder::eventTree_
RootTree & eventTree_
Definition: RootFile.cc:137
edm::DelayedReader::preEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * preEventReadFromSourceSignal() const =0
DelayedReader.h
edm::ParameterSetConverter
Definition: ParameterSetConverter.h:40
edm::stemFromPath
std::string_view stemFromPath(std::string_view path)
Definition: stemFromPath.cc:4
ProcessHistoryRegistry.h
edm::RootFile::readEntryDescriptionTree
void readEntryDescriptionTree(EntryDescriptionMap &entryDescriptionMap, InputType inputType)
Definition: RootFile.cc:602
hgcal_conditions::parameters
Definition: HGCConditions.h:86
edm::StreamID::value
unsigned int value() const
Definition: StreamID.h:43
ProductRegistry.h
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
edm::RootFile::isDuplicateEvent
bool isDuplicateEvent()
Definition: RootFile.cc:799
edm::RootFile::enforceGUIDInFileName_
bool enforceGUIDInFileName_
Definition: RootFile.h:333
edm::FullProvenanceReader::FullProvenanceReader
FullProvenanceReader(RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
Definition: RootFile.cc:2045
edm::FileBlock::EventsToBeSorted
Definition: FileBlock.h:35
edm::RootFile::skipThisEntry
bool skipThisEntry()
Definition: RootFile.cc:762
edm::IndexIntoFile::findPosition
IndexIntoFileItr findPosition(RunNumber_t run, LuminosityBlockNumber_t lumi=0U, EventNumber_t event=0U) const
Definition: IndexIntoFile.cc:489
edm::EventID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventID.h:39
edm::FileID
Definition: FileID.h:14
edm::RootFile::fileFormatVersion
FileFormatVersion fileFormatVersion() const
Definition: RootFile.h:222
edm::FileFormatVersion::perEventProductIDs
bool perEventProductIDs() const
Definition: FileFormatVersion.cc:19
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
edm::LuminosityBlockNumber_t
unsigned int LuminosityBlockNumber_t
Definition: RunLumiEventNumber.h:13
edm::RootFile::eventProcessHistoryIDs_
std::vector< EventProcessHistoryID > eventProcessHistoryIDs_
Definition: RootFile.h:328
edm::poolNames::branchListIndexesBranchName
std::string const & branchListIndexesBranchName()
Definition: BranchType.cc:202
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
edm::InRun
Definition: BranchType.h:11
CMS_SA_ALLOW
#define CMS_SA_ALLOW
Definition: thread_safety_macros.h:5
edm::IndexIntoFileItrHolder
Definition: IndexIntoFile.h:1109
edm::DummyProvenanceReader::DummyProvenanceReader
DummyProvenanceReader()
Definition: RootFile.cc:2172
edm::IndexIntoFile::empty
bool empty() const
True if no runs, lumis, or events are in the file.
Definition: IndexIntoFile.cc:487
edm::InputType
InputType
Definition: InputType.h:5
edm::BranchTypeToAuxiliaryBranchName
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:109
edm::EntryDescriptionMap
std::map< EntryDescriptionID, EventEntryDescription > EntryDescriptionMap
Definition: RootFile.h:52
runTheMatrix.nStreams
nStreams
Definition: runTheMatrix.py:371
EventSkipperByID.h
edm::RootFile::setEntryAtLumi
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition: RootFile.cc:1655
edm::RootFile::dropOnInput
void dropOnInput(ProductRegistry &reg, ProductSelectorRules const &rules, bool dropDescendants, InputType inputType)
Definition: RootFile.cc:1723
edm::LuminosityBlockPrincipal::aux
LuminosityBlockAuxiliary const & aux() const
Definition: LuminosityBlockPrincipal.h:64
edm::RootFile::file
std::string const & file() const
Definition: RootFile.h:214
edm::ProductRegistry
Definition: ProductRegistry.h:37
edm::MakeOldProvenanceReader::entryDescriptionMap_
edm::propagate_const< std::unique_ptr< EntryDescriptionMap > > entryDescriptionMap_
Definition: RootFile.cc:85
edm::first
T first(std::pair< T, U > const &p)
Definition: ParameterSet.cc:217
edm::RootFile::setEntryAtRun
bool setEntryAtRun(RunNumber_t run)
Definition: RootFile.cc:1663
edm::RootTree::resetTraining
void resetTraining()
Definition: RootTree.h:194
edm::LuminosityBlockAuxiliary
Definition: LuminosityBlockAuxiliary.h:15
edm::poolNames::mergeableRunProductMetadataBranchName
std::string const & mergeableRunProductMetadataBranchName()
Definition: BranchType.cc:194
LuminosityBlockAux.h
edm::MakeReducedProvenanceReader::parentageIDLookup_
std::vector< ParentageID > const & parentageIDLookup_
Definition: RootFile.cc:100
EDMException.h
SharedResourcesAcquirer.h
edm::RootFile::inputType_
InputType inputType_
Definition: RootFile.h:362
edm::RootFile::RootFile
RootFile(std::string const &fileName, ProcessConfiguration const &processConfiguration, std::string const &logicalFileName, std::shared_ptr< InputFile > filePtr, std::shared_ptr< EventSkipperByID > eventSkipperByID, bool skipAnyEvents, int remainingEvents, int remainingLumis, unsigned int nStreams, unsigned int treeCacheSize, int treeMaxVirtualSize, InputSource::ProcessingMode processingMode, RunHelperBase *runHelper, bool noEventSort, ProductSelectorRules const &productSelectorRules, InputType inputType, std::shared_ptr< BranchIDListHelper > branchIDListHelper, std::shared_ptr< ThinnedAssociationsHelper > thinnedAssociationsHelper, std::vector< BranchID > const *associationsFromSecondary, std::shared_ptr< DuplicateChecker > duplicateChecker, bool dropDescendantsOfDroppedProducts, ProcessHistoryRegistry &processHistoryRegistry, std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile, std::vector< ProcessHistoryID > &orderedProcessHistoryIDs, bool bypassVersionCheck, bool labelRawDataLikeMC, bool usingGoToEvent, bool enablePrefetching, bool enforceGUIDInFileName)
Definition: RootFile.cc:141
edm::InProcess
Definition: BranchType.h:11
edm::MakeFullProvenanceReader::makeReader
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
Definition: RootFile.cc:2201
edm::RootFile::setAtEventEntry
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
Definition: RootFile.cc:1495
edm::RootFile::fileThinnedAssociationsHelper_
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > fileThinnedAssociationsHelper_
Definition: RootFile.h:347
edm::ReducedProvenanceReader::readProvenanceAsync
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
Definition: RootFile.cc:1980
BXlumiParameters_cfi.lumi
lumi
Definition: BXlumiParameters_cfi.py:6
edm::FileFormatVersion::noMetaDataTrees
bool noMetaDataTrees() const
Definition: FileFormatVersion.cc:39
ParentageRegistry.h
edm::propagate_const
Definition: propagate_const.h:32
edm::roottree::EntryNumber
IndexIntoFile::EntryNumber_t EntryNumber
Definition: RootTree.h:51
edm::poolNames::parentageBranchName
std::string const & parentageBranchName()
Definition: BranchType.cc:149
edm::IndexIntoFile::IndexIntoFileItr::advanceToNextRun
void advanceToNextRun()
Definition: IndexIntoFile.h:774
trigger::size_type
uint16_t size_type
Definition: TriggerTypeDefs.h:18
edm::EventPrincipal
Definition: EventPrincipal.h:46
edm::IndexIntoFile::setEventFinder
void setEventFinder(std::shared_ptr< EventFinder > ptr)
Definition: IndexIntoFile.h:952
edm::FileFormatVersion::runsAndLumis
bool runsAndLumis() const
Definition: FileFormatVersion.cc:13
edm::RootFile::eventAuxCache_
EventAuxiliary eventAuxCache_
Definition: RootFile.h:337
edm::IndexIntoFile::invalidIndex
static constexpr int invalidIndex
Definition: IndexIntoFile.h:232
edm::RootTree::metaTree
TTree const * metaTree() const
Definition: RootTree.h:184
edm::OldProvenanceReader::acquirer_
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2109
edm::StreamContext
Definition: StreamContext.h:31
edm::RootFile::provenanceAdaptor_
edm::propagate_const< std::unique_ptr< ProvenanceAdaptor > > provenanceAdaptor_
Definition: RootFile.h:356
edm::IndexIntoFile::kRun
Definition: IndexIntoFile.h:238
edm::ProductRegistry::productListUpdator
ProductList & productListUpdator()
Definition: ProductRegistry.h:81
edm::RootTree::entryNumberForIndex
EntryNumber const & entryNumberForIndex(unsigned int index) const
Definition: RootTree.cc:100
edm::FileFormatVersion::eventHistoryTree
bool eventHistoryTree() const
Definition: FileFormatVersion.cc:17
edm::RootFile::skipEvents
bool skipEvents(int &offset)
Definition: RootFile.cc:1354
edm::RootFile::modifiedIDs
bool modifiedIDs() const
Definition: RootFile.h:226
edm::poolNames::processHistoryBranchName
std::string const & processHistoryBranchName()
Definition: BranchType.cc:170
EventPrincipal.h
edm::RootFile::fillRunAuxiliary
std::shared_ptr< RunAuxiliary > fillRunAuxiliary()
Definition: RootFile.cc:1334
edm::RootFile::branchChildren_
edm::propagate_const< std::shared_ptr< BranchChildren > > branchChildren_
Definition: RootFile.h:354
edm::OldProvenanceReader
Definition: RootFile.cc:2088
edm::RootFile::wasLastEventJustRead
bool wasLastEventJustRead() const
Definition: RootFile.cc:861
edm::MakeOldProvenanceReader::MakeOldProvenanceReader
MakeOldProvenanceReader(std::unique_ptr< EntryDescriptionMap > &&entryDescriptionMap)
Definition: RootFile.cc:79
edmLumisInFiles.lumis
lumis
Definition: edmLumisInFiles.py:31
edm::StoredMergeableRunProductMetadata
Definition: StoredMergeableRunProductMetadata.h:57
edm::BranchID
Definition: BranchID.h:14
TrackValidation_cff.task
task
Definition: TrackValidation_cff.py:252
edm::FullProvenanceReader::readProvenance
std::set< ProductProvenance > readProvenance(unsigned int transitionIndex) const override
Definition: RootFile.cc:2068
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::RootTree::fillAux
void fillAux(T *&pAux)
Definition: RootTree.h:144
StoredProductProvenance.h
edm::RootFile::getNextItemType
IndexIntoFile::EntryType getNextItemType(RunNumber_t &run, LuminosityBlockNumber_t &lumi, EventNumber_t &event)
Definition: RootFile.cc:816
edm::MergeableRunProductMetadata
Definition: MergeableRunProductMetadata.h:52
edm::EventAuxiliary::id
EventID const & id() const
Definition: EventAuxiliary.h:63
edm::RootFile::fillEventAuxiliary
EventAuxiliary fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
Definition: RootFile.cc:1249
edm::RootTree::fillBranchEntry
void fillBranchEntry(TBranch *branch, T *&pbuf)
Definition: RootTree.h:160
edm::Hash< EntryDescriptionType >
edm::EventProcessHistoryID
Definition: EventProcessHistoryID.h:11
edm::MakeReducedProvenanceReader
Definition: RootFile.cc:92
edm::EventNumber_t
unsigned long long EventNumber_t
Definition: RunLumiEventNumber.h:12
edm::RootFile::savedRunAuxiliary
std::shared_ptr< RunAuxiliary const > savedRunAuxiliary() const
Definition: RootFile.h:300
edm::ProcessHistoryRegistry::vector_type
ProcessHistoryVector vector_type
Definition: ProcessHistoryRegistry.h:22
edm::EventAux
Definition: EventAux.h:15
edm::IndexIntoFile::IndexIntoFileItr::processHistoryIDIndex
int processHistoryIDIndex() const
Definition: IndexIntoFile.h:701
edm::RootFileEventFinder::getEventNumberOfEntry
EventNumber_t getEventNumberOfEntry(roottree::EntryNumber entry) const override
Definition: RootFile.cc:126
edm::InEvent
Definition: BranchType.h:11
edm::poolNames::parameterSetMapBranchName
std::string const & parameterSetMapBranchName()
Definition: BranchType.cc:161
edm::RootFile::whyNotFastClonable_
int whyNotFastClonable_
Definition: RootFile.h:334
edm::RootFile::thinnedAssociationsHelper_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: RootFile.h:348
edm::RootFile::setPosition
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
Definition: RootFile.cc:753
edm::LuminosityBlockID
Definition: LuminosityBlockID.h:31
edm::InputSource::RunsAndLumis
Definition: InputSource.h:80
edm::RootFile::hasNewlyDroppedBranch
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
Definition: RootFile.h:224
edm::poolNames::entryDescriptionIDBranchName
std::string const & entryDescriptionIDBranchName()
Definition: BranchType.cc:142
b
double b
Definition: hdecay.h:118
edm::OldProvenanceReader::entryDescriptionMap_
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2106
edm::RootTree::resetAndGetRootDelayedReader
DelayedReader * resetAndGetRootDelayedReader() const
Definition: RootTree.cc:123
edm::RootFile::fillIndexIntoFile
void fillIndexIntoFile()
Definition: RootFile.cc:928
edm::ReducedProvenanceReader::rootTree_
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:1896
edm::IndexIntoFile::invalidLumi
static constexpr LuminosityBlockNumber_t invalidLumi
Definition: IndexIntoFile.h:234
edm::poolNames::parentageTreeName
std::string const & parentageTreeName()
Definition: BranchType.cc:147
edm::FileFormatVersion::newAuxiliary
bool newAuxiliary() const
Definition: FileFormatVersion.cc:11
edm::EventID::run
RunNumber_t run() const
Definition: EventID.h:38
edm::BranchIDLists
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
edm::EventAuxiliary
Definition: EventAuxiliary.h:14
edm::RootFile::treePointers_
RootTreePtrArray treePointers_
Definition: RootFile.h:341
edm::ProductSelector
Definition: ProductSelector.h:26
edm::MakeDummyProvenanceReader::makeReader
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
Definition: RootFile.cc:2191
edm::RootFile::indexIntoFile_
IndexIntoFile & indexIntoFile_
Definition: RootFile.h:322
edm::ProductSelectorRules
Definition: ProductSelectorRules.h:24
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::RunHelperBase
Definition: RunHelper.h:15
edm::numEntries
Long64_t numEntries(TFile *hdl, std::string const &trname)
Definition: CollUtil.cc:50
edm::Parentage
Definition: Parentage.h:25
edm::RootFile::readEvent
void readEvent(EventPrincipal &cache)
Definition: RootFile.cc:1443
edm::IndexIntoFile::IndexIntoFileItr::skipEventForward
void skipEventForward(int &phIndexOfSkippedEvent, RunNumber_t &runOfSkippedEvent, LuminosityBlockNumber_t &lumiOfSkippedEvent, EntryNumber_t &skippedEventEntry)
Definition: IndexIntoFile.h:745
edm::IndexIntoFile::begin
IndexIntoFileItr begin(SortOrder sortOrder) const
Definition: IndexIntoFile.cc:461
edm::RootFile::newBranchToOldBranch
std::string const & newBranchToOldBranch(std::string const &newBranch) const
Definition: RootFile.cc:743
edm::IndexIntoFile::IndexIntoFileItr::skipLumiInRun
bool skipLumiInRun()
Definition: IndexIntoFile.h:768
edm::RootFile::fid_
FileID fid_
Definition: RootFile.h:320
edm::ProductRegistry::copyProduct
void copyProduct(BranchDescription const &productdesc)
Definition: ProductRegistry.cc:122
edm::RootFile::orderedProcessHistoryIDs_
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
Definition: RootFile.h:323
edm::poolNames::eventSelectionsBranchName
std::string const & eventSelectionsBranchName()
Definition: BranchType.cc:200
edm::DelayedReader::postEventReadFromSourceSignal
virtual signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const * postEventReadFromSourceSignal() const =0
edm::InputSource::ProcessingMode
ProcessingMode
Definition: InputSource.h:80
edm::LuminosityBlockAuxiliary::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: LuminosityBlockAuxiliary.h:32
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:37
ReleaseVersion.h
edm::ProductRegistry::ProductList
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductRegistry.h:39
BranchDescription.h
edm::RootFile::savedRunAuxiliary_
edm::propagate_const< std::shared_ptr< RunAuxiliary > > savedRunAuxiliary_
Definition: RootFile.h:330
edm::TypeWithDict
Definition: TypeWithDict.h:38
edm::ReducedProvenanceReader::parentageIDLookup_
std::vector< ParentageID > const & parentageIDLookup_
Definition: RootFile.cc:1900
edm::ServiceRegistry::Operate
friend class Operate
Definition: ServiceRegistry.h:54
edm::OldProvenanceReader::readProvenance
std::set< ProductProvenance > readProvenance(unsigned int transitionIndex) const override
Definition: RootFile.cc:2138
edm::RootFile::storedMergeableRunProductMetadata_
edm::propagate_const< std::unique_ptr< StoredMergeableRunProductMetadata > > storedMergeableRunProductMetadata_
Definition: RootFile.h:327
edm::DaqProvenanceHelper::mapBranchID
BranchID const & mapBranchID(BranchID const &branchID) const
Definition: DaqProvenanceHelper.cc:191
edm::EventEntryDescription::parents
std::vector< BranchID > const & parents() const
Definition: EventEntryDescription.h:39
edm::ParameterSet
Definition: ParameterSet.h:47
GetReleaseVersion.h
edm::MakeOldProvenanceReader::makeReader
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
Definition: RootFile.cc:2196
edm::FileFormatVersion
Definition: FileFormatVersion.h:7
edm::RootFile::hasNewlyDroppedBranch_
std::array< bool, NumBranchTypes > hasNewlyDroppedBranch_
Definition: RootFile.h:335
a
double a
Definition: hdecay.h:119
edm::IndexIntoFile::firstAppearanceOrder
Definition: IndexIntoFile.h:266
edm::RootFile::makeProvenanceReaderMaker
std::unique_ptr< MakeProvenanceReader > makeProvenanceReaderMaker(InputType inputType)
Definition: RootFile.cc:1853
fetchall_from_DQM_v2.release
release
Definition: fetchall_from_DQM_v2.py:92
edm::WaitingTaskHolder
Definition: WaitingTaskHolder.h:32
edm::InLumi
Definition: BranchType.h:11
edm::IndexIntoFile::IndexIntoFileItr
Definition: IndexIntoFile.h:681
edm::IndexIntoFile::SortOrder
SortOrder
Definition: IndexIntoFile.h:266
edm::poolNames::productDescriptionBranchName
std::string const & productDescriptionBranchName()
Definition: BranchType.cc:155
edm::RootFile::setEntryAtEvent
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
Definition: RootFile.cc:1647
edm::ProductProvenanceVector
std::vector< ProductProvenance > ProductProvenanceVector
Definition: ProductProvenance.h:60
edm::FullProvenanceReader
Definition: RootFile.cc:2024
edm::RootFile::setIfFastClonable
void setIfFastClonable(int remainingEvents, int remainingLumis)
Definition: RootFile.cc:683
edm::RootFile::logicalFile_
const std::string logicalFile_
Definition: RootFile.h:314
edm::errors::FileNameInconsistentWithGUID
Definition: EDMException.h:68
edm::LuminosityBlockPrincipal::fillLuminosityBlockPrincipal
void fillLuminosityBlockPrincipal(ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
Definition: LuminosityBlockPrincipal.cc:16
edm::releaseversion::DecomposedReleaseVersion
Definition: ReleaseVersion.h:9
edm::ServiceRegistry::presentToken
ServiceToken presentToken() const
Definition: ServiceRegistry.cc:63
edm::ParentageRegistry
Definition: ParentageRegistry.h:12
edm::RootFile::initializeDuplicateChecker
void initializeDuplicateChecker(std::vector< std::shared_ptr< IndexIntoFile >> const &indexesIntoFiles, std::vector< std::shared_ptr< IndexIntoFile >>::size_type currentIndexIntoFile)
Definition: RootFile.cc:1699
edm::OldProvenanceReader::rootTree_
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2102
edm::RootFile::processingMode_
InputSource::ProcessingMode processingMode_
Definition: RootFile.h:349
edm::MakeFullProvenanceReader
Definition: RootFile.cc:87
edm::DummyProvenanceReader::readProvenanceAsync
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
Definition: RootFile.cc:2178
edm::friendlyname::friendlyName
std::string friendlyName(std::string const &iFullName)
Definition: FriendlyName.cc:278
edm::RootFile::validateFile
void validateFile(InputType inputType, bool usingGoToEvent)
Definition: RootFile.cc:1153
thread_safety_macros.h
RunPrincipal.h
edm::RootFile::markBranchToBeDropped
void markBranchToBeDropped(bool dropDescendants, BranchDescription const &branch, std::set< BranchID > &branchesToDrop, std::map< BranchID, BranchID > const &droppedToKeptAlias) const
Definition: RootFile.cc:1712
edm::FileBlock::FileTooOld
Definition: FileBlock.h:33
edm::RootFile::filePtr_
edm::propagate_const< std::shared_ptr< InputFile > > filePtr_
Definition: RootFile.h:317
ProductSelector.h
EventEntryInfo.h
edm::IndexIntoFile::IndexIntoFileItr::firstEventEntryThisRun
EntryNumber_t firstEventEntryThisRun()
Definition: IndexIntoFile.h:719
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
edm::poolNames::entryDescriptionTreeName
std::string const & entryDescriptionTreeName()
Definition: BranchType.cc:140
GlobalIdentifier.h
edm::IndexIntoFile::findLumiPosition
IndexIntoFileItr findLumiPosition(RunNumber_t run, LuminosityBlockNumber_t lumi) const
Definition: IndexIntoFile.cc:685
edm::ProcessConfigurationVector
std::vector< ProcessConfiguration > ProcessConfigurationVector
Definition: ProcessConfiguration.h:62
edm::FileBlock::EventsOrLumisSelectedByID
Definition: FileBlock.h:37
edm::BranchChildren
Definition: BranchChildren.h:18
edm::ReducedProvenanceReader::readProvenance
std::set< ProductProvenance > readProvenance(unsigned int) const override
Definition: RootFile.cc:1994
edm::RootFile::readLuminosityBlockAuxiliary_
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
Definition: RootFile.cc:1590
edm::EventID::event
EventNumber_t event() const
Definition: EventID.h:40
edm::createGlobalIdentifier
std::string createGlobalIdentifier(bool binary=false)
Definition: GlobalIdentifier.cc:5
edm::MakeProvenanceReader
Definition: RootFile.h:56
edm::RootFile::fillEventHistory
void fillEventHistory(EventAuxiliary &evtAux, EventSelectionIDVector &eventSelectionIDs, BranchListIndexes &branchListIndexes)
Definition: RootFile.cc:1254
edm::RootFile::branchChildren
std::shared_ptr< BranchChildren const > branchChildren() const
Definition: RootFile.h:303
edm::SharedResourcesRegistry
Definition: SharedResourcesRegistry.h:39
BranchType.h
edm::poolNames::processHistoryMapBranchName
std::string const & processHistoryMapBranchName()
Definition: BranchType.cc:167
edm::FileBlock::NoEventsInFile
Definition: FileBlock.h:34
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
edm::RootFile::skipAnyEvents_
bool skipAnyEvents_
Definition: RootFile.h:331
edm::roottree::defaultLearningEntries
unsigned const int defaultLearningEntries
Definition: RootTree.h:49
edm::RootFile::edProductClass_
edm::propagate_const< TClass * > edProductClass_
Definition: RootFile.h:361
edm::RootFile::fileFormatVersion_
FileFormatVersion fileFormatVersion_
Definition: RootFile.h:319
edm::ProductRegistry::allBranchDescriptions
std::vector< BranchDescription const * > allBranchDescriptions() const
Definition: ProductRegistry.cc:199
RootFile.h
edm::BranchDescription::branchName
std::string const & branchName() const
Definition: BranchDescription.h:120
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
edm::IndexIntoFile::end
IndexIntoFileItr end(SortOrder sortOrder) const
Used to end an iteration over the Runs, Lumis, and Events in a file.
Definition: IndexIntoFile.cc:470
edm::EventPrincipal::streamID
StreamID streamID() const
Definition: EventPrincipal.h:106
InputFile.h
edm::FullProvenanceReader::infoVector_
ProductProvenanceVector infoVector_
Definition: RootFile.cc:2037
edm::FileFormatVersion::processHistorySameWithinRun
bool processHistorySameWithinRun() const
Definition: FileFormatVersion.cc:33
edm::RootFile::readEventHistoryTree
void readEventHistoryTree()
Definition: RootFile.cc:1688
edm::OldProvenanceReader::~OldProvenanceReader
~OldProvenanceReader() override
Definition: RootFile.cc:2093
edm::lower_bound_all
ForwardSequence::const_iterator lower_bound_all(ForwardSequence const &s, Datum const &d)
wrappers for std::lower_bound
Definition: Algorithms.h:69
edm::ServiceRegistry::instance
static ServiceRegistry & instance()
Definition: ServiceRegistry.cc:90
edm::RootTree::branchNames
std::vector< std::string > const & branchNames() const
Definition: RootTree.h:140
edm::FullProvenanceReader::rootTree_
RootTree * rootTree_
Definition: RootFile.cc:2036
edm::RootTree::insertEntryForIndex
void insertEntryForIndex(unsigned int index)
Definition: RootTree.cc:105
edm::RunAux
Definition: RunAux.h:14
edm::IndexIntoFile::findEventPosition
IndexIntoFileItr findEventPosition(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
Definition: IndexIntoFile.cc:676
LuminosityBlockPrincipal.h
edm::LuminosityBlockAux
Definition: LuminosityBlockAux.h:13
instance
static PFTauRenderPlugin instance
Definition: PFTauRenderPlugin.cc:70
edm::pset::Registry::insertMapped
bool insertMapped(value_type const &v, bool forceUpdate=false)
Definition: Registry.cc:32
edm::BranchDescription::updateFriendlyClassName
void updateFriendlyClassName()
Definition: BranchDescription.cc:294
edm::FileFormatVersion::storedProductProvenanceUsed
bool storedProductProvenanceUsed() const
Definition: FileFormatVersion.cc:41
FileBlock.h
edm::ReducedProvenanceReader::acquirer_
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:1903
edm::IndexIntoFile::containsItem
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
Definition: IndexIntoFile.cc:696
edm::InputSource::Runs
Definition: InputSource.h:80
edm::EventPrincipal::fillEventPrincipal
void fillEventPrincipal(EventAuxiliary const &aux, ProcessHistory const *processHistory, DelayedReader *reader=nullptr)
Definition: EventPrincipal.cc:105
edm::RootFile::initAssociationsFromSecondary
void initAssociationsFromSecondary(std::vector< BranchID > const &)
Definition: RootFile.cc:757
Registry.h
edm::releaseversion::isEarlierRelease
bool isEarlierRelease(std::string const &a, std::string const &b)
Definition: ReleaseVersion.cc:70
edm::IndexIntoFile::IndexIntoFileItr::getEntryType
EntryType getEntryType() const
Definition: IndexIntoFile.h:700
edm::roottree::defaultNonEventCacheSize
unsigned const int defaultNonEventCacheSize
Definition: RootTree.h:48
edm::RootFile::history_
edm::propagate_const< std::unique_ptr< History > > history_
Definition: RootFile.h:353
edm::RunPrincipal::fillRunPrincipal
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
Definition: RunPrincipal.cc:28
edm::Timestamp::invalidTimestamp
static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
edm::FullProvenanceReader::readProvenanceAsync
void readProvenanceAsync(WaitingTaskHolder task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
Definition: RootFile.cc:2054
edm::RootFile::noEventSort_
bool noEventSort_
Definition: RootFile.h:332
edm::BranchTypeToProductProvenanceBranchName
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
Definition: BranchType.cc:132
edm::RootTree::current
bool current() const
Definition: RootTree.h:130
edm::RootTree::isValid
bool isValid() const
Definition: RootTree.cc:110
edm::ParentageRegistry::insertMapped
bool insertMapped(value_type const &v)
Definition: ParentageRegistry.cc:24
edm::RootFile::createFileBlock
std::unique_ptr< FileBlock > createFileBlock() const
Definition: RootFile.cc:727
edm::RootFile::provenanceReaderMaker_
edm::propagate_const< std::unique_ptr< MakeProvenanceReader > > provenanceReaderMaker_
Definition: RootFile.h:357
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
edm::RootFile::parentageIDLookup_
std::vector< ParentageID > parentageIDLookup_
Definition: RootFile.h:359
edm::ProductRegistry::productList
ProductList const & productList() const
Definition: ProductRegistry.h:76
edm::RootFile::goToEvent
bool goToEvent(EventID const &eventID)
Definition: RootFile.cc:1410
SharedResourcesRegistry.h
edm::RunPrincipal::mergeableRunProductMetadata
MergeableRunProductMetadata * mergeableRunProductMetadata()
Definition: RunPrincipal.h:81
stemFromPath.h
hgcal::association
std::tuple< layerClusterToCaloParticle, caloParticleToLayerCluster > association
Definition: LayerClusterAssociatorByEnergyScoreImpl.h:44
edm::ProcessHistoryID
Hash< ProcessHistoryType > ProcessHistoryID
Definition: ProcessHistoryID.h:8
edm::ReducedProvenanceReader::daqProvenanceHelper_
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1901
edm::RootTree::entryNumber
EntryNumber const & entryNumber() const
Definition: RootTree.h:135
edm::FullProvenanceReader::~FullProvenanceReader
~FullProvenanceReader() override
Definition: RootFile.cc:2027
edm::RootFile::lastEventEntryNumberRead_
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
Definition: RootFile.h:343
edm::RootTree::entries
EntryNumber const & entries() const
Definition: RootTree.h:137
edm::IndexIntoFile::IndexIntoFileItr::advanceToNextLumiOrRun
void advanceToNextLumiOrRun()
Definition: IndexIntoFile.h:775
MergeableRunProductMetadata.h
edm::DummyProvenanceReader::readProvenance
std::set< ProductProvenance > readProvenance(unsigned int) const override
Definition: RootFile.cc:2174
edm::poolNames::metaDataTreeName
std::string const & metaDataTreeName()
Definition: BranchType.cc:152
edm::ProcessHistoryRegistry::collection_type
ProcessHistoryMap collection_type
Definition: ProcessHistoryRegistry.h:21
edm::EventAuxiliary::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: EventAuxiliary.h:61
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:29
edm::MakeReducedProvenanceReader::MakeReducedProvenanceReader
MakeReducedProvenanceReader(std::vector< ParentageID > const &parentageIDLookup)
Definition: RootFile.cc:94
setIsMergeable.h
edm::InputType::Primary
edm::getReleaseVersion
std::string getReleaseVersion()
Definition: GetReleaseVersion.cc:7
Exception
Definition: hltDiff.cc:245
edm::IndexIntoFile::fillEventNumbersOrEntries
void fillEventNumbersOrEntries(bool needEventNumbers, bool needEventEntries) const
Definition: IndexIntoFile.cc:202
edm::RootTree::branchEntryInfoBranch
TBranch * branchEntryInfoBranch() const
Definition: RootTree.h:188
edm::ReducedProvenanceReader::pProvVector_
StoredProductProvenanceVector const * pProvVector_
Definition: RootFile.cc:1899
edm::RootFile::containsItem
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
Definition: RootFile.cc:812
edm::RootFile::productRegistry_
std::shared_ptr< ProductRegistry const > productRegistry_
Definition: RootFile.h:344
edm::RootFile::whyNotFastClonable
int whyNotFastClonable() const
Definition: RootFile.h:223
edm::RootFile::setEntryAtNextEventInLumi
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition: RootFile.cc:1671
edm::IndexIntoFile::reduceProcessHistoryIDs
void reduceProcessHistoryIDs(ProcessHistoryRegistry const &processHistoryRegistry)
Definition: IndexIntoFile.cc:308
edm::InputType::SecondarySource
edm::poolNames::thinnedAssociationsHelperBranchName
std::string const & thinnedAssociationsHelperBranchName()
Definition: BranchType.cc:179
ThinnedAssociation.h
edm::RootFile::setSignals
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
Definition: RootFile.cc:1847
edm::History
Definition: History.h:22
edm::OldProvenanceReader::OldProvenanceReader
OldProvenanceReader(RootTree *rootTree, EntryDescriptionMap const &theMap, DaqProvenanceHelper const *daqProvenanceHelper)
Definition: RootFile.cc:2112
edm::OldProvenanceReader::pInfoVector_
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2105
ProvenanceAdaptor.h
edm::RootTree::fillBranchEntryMeta
void fillBranchEntryMeta(TBranch *branch, T *&pbuf)
Definition: RootTree.h:149
edm::IndexIntoFile::EntryNumber_t
long long EntryNumber_t
Definition: IndexIntoFile.h:231
edm::ProcessHistoryRegistry
Definition: ProcessHistoryRegistry.h:18
edm::poolNames::productDependenciesBranchName
std::string const & productDependenciesBranchName()
Definition: BranchType.cc:158
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:24
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
edm::RootFile::newBranchToOldBranch_
std::map< std::string, std::string > newBranchToOldBranch_
Definition: RootFile.h:351
edm::BranchDescription
Definition: BranchDescription.h:32
edm::poolNames::eventHistoryTreeName
std::string const & eventHistoryTreeName()
Definition: BranchType.cc:212
drop
const int drop
Definition: GenParticlePruner.cc:48
edm::MakeReducedProvenanceReader::makeReader
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
Definition: RootFile.cc:2206
DTskim_cfg.processingMode
processingMode
Definition: DTskim_cfg.py:82
edm::errors::FormatIncompatibility
Definition: EDMException.h:58
edm::RootTree
Definition: RootTree.h:103
edm::IndexIntoFile::kEnd
Definition: IndexIntoFile.h:238
edm::RootFile::fillThisEventAuxiliary
EventAuxiliary const & fillThisEventAuxiliary()
Definition: RootFile.cc:1230
edm::RootFile::indexIntoFileBegin_
IndexIntoFile::IndexIntoFileItr indexIntoFileBegin_
Definition: RootFile.h:324
edm::roottree::getEntry
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:496
edm::RootFile::~RootFile
~RootFile()
Definition: RootFile.cc:600
edm::EDProductGetter::transitionIndex
unsigned int transitionIndex() const
Definition: EDProductGetter.h:94
cmsCodeRulesChecker.rules
rules
Definition: cmsCodeRulesChecker.py:152
ParameterSet.h
edm::IndexIntoFile::fixIndexes
void fixIndexes(std::vector< ProcessHistoryID > &processHistoryIDs)
Definition: IndexIntoFile.cc:370
edm::stable_sort_all
void stable_sort_all(RandomAccessSequence &s)
wrappers for std::stable_sort
Definition: Algorithms.h:103
edm::RootFile::readRun_
void readRun_(RunPrincipal &runPrincipal)
Definition: RootFile.cc:1563
edm::IndexIntoFile::setRunOrLumiEntries
std::vector< RunOrLumiEntry > & setRunOrLumiEntries()
Definition: IndexIntoFile.h:1007
edm::FileBlock::MaxEventsTooSmall
Definition: FileBlock.h:39
edm::RunPrincipal
Definition: RunPrincipal.h:34
edm::poolNames::fileIdentifierBranchName
std::string const & fileIdentifierBranchName()
Definition: BranchType.cc:185
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:61
edm::RootFile::branchListIndexesUnchanged_
bool branchListIndexesUnchanged_
Definition: RootFile.h:336
parents
TPRegexp parents
Definition: eve_filter.cc:21
event
Definition: event.py:1
edm::EventID
Definition: EventID.h:31
edm::RootTree::setSignals
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
Definition: RootTree.cc:489
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
edm::EventEntryDescription::id
EntryDescriptionID id() const
Definition: EventEntryDescription.cc:13
edm::EventSelectionIDVector
std::vector< EventSelectionID > EventSelectionIDVector
Definition: EventSelectionID.h:16
edm::poolNames::entryDescriptionBranchName
std::string const & entryDescriptionBranchName()
Definition: BranchType.cc:144
edm::SerialTaskQueueChain
Definition: SerialTaskQueueChain.h:32
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::IndexIntoFile::IndexIntoFileItr::skipEventBackward
void skipEventBackward(int &phIndexOfEvent, RunNumber_t &runOfEvent, LuminosityBlockNumber_t &lumiOfEvent, EntryNumber_t &eventEntry)
Definition: IndexIntoFile.h:759
edm::OldProvenanceReader::daqProvenanceHelper_
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2107
lumi
Definition: LumiSectionData.h:20
edm::ReducedProvenanceReader
Definition: RootFile.cc:1882
edm::MergeableRunProductMetadata::readRun
void readRun(long long inputRunEntry, StoredMergeableRunProductMetadata const &inputStoredMergeableRunProductMetadata, IndexIntoFileItrHolder const &inputIndexIntoFileItr)
Definition: MergeableRunProductMetadata.cc:23
edm::RootFile::runTree_
RootTree runTree_
Definition: RootFile.h:340
edm::errors::FileReadError
Definition: EDMException.h:50
edm::signalslot::Signal
Definition: DelayedReader.h:26
dttmaxenums::R
Definition: DTTMax.h:29
DaqProvenanceHelper.h
edm::DummyProvenanceReader
Definition: RootFile.cc:2159
edm::ReducedProvenanceReader::ReducedProvenanceReader
ReducedProvenanceReader(RootTree *iRootTree, std::vector< ParentageID > const &iParentageIDLookup, DaqProvenanceHelper const *daqProvenanceHelper)
Definition: RootFile.cc:1906
edm::EventAuxiliary::setProcessHistoryID
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: EventAuxiliary.h:62
edm::poolNames::processConfigurationBranchName
std::string const & processConfigurationBranchName()
Definition: BranchType.cc:173
edm::RootFile::eventProductProvenanceRetriever
std::shared_ptr< ProductProvenanceRetriever const > eventProductProvenanceRetriever(size_t index) const
Definition: RootFile.h:306
EventAux.h
edm::errors::UnimplementedFeature
Definition: EDMException.h:38
RunID.h
edm::FileBlock::MaxLumisTooSmall
Definition: FileBlock.h:40
label
const char * label
Definition: PFTauDecayModeTools.cc:11
do_nothing_deleter.h
chain
Definition: chain.py:1
edm::InputSource::RunsLumisAndEvents
Definition: InputSource.h:80
edm::RootFile::branchIDLists_
std::shared_ptr< BranchIDLists const > branchIDLists_
Definition: RootFile.h:345
edm::IndexIntoFile::EventFinder
Definition: IndexIntoFile.h:902
edm::MakeOldProvenanceReader
Definition: RootFile.cc:77
edm::ProcessConfiguration
Definition: ProcessConfiguration.h:14
edm::StoredProductProvenanceVector
std::vector< StoredProductProvenance > StoredProductProvenanceVector
Definition: StoredProductProvenance.h:34
edm::IndexIntoFile::setProcessHistoryIDs
std::vector< ProcessHistoryID > & setProcessHistoryIDs()
Definition: IndexIntoFile.h:1012
edm::BranchKey
Definition: BranchKey.h:17
edm::pset::Registry
Definition: Registry.h:26
edm::poolNames::moduleDescriptionMapBranchName
std::string const & moduleDescriptionMapBranchName()
Definition: BranchType.cc:164
edm::RootTree::next
bool next()
Definition: RootTree.h:127
edm::RootFile::duplicateChecker_
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
Definition: RootFile.h:355
edm::DummyProvenanceReader::~DummyProvenanceReader
~DummyProvenanceReader() override
Definition: RootFile.cc:2162
edm::OldProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2108
edm::FileBlock::DuplicateEventsRemoved
Definition: FileBlock.h:42
edm::FullProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2041
edm::ParameterSetConverter::ParameterSetIdConverter
std::map< ParameterSetID, ParameterSetID > ParameterSetIdConverter
Definition: ParameterSetConverter.h:45
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::RootFile::indexIntoFileIter
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
Definition: RootFile.cc:751
edm::RootFile::fillLumiAuxiliary
std::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
Definition: RootFile.cc:1311
edm::IndexIntoFile::IndexIntoFileItr::entry
EntryNumber_t entry() const
Definition: IndexIntoFile.h:704
edm::IndexIntoFile::invalidRun
static constexpr RunNumber_t invalidRun
Definition: IndexIntoFile.h:233
edm::poolNames::eventHistoryBranchName
std::string const & eventHistoryBranchName()
Definition: BranchType.cc:197
edm::RunAuxiliary
Definition: RunAuxiliary.h:15
edm::IndexIntoFile::IndexIntoFileItr::advanceToEvent
void advanceToEvent()
Definition: IndexIntoFile.cc:1748
edm::RootFile::wasFirstEventJustRead
bool wasFirstEventJustRead() const
Definition: RootFile.cc:867
edm::IndexIntoFile::fillEventNumbers
void fillEventNumbers() const
Definition: IndexIntoFile.cc:198
edm::IndexIntoFile::EntryType
EntryType
Definition: IndexIntoFile.h:238
edm::FileBlock::InitialEventsSkipped
Definition: FileBlock.h:38
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
edm::ReducedProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:1902
edm::RootFile::file_
const std::string file_
Definition: RootFile.h:313