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  eventAux_(),
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  eventSelectionIDs_(),
234  branchListIndexes_(),
235  history_(),
236  branchChildren_(new BranchChildren),
237  duplicateChecker_(duplicateChecker),
238  provenanceAdaptor_(),
239  provenanceReaderMaker_(),
240  eventProductProvenanceRetrievers_(),
241  parentageIDLookup_(),
242  daqProvenanceHelper_(),
243  edProductClass_(TypeWithDict::byName("edm::WrapperBase").getClass()),
244  inputType_(inputType) {
245  hasNewlyDroppedBranch_.fill(false);
246 
250 
251  // Read the metadata tree.
252  // We use a smart pointer so the tree will be deleted after use, and not kept for the life of the file.
253  std::unique_ptr<TTree> metaDataTree(dynamic_cast<TTree*>(filePtr_->Get(poolNames::metaDataTreeName().c_str())));
254  if (nullptr == metaDataTree.get()) {
256  << "Could not find tree " << poolNames::metaDataTreeName() << " in the input file.\n";
257  }
258 
259  // To keep things simple, we just read in every possible branch that exists.
260  // We don't pay attention to which branches exist in which file format versions
261 
263  if (metaDataTree->FindBranch(poolNames::fileFormatVersionBranchName().c_str()) != nullptr) {
264  TBranch* fft = metaDataTree->GetBranch(poolNames::fileFormatVersionBranchName().c_str());
265  fft->SetAddress(&fftPtr);
266  roottree::getEntry(fft, 0);
267  metaDataTree->SetBranchAddress(poolNames::fileFormatVersionBranchName().c_str(), &fftPtr);
268  }
269 
270  FileID* fidPtr = &fid_;
271  if (metaDataTree->FindBranch(poolNames::fileIdentifierBranchName().c_str()) != nullptr) {
272  metaDataTree->SetBranchAddress(poolNames::fileIdentifierBranchName().c_str(), &fidPtr);
273  }
274 
275  IndexIntoFile* iifPtr = &indexIntoFile_;
276  if (metaDataTree->FindBranch(poolNames::indexIntoFileBranchName().c_str()) != nullptr) {
277  metaDataTree->SetBranchAddress(poolNames::indexIntoFileBranchName().c_str(), &iifPtr);
278  }
279 
280  StoredMergeableRunProductMetadata* smrc = nullptr;
281  if (inputType == InputType::Primary) {
283  if (metaDataTree->FindBranch(poolNames::mergeableRunProductMetadataBranchName().c_str()) != nullptr) {
284  metaDataTree->SetBranchAddress(poolNames::mergeableRunProductMetadataBranchName().c_str(), &smrc);
285  }
286  }
287 
288  // Need to read to a temporary registry so we can do a translation of the BranchKeys.
289  // This preserves backward compatibility against friendly class name algorithm changes.
290  ProductRegistry inputProdDescReg;
291  ProductRegistry* ppReg = &inputProdDescReg;
292  metaDataTree->SetBranchAddress(poolNames::productDescriptionBranchName().c_str(), (&ppReg));
293 
294  typedef std::map<ParameterSetID, ParameterSetBlob> PsetMap;
295  PsetMap psetMap;
296  PsetMap* psetMapPtr = &psetMap;
297  if (metaDataTree->FindBranch(poolNames::parameterSetMapBranchName().c_str()) != nullptr) {
298  //backward compatibility
299  assert(!fileFormatVersion().parameterSetsTree());
300  metaDataTree->SetBranchAddress(poolNames::parameterSetMapBranchName().c_str(), &psetMapPtr);
301  } else {
302  assert(fileFormatVersion().parameterSetsTree());
303  // We use a smart pointer so the tree will be deleted after use, and not kept for the life of the file.
304  std::unique_ptr<TTree> psetTree(dynamic_cast<TTree*>(filePtr_->Get(poolNames::parameterSetsTreeName().c_str())));
305  if (nullptr == psetTree.get()) {
307  << "Could not find tree " << poolNames::parameterSetsTreeName() << " in the input file.\n";
308  }
309 
310  typedef std::pair<ParameterSetID, ParameterSetBlob> IdToBlobs;
311  IdToBlobs idToBlob;
312  IdToBlobs* pIdToBlob = &idToBlob;
313  psetTree->SetBranchAddress(poolNames::idToParameterSetBlobsBranchName().c_str(), &pIdToBlob);
314 
315  std::unique_ptr<TTreeCache> psetTreeCache =
317  psetTreeCache->SetEnablePrefetching(false);
318  filePtr_->SetCacheRead(psetTreeCache.get());
319  for (Long64_t i = 0; i != psetTree->GetEntries(); ++i) {
320  psetTree->GetEntry(i);
321  psetMap.insert(idToBlob);
322  }
323  filePtr_->SetCacheRead(nullptr);
324  }
325 
326  // backward compatibility
328  ProcessHistoryRegistry::collection_type* pHistMapPtr = &pHistMap;
329  if (metaDataTree->FindBranch(poolNames::processHistoryMapBranchName().c_str()) != nullptr) {
330  metaDataTree->SetBranchAddress(poolNames::processHistoryMapBranchName().c_str(), &pHistMapPtr);
331  }
332 
334  ProcessHistoryRegistry::vector_type* pHistVectorPtr = &pHistVector;
335  if (metaDataTree->FindBranch(poolNames::processHistoryBranchName().c_str()) != nullptr) {
336  metaDataTree->SetBranchAddress(poolNames::processHistoryBranchName().c_str(), &pHistVectorPtr);
337  }
338 
339  // backward compatibility
340  ProcessConfigurationVector processConfigurations;
341  ProcessConfigurationVector* procConfigVectorPtr = &processConfigurations;
342  if (metaDataTree->FindBranch(poolNames::processConfigurationBranchName().c_str()) != nullptr) {
343  metaDataTree->SetBranchAddress(poolNames::processConfigurationBranchName().c_str(), &procConfigVectorPtr);
344  }
345 
346  auto branchIDListsAPtr = std::make_unique<BranchIDLists>();
347  BranchIDLists* branchIDListsPtr = branchIDListsAPtr.get();
348  if (metaDataTree->FindBranch(poolNames::branchIDListBranchName().c_str()) != nullptr) {
349  metaDataTree->SetBranchAddress(poolNames::branchIDListBranchName().c_str(), &branchIDListsPtr);
350  }
351 
352  if (inputType != InputType::SecondarySource) {
354  std::make_unique<ThinnedAssociationsHelper>(); // propagate_const<T> has no reset() function
355  ThinnedAssociationsHelper* thinnedAssociationsHelperPtr = fileThinnedAssociationsHelper_.get();
356  if (metaDataTree->FindBranch(poolNames::thinnedAssociationsHelperBranchName().c_str()) != nullptr) {
357  metaDataTree->SetBranchAddress(poolNames::thinnedAssociationsHelperBranchName().c_str(),
358  &thinnedAssociationsHelperPtr);
359  }
360  }
361 
362  BranchChildren* branchChildrenBuffer = branchChildren_.get();
363  if (metaDataTree->FindBranch(poolNames::productDependenciesBranchName().c_str()) != nullptr) {
364  metaDataTree->SetBranchAddress(poolNames::productDependenciesBranchName().c_str(), &branchChildrenBuffer);
365  }
366 
367  // backward compatibility
368  std::vector<EventProcessHistoryID>* eventHistoryIDsPtr = &eventProcessHistoryIDs_;
369  if (metaDataTree->FindBranch(poolNames::eventHistoryBranchName().c_str()) != nullptr) {
370  metaDataTree->SetBranchAddress(poolNames::eventHistoryBranchName().c_str(), &eventHistoryIDsPtr);
371  }
372 
373  if (metaDataTree->FindBranch(poolNames::moduleDescriptionMapBranchName().c_str()) != nullptr) {
374  if (metaDataTree->GetBranch(poolNames::moduleDescriptionMapBranchName().c_str())->GetSplitLevel() != 0) {
375  metaDataTree->SetBranchStatus((poolNames::moduleDescriptionMapBranchName() + ".*").c_str(), false);
376  } else {
377  metaDataTree->SetBranchStatus(poolNames::moduleDescriptionMapBranchName().c_str(), false);
378  }
379  }
380 
381  // Here we read the metadata tree
382  roottree::getEntry(metaDataTree.get(), 0);
383 
385 
386  // Here we read the event history tree, if we have one.
388 
390  if (!fileFormatVersion().triggerPathsTracked()) {
391  ParameterSetConverter converter(psetMap, psetIdConverter, fileFormatVersion().parameterSetsByReference());
392  } else {
393  // Merge into the parameter set registry.
394  pset::Registry& psetRegistry = *pset::Registry::instance();
395  for (auto const& psetEntry : psetMap) {
396  ParameterSet pset(psetEntry.second.pset());
397  pset.setID(psetEntry.first);
398  // For thread safety, don't update global registries when a secondary source opens a file.
399  if (inputType != InputType::SecondarySource) {
400  psetRegistry.insertMapped(pset);
401  }
402  }
403  }
404  if (!fileFormatVersion().splitProductIDs()) {
405  // Old provenance format input file. Create a provenance adaptor.
406  // propagate_const<T> has no reset() function
407  provenanceAdaptor_ = std::make_unique<ProvenanceAdaptor>(
408  inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter, true);
409  // Fill in the branchIDLists branch from the provenance adaptor
410  branchIDLists_ = provenanceAdaptor_->branchIDLists();
411  } else {
412  if (!fileFormatVersion().triggerPathsTracked()) {
413  // New provenance format, but change in ParameterSet Format. Create a provenance adaptor.
414  // propagate_const<T> has no reset() function
415  provenanceAdaptor_ = std::make_unique<ProvenanceAdaptor>(
416  inputProdDescReg, pHistMap, pHistVector, processConfigurations, psetIdConverter, false);
417  }
418  // New provenance format input file. The branchIDLists branch was read directly from the input file.
419  if (metaDataTree->FindBranch(poolNames::branchIDListBranchName().c_str()) == nullptr) {
420  throw Exception(errors::EventCorruption) << "Failed to find branchIDLists branch in metaData tree.\n";
421  }
422  branchIDLists_.reset(branchIDListsAPtr.release());
423  }
424 
426  if (metaDataTree->FindBranch(poolNames::thinnedAssociationsHelperBranchName().c_str()) == nullptr) {
428  << "Failed to find thinnedAssociationsHelper branch in metaData tree.\n";
429  }
430  }
431 
432  if (!bypassVersionCheck) {
433  checkReleaseVersion(pHistVector, file());
434  }
435 
436  if (labelRawDataLikeMC) {
437  std::string const rawData("FEDRawDataCollection");
438  std::string const source("source");
439  ProductRegistry::ProductList& pList = inputProdDescReg.productListUpdator();
440  BranchKey finder(rawData, source, "", "");
441  ProductRegistry::ProductList::iterator it = pList.lower_bound(finder);
442  if (it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() == source) {
443  // We found raw data with a module label of source.
444  // We need to change the module label and process name.
445  // Create helper.
446  it->second.init();
447  // propagate_const<T> has no reset() function
448  daqProvenanceHelper_ = std::make_unique<DaqProvenanceHelper>(it->second.unwrappedTypeID());
449  // Create the new branch description
450  BranchDescription const& newBD = daqProvenanceHelper_->branchDescription();
451  // Save info from the old and new branch descriptions
452  daqProvenanceHelper_->saveInfo(it->second, newBD);
453  // Map the new branch name to the old branch name.
454  newBranchToOldBranch_.insert(std::make_pair(newBD.branchName(), it->second.branchName()));
455  // Remove the old branch description from the product Registry.
456  pList.erase(it);
457  // Check that there was only one.
458  it = pList.lower_bound(finder);
459  assert(!(it != pList.end() && it->first.friendlyClassName() == rawData && it->first.moduleLabel() == source));
460  // Insert the new branch description into the product registry.
461  inputProdDescReg.copyProduct(newBD);
462  // Fix up other per file metadata.
463  daqProvenanceHelper_->fixMetaData(processConfigurations, pHistVector);
464  daqProvenanceHelper_->fixMetaData(*branchIDLists_);
465  daqProvenanceHelper_->fixMetaData(*branchChildren_);
466  }
467  }
468 
469  for (auto const& history : pHistVector) {
470  processHistoryRegistry.registerProcessHistory(history);
471  }
472 
474 
475  // Update the branch id info. This has to be done before validateFile since
476  // depending on the file format, the branchIDListHelper_ may have its fixBranchListIndexes call made
477  if (inputType == InputType::Primary) {
479  }
480 
481  validateFile(inputType, usingGoToEvent);
482 
483  // Here, we make the class that will make the ProvenanceReader
484  // It reads whatever trees it needs.
485  // propagate_const<T> has no reset() function
486  provenanceReaderMaker_ = std::unique_ptr<MakeProvenanceReader>(makeProvenanceReaderMaker(inputType).release());
487 
488  // Merge into the hashed registries.
489  if (eventSkipperByID_ && eventSkipperByID_->somethingToSkip()) {
491  }
492 
493  initializeDuplicateChecker(indexesIntoFiles, currentIndexIntoFile);
500 
501  // Set product presence information in the product registry.
502  ProductRegistry::ProductList& pList = inputProdDescReg.productListUpdator();
503  for (auto& product : pList) {
504  BranchDescription& prod = product.second;
505  prod.init();
506  treePointers_[prod.branchType()]->setPresence(prod, newBranchToOldBranch(prod.branchName()));
507  }
508 
509  auto newReg = std::make_unique<ProductRegistry>();
510 
511  // Do the translation from the old registry to the new one
512  {
513  ProductRegistry::ProductList const& prodList = inputProdDescReg.productList();
514  for (auto const& product : prodList) {
515  BranchDescription const& prod = product.second;
516  std::string newFriendlyName = friendlyname::friendlyName(prod.className());
517  if (newFriendlyName == prod.friendlyClassName()) {
518  newReg->copyProduct(prod);
519  } else {
520  if (fileFormatVersion().splitProductIDs()) {
522  << "Cannot change friendly class name algorithm without more development work\n"
523  << "to update BranchIDLists and ThinnedAssociationsHelper. Contact the framework group.\n";
524  }
525  BranchDescription newBD(prod);
526  newBD.updateFriendlyClassName();
527  newReg->copyProduct(newBD);
528  newBranchToOldBranch_.insert(std::make_pair(newBD.branchName(), prod.branchName()));
529  }
530  }
531  dropOnInput(*newReg, productSelectorRules, dropDescendants, inputType);
532  if (inputType == InputType::SecondaryFile) {
533  thinnedAssociationsHelper->updateFromSecondaryInput(*fileThinnedAssociationsHelper_,
534  *associationsFromSecondary);
535  } else if (inputType == InputType::Primary) {
536  thinnedAssociationsHelper->updateFromPrimaryInput(*fileThinnedAssociationsHelper_);
537  }
538 
539  if (inputType == InputType::Primary) {
540  for (auto& product : newReg->productListUpdator()) {
541  setIsMergeable(product.second);
542  }
543  }
544 
545  // freeze the product registry
546  newReg->setFrozen(inputType != InputType::Primary);
547  productRegistry_.reset(newReg.release());
548  }
549 
550  // Set up information from the product registry.
551  ProductRegistry::ProductList const& prodList = productRegistry()->productList();
552 
553  {
554  std::array<size_t, NumBranchTypes> nBranches;
555  nBranches.fill(0);
556  for (auto const& product : prodList) {
557  ++nBranches[product.second.branchType()];
558  }
559 
560  int i = 0;
561  for (auto t : treePointers_) {
562  t->numberOfBranchesToAdd(nBranches[i]);
563  ++i;
564  }
565  }
566  for (auto const& product : prodList) {
567  BranchDescription const& prod = product.second;
568  treePointers_[prod.branchType()]->addBranch(prod, newBranchToOldBranch(prod.branchName()));
569  }
570 
571  // Determine if this file is fast clonable.
572  setIfFastClonable(remainingEvents, remainingLumis);
573 
574  // We are done with our initial reading of EventAuxiliary.
576 
577  // Tell the event tree to begin training at the next read.
579 
580  // Train the run and lumi trees.
581  runTree_.trainCache("*");
582  lumiTree_.trainCache("*");
583  }
584 
586 
587  void RootFile::readEntryDescriptionTree(EntryDescriptionMap& entryDescriptionMap, InputType inputType) {
588  // Called only for old format files.
589  // We use a smart pointer so the tree will be deleted after use, and not kept for the life of the file.
590  std::unique_ptr<TTree> entryDescriptionTree(
591  dynamic_cast<TTree*>(filePtr_->Get(poolNames::entryDescriptionTreeName().c_str())));
592  if (nullptr == entryDescriptionTree.get()) {
594  << "Could not find tree " << poolNames::entryDescriptionTreeName() << " in the input file.\n";
595  }
596 
597  EntryDescriptionID idBuffer;
598  EntryDescriptionID* pidBuffer = &idBuffer;
599  entryDescriptionTree->SetBranchAddress(poolNames::entryDescriptionIDBranchName().c_str(), &pidBuffer);
600 
601  EventEntryDescription entryDescriptionBuffer;
602  EventEntryDescription* pEntryDescriptionBuffer = &entryDescriptionBuffer;
603  entryDescriptionTree->SetBranchAddress(poolNames::entryDescriptionBranchName().c_str(), &pEntryDescriptionBuffer);
604 
605  // Fill in the parentage registry.
607 
608  for (Long64_t i = 0, numEntries = entryDescriptionTree->GetEntries(); i < numEntries; ++i) {
609  roottree::getEntry(entryDescriptionTree.get(), i);
610  if (idBuffer != entryDescriptionBuffer.id()) {
611  throw Exception(errors::EventCorruption) << "Corruption of EntryDescription tree detected.\n";
612  }
613  entryDescriptionMap.insert(std::make_pair(entryDescriptionBuffer.id(), entryDescriptionBuffer));
615  parents.setParents(entryDescriptionBuffer.parents());
616  if (daqProvenanceHelper_) {
617  ParentageID const oldID = parents.id();
618  daqProvenanceHelper_->fixMetaData(parents.parentsForUpdate());
619  ParentageID newID = parents.id();
620  if (newID != oldID) {
621  daqProvenanceHelper_->setOldParentageIDToNew(oldID, newID);
622  }
623  }
624  // For thread safety, don't update global registries when a secondary source opens a file.
625  if (inputType != InputType::SecondarySource) {
626  registry.insertMapped(parents);
627  }
628  }
629  entryDescriptionTree->SetBranchAddress(poolNames::entryDescriptionIDBranchName().c_str(), nullptr);
630  entryDescriptionTree->SetBranchAddress(poolNames::entryDescriptionBranchName().c_str(), nullptr);
631  }
632 
634  // New format file
635  // We use a smart pointer so the tree will be deleted after use, and not kept for the life of the file.
636  std::unique_ptr<TTree> parentageTree(dynamic_cast<TTree*>(filePtr_->Get(poolNames::parentageTreeName().c_str())));
637  if (nullptr == parentageTree.get()) {
639  << "Could not find tree " << poolNames::parentageTreeName() << " in the input file.\n";
640  }
641 
643  Parentage* pParentageBuffer = &parents;
644  parentageTree->SetBranchAddress(poolNames::parentageBranchName().c_str(), &pParentageBuffer);
645 
647 
648  parentageIDLookup_.reserve(parentageTree->GetEntries());
649  for (Long64_t i = 0, numEntries = parentageTree->GetEntries(); i < numEntries; ++i) {
650  roottree::getEntry(parentageTree.get(), i);
651  if (daqProvenanceHelper_) {
652  ParentageID const oldID = parents.id();
653  daqProvenanceHelper_->fixMetaData(parents.parentsForUpdate());
654  ParentageID newID = parents.id();
655  if (newID != oldID) {
656  daqProvenanceHelper_->setOldParentageIDToNew(oldID, newID);
657  }
658  }
659  // For thread safety, don't update global registries when a secondary source opens a file.
660  if (inputType != InputType::SecondarySource) {
661  registry.insertMapped(parents);
662  }
663  parentageIDLookup_.push_back(parents.id());
664  }
665  parentageTree->SetBranchAddress(poolNames::parentageBranchName().c_str(), nullptr);
666  }
667 
668  void RootFile::setIfFastClonable(int remainingEvents, int remainingLumis) {
669  if (fileFormatVersion().noMetaDataTrees() and !fileFormatVersion().storedProductProvenanceUsed()) {
670  //we must avoid copying the old branch which stored the per product per event provenance
672  return;
673  }
674  if (!fileFormatVersion().splitProductIDs()) {
676  return;
677  }
680  return;
681  }
682  // Find entry for first event in file
684  while (it != indexIntoFileEnd_ && it.getEntryType() != IndexIntoFile::kEvent) {
685  ++it;
686  }
687  if (it == indexIntoFileEnd_) {
689  return;
690  }
691 
692  // From here on, record all reasons we can't fast clone.
693  IndexIntoFile::SortOrder sortOrder =
697  }
698  if (skipAnyEvents_) {
700  }
701  if (remainingEvents >= 0 && eventTree_.entries() > remainingEvents) {
703  }
704  if (remainingLumis >= 0 && lumiTree_.entries() > remainingLumis) {
706  }
707  if (duplicateChecker_ && !duplicateChecker_->checkDisabled() && !duplicateChecker_->noDuplicatesInFile()) {
709  }
710  }
711 
712  std::unique_ptr<FileBlock> RootFile::createFileBlock() const {
713  return std::make_unique<FileBlock>(fileFormatVersion(),
714  eventTree_.tree(),
716  lumiTree_.tree(),
718  runTree_.tree(),
719  runTree_.metaTree(),
722  file_,
724  modifiedIDs(),
725  branchChildren());
726  }
727 
728  std::string const& RootFile::newBranchToOldBranch(std::string const& newBranch) const {
729  std::map<std::string, std::string>::const_iterator it = newBranchToOldBranch_.find(newBranch);
730  if (it != newBranchToOldBranch_.end()) {
731  return it->second;
732  }
733  return newBranch;
734  }
735 
737 
740  }
741 
742  void RootFile::initAssociationsFromSecondary(std::vector<BranchID> const& associationsFromSecondary) {
743  thinnedAssociationsHelper_->initAssociationsFromSecondary(associationsFromSecondary,
745  }
746 
749  return false;
750  }
751 
752  if (eventSkipperByID_ && eventSkipperByID_->somethingToSkip()) {
753  // See first if the entire lumi or run is skipped, so we won't have to read the event Auxiliary in that case.
755  return true;
756  }
757 
758  // The Lumi is not skipped. If this is an event, see if the event is skipped.
762  return true;
763  }
764  }
765 
766  // Skip runs with no lumis if either lumisToSkip or lumisToProcess have been set to select lumis
768  // There are no lumis in this run, not even ones we will skip
770  return true;
771  }
772  // If we get here there are lumis in the run, check to see if we are skipping all of them
773  do {
775  return false;
776  }
777  } while (indexIntoFileIter_.skipLumiInRun());
778  return true;
779  }
780  }
781  return false;
782  }
783 
786  if (duplicateChecker_.get() == nullptr) {
787  return false;
788  }
790  return duplicateChecker_->isDuplicateAndCheckActive(indexIntoFileIter_.processHistoryIDIndex(),
793  eventAux_.id().event(),
794  file_);
795  }
796 
799  }
800 
803  EventNumber_t& event) {
804  // First, account for consecutive skipped entries.
805  while (skipThisEntry()) {
810  } else {
812  }
813  }
814  // OK, we have an entry that is not skipped.
816  if (entryType == IndexIntoFile::kEnd) {
817  return IndexIntoFile::kEnd;
818  }
819  if (entryType == IndexIntoFile::kRun) {
821  runHelper_->checkForNewRun(run, indexIntoFileIter_.peekAheadAtLumi());
822  return IndexIntoFile::kRun;
823  } else if (processingMode_ == InputSource::Runs) {
825  return getNextItemType(run, lumi, event);
826  }
827  if (entryType == IndexIntoFile::kLumi) {
830  return IndexIntoFile::kLumi;
833  return getNextItemType(run, lumi, event);
834  }
835  if (isDuplicateEvent()) {
837  return getNextItemType(run, lumi, event);
838  }
842  event = eventAux_.event();
843  return IndexIntoFile::kEvent;
844  }
845 
848  itr.advanceToEvent();
849  return itr.getEntryType() == IndexIntoFile::kEnd;
850  }
851 
854  int phIndex;
857  IndexIntoFile::EntryNumber_t eventEntry;
858  itr.skipEventBackward(phIndex, run, lumi, eventEntry);
859  itr.skipEventBackward(phIndex, run, lumi, eventEntry);
860  return eventEntry == IndexIntoFile::invalidEntry;
861  }
862 
863  namespace {
864  struct RunItem {
865  RunItem(ProcessHistoryID const& phid, RunNumber_t const& run) : phid_(phid), run_(run) {}
866  ProcessHistoryID phid_;
867  RunNumber_t run_;
868  };
869  struct RunItemSortByRun {
870  bool operator()(RunItem const& a, RunItem const& b) const { return a.run_ < b.run_; }
871  };
872  struct RunItemSortByRunPhid {
873  bool operator()(RunItem const& a, RunItem const& b) const {
874  return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.phid_ < b.phid_);
875  }
876  };
877  struct LumiItem {
878  LumiItem(ProcessHistoryID const& phid,
879  RunNumber_t const& run,
882  : phid_(phid),
883  run_(run),
884  lumi_(lumi),
885  firstEventEntry_(entry),
886  lastEventEntry_(entry == IndexIntoFile::invalidEntry ? IndexIntoFile::invalidEntry : entry + 1) {}
887  ProcessHistoryID phid_;
888  RunNumber_t run_;
890  IndexIntoFile::EntryNumber_t firstEventEntry_;
891  IndexIntoFile::EntryNumber_t lastEventEntry_;
892  };
893  struct LumiItemSortByRunLumi {
894  bool operator()(LumiItem const& a, LumiItem const& b) const {
895  return a.run_ < b.run_ || (!(b.run_ < a.run_) && a.lumi_ < b.lumi_);
896  }
897  };
898  struct LumiItemSortByRunLumiPhid {
899  bool operator()(LumiItem const& a, LumiItem const& b) const {
900  if (a.run_ < b.run_)
901  return true;
902  if (b.run_ < a.run_)
903  return false;
904  if (a.lumi_ < b.lumi_)
905  return true;
906  if (b.lumi_ < a.lumi_)
907  return false;
908  return a.phid_ < b.phid_;
909  }
910  };
911  } // namespace
912 
914  // This function is for backward compatibility.
915  // If reading a current format file, indexIntoFile_ is read from the input
916  // file and should always be there. Note that the algorithm below will work
917  // sometimes but often fail with the new format introduced in release 3_8_0.
918  // If it ever becomes necessary to rebuild IndexIntoFile from the new format,
919  // probably a separate function should be written to deal with the task.
920  // This is possible just not implemented yet.
921  assert(!fileFormatVersion().hasIndexIntoFile());
922 
923  typedef std::list<LumiItem> LumiList;
924  LumiList lumis; // (declare 1)
925 
926  typedef std::set<LuminosityBlockID> RunLumiSet;
927  RunLumiSet runLumiSet; // (declare 2)
928 
929  typedef std::list<RunItem> RunList;
930  RunList runs; // (declare 5)
931 
932  typedef std::set<RunNumber_t> RunSet;
933  RunSet runSet; // (declare 4)
934 
935  typedef std::set<RunItem, RunItemSortByRunPhid> RunItemSet;
936  RunItemSet runItemSet; // (declare 3)
937 
938  typedef std::map<RunNumber_t, ProcessHistoryID> PHIDMap;
939  PHIDMap phidMap;
940 
941  RunNumber_t prevRun = 0;
942  LuminosityBlockNumber_t prevLumi = 0;
943  ProcessHistoryID prevPhid;
944  bool iFirst = true;
945 
946  indexIntoFile_.unsortedEventNumbers().clear(); // should already be empty, just being careful
948 
949  // First, loop through the event tree.
950  while (eventTree_.next()) {
951  bool newRun = false;
952  bool newLumi = false;
955 
956  // Save the event numbers as we loop through the event auxiliary to avoid
957  // having to read through the event auxiliary again later. These event numbers
958  // are not actually used in this function, but could be needed elsewhere.
960 
961  ProcessHistoryID reducedPHID = processHistoryRegistry_->reducedProcessHistoryID(eventAux().processHistoryID());
962 
963  if (iFirst || prevPhid != reducedPHID || prevRun != eventAux().run()) {
964  iFirst = false;
965  newRun = newLumi = true;
966  } else if (prevLumi != eventAux().luminosityBlock()) {
967  newLumi = true;
968  }
969  prevPhid = reducedPHID;
970  prevRun = eventAux().run();
971  prevLumi = eventAux().luminosityBlock();
972  if (newLumi) {
973  lumis.emplace_back(
974  reducedPHID, eventAux().run(), eventAux().luminosityBlock(), eventTree_.entryNumber()); // (insert 1)
975  runLumiSet.insert(LuminosityBlockID(eventAux().run(), eventAux().luminosityBlock())); // (insert 2)
976  } else {
977  LumiItem& currentLumi = lumis.back();
978  assert(currentLumi.lastEventEntry_ == eventTree_.entryNumber());
979  ++currentLumi.lastEventEntry_;
980  }
981  if (newRun) {
982  // Insert run in list if it is not already there.
983  RunItem item(reducedPHID, eventAux().run());
984  if (runItemSet.insert(item).second) { // (check 3, insert 3)
985  runs.push_back(std::move(item)); // (insert 5)
986  runSet.insert(eventAux().run()); // (insert 4)
987  phidMap.insert(std::make_pair(eventAux().run(), reducedPHID));
988  }
989  }
990  }
991  // now clean up.
995 
996  // Loop over run entries and fill information.
997 
998  typedef std::map<RunNumber_t, IndexIntoFile::EntryNumber_t> RunMap;
999  RunMap runMap; // (declare 11)
1000 
1001  typedef std::vector<RunItem> RunVector;
1002  RunVector emptyRuns; // (declare 12)
1003 
1004  if (runTree_.isValid()) {
1005  while (runTree_.next()) {
1006  // Note: adjacent duplicates will be skipped without an explicit check.
1007 
1008  std::shared_ptr<RunAuxiliary> runAux = fillRunAuxiliary();
1009  ProcessHistoryID reducedPHID = processHistoryRegistry_->reducedProcessHistoryID(runAux->processHistoryID());
1010 
1011  if (runSet.insert(runAux->run()).second) { // (check 4, insert 4)
1012  // This run was not associated with any events.
1013  emptyRuns.emplace_back(reducedPHID, runAux->run()); // (insert 12)
1014  }
1015  runMap.insert(std::make_pair(runAux->run(), runTree_.entryNumber())); // (insert 11)
1016  phidMap.insert(std::make_pair(runAux->run(), reducedPHID));
1017  }
1018  // now clean up.
1020  }
1021 
1022  // Insert the ordered empty runs into the run list.
1023  RunItemSortByRun runItemSortByRun;
1024  stable_sort_all(emptyRuns, runItemSortByRun);
1025 
1026  RunList::iterator itRuns = runs.begin(), endRuns = runs.end();
1027  for (auto const& emptyRun : emptyRuns) {
1028  for (; itRuns != endRuns; ++itRuns) {
1029  if (runItemSortByRun(emptyRun, *itRuns)) {
1030  break;
1031  }
1032  }
1033  runs.insert(itRuns, emptyRun);
1034  }
1035 
1036  // Loop over luminosity block entries and fill information.
1037 
1038  typedef std::vector<LumiItem> LumiVector;
1039  LumiVector emptyLumis; // (declare 7)
1040 
1041  typedef std::map<LuminosityBlockID, IndexIntoFile::EntryNumber_t> RunLumiMap;
1042  RunLumiMap runLumiMap; // (declare 6)
1043 
1044  if (lumiTree_.isValid()) {
1045  while (lumiTree_.next()) {
1046  // Note: adjacent duplicates will be skipped without an explicit check.
1047  std::shared_ptr<LuminosityBlockAuxiliary> lumiAux = fillLumiAuxiliary();
1048  LuminosityBlockID lumiID = LuminosityBlockID(lumiAux->run(), lumiAux->luminosityBlock());
1049  if (runLumiSet.insert(lumiID).second) { // (check 2, insert 2)
1050  // This lumi was not associated with any events.
1051  // Use the process history ID from the corresponding run. In cases of practical
1052  // importance, this should be the correct process history ID, but it is possible
1053  // to construct files where this is not the correct process history ID ...
1054  PHIDMap::const_iterator iPhidMap = phidMap.find(lumiAux->run());
1055  assert(iPhidMap != phidMap.end());
1056  emptyLumis.emplace_back(
1057  iPhidMap->second, lumiAux->run(), lumiAux->luminosityBlock(), IndexIntoFile::invalidEntry); // (insert 7)
1058  }
1059  runLumiMap.insert(std::make_pair(lumiID, lumiTree_.entryNumber()));
1060  }
1061  // now clean up.
1063  }
1064 
1065  // Insert the ordered empty lumis into the lumi list.
1066  LumiItemSortByRunLumi lumiItemSortByRunLumi;
1067  stable_sort_all(emptyLumis, lumiItemSortByRunLumi);
1068 
1069  LumiList::iterator itLumis = lumis.begin(), endLumis = lumis.end();
1070  for (auto const& emptyLumi : emptyLumis) {
1071  for (; itLumis != endLumis; ++itLumis) {
1072  if (lumiItemSortByRunLumi(emptyLumi, *itLumis)) {
1073  break;
1074  }
1075  }
1076  lumis.insert(itLumis, emptyLumi);
1077  }
1078 
1079  // Create a map of RunItems that gives the order of first appearance in the list.
1080  // Also fill in the vector of process history IDs
1081  typedef std::map<RunItem, int, RunItemSortByRunPhid> RunCountMap;
1082  RunCountMap runCountMap; // Declare (17)
1083  std::vector<ProcessHistoryID>& phids = indexIntoFile_.setProcessHistoryIDs();
1084  assert(phids.empty());
1085  std::vector<IndexIntoFile::RunOrLumiEntry>& entries = indexIntoFile_.setRunOrLumiEntries();
1086  assert(entries.empty());
1087  int rcount = 0;
1088  for (auto& run : runs) {
1089  RunCountMap::const_iterator countMapItem = runCountMap.find(run);
1090  if (countMapItem == runCountMap.end()) {
1091  countMapItem = runCountMap.insert(std::make_pair(run, rcount)).first; // Insert (17)
1092  assert(countMapItem != runCountMap.end());
1093  ++rcount;
1094  }
1095  std::vector<ProcessHistoryID>::const_iterator phidItem = find_in_all(phids, run.phid_);
1096  if (phidItem == phids.end()) {
1097  phids.push_back(run.phid_);
1098  phidItem = phids.end() - 1;
1099  }
1100  entries.emplace_back(countMapItem->second, // use (17)
1102  runMap[run.run_], // use (11)
1103  phidItem - phids.begin(),
1104  run.run_,
1105  0U,
1108  }
1109 
1110  // Create a map of LumiItems that gives the order of first appearance in the list.
1111  typedef std::map<LumiItem, int, LumiItemSortByRunLumiPhid> LumiCountMap;
1112  LumiCountMap lumiCountMap; // Declare (19)
1113  int lcount = 0;
1114  for (auto& lumi : lumis) {
1115  RunCountMap::const_iterator runCountMapItem = runCountMap.find(RunItem(lumi.phid_, lumi.run_));
1116  assert(runCountMapItem != runCountMap.end());
1117  LumiCountMap::const_iterator countMapItem = lumiCountMap.find(lumi);
1118  if (countMapItem == lumiCountMap.end()) {
1119  countMapItem = lumiCountMap.insert(std::make_pair(lumi, lcount)).first; // Insert (17)
1120  assert(countMapItem != lumiCountMap.end());
1121  ++lcount;
1122  }
1123  std::vector<ProcessHistoryID>::const_iterator phidItem = find_in_all(phids, lumi.phid_);
1124  assert(phidItem != phids.end());
1125  entries.emplace_back(runCountMapItem->second,
1126  countMapItem->second,
1127  runLumiMap[LuminosityBlockID(lumi.run_, lumi.lumi_)],
1128  phidItem - phids.begin(),
1129  lumi.run_,
1130  lumi.lumi_,
1131  lumi.firstEventEntry_,
1132  lumi.lastEventEntry_);
1133  }
1134  stable_sort_all(entries);
1135  }
1136 
1137  void RootFile::validateFile(InputType inputType, bool usingGoToEvent) {
1138  if (!fid_.isValid()) {
1140  }
1141  if (!eventTree_.isValid()) {
1142  throw Exception(errors::EventCorruption) << "'Events' tree is corrupted or not present\n"
1143  << "in the input file.\n";
1144  }
1145  if (enforceGUIDInFileName_) {
1146  auto guidFromName = stemFromPath(file_);
1147  if (guidFromName != fid_.fid()) {
1149  << "GUID " << guidFromName << " extracted from file name " << file_
1150  << " is inconsistent with the GUID read from the file " << fid_.fid();
1151  }
1152  }
1153 
1154  if (fileFormatVersion().hasIndexIntoFile()) {
1155  if (runTree().entries() > 0) {
1157  }
1159  if (daqProvenanceHelper_) {
1160  std::vector<ProcessHistoryID>& phidVec = indexIntoFile_.setProcessHistoryIDs();
1161  for (auto& phid : phidVec) {
1162  phid = daqProvenanceHelper_->mapProcessHistoryID(phid);
1163  }
1164  }
1166  }
1167  } else {
1170  }
1171 
1175  std::shared_ptr<IndexIntoFile::EventFinder>(std::make_shared<RootFileEventFinder>(eventTree_)));
1176  // We fill the event numbers explicitly if we need to find events in closed files,
1177  // such as for secondary files (or secondary sources) or if duplicate checking across files.
1178  bool needEventNumbers = false;
1179  bool needIndexesForDuplicateChecker =
1180  duplicateChecker_ && duplicateChecker_->checkingAllFiles() && !duplicateChecker_->checkDisabled();
1181  if (inputType != InputType::Primary || needIndexesForDuplicateChecker || usingGoToEvent) {
1182  needEventNumbers = true;
1183  }
1184  bool needEventEntries = false;
1185  if (inputType != InputType::Primary || !noEventSort_) {
1186  // We need event entries for sorting or for secondary files or sources.
1187  needEventEntries = true;
1188  }
1189  indexIntoFile_.fillEventNumbersOrEntries(needEventNumbers, needEventEntries);
1190  }
1191 
1192  void RootFile::reportOpened(std::string const& inputType) {
1193  // Report file opened.
1194  std::string const label = "source";
1195  std::string moduleName = "PoolSource";
1196  filePtr_->inputFileOpened(logicalFile_, inputType, moduleName, label, fid_.fid(), eventTree_.branchNames());
1197  }
1198 
1200  // Just to play it safe, zero all pointers to objects in the InputFile to be closed.
1201  eventHistoryTree_ = nullptr;
1202  for (auto& treePointer : treePointers_) {
1203  treePointer->close();
1204  treePointer = nullptr;
1205  }
1206  filePtr_->Close();
1207  filePtr_ = nullptr; // propagate_const<T> has no reset() function
1208  }
1209 
1212  // Already read.
1213  return;
1214  }
1215  if (fileFormatVersion().newAuxiliary()) {
1216  EventAuxiliary* pEvAux = &eventAux_;
1218  } else {
1219  // for backward compatibility.
1221  EventAux* pEvAux = &eventAux;
1222  eventTree_.fillAux<EventAux>(pEvAux);
1224  }
1226  }
1227 
1229  if (!eventTree_.current(entry)) {
1230  return false;
1231  }
1234  return true;
1235  }
1236 
1238  // We could consider doing delayed reading, but because we have to
1239  // store this History object in a different tree than the event
1240  // data tree, this is too hard to do in this first version.
1241 
1242  if (fileFormatVersion().eventHistoryBranch()) {
1243  // Lumi block number was not in EventID for the relevant releases.
1244  EventID id(eventAux().id().run(), 0, eventAux().id().event());
1245  if (eventProcessHistoryIter_->eventID() != id) {
1248  assert(eventProcessHistoryIter_->eventID() == id);
1249  }
1252  } else if (fileFormatVersion().eventHistoryTree()) {
1253  // for backward compatibility.
1254  History* pHistory = history_.get();
1255  TBranch* eventHistoryBranch = eventHistoryTree_->GetBranch(poolNames::eventHistoryBranchName().c_str());
1256  if (!eventHistoryBranch) {
1257  throw Exception(errors::EventCorruption) << "Failed to find history branch in event history tree.\n";
1258  }
1259  eventHistoryBranch->SetAddress(&pHistory);
1261  eventAux_.setProcessHistoryID(history_->processHistoryID());
1262  eventSelectionIDs_.swap(history_->eventSelectionIDs());
1263  branchListIndexes_.swap(history_->branchListIndexes());
1264  } else if (fileFormatVersion().noMetaDataTrees()) {
1265  // Current format
1267  TBranch* eventSelectionIDBranch = eventTree_.tree()->GetBranch(poolNames::eventSelectionsBranchName().c_str());
1268  assert(eventSelectionIDBranch != nullptr);
1269  eventTree_.fillBranchEntry(eventSelectionIDBranch, pESV);
1271  TBranch* branchListIndexesBranch = eventTree_.tree()->GetBranch(poolNames::branchListIndexesBranchName().c_str());
1272  assert(branchListIndexesBranch != nullptr);
1273  eventTree_.fillBranchEntry(branchListIndexesBranch, pBLI);
1274  }
1275  if (provenanceAdaptor_) {
1276  eventAux_.setProcessHistoryID(provenanceAdaptor_->convertID(eventAux().processHistoryID()));
1277  for (auto& esID : eventSelectionIDs_) {
1278  esID = provenanceAdaptor_->convertID(esID);
1279  }
1280  }
1281  if (daqProvenanceHelper_) {
1283  }
1285  // old format. branchListIndexes_ must be filled in from the ProvenanceAdaptor.
1286  provenanceAdaptor_->branchListIndexes(branchListIndexes_);
1287  }
1288  if (branchIDListHelper_) {
1289  branchIDListHelper_->fixBranchListIndexes(branchListIndexes_);
1290  }
1291  }
1292 
1293  std::shared_ptr<LuminosityBlockAuxiliary> RootFile::fillLumiAuxiliary() {
1294  auto lumiAuxiliary = std::make_shared<LuminosityBlockAuxiliary>();
1295  if (fileFormatVersion().newAuxiliary()) {
1296  LuminosityBlockAuxiliary* pLumiAux = lumiAuxiliary.get();
1298  } else {
1299  LuminosityBlockAux lumiAux;
1300  LuminosityBlockAux* pLumiAux = &lumiAux;
1302  conversion(lumiAux, *lumiAuxiliary);
1303  }
1304  if (provenanceAdaptor_) {
1305  lumiAuxiliary->setProcessHistoryID(provenanceAdaptor_->convertID(lumiAuxiliary->processHistoryID()));
1306  }
1307  if (daqProvenanceHelper_) {
1308  lumiAuxiliary->setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(lumiAuxiliary->processHistoryID()));
1309  }
1310  if (lumiAuxiliary->luminosityBlock() == 0 && !fileFormatVersion().runsAndLumis()) {
1311  lumiAuxiliary->id() = LuminosityBlockID(RunNumber_t(1), LuminosityBlockNumber_t(1));
1312  }
1313  return lumiAuxiliary;
1314  }
1315 
1316  std::shared_ptr<RunAuxiliary> RootFile::fillRunAuxiliary() {
1317  auto runAuxiliary = std::make_shared<RunAuxiliary>();
1318  if (fileFormatVersion().newAuxiliary()) {
1319  RunAuxiliary* pRunAux = runAuxiliary.get();
1320  runTree_.fillAux<RunAuxiliary>(pRunAux);
1321  } else {
1322  RunAux runAux;
1323  RunAux* pRunAux = &runAux;
1324  runTree_.fillAux<RunAux>(pRunAux);
1325  conversion(runAux, *runAuxiliary);
1326  }
1327  if (provenanceAdaptor_) {
1328  runAuxiliary->setProcessHistoryID(provenanceAdaptor_->convertID(runAuxiliary->processHistoryID()));
1329  }
1330  if (daqProvenanceHelper_) {
1331  runAuxiliary->setProcessHistoryID(daqProvenanceHelper_->mapProcessHistoryID(runAuxiliary->processHistoryID()));
1332  }
1333  return runAuxiliary;
1334  }
1335 
1337  while (offset > 0 && indexIntoFileIter_ != indexIntoFileEnd_) {
1338  int phIndexOfSkippedEvent = IndexIntoFile::invalidIndex;
1339  RunNumber_t runOfSkippedEvent = IndexIntoFile::invalidRun;
1342 
1344  phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, skippedEventEntry);
1345 
1346  // At the end of the file and there were no more events to skip
1347  if (skippedEventEntry == IndexIntoFile::invalidEntry)
1348  break;
1349 
1350  if (eventSkipperByID_ && eventSkipperByID_->somethingToSkip()) {
1351  fillEventAuxiliary(skippedEventEntry);
1352  if (eventSkipperByID_->skipIt(runOfSkippedEvent, lumiOfSkippedEvent, eventAux_.id().event())) {
1353  continue;
1354  }
1355  }
1356  if (duplicateChecker_ && !duplicateChecker_->checkDisabled() && !duplicateChecker_->noDuplicatesInFile()) {
1357  fillEventAuxiliary(skippedEventEntry);
1358  if (duplicateChecker_->isDuplicateAndCheckActive(
1359  phIndexOfSkippedEvent, runOfSkippedEvent, lumiOfSkippedEvent, eventAux_.id().event(), file_)) {
1360  continue;
1361  }
1362  }
1363  --offset;
1364  }
1365 
1366  while (offset < 0) {
1367  if (duplicateChecker_) {
1368  duplicateChecker_->disable();
1369  }
1370 
1371  int phIndexOfEvent = IndexIntoFile::invalidIndex;
1375 
1376  indexIntoFileIter_.skipEventBackward(phIndexOfEvent, runOfEvent, lumiOfEvent, eventEntry);
1377 
1378  if (eventEntry == IndexIntoFile::invalidEntry)
1379  break;
1380 
1381  if (eventSkipperByID_ && eventSkipperByID_->somethingToSkip()) {
1382  fillEventAuxiliary(eventEntry);
1383  if (eventSkipperByID_->skipIt(runOfEvent, lumiOfEvent, eventAux_.id().event())) {
1384  continue;
1385  }
1386  }
1387  ++offset;
1388  }
1390  }
1391 
1392  bool RootFile::goToEvent(EventID const& eventID) {
1394 
1395  if (duplicateChecker_) {
1396  duplicateChecker_->disable();
1397  }
1398 
1400  if (noEventSort_)
1402 
1405 
1406  if (iter == indexIntoFile_.end(sortOrder)) {
1407  return false;
1408  }
1409  indexIntoFileIter_ = iter;
1410  return true;
1411  }
1412 
1413  // readEvent() is responsible for creating, and setting up, the
1414  // EventPrincipal.
1415  //
1416  // 1. create an EventPrincipal with a unique EventID
1417  // 2. For each entry in the provenance, put in one ProductResolver,
1418  // holding the Provenance for the corresponding EDProduct.
1419  // 3. set up the the EventPrincipal to know about this ProductResolver.
1420  //
1421  // We do *not* create the EDProduct instance (the equivalent of reading
1422  // the branch containing this EDProduct. That will be done by the Delayed Reader,
1423  // when it is asked to do so.
1424  //
1428  // read the event auxiliary if not alrady read.
1430 
1431  // read the event
1432  readCurrentEvent(principal);
1433 
1434  runHelper_->checkRunConsistency(eventAux().run(), indexIntoFileIter_.run());
1435  runHelper_->checkLumiConsistency(eventAux().luminosityBlock(), indexIntoFileIter_.lumi());
1436 
1437  // If this next assert shows up in performance profiling or significantly affects memory, then these three lines should be deleted.
1438  // The IndexIntoFile should guarantee that it never fails.
1440  ? *daqProvenanceHelper_->oldProcessHistoryID()
1441  : eventAux().processHistoryID());
1442  ProcessHistoryID const& reducedPHID = processHistoryRegistry_->reducedProcessHistoryID(idToCheck);
1444 
1446  }
1447 
1448  // Reads event at the current entry in the event tree
1450  if (!eventTree_.current()) {
1451  return false;
1452  }
1454  if (!fileFormatVersion().lumiInEventID()) {
1455  //ugly, but will disappear when the backward compatibility is done with schema evolution.
1456  const_cast<EventID&>(eventAux_.id()).setLuminosityBlockNumber(eventAux_.oldLuminosityBlock());
1458  }
1459  fillEventHistory();
1460  runHelper_->overrideRunNumber(eventAux_.id(), eventAux().isRealData());
1461 
1462  // We're not done ... so prepare the EventPrincipal
1464  auto history = processHistoryRegistry_->getMapped(eventAux().processHistoryID());
1465  principal.fillEventPrincipal(eventAux(),
1466  history,
1469  *(makeProductProvenanceRetriever(principal.streamID().value())),
1471 
1472  // report event read from file
1473  filePtr_->eventReadFromFile();
1474  return true;
1475  }
1476 
1478 
1479  std::shared_ptr<RunAuxiliary> RootFile::readRunAuxiliary_() {
1480  if (runHelper_->fakeNewRun()) {
1481  auto runAuxiliary = std::make_shared<RunAuxiliary>(*savedRunAuxiliary());
1482  runHelper_->overrideRunNumber(runAuxiliary->id());
1483  return runAuxiliary;
1484  }
1487 
1488  // Begin code for backward compatibility before the existence of run trees.
1489  if (!runTree_.isValid()) {
1490  // prior to the support of run trees.
1491  // RunAuxiliary did not contain a valid timestamp. Take it from the next event.
1493  assert(eventEntry != IndexIntoFile::invalidEntry);
1494  assert(eventTree_.current(eventEntry));
1495  fillEventAuxiliary(eventEntry);
1496 
1498  runHelper_->overrideRunNumber(run);
1499  savedRunAuxiliary_ = std::make_shared<RunAuxiliary>(run.run(), eventAux().time(), Timestamp::invalidTimestamp());
1500  return savedRunAuxiliary();
1501  }
1502  // End code for backward compatibility before the existence of run trees.
1504  std::shared_ptr<RunAuxiliary> runAuxiliary = fillRunAuxiliary();
1505  assert(runAuxiliary->run() == indexIntoFileIter_.run());
1506  runHelper_->overrideRunNumber(runAuxiliary->id());
1507  filePtr_->reportInputRunNumber(runAuxiliary->run());
1508  // If RunAuxiliary did not contain a valid begin timestamp, invalidate any end timestamp.
1509  if (runAuxiliary->beginTime() == Timestamp::invalidTimestamp()) {
1510  runAuxiliary->setEndTime(Timestamp::invalidTimestamp());
1511  }
1512 
1513  // If RunAuxiliary did not contain a valid timestamp, or if this an old format file from
1514  // when the Run's ProcessHistory included only processes where products were added to the Run itself,
1515  // we attempt to read the first event in the run to get appropriate info.
1516  if (runAuxiliary->beginTime() == Timestamp::invalidTimestamp() ||
1519  // If we have a valid event, use its information.
1520  if (eventEntry != IndexIntoFile::invalidEntry) {
1521  assert(eventTree_.current(eventEntry));
1522  fillEventAuxiliary(eventEntry);
1523 
1524  // RunAuxiliary did not contain a valid timestamp. Take it from the next event in this run if there is one.
1525  if (runAuxiliary->beginTime() == Timestamp::invalidTimestamp()) {
1526  runAuxiliary->setBeginTime(eventAux().time());
1527  }
1528 
1529  // For backwards compatibility when the Run's ProcessHistory included only processes where products were added to the
1530  // Run, and then the Run and Event auxiliaries could be different. Use the event ProcessHistoryID if there is one. It should
1531  // almost always be correct by the current definition (processes included if any products are added. This makes the run, lumi,
1532  // and event ProcessHistory's always be the same if no file merging occurs).
1533  if (!fileFormatVersion().processHistorySameWithinRun()) {
1534  fillEventHistory();
1535  runAuxiliary->setProcessHistoryID(eventAux().processHistoryID());
1536  }
1537  }
1538  }
1539  savedRunAuxiliary_ = runAuxiliary;
1540  return runAuxiliary;
1541  }
1542 
1543  void RootFile::readRun_(RunPrincipal& runPrincipal) {
1544  MergeableRunProductMetadata* mergeableRunProductMetadata = nullptr;
1545  if (inputType_ == InputType::Primary) {
1546  mergeableRunProductMetadata = runPrincipal.mergeableRunProductMetadata();
1547  RootTree::EntryNumber const& entryNumber = runTree_.entryNumber();
1548  assert(entryNumber >= 0);
1549  mergeableRunProductMetadata->readRun(
1551  }
1552 
1553  if (!runHelper_->fakeNewRun()) {
1557  }
1558  // Begin code for backward compatibility before the existence of run trees.
1559  if (!runTree_.isValid()) {
1560  return;
1561  }
1562  // End code for backward compatibility before the existence of run trees.
1563  // NOTE: we use 0 for the index since do not do delayed reads for RunPrincipals
1566  // Read in all the products now.
1567  runPrincipal.readAllFromSourceAndMergeImmediately(mergeableRunProductMetadata);
1568  }
1569 
1570  std::shared_ptr<LuminosityBlockAuxiliary> RootFile::readLuminosityBlockAuxiliary_() {
1573  // Begin code for backward compatibility before the existence of lumi trees.
1574  if (!lumiTree_.isValid()) {
1576  assert(eventEntry != IndexIntoFile::invalidEntry);
1577  assert(eventTree_.current(eventEntry));
1578  fillEventAuxiliary(eventEntry);
1579 
1581  runHelper_->overrideRunNumber(lumi);
1582  return std::make_shared<LuminosityBlockAuxiliary>(
1583  lumi.run(), lumi.luminosityBlock(), eventAux().time(), Timestamp::invalidTimestamp());
1584  }
1585  // End code for backward compatibility before the existence of lumi trees.
1587  std::shared_ptr<LuminosityBlockAuxiliary> lumiAuxiliary = fillLumiAuxiliary();
1588  assert(lumiAuxiliary->run() == indexIntoFileIter_.run());
1589  assert(lumiAuxiliary->luminosityBlock() == indexIntoFileIter_.lumi());
1590  runHelper_->overrideRunNumber(lumiAuxiliary->id());
1591  filePtr_->reportInputLumiSection(lumiAuxiliary->run(), lumiAuxiliary->luminosityBlock());
1592  if (lumiAuxiliary->beginTime() == Timestamp::invalidTimestamp()) {
1594  if (eventEntry != IndexIntoFile::invalidEntry) {
1595  assert(eventTree_.current(eventEntry));
1596  fillEventAuxiliary(eventEntry);
1597 
1598  lumiAuxiliary->setBeginTime(eventAux().time());
1599  }
1600  lumiAuxiliary->setEndTime(Timestamp::invalidTimestamp());
1601  }
1602  if (!fileFormatVersion().processHistorySameWithinRun() && savedRunAuxiliary_) {
1603  lumiAuxiliary->setProcessHistoryID(savedRunAuxiliary_->processHistoryID());
1604  }
1605  return lumiAuxiliary;
1606  }
1607 
1611  // Begin code for backward compatibility before the existence of lumi trees.
1612  if (!lumiTree_.isValid()) {
1614  return;
1615  }
1616  // End code for backward compatibility before the existence of lumi trees.
1618  // NOTE: we use 0 for the index since do not do delayed reads for LuminosityBlockPrincipals
1620  auto history = processHistoryRegistry_->getMapped(lumiPrincipal.aux().processHistoryID());
1622  // Read in all the products now.
1623  lumiPrincipal.readAllFromSourceAndMergeImmediately();
1625  }
1626 
1630  return false;
1632  return true;
1633  }
1634 
1638  return false;
1640  return true;
1641  }
1642 
1646  return false;
1648  return true;
1649  }
1650 
1654  }
1657  return false;
1658  if (run != indexIntoFileIter_.run())
1659  return false;
1660  if (lumi != indexIntoFileIter_.lumi())
1661  return false;
1663  return true;
1664  }
1665 
1667  // Read in the event history tree, if we have one...
1668  if (fileFormatVersion().eventHistoryTree()) {
1669  history_ = std::make_unique<History>(); // propagate_const<T> has no reset() function
1670  eventHistoryTree_ = dynamic_cast<TTree*>(filePtr_->Get(poolNames::eventHistoryTreeName().c_str()));
1671  if (!eventHistoryTree_) {
1672  throw Exception(errors::EventCorruption) << "Failed to find the event history tree.\n";
1673  }
1674  }
1675  }
1676 
1678  std::vector<std::shared_ptr<IndexIntoFile>> const& indexesIntoFiles,
1679  std::vector<std::shared_ptr<IndexIntoFile>>::size_type currentIndexIntoFile) {
1680  if (duplicateChecker_ && !duplicateChecker_->checkDisabled()) {
1681  if (eventTree_.next()) {
1683  duplicateChecker_->inputFileOpened(
1684  eventAux().isRealData(), indexIntoFile_, indexesIntoFiles, currentIndexIntoFile);
1685  }
1687  }
1688  }
1689 
1690  void RootFile::markBranchToBeDropped(bool dropDescendants,
1691  BranchDescription const& branch,
1692  std::set<BranchID>& branchesToDrop,
1693  std::map<BranchID, BranchID> const& droppedToKeptAlias) const {
1694  if (dropDescendants) {
1695  branchChildren_->appendToDescendants(branch, branchesToDrop, droppedToKeptAlias);
1696  } else {
1697  branchesToDrop.insert(branch.branchID());
1698  }
1699  }
1700 
1702  ProductSelectorRules const& rules,
1703  bool dropDescendants,
1704  InputType inputType) {
1705  // This is the selector for drop on input.
1706  ProductSelector productSelector;
1707  productSelector.initialize(rules, reg.allBranchDescriptions());
1708 
1709  std::vector<BranchDescription const*> associationDescriptions;
1710 
1712  // Do drop on input. On the first pass, just fill in a set of branches to be dropped.
1713  std::set<BranchID> branchesToDrop;
1714  std::map<BranchID, BranchID> droppedToKeptAlias;
1715  for (auto const& product : prodList) {
1716  BranchDescription const& prod = product.second;
1717  if (prod.branchID() != prod.originalBranchID() && prod.present()) {
1718  droppedToKeptAlias[prod.originalBranchID()] = prod.branchID();
1719  }
1720  }
1721  for (auto const& product : prodList) {
1722  BranchDescription const& prod = product.second;
1723  // Special handling for ThinnedAssociations
1724  if (prod.unwrappedType() == typeid(ThinnedAssociation) && prod.present()) {
1725  if (inputType != InputType::SecondarySource) {
1726  associationDescriptions.push_back(&prod);
1727  } else {
1728  markBranchToBeDropped(dropDescendants, prod, branchesToDrop, droppedToKeptAlias);
1729  }
1730  } else if (!productSelector.selected(prod)) {
1731  markBranchToBeDropped(dropDescendants, prod, branchesToDrop, droppedToKeptAlias);
1732  }
1733  }
1734 
1735  if (inputType != InputType::SecondarySource) {
1736  // Decide whether to keep the thinned associations and corresponding
1737  // entries in the helper. For secondary source they are all dropped,
1738  // but in other cases we look for thinned collections the associations
1739  // redirect a Ref or Ptr to when dereferencing them.
1740 
1741  // Need a list of kept products in order to determine which thinned associations
1742  // are kept.
1743  std::set<BranchID> keptProductsInEvent;
1744  for (auto const& product : prodList) {
1745  BranchDescription const& prod = product.second;
1746  if (branchesToDrop.find(prod.branchID()) == branchesToDrop.end() && prod.present() &&
1747  prod.branchType() == InEvent) {
1748  keptProductsInEvent.insert(prod.branchID());
1749  }
1750  }
1751 
1752  // Decide which ThinnedAssociations to keep and store the decision in keepAssociation
1753  std::map<BranchID, bool> keepAssociation;
1754  fileThinnedAssociationsHelper_->selectAssociationProducts(
1755  associationDescriptions, keptProductsInEvent, keepAssociation);
1756 
1757  for (auto association : associationDescriptions) {
1758  if (!keepAssociation[association->branchID()]) {
1759  markBranchToBeDropped(dropDescendants, *association, branchesToDrop, droppedToKeptAlias);
1760  }
1761  }
1762 
1763  // Also delete the dropped associations from the ThinnedAssociationsHelper
1764  auto temp = std::make_unique<ThinnedAssociationsHelper>();
1765  for (auto const& associationBranches : fileThinnedAssociationsHelper_->data()) {
1766  auto iter = keepAssociation.find(associationBranches.association());
1767  if (iter != keepAssociation.end() && iter->second) {
1768  temp->addAssociation(associationBranches);
1769  }
1770  }
1771  // propagate_const<T> has no reset() function
1772  fileThinnedAssociationsHelper_ = std::unique_ptr<ThinnedAssociationsHelper>(temp.release());
1773  }
1774 
1775  // On this pass, actually drop the branches.
1776  std::set<BranchID>::const_iterator branchesToDropEnd = branchesToDrop.end();
1777  for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1778  BranchDescription const& prod = it->second;
1779  bool drop = branchesToDrop.find(prod.branchID()) != branchesToDropEnd;
1780  if (drop) {
1781  if (!prod.dropped()) {
1782  if (productSelector.selected(prod) && prod.unwrappedType() != typeid(ThinnedAssociation)) {
1783  LogWarning("RootFile") << "Branch '" << prod.branchName() << "' is being dropped from the input\n"
1784  << "of file '" << file_ << "' because it is dependent on a branch\n"
1785  << "that was explicitly dropped.\n";
1786  }
1787  treePointers_[prod.branchType()]->dropBranch(newBranchToOldBranch(prod.branchName()));
1788  hasNewlyDroppedBranch_[prod.branchType()] = true;
1789  }
1790  ProductRegistry::ProductList::iterator icopy = it;
1791  ++it;
1792  prodList.erase(icopy);
1793  } else {
1794  ++it;
1795  }
1796  }
1797 
1798  // Drop on input mergeable run and lumi products, this needs to be invoked for secondary file input
1799  if (inputType == InputType::SecondaryFile) {
1800  TString tString;
1801  for (ProductRegistry::ProductList::iterator it = prodList.begin(), itEnd = prodList.end(); it != itEnd;) {
1802  BranchDescription const& prod = it->second;
1803  if (prod.branchType() != InEvent) {
1804  TClass* cp = prod.wrappedType().getClass();
1805  void* p = cp->New();
1806  int offset = cp->GetBaseClassOffset(edProductClass_);
1807  std::unique_ptr<WrapperBase> edp = getWrapperBasePtr(p, offset);
1808  if (edp->isMergeable()) {
1809  treePointers_[prod.branchType()]->dropBranch(newBranchToOldBranch(prod.branchName()));
1810  ProductRegistry::ProductList::iterator icopy = it;
1811  ++it;
1812  prodList.erase(icopy);
1813  } else {
1814  ++it;
1815  }
1816  } else
1817  ++it;
1818  }
1819  }
1820  }
1821 
1823  signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* preEventReadSource,
1824  signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)> const* postEventReadSource) {
1825  eventTree_.setSignals(preEventReadSource, postEventReadSource);
1826  }
1827 
1828  std::unique_ptr<MakeProvenanceReader> RootFile::makeProvenanceReaderMaker(InputType inputType) {
1830  readParentageTree(inputType);
1831  return std::make_unique<MakeReducedProvenanceReader>(parentageIDLookup_);
1832  } else if (fileFormatVersion_.splitProductIDs()) {
1833  readParentageTree(inputType);
1834  return std::make_unique<MakeFullProvenanceReader>();
1835  } else if (fileFormatVersion_.perEventProductIDs()) {
1836  auto entryDescriptionMap = std::make_unique<EntryDescriptionMap>();
1837  readEntryDescriptionTree(*entryDescriptionMap, inputType);
1838  return std::make_unique<MakeOldProvenanceReader>(std::move(entryDescriptionMap));
1839  } else {
1840  return std::make_unique<MakeDummyProvenanceReader>();
1841  }
1842  }
1843 
1844  std::shared_ptr<ProductProvenanceRetriever> RootFile::makeProductProvenanceRetriever(unsigned int iStreamID) {
1845  if (eventProductProvenanceRetrievers_.size() <= iStreamID) {
1846  eventProductProvenanceRetrievers_.resize(iStreamID + 1);
1847  }
1848  if (!eventProductProvenanceRetrievers_[iStreamID]) {
1849  // propagate_const<T> has no reset() function
1850  eventProductProvenanceRetrievers_[iStreamID] = std::make_shared<ProductProvenanceRetriever>(
1852  }
1853  eventProductProvenanceRetrievers_[iStreamID]->reset();
1854  return eventProductProvenanceRetriever(iStreamID);
1855  }
1856 
1858  public:
1859  ReducedProvenanceReader(RootTree* iRootTree,
1860  std::vector<ParentageID> const& iParentageIDLookup,
1861  DaqProvenanceHelper const* daqProvenanceHelper);
1862 
1863  std::set<ProductProvenance> readProvenance(unsigned int) const override;
1864 
1865  private:
1867  ModuleCallingContext const* moduleCallingContext,
1868  unsigned int transitionIndex,
1869  std::atomic<const std::set<ProductProvenance>*>& writeTo) const override;
1870 
1875  std::vector<ParentageID> const& parentageIDLookup_;
1877  std::shared_ptr<std::recursive_mutex> mutex_;
1879  };
1880 
1882  std::vector<ParentageID> const& iParentageIDLookup,
1883  DaqProvenanceHelper const* daqProvenanceHelper)
1885  rootTree_(iRootTree),
1886  pProvVector_(&provVector_),
1887  parentageIDLookup_(iParentageIDLookup),
1888  daqProvenanceHelper_(daqProvenanceHelper),
1889  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
1890  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {
1891  provBranch_ =
1892  rootTree_->tree()->GetBranch(BranchTypeToProductProvenanceBranchName(rootTree_->branchType()).c_str());
1893  }
1894 
1895  namespace {
1896  using SignalType = signalslot::Signal<void(StreamContext const&, ModuleCallingContext const&)>;
1897  template <typename R>
1898  void readProvenanceAsyncImpl(R const* iThis,
1900  WaitingTask* task,
1901  unsigned int transitionIndex,
1902  std::atomic<const std::set<ProductProvenance>*>& writeTo,
1903  ModuleCallingContext const* iContext,
1904  SignalType const* pre,
1905  SignalType const* post) {
1906  if (nullptr == writeTo.load()) {
1907  //need to be sure the task isn't run until after the read
1908  WaitingTaskHolder taskHolder{task};
1909  auto pWriteTo = &writeTo;
1910 
1911  auto serviceToken = ServiceRegistry::instance().presentToken();
1912 
1913  chain.push([holder = std::move(taskHolder),
1914  pWriteTo,
1915  iThis,
1916  transitionIndex,
1917  iContext,
1918  pre,
1919  post,
1920  serviceToken]() mutable {
1921  if (nullptr == pWriteTo->load()) {
1922  ServiceRegistry::Operate operate(serviceToken);
1923  std::unique_ptr<const std::set<ProductProvenance>> prov;
1924  try {
1925  if (pre) {
1926  pre->emit(*(iContext->getStreamContext()), *iContext);
1927  }
1928  prov = std::make_unique<const std::set<ProductProvenance>>(iThis->readProvenance(transitionIndex));
1929  if (post) {
1930  post->emit(*(iContext->getStreamContext()), *iContext);
1931  }
1932 
1933  } catch (...) {
1934  if (post) {
1935  post->emit(*(iContext->getStreamContext()), *iContext);
1936  }
1937 
1938  holder.doneWaiting(std::current_exception());
1939  return;
1940  }
1941  const std::set<ProductProvenance>* expected = nullptr;
1942 
1943  if (pWriteTo->compare_exchange_strong(expected, prov.get())) {
1944  prov.release();
1945  }
1946  }
1947  holder.doneWaiting(std::exception_ptr());
1948  });
1949  }
1950  }
1951  } // namespace
1952 
1954  ModuleCallingContext const* moduleCallingContext,
1955  unsigned int transitionIndex,
1956  std::atomic<const std::set<ProductProvenance>*>& writeTo) const {
1957  readProvenanceAsyncImpl(this,
1959  task,
1960  transitionIndex,
1961  writeTo,
1962  moduleCallingContext,
1963  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
1964  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
1965  }
1966 
1967  std::set<ProductProvenance> ReducedProvenanceReader::readProvenance(unsigned int transitionIndex) const {
1968  {
1969  std::lock_guard<std::recursive_mutex> guard(*mutex_);
1970  ReducedProvenanceReader* me = const_cast<ReducedProvenanceReader*>(this);
1971  me->rootTree_->fillBranchEntry(
1972  me->provBranch_, me->rootTree_->entryNumberForIndex(transitionIndex), me->pProvVector_);
1973  }
1974  std::set<ProductProvenance> retValue;
1975  if (daqProvenanceHelper_) {
1976  for (auto const& prov : provVector_) {
1977  BranchID bid(prov.branchID_);
1978  retValue.emplace(daqProvenanceHelper_->mapBranchID(BranchID(prov.branchID_)),
1979  daqProvenanceHelper_->mapParentageID(parentageIDLookup_[prov.parentageIDIndex_]));
1980  }
1981  } else {
1982  for (auto const& prov : provVector_) {
1983  if (prov.parentageIDIndex_ >= parentageIDLookup_.size()) {
1985  << "ReducedProvenanceReader::ReadProvenance\n"
1986  << "The parentage ID index value " << prov.parentageIDIndex_
1987  << " is out of bounds. The maximum value is " << parentageIDLookup_.size() - 1 << ".\n"
1988  << "This should never happen.\n"
1989  << "Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
1990  }
1991  retValue.emplace(BranchID(prov.branchID_), parentageIDLookup_[prov.parentageIDIndex_]);
1992  }
1993  }
1994  return retValue;
1995  }
1996 
1998  public:
1999  explicit FullProvenanceReader(RootTree* rootTree, DaqProvenanceHelper const* daqProvenanceHelper);
2001  std::set<ProductProvenance> readProvenance(unsigned int transitionIndex) const override;
2002 
2003  private:
2005  ModuleCallingContext const* moduleCallingContext,
2006  unsigned int transitionIndex,
2007  std::atomic<const std::set<ProductProvenance>*>& writeTo) const override;
2008 
2011  //All access to a ROOT file is serialized
2014  std::shared_ptr<std::recursive_mutex> mutex_;
2016  };
2017 
2020  rootTree_(rootTree),
2021  infoVector_(),
2022  pInfoVector_(&infoVector_),
2023  daqProvenanceHelper_(daqProvenanceHelper),
2024  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2025  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
2026 
2028  ModuleCallingContext const* moduleCallingContext,
2029  unsigned int transitionIndex,
2030  std::atomic<const std::set<ProductProvenance>*>& writeTo) const {
2031  readProvenanceAsyncImpl(this,
2033  task,
2034  transitionIndex,
2035  writeTo,
2036  moduleCallingContext,
2039  }
2040 
2041  std::set<ProductProvenance> FullProvenanceReader::readProvenance(unsigned int transitionIndex) const {
2042  {
2043  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2046  }
2047  std::set<ProductProvenance> retValue;
2048  if (daqProvenanceHelper_) {
2049  for (auto const& info : infoVector_) {
2050  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2051  daqProvenanceHelper_->mapParentageID(info.parentageID()));
2052  }
2053  } else {
2054  for (auto const& info : infoVector_) {
2055  retValue.emplace(info);
2056  }
2057  }
2058  return retValue;
2059  }
2060 
2062  public:
2063  explicit OldProvenanceReader(RootTree* rootTree,
2064  EntryDescriptionMap const& theMap,
2065  DaqProvenanceHelper const* daqProvenanceHelper);
2066  ~OldProvenanceReader() override {}
2067  std::set<ProductProvenance> readProvenance(unsigned int transitionIndex) const override;
2068 
2069  private:
2071  ModuleCallingContext const* moduleCallingContext,
2072  unsigned int transitionIndex,
2073  std::atomic<const std::set<ProductProvenance>*>& writeTo) const override;
2074 
2076  std::vector<EventEntryInfo> infoVector_;
2077  //All access to ROOT file are serialized
2078  CMS_SA_ALLOW mutable std::vector<EventEntryInfo>* pInfoVector_;
2081  std::shared_ptr<std::recursive_mutex> mutex_;
2083  };
2084 
2086  EntryDescriptionMap const& theMap,
2087  DaqProvenanceHelper const* daqProvenanceHelper)
2089  rootTree_(rootTree),
2090  infoVector_(),
2091  pInfoVector_(&infoVector_),
2092  entryDescriptionMap_(theMap),
2093  daqProvenanceHelper_(daqProvenanceHelper),
2094  mutex_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().second),
2095  acquirer_(SharedResourcesRegistry::instance()->createAcquirerForSourceDelayedReader().first) {}
2096 
2098  ModuleCallingContext const* moduleCallingContext,
2099  unsigned int transitionIndex,
2100  std::atomic<const std::set<ProductProvenance>*>& writeTo) const {
2101  readProvenanceAsyncImpl(this,
2103  task,
2104  transitionIndex,
2105  writeTo,
2106  moduleCallingContext,
2107  rootTree_->rootDelayedReader()->preEventReadFromSourceSignal(),
2108  rootTree_->rootDelayedReader()->postEventReadFromSourceSignal());
2109  }
2110 
2111  std::set<ProductProvenance> OldProvenanceReader::readProvenance(unsigned int transitionIndex) const {
2112  {
2113  std::lock_guard<std::recursive_mutex> guard(*mutex_);
2114  rootTree_->branchEntryInfoBranch()->SetAddress(&pInfoVector_);
2115  roottree::getEntry(rootTree_->branchEntryInfoBranch(), rootTree_->entryNumberForIndex(transitionIndex));
2116  }
2117  std::set<ProductProvenance> retValue;
2118  for (auto const& info : infoVector_) {
2119  EntryDescriptionMap::const_iterator iter = entryDescriptionMap_.find(info.entryDescriptionID());
2120  assert(iter != entryDescriptionMap_.end());
2121  Parentage parentage(iter->second.parents());
2122  if (daqProvenanceHelper_) {
2123  retValue.emplace(daqProvenanceHelper_->mapBranchID(info.branchID()),
2124  daqProvenanceHelper_->mapParentageID(parentage.id()));
2125  } else {
2126  retValue.emplace(info.branchID(), parentage.id());
2127  }
2128  }
2129  return retValue;
2130  }
2131 
2133  public:
2136 
2137  private:
2138  std::set<ProductProvenance> readProvenance(unsigned int) const override;
2140  ModuleCallingContext const* moduleCallingContext,
2141  unsigned int transitionIndex,
2142  std::atomic<const std::set<ProductProvenance>*>& writeTo) const override;
2143  };
2144 
2146 
2147  std::set<ProductProvenance> DummyProvenanceReader::readProvenance(unsigned int) const {
2148  // Not providing parentage!!!
2149  return std::set<ProductProvenance>{};
2150  }
2152  ModuleCallingContext const* moduleCallingContext,
2153  unsigned int transitionIndex,
2154  std::atomic<const std::set<ProductProvenance>*>& writeTo) const {
2155  if (nullptr == writeTo.load()) {
2156  auto emptyProv = std::make_unique<const std::set<ProductProvenance>>();
2157  const std::set<ProductProvenance>* expected = nullptr;
2158  if (writeTo.compare_exchange_strong(expected, emptyProv.get())) {
2159  emptyProv.release();
2160  }
2161  }
2162  }
2163 
2164  std::unique_ptr<ProvenanceReaderBase> MakeDummyProvenanceReader::makeReader(RootTree&,
2165  DaqProvenanceHelper const*) const {
2166  return std::make_unique<DummyProvenanceReader>();
2167  }
2168 
2169  std::unique_ptr<ProvenanceReaderBase> MakeOldProvenanceReader::makeReader(
2170  RootTree& rootTree, DaqProvenanceHelper const* daqProvenanceHelper) const {
2171  return std::make_unique<OldProvenanceReader>(&rootTree, *entryDescriptionMap_, daqProvenanceHelper);
2172  }
2173 
2174  std::unique_ptr<ProvenanceReaderBase> MakeFullProvenanceReader::makeReader(
2175  RootTree& rootTree, DaqProvenanceHelper const* daqProvenanceHelper) const {
2176  return std::make_unique<FullProvenanceReader>(&rootTree, daqProvenanceHelper);
2177  }
2178 
2179  std::unique_ptr<ProvenanceReaderBase> MakeReducedProvenanceReader::makeReader(
2180  RootTree& rootTree, DaqProvenanceHelper const* daqProvenanceHelper) const {
2181  return std::make_unique<ReducedProvenanceReader>(&rootTree, parentageIDLookup_, daqProvenanceHelper);
2182  }
2183 } // namespace edm
edm::poolNames::idToParameterSetBlobsBranchName
std::string const & idToParameterSetBlobsBranchName()
Definition: BranchType.cc:216
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:2012
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:186
edm::RootFileEventFinder
Definition: RootFile.cc:121
edm::RootTree::trainCache
void trainCache(char const *branchNames)
Definition: RootTree.cc:461
ModuleCallingContext.h
edm::OldProvenanceReader::readProvenanceAsync
void readProvenanceAsync(WaitingTask *task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
Definition: RootFile.cc:2097
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:355
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:359
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:1844
edm::RootTree::EntryNumber
roottree::EntryNumber EntryNumber
Definition: RootTree.h:106
DuplicateChecker.h
edm::poolNames::fileFormatVersionBranchName
std::string const & fileFormatVersionBranchName()
Definition: BranchType.cc:192
edm::FileFormatVersion::splitProductIDs
bool splitProductIDs() const
Definition: FileFormatVersion.cc:21
ServiceRegistry.h
edm::ReducedProvenanceReader::provBranch_
edm::propagate_const< TBranch * > provBranch_
Definition: RootFile.cc:1872
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:34
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::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:1873
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:361
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:349
LumiList
Definition: LumiList.py:1
edm::RootFile::readParentageTree
void readParentageTree(InputType inputType)
Definition: RootFile.cc:633
getWrapperBasePtr.h
edm::OldProvenanceReader::infoVector_
std::vector< EventEntryInfo > infoVector_
Definition: RootFile.cc:2076
edm::setIsMergeable
void setIsMergeable(BranchDescription &)
Definition: setIsMergeable.cc:15
edm::FullProvenanceReader::daqProvenanceHelper_
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:2013
RunList
Definition: RunList.h:16
edm::RootFile::eventHistoryTree_
edm::propagate_const< TTree * > eventHistoryTree_
Definition: RootFile.h:351
edm::RootFile::reportOpened
void reportOpened(std::string const &inputType)
Definition: RootFile.cc:1192
edm::RootFile::readLuminosityBlock_
void readLuminosityBlock_(LuminosityBlockPrincipal &lumiPrincipal)
Definition: RootFile.cc:1608
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:227
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:1199
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:152
edm::RootFile::runTree
RootTree const & runTree() const
Definition: RootFile.h:223
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::FullProvenanceReader::acquirer_
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2015
edm::Principal::readAllFromSourceAndMergeImmediately
void readAllFromSourceAndMergeImmediately(MergeableRunProductMetadata const *mergeableRunProductMetadata=nullptr)
Definition: Principal.cc:909
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:1479
edm::IndexIntoFile::invalidEntry
static constexpr EntryNumber_t invalidEntry
Definition: IndexIntoFile.h:236
edm::RootFile::readCurrentEvent
bool readCurrentEvent(EventPrincipal &cache)
Definition: RootFile.cc:1449
l1tstage2_dqm_sourceclient-live_cfg.rawData
rawData
Definition: l1tstage2_dqm_sourceclient-live_cfg.py:156
edm::IndexIntoFile::processHistoryID
ProcessHistoryID const & processHistoryID(int i) const
Definition: IndexIntoFile.cc:55
edm::poolNames::parameterSetsTreeName
std::string const & parameterSetsTreeName()
Definition: BranchType.cc:214
edm::DaqProvenanceHelper
Definition: DaqProvenanceHelper.h:27
edm::EventAuxiliary::oldLuminosityBlock
LuminosityBlockNumber_t oldLuminosityBlock() const
Definition: EventAuxiliary.h:70
edm::FileBlock::NotProcessingEvents
Definition: FileBlock.h:29
writedatasetfile.runs
runs
Definition: writedatasetfile.py:27
edm::RootFile::eventAux_
EventAuxiliary eventAux_
Definition: RootFile.h:337
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:14
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:345
edm::second
U second(std::pair< T, U > const &p)
Definition: ParameterSet.cc:215
edm::poolNames::indexIntoFileBranchName
std::string const & indexIntoFileBranchName()
Definition: BranchType.cc:201
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:152
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:41
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:587
edm::StreamID::value
unsigned int value() const
Definition: StreamID.h:42
edm::DummyProvenanceReader::readProvenanceAsync
void readProvenanceAsync(WaitingTask *task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
Definition: RootFile.cc:2151
ProductRegistry.h
edm::RootFile::eventID
EventID const & eventID() const
Definition: RootFile.h:220
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
edm::RootFile::isDuplicateEvent
bool isDuplicateEvent()
Definition: RootFile.cc:784
edm::RootFile::enforceGUIDInFileName_
bool enforceGUIDInFileName_
Definition: RootFile.h:333
edm::FullProvenanceReader::FullProvenanceReader
FullProvenanceReader(RootTree *rootTree, DaqProvenanceHelper const *daqProvenanceHelper)
Definition: RootFile.cc:2018
edm::FileBlock::EventsToBeSorted
Definition: FileBlock.h:35
edm::RootFile::skipThisEntry
bool skipThisEntry()
Definition: RootFile.cc:747
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:224
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:212
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:2145
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:115
edm::EntryDescriptionMap
std::map< EntryDescriptionID, EventEntryDescription > EntryDescriptionMap
Definition: RootFile.h:52
EventSkipperByID.h
edm::RootFile::setEntryAtLumi
bool setEntryAtLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition: RootFile.cc:1635
edm::RootFile::dropOnInput
void dropOnInput(ProductRegistry &reg, ProductSelectorRules const &rules, bool dropDescendants, InputType inputType)
Definition: RootFile.cc:1701
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:34
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:210
edm::ReducedProvenanceReader::readProvenanceAsync
void readProvenanceAsync(WaitingTask *task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
Definition: RootFile.cc:1953
edm::RootFile::setEntryAtRun
bool setEntryAtRun(RunNumber_t run)
Definition: RootFile.cc:1643
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:204
LuminosityBlockAux.h
edm::MakeReducedProvenanceReader::parentageIDLookup_
std::vector< ParentageID > const & parentageIDLookup_
Definition: RootFile.cc:100
EDMException.h
edm::EventAuxiliary::run
RunNumber_t run() const
Definition: EventAuxiliary.h:73
SharedResourcesAcquirer.h
edm::RootFile::inputType_
InputType inputType_
Definition: RootFile.h:363
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::MakeFullProvenanceReader::makeReader
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
Definition: RootFile.cc:2174
edm::RootFile::setAtEventEntry
void setAtEventEntry(IndexIntoFile::EntryNumber_t entry)
Definition: RootFile.cc:1477
edm::RootFile::fileThinnedAssociationsHelper_
edm::propagate_const< std::unique_ptr< ThinnedAssociationsHelper > > fileThinnedAssociationsHelper_
Definition: RootFile.h:346
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:159
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::RootFile::eventSelectionIDs_
EventSelectionIDVector eventSelectionIDs_
Definition: RootFile.h:352
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::IndexIntoFile::invalidIndex
static constexpr int invalidIndex
Definition: IndexIntoFile.h:232
edm::EventAuxiliary::resetObsoleteInfo
void resetObsoleteInfo()
Definition: EventAuxiliary.h:71
edm::RootTree::metaTree
TTree const * metaTree() const
Definition: RootTree.h:184
edm::OldProvenanceReader::acquirer_
SharedResourcesAcquirer acquirer_
Definition: RootFile.cc:2082
edm::StreamContext
Definition: StreamContext.h:31
edm::RootFile::provenanceAdaptor_
edm::propagate_const< std::unique_ptr< ProvenanceAdaptor > > provenanceAdaptor_
Definition: RootFile.h:357
edm::IndexIntoFile::kRun
Definition: IndexIntoFile.h:238
edm::ProductRegistry::productListUpdator
ProductList & productListUpdator()
Definition: ProductRegistry.h:78
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:1336
edm::RootFile::modifiedIDs
bool modifiedIDs() const
Definition: RootFile.h:228
edm::poolNames::processHistoryBranchName
std::string const & processHistoryBranchName()
Definition: BranchType.cc:180
EventPrincipal.h
edm::RootFile::fillRunAuxiliary
std::shared_ptr< RunAuxiliary > fillRunAuxiliary()
Definition: RootFile.cc:1316
edm::RootFile::branchChildren_
edm::propagate_const< std::shared_ptr< BranchChildren > > branchChildren_
Definition: RootFile.h:355
edm::OldProvenanceReader
Definition: RootFile.cc:2061
edm::RootFile::wasLastEventJustRead
bool wasLastEventJustRead() const
Definition: RootFile.cc:846
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::RootFile::fillEventHistory
void fillEventHistory()
Definition: RootFile.cc:1237
edm::FullProvenanceReader::readProvenance
std::set< ProductProvenance > readProvenance(unsigned int transitionIndex) const override
Definition: RootFile.cc:2041
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:801
edm::MergeableRunProductMetadata
Definition: MergeableRunProductMetadata.h:52
edm::RootFile::branchListIndexes_
BranchListIndexes branchListIndexes_
Definition: RootFile.h:353
edm::EventAuxiliary::id
EventID const & id() const
Definition: EventAuxiliary.h:63
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:171
edm::RootFile::whyNotFastClonable_
int whyNotFastClonable_
Definition: RootFile.h:334
edm::RootFile::thinnedAssociationsHelper_
edm::propagate_const< std::shared_ptr< ThinnedAssociationsHelper > > thinnedAssociationsHelper_
Definition: RootFile.h:347
edm::RootFile::setPosition
void setPosition(IndexIntoFile::IndexIntoFileItr const &position)
Definition: RootFile.cc:738
edm::LuminosityBlockID
Definition: LuminosityBlockID.h:31
OrderedSet.t
t
Definition: OrderedSet.py:90
edm::InputSource::RunsAndLumis
Definition: InputSource.h:80
edm::RootFile::hasNewlyDroppedBranch
std::array< bool, NumBranchTypes > const & hasNewlyDroppedBranch() const
Definition: RootFile.h:226
edm::poolNames::entryDescriptionIDBranchName
std::string const & entryDescriptionIDBranchName()
Definition: BranchType.cc:152
b
double b
Definition: hdecay.h:118
edm::OldProvenanceReader::entryDescriptionMap_
EntryDescriptionMap const & entryDescriptionMap_
Definition: RootFile.cc:2079
edm::RootTree::resetAndGetRootDelayedReader
DelayedReader * resetAndGetRootDelayedReader() const
Definition: RootTree.cc:123
edm::RootFile::fillIndexIntoFile
void fillIndexIntoFile()
Definition: RootFile.cc:913
edm::ReducedProvenanceReader::rootTree_
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:1871
edm::IndexIntoFile::invalidLumi
static constexpr LuminosityBlockNumber_t invalidLumi
Definition: IndexIntoFile.h:234
edm::poolNames::parentageTreeName
std::string const & parentageTreeName()
Definition: BranchType.cc:157
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:2164
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:1425
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:728
edm::LogWarning
Definition: MessageLogger.h:141
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:126
edm::RootFile::orderedProcessHistoryIDs_
std::vector< ProcessHistoryID > & orderedProcessHistoryIDs_
Definition: RootFile.h:323
edm::poolNames::eventSelectionsBranchName
std::string const & eventSelectionsBranchName()
Definition: BranchType.cc:210
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:28
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:35
ReleaseVersion.h
edm::ProductRegistry::ProductList
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductRegistry.h:36
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:1875
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:2111
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:36
GetReleaseVersion.h
edm::MakeOldProvenanceReader::makeReader
std::unique_ptr< ProvenanceReaderBase > makeReader(RootTree &eventTree, DaqProvenanceHelper const *daqProvenanceHelper) const override
Definition: RootFile.cc:2169
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:1828
fetchall_from_DQM_v2.release
release
Definition: fetchall_from_DQM_v2.py:92
edm::WaitingTaskHolder
Definition: WaitingTaskHolder.h:30
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:165
edm::RootFile::setEntryAtEvent
bool setEntryAtEvent(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event)
Definition: RootFile.cc:1627
edm::ProductProvenanceVector
std::vector< ProductProvenance > ProductProvenanceVector
Definition: ProductProvenance.h:60
edm::EventAuxiliary::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventAuxiliary.h:67
edm::FullProvenanceReader
Definition: RootFile.cc:1997
edm::RootFile::setIfFastClonable
void setIfFastClonable(int remainingEvents, int remainingLumis)
Definition: RootFile.cc:668
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:1677
edm::OldProvenanceReader::rootTree_
edm::propagate_const< RootTree * > rootTree_
Definition: RootFile.cc:2075
edm::RootFile::processingMode_
InputSource::ProcessingMode processingMode_
Definition: RootFile.h:348
edm::ModuleCallingContext::getStreamContext
StreamContext const * getStreamContext() const
Definition: ModuleCallingContext.cc:32
edm::MakeFullProvenanceReader
Definition: RootFile.cc:87
edm::friendlyname::friendlyName
std::string friendlyName(std::string const &iFullName)
Definition: FriendlyName.cc:233
edm::RootFile::validateFile
void validateFile(InputType inputType, bool usingGoToEvent)
Definition: RootFile.cc:1137
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:1690
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:150
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:1967
edm::RootFile::readLuminosityBlockAuxiliary_
std::shared_ptr< LuminosityBlockAuxiliary > readLuminosityBlockAuxiliary_()
Definition: RootFile.cc:1570
edm::EventID::event
EventNumber_t event() const
Definition: EventID.h:40
edm::FullProvenanceReader::readProvenanceAsync
void readProvenanceAsync(WaitingTask *task, ModuleCallingContext const *moduleCallingContext, unsigned int transitionIndex, std::atomic< const std::set< ProductProvenance > * > &writeTo) const override
Definition: RootFile.cc:2027
edm::MakeProvenanceReader
Definition: RootFile.h:56
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:177
edm::FileBlock::NoEventsInFile
Definition: FileBlock.h:34
edm::RootFile::skipAnyEvents_
bool skipAnyEvents_
Definition: RootFile.h:331
edm::RootFile::fillEventAuxiliary
bool fillEventAuxiliary(IndexIntoFile::EntryNumber_t entry)
Definition: RootFile.cc:1228
edm::roottree::defaultLearningEntries
unsigned const int defaultLearningEntries
Definition: RootTree.h:49
edm::RootFile::edProductClass_
edm::propagate_const< TClass * > edProductClass_
Definition: RootFile.h:362
edm::RootFile::fileFormatVersion_
FileFormatVersion fileFormatVersion_
Definition: RootFile.h:319
edm::ProductRegistry::allBranchDescriptions
std::vector< BranchDescription const * > allBranchDescriptions() const
Definition: ProductRegistry.cc:211
RootFile.h
edm::BranchDescription::branchName
std::string const & branchName() const
Definition: BranchDescription.h:119
edm::EventAuxiliary::time
Timestamp const & time() const
Definition: EventAuxiliary.h:66
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:2010
edm::FileFormatVersion::processHistorySameWithinRun
bool processHistorySameWithinRun() const
Definition: FileFormatVersion.cc:33
edm::RootFile::readEventHistoryTree
void readEventHistoryTree()
Definition: RootFile.cc:1666
edm::OldProvenanceReader::~OldProvenanceReader
~OldProvenanceReader() override
Definition: RootFile.cc:2066
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
diMuonSkim_cfi.byName
byName
Definition: diMuonSkim_cfi.py:9
itr
std::vector< std::pair< float, float > >::iterator itr
Definition: HGCDigitizer.cc:28
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:2009
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
TrackValidation_cff.association
association
Definition: TrackValidation_cff.py:286
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:1878
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:103
edm::RootFile::initAssociationsFromSecondary
void initAssociationsFromSecondary(std::vector< BranchID > const &)
Definition: RootFile.cc:742
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:354
edm::RunPrincipal::fillRunPrincipal
void fillRunPrincipal(ProcessHistoryRegistry const &processHistoryRegistry, DelayedReader *reader=nullptr)
Definition: RunPrincipal.cc:26
edm::Timestamp::invalidTimestamp
static Timestamp invalidTimestamp()
Definition: Timestamp.h:82
HLT_2018_cff.finder
finder
Definition: HLT_2018_cff.py:50398
edm::RootFile::noEventSort_
bool noEventSort_
Definition: RootFile.h:332
edm::BranchTypeToProductProvenanceBranchName
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
Definition: BranchType.cc:134
edm::RootTree::current
bool current() const
Definition: RootTree.h:130
edm::RootTree::isValid
bool isValid() const
Definition: RootTree.cc:110
edm::WaitingTask
Definition: WaitingTask.h:36
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:712
edm::RootFile::provenanceReaderMaker_
edm::propagate_const< std::unique_ptr< MakeProvenanceReader > > provenanceReaderMaker_
Definition: RootFile.h:358
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::RootFile::eventAux
EventAuxiliary const & eventAux() const
Definition: RootFile.h:216
std
Definition: JetResolutionObject.h:76
writedatasetfile.run
run
Definition: writedatasetfile.py:27
edm::RootFile::parentageIDLookup_
std::vector< ParentageID > parentageIDLookup_
Definition: RootFile.h:360
edm::ProductRegistry::productList
ProductList const & productList() const
Definition: ProductRegistry.h:73
edm::RootFile::goToEvent
bool goToEvent(EventID const &eventID)
Definition: RootFile.cc:1392
SharedResourcesRegistry.h
edm::RunPrincipal::mergeableRunProductMetadata
MergeableRunProductMetadata * mergeableRunProductMetadata()
Definition: RunPrincipal.h:79
stemFromPath.h
edm::ProcessHistoryID
Hash< ProcessHistoryType > ProcessHistoryID
Definition: ProcessHistoryID.h:8
edm::ReducedProvenanceReader::daqProvenanceHelper_
DaqProvenanceHelper const * daqProvenanceHelper_
Definition: RootFile.cc:1876
edm::RootTree::entryNumber
EntryNumber const & entryNumber() const
Definition: RootTree.h:135
edm::FullProvenanceReader::~FullProvenanceReader
~FullProvenanceReader() override
Definition: RootFile.cc:2000
edm::RootFile::lastEventEntryNumberRead_
IndexIntoFile::EntryNumber_t lastEventEntryNumberRead_
Definition: RootFile.h:342
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:2147
edm::poolNames::metaDataTreeName
std::string const & metaDataTreeName()
Definition: BranchType.cc:162
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:31
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:246
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:1874
edm::RootFile::containsItem
bool containsItem(RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event) const
Definition: RootFile.cc:797
edm::RootFile::productRegistry_
std::shared_ptr< ProductRegistry const > productRegistry_
Definition: RootFile.h:343
edm::RootFile::whyNotFastClonable
int whyNotFastClonable() const
Definition: RootFile.h:225
edm::RootFile::setEntryAtNextEventInLumi
bool setEntryAtNextEventInLumi(RunNumber_t run, LuminosityBlockNumber_t lumi)
Definition: RootFile.cc:1651
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:189
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:1822
edm::History
Definition: History.h:22
edm::OldProvenanceReader::OldProvenanceReader
OldProvenanceReader(RootTree *rootTree, EntryDescriptionMap const &theMap, DaqProvenanceHelper const *daqProvenanceHelper)
Definition: RootFile.cc:2085
edm::OldProvenanceReader::pInfoVector_
std::vector< EventEntryInfo > * pInfoVector_
Definition: RootFile.cc:2078
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:168
funct::void
TEMPL(T2) struct Divides void
Definition: Factorize.h:29
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
edm::RootFile::newBranchToOldBranch_
std::map< std::string, std::string > newBranchToOldBranch_
Definition: RootFile.h:350
edm::BranchDescription
Definition: BranchDescription.h:32
edm::poolNames::eventHistoryTreeName
std::string const & eventHistoryTreeName()
Definition: BranchType.cc:222
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:2179
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::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:585
edm::EDProductGetter::transitionIndex
unsigned int transitionIndex() const
Definition: EDProductGetter.h:68
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:1543
edm::EventAuxiliary::isRealData
bool isRealData() const
Definition: EventAuxiliary.h:74
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:195
edm::moduleName
std::string moduleName(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
hlt_dqm_clientPB-live_cfg.me
me
Definition: hlt_dqm_clientPB-live_cfg.py:56
edm::RootFile::branchListIndexesUnchanged_
bool branchListIndexesUnchanged_
Definition: RootFile.h:336
parents
TPRegexp parents
Definition: eve_filter.cc:21
ntuplemaker.time
time
Definition: ntuplemaker.py:310
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:78
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:154
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
edm::SerialTaskQueueChain
Definition: SerialTaskQueueChain.h:32
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:2080
lumi
Definition: LumiSectionData.h:20
edm::ReducedProvenanceReader
Definition: RootFile.cc:1857
edm::MergeableRunProductMetadata::readRun
void readRun(long long inputRunEntry, StoredMergeableRunProductMetadata const &inputStoredMergeableRunProductMetadata, IndexIntoFileItrHolder const &inputIndexIntoFileItr)
Definition: MergeableRunProductMetadata.cc:23
event
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of "!*" before the partial wildcard feature was incorporated). The per-event "cost" of each negative criterion with multiple relevant triggers is about the same as ! *was in the past
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:2132
edm::ReducedProvenanceReader::ReducedProvenanceReader
ReducedProvenanceReader(RootTree *iRootTree, std::vector< ParentageID > const &iParentageIDLookup, DaqProvenanceHelper const *daqProvenanceHelper)
Definition: RootFile.cc:1881
edm::EventAuxiliary::setProcessHistoryID
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: EventAuxiliary.h:62
edm::poolNames::processConfigurationBranchName
std::string const & processConfigurationBranchName()
Definition: BranchType.cc:183
edm::RootFile::eventProductProvenanceRetriever
std::shared_ptr< ProductProvenanceRetriever const > eventProductProvenanceRetriever(size_t index) const
Definition: RootFile.h:306
EventAux.h
begin
#define begin
Definition: vmac.h:32
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:344
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:174
edm::RootTree::next
bool next()
Definition: RootTree.h:127
edm::RootFile::duplicateChecker_
edm::propagate_const< std::shared_ptr< DuplicateChecker > > duplicateChecker_
Definition: RootFile.h:356
edm::DummyProvenanceReader::~DummyProvenanceReader
~DummyProvenanceReader() override
Definition: RootFile.cc:2135
edm::OldProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2081
edm::FileBlock::DuplicateEventsRemoved
Definition: FileBlock.h:42
edm::FullProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:2014
edm::ParameterSetConverter::ParameterSetIdConverter
std::map< ParameterSetID, ParameterSetID > ParameterSetIdConverter
Definition: ParameterSetConverter.h:46
muonDTDigis_cfi.pset
pset
Definition: muonDTDigis_cfi.py:27
edm::RootFile::indexIntoFileIter
IndexIntoFile::IndexIntoFileItr indexIntoFileIter() const
Definition: RootFile.cc:736
edm::RootFile::fillLumiAuxiliary
std::shared_ptr< LuminosityBlockAuxiliary > fillLumiAuxiliary()
Definition: RootFile.cc:1293
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:207
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:852
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::createGlobalIdentifier
std::string createGlobalIdentifier()
Definition: GlobalIdentifier.cc:5
edm::ModuleCallingContext
Definition: ModuleCallingContext.h:29
edm::RootFile::fillThisEventAuxiliary
void fillThisEventAuxiliary()
Definition: RootFile.cc:1210
edm::ReducedProvenanceReader::mutex_
std::shared_ptr< std::recursive_mutex > mutex_
Definition: RootFile.cc:1877
edm::RootFile::file_
const std::string file_
Definition: RootFile.h:313