CMS 3D CMS Logo

RootOutputFile.cc
Go to the documentation of this file.
1 
3 
5 
38 
39 #include "TTree.h"
40 #include "TFile.h"
41 #include "TClass.h"
42 #include "Rtypes.h"
43 #include "RVersion.h"
44 
45 #include "Compression.h"
46 
47 #include <algorithm>
48 #include <iomanip>
49 #include <sstream>
50 
51 namespace edm {
52 
53  namespace {
54  bool sorterForJobReportHash(BranchDescription const* lh, BranchDescription const* rh) {
55  return lh->fullClassName() < rh->fullClassName()
56  ? true
57  : lh->fullClassName() > rh->fullClassName()
58  ? false
59  : lh->moduleLabel() < rh->moduleLabel()
60  ? true
61  : lh->moduleLabel() > rh->moduleLabel()
62  ? false
63  : lh->productInstanceName() < rh->productInstanceName()
64  ? true
65  : lh->productInstanceName() > rh->productInstanceName()
66  ? false
67  : lh->processName() < rh->processName() ? true : false;
68  }
69 
70  TFile* openTFile(char const* name, int compressionLevel) {
71  TFile* file = TFile::Open(name, "recreate", "", compressionLevel);
72  std::exception_ptr e = edm::threadLocalException::getException();
73  if (e != std::exception_ptr()) {
74  edm::threadLocalException::setException(std::exception_ptr());
75  std::rethrow_exception(e);
76  }
77  return file;
78  }
79  } // namespace
80 
82  std::string const& fileName,
83  std::string const& logicalFileName,
84  std::vector<std::string> const& processesWithSelectedMergeableRunProducts)
85  : file_(fileName),
86  logicalFile_(logicalFileName),
87  reportToken_(0),
88  om_(om),
89  whyNotFastClonable_(om_->whyNotFastClonable()),
90  canFastCloneAux_(false),
91  filePtr_(openTFile(file_.c_str(), om_->compressionLevel())),
92  fid_(),
93  eventEntryNumber_(0LL),
94  lumiEntryNumber_(0LL),
95  runEntryNumber_(0LL),
96  indexIntoFile_(),
97  storedMergeableRunProductMetadata_(processesWithSelectedMergeableRunProducts),
98  nEventsInLumi_(0),
99  metaDataTree_(nullptr),
100  parameterSetsTree_(nullptr),
101  parentageTree_(nullptr),
102  lumiAux_(),
103  runAux_(),
104  pEventAux_(nullptr),
105  pLumiAux_(&lumiAux_),
106  pRunAux_(&runAux_),
107  eventEntryInfoVector_(),
108  pEventEntryInfoVector_(&eventEntryInfoVector_),
109  pBranchListIndexes_(nullptr),
110  pEventSelectionIDs_(nullptr),
111  eventTree_(filePtr(), InEvent, om_->splitLevel(), om_->treeMaxVirtualSize()),
112  lumiTree_(filePtr(), InLumi, om_->splitLevel(), om_->treeMaxVirtualSize()),
113  runTree_(filePtr(), InRun, om_->splitLevel(), om_->treeMaxVirtualSize()),
114  treePointers_(),
115  dataTypeReported_(false),
116  processHistoryRegistry_(),
117  parentageIDs_(),
118  branchesWithStoredHistory_(),
119  wrapperBaseTClass_(TClass::GetClass("edm::WrapperBase")) {
120  if (om_->compressionAlgorithm() == std::string("ZLIB")) {
121  filePtr_->SetCompressionAlgorithm(ROOT::kZLIB);
122  } else if (om_->compressionAlgorithm() == std::string("LZMA")) {
123  filePtr_->SetCompressionAlgorithm(ROOT::kLZMA);
124  } else {
126  << "PoolOutputModule configured with unknown compression algorithm '" << om_->compressionAlgorithm() << "'\n"
127  << "Allowed compression algorithms are ZLIB and LZMA\n";
128  }
129  if (-1 != om->eventAutoFlushSize()) {
131  }
133  BranchTypeToAuxiliaryBranchName(InEvent), pEventAux_, om_->auxItems()[InEvent].basketSize_);
136  om_->auxItems()[InEvent].basketSize_);
138  poolNames::eventSelectionsBranchName(), pEventSelectionIDs_, om_->auxItems()[InEvent].basketSize_, false);
141 
143  BranchTypeToAuxiliaryBranchName(InLumi), pLumiAux_, om_->auxItems()[InLumi].basketSize_);
144 
146  BranchTypeToAuxiliaryBranchName(InRun), pRunAux_, om_->auxItems()[InRun].basketSize_);
147 
151  treePointers_[InProcess] = nullptr;
152 
153  for (int i = InEvent; i < NumBranchTypes; ++i) {
154  if (i == InProcess) {
155  // Output for ProcessBlocks is not implemented yet.
156  continue;
157  }
158  BranchType branchType = static_cast<BranchType>(i);
159  RootOutputTree* theTree = treePointers_[branchType];
160  for (auto& item : om_->selectedOutputItemList()[branchType]) {
161  item.setProduct(nullptr);
162  BranchDescription const& desc = *item.branchDescription();
163  theTree->addBranch(desc.branchName(),
164  desc.wrappedName(),
165  item.product(),
166  item.splitLevel(),
167  item.basketSize(),
168  item.branchDescription()->produced());
169  //make sure we always store product registry info for all branches we create
170  branchesWithStoredHistory_.insert(item.branchID());
171  }
172  }
173  // Don't split metadata tree or event description tree
177 
179 
180  // For the Job Report, get a vector of branch names in the "Events" tree.
181  // Also create a hash of all the branch names in the "Events" tree
182  // in a deterministic order, except use the full class name instead of the friendly class name.
183  // To avoid extra string copies, we create a vector of pointers into the product registry,
184  // and use a custom comparison operator for sorting.
185  std::vector<std::string> branchNames;
186  std::vector<BranchDescription const*> branches;
187  branchNames.reserve(om_->selectedOutputItemList()[InEvent].size());
188  branches.reserve(om->selectedOutputItemList()[InEvent].size());
189  for (auto const& item : om_->selectedOutputItemList()[InEvent]) {
190  branchNames.push_back(item.branchDescription()->branchName());
191  branches.push_back(item.branchDescription());
192  }
193  // Now sort the branches for the hash.
194  sort_all(branches, sorterForJobReportHash);
195  // Now, make a concatenated string.
196  std::ostringstream oss;
197  char const underscore = '_';
198  for (auto const& branch : branches) {
199  BranchDescription const& bd = *branch;
200  oss << bd.fullClassName() << underscore << bd.moduleLabel() << underscore << bd.productInstanceName()
201  << underscore << bd.processName() << underscore;
202  }
203  std::string stringrep = oss.str();
204  cms::Digest md5alg(stringrep);
205 
206  // Register the output file with the JobReport service
207  // and get back the token for it.
208  std::string moduleName = "PoolOutputModule";
209  Service<JobReport> reportSvc;
210  reportToken_ = reportSvc->outputFileOpened(file_,
211  logicalFile_, // PFN and LFN
212  om_->catalog(), // catalog
213  moduleName, // module class name
214  om_->moduleLabel(), // module label
215  fid_.fid(), // file id (guid)
216  std::string(), // data type (not yet known, so string is empty).
217  md5alg.digest().toString(), // branch hash
218  branchNames); // branch names being written
219  }
220 
221  namespace {
222  void maybeIssueWarning(int whyNotFastClonable, std::string const& ifileName, std::string const& ofileName) {
223  // No message if fast cloning was deliberately disabled, or if there are no events to copy anyway.
226  return;
227  }
228 
229  // There will be a message stating every reason that fast cloning was not possible.
230  // If at one or more of the reasons was because of something the user explicitly specified (e.g. event selection, skipping events),
231  // or if the input file was in an old format, the message will be informational. Otherwise, the message will be a warning.
232  bool isWarning = true;
233  std::ostringstream message;
234  message << "Fast copying of file " << ifileName << " to file " << ofileName << " is disabled because:\n";
235  if ((whyNotFastClonable & FileBlock::HasSecondaryFileSequence) != 0) {
236  message << "a SecondaryFileSequence was specified.\n";
237  whyNotFastClonable &= ~(FileBlock::HasSecondaryFileSequence);
238  isWarning = false;
239  }
240  if ((whyNotFastClonable & FileBlock::FileTooOld) != 0) {
241  message << "the input file is in an old format.\n";
242  whyNotFastClonable &= ~(FileBlock::FileTooOld);
243  isWarning = false;
244  }
245  if ((whyNotFastClonable & FileBlock::EventsToBeSorted) != 0) {
246  message << "events need to be sorted.\n";
247  whyNotFastClonable &= ~(FileBlock::EventsToBeSorted);
248  }
249  if ((whyNotFastClonable & FileBlock::RunOrLumiNotContiguous) != 0) {
250  message << "a run or a lumi is not contiguous in the input file.\n";
251  whyNotFastClonable &= ~(FileBlock::RunOrLumiNotContiguous);
252  }
253  if ((whyNotFastClonable & FileBlock::EventsOrLumisSelectedByID) != 0) {
254  message << "events or lumis were selected or skipped by ID.\n";
255  whyNotFastClonable &= ~(FileBlock::EventsOrLumisSelectedByID);
256  isWarning = false;
257  }
258  if ((whyNotFastClonable & FileBlock::InitialEventsSkipped) != 0) {
259  message << "initial events, lumis or runs were skipped.\n";
260  whyNotFastClonable &= ~(FileBlock::InitialEventsSkipped);
261  isWarning = false;
262  }
263  if ((whyNotFastClonable & FileBlock::DuplicateEventsRemoved) != 0) {
264  message << "some events were skipped because of duplicate checking.\n";
265  whyNotFastClonable &= ~(FileBlock::DuplicateEventsRemoved);
266  }
267  if ((whyNotFastClonable & FileBlock::MaxEventsTooSmall) != 0) {
268  message << "some events were not copied because of maxEvents limit.\n";
269  whyNotFastClonable &= ~(FileBlock::MaxEventsTooSmall);
270  isWarning = false;
271  }
272  if ((whyNotFastClonable & FileBlock::MaxLumisTooSmall) != 0) {
273  message << "some events were not copied because of maxLumis limit.\n";
274  whyNotFastClonable &= ~(FileBlock::MaxLumisTooSmall);
275  isWarning = false;
276  }
277  if ((whyNotFastClonable & FileBlock::ParallelProcesses) != 0) {
278  message << "parallel processing was specified.\n";
279  whyNotFastClonable &= ~(FileBlock::ParallelProcesses);
280  isWarning = false;
281  }
282  if ((whyNotFastClonable & FileBlock::EventSelectionUsed) != 0) {
283  message << "an EventSelector was specified.\n";
284  whyNotFastClonable &= ~(FileBlock::EventSelectionUsed);
285  isWarning = false;
286  }
287  if ((whyNotFastClonable & FileBlock::OutputMaxEventsTooSmall) != 0) {
288  message << "some events were not copied because of maxEvents output limit.\n";
289  whyNotFastClonable &= ~(FileBlock::OutputMaxEventsTooSmall);
290  isWarning = false;
291  }
292  if ((whyNotFastClonable & FileBlock::SplitLevelMismatch) != 0) {
293  message << "the split level or basket size of a branch or branches was modified.\n";
294  whyNotFastClonable &= ~(FileBlock::SplitLevelMismatch);
295  }
296  if ((whyNotFastClonable & FileBlock::BranchMismatch) != 0) {
297  message << "The format of a data product has changed.\n";
298  whyNotFastClonable &= ~(FileBlock::BranchMismatch);
299  }
300  assert(whyNotFastClonable == FileBlock::CanFastClone);
301  if (isWarning) {
302  LogWarning("FastCloningDisabled") << message.str();
303  } else {
304  LogInfo("FastCloningDisabled") << message.str();
305  }
306  }
307  } // namespace
308 
309  void RootOutputFile::beginInputFile(FileBlock const& fb, int remainingEvents) {
310  // Reset per input file information
311  whyNotFastClonable_ = om_->whyNotFastClonable();
312  canFastCloneAux_ = false;
313 
314  if (fb.tree() != nullptr) {
315  whyNotFastClonable_ |= fb.whyNotFastClonable();
316 
317  if (remainingEvents >= 0 && remainingEvents < fb.tree()->GetEntries()) {
319  }
320 
322  if (!match) {
323  if (om_->overrideInputFileSplitLevels()) {
324  // We may be fast copying. We must disable fast copying if the split levels
325  // or basket sizes do not match.
327  } else {
328  // We are using the input split levels and basket sizes from the first input file
329  // for copied output branches. In this case, we throw an exception if any branches
330  // have different split levels or basket sizes in a subsequent input file.
331  // If the mismatch is in the first file, there is a bug somewhere, so we assert.
332  assert(om_->inputFileCount() > 1);
333  throw Exception(errors::MismatchedInputFiles, "RootOutputFile::beginInputFile()")
334  << "Merge failure because input file " << file_ << " has different ROOT split levels or basket sizes\n"
335  << "than previous files. To allow merging in splite of this, use the configuration parameter\n"
336  << "overrideInputFileSplitLevels=cms.untracked.bool(True)\n"
337  << "in every PoolOutputModule.\n";
338  }
339  }
340 
341  // Since this check can be time consuming, we do it only if we would otherwise fast clone.
343  if (!eventTree_.checkIfFastClonable(fb.tree())) {
345  }
346  }
347  // We now check if we can fast copy the auxiliary branches.
348  // We can do so only if we can otherwise fast copy,
349  // the input file has the current format (these branches are in the Events Tree),
350  // there are no newly dropped or produced products,
351  // no metadata has been dropped,
352  // ID's have not been modified,
353  // and the branch list indexes do not need modification.
354 
355  // Note: Fast copy of the EventProductProvenance branch is unsafe
356  // unless we can enforce that the parentage information for a fully copied
357  // output file will be the same as for the input file, with nothing dropped.
358  // This has never been enforced, and, withthe EDAlias feature, it may no longer
359  // work by accident.
360  // So, for now, we do not enable fast cloning of the non-product branches.
361  /*
362  Service<ConstProductRegistry> reg;
363  canFastCloneAux_ = (whyNotFastClonable_ == FileBlock::CanFastClone) &&
364  fb.fileFormatVersion().noMetaDataTrees() &&
365  !om_->hasNewlyDroppedBranch()[InEvent] &&
366  !fb.hasNewlyDroppedBranch()[InEvent] &&
367  om_->dropMetaData() == PoolOutputModule::DropNone &&
368  !reg->anyProductProduced() &&
369  !fb.modifiedIDs() &&
370  fb.branchListIndexesUnchanged();
371 */
372 
373  // Report the fast copying status.
374  Service<JobReport> reportSvc;
375  reportSvc->reportFastCopyingStatus(reportToken_, fb.fileName(), whyNotFastClonable_ == FileBlock::CanFastClone);
376  } else {
378  }
379 
382 
383  // Possibly issue warning or informational message if we haven't fast cloned.
384  if (fb.tree() != nullptr && whyNotFastClonable_ != FileBlock::CanFastClone) {
385  maybeIssueWarning(whyNotFastClonable_, fb.fileName(), file_);
386  }
387  }
388 
393  }
394 
396  unsigned int const oneK = 1024;
397  Long64_t size = filePtr_->GetSize() / oneK;
398  return (size >= om_->maxFileSize());
399  }
400 
402  // Auxiliary branch
403  pEventAux_ = &e.eventAuxiliary();
404 
405  // Because getting the data may cause an exception to be thrown we want to do that
406  // first before writing anything to the file about this event
407  // NOTE: pEventAux_, pBranchListIndexes_, pEventSelectionIDs_, and pEventEntryInfoVector_
408  // must be set before calling fillBranches since they get written out in that routine.
409  assert(pEventAux_->processHistoryID() == e.processHistoryID());
410  pBranchListIndexes_ = &e.branchListIndexes();
411 
412  // Note: The EventSelectionIDVector should have a one to one correspondence with the processes in the process history.
413  // Therefore, a new entry should be added if and only if the current process has been added to the process history,
414  // which is done if and only if there is a produced product.
416  EventSelectionIDVector esids = e.eventSelectionIDs();
417  if (reg->anyProductProduced() || !om_->wantAllEvents()) {
418  esids.push_back(om_->selectorConfig());
419  }
420  pEventSelectionIDs_ = &esids;
421  ProductProvenanceRetriever const* provRetriever = e.productProvenanceRetrieverPtr();
422  assert(provRetriever);
423  fillBranches(InEvent, e, pEventEntryInfoVector_, provRetriever);
424 
425  // Add the dataType to the job report if it hasn't already been done
426  if (!dataTypeReported_) {
427  Service<JobReport> reportSvc;
428  std::string dataType("MC");
429  if (pEventAux_->isRealData())
430  dataType = "Data";
431  reportSvc->reportDataType(reportToken_, dataType);
432  dataTypeReported_ = true;
433  }
434 
435  // Store the process history.
437  // Store the reduced ID in the IndexIntoFile
438  ProcessHistoryID reducedPHID = processHistoryRegistry_.reducedProcessHistoryID(e.processHistoryID());
439  // Add event to index
443 
444  // Report event written
445  Service<JobReport> reportSvc;
446  reportSvc->eventWrittenToFile(reportToken_, e.id().run(), e.id().event());
447  ++nEventsInLumi_;
448  }
449 
451  // Auxiliary branch
452  // NOTE: lumiAux_ must be filled before calling fillBranches since it gets written out in that routine.
454  // Use the updated process historyID
456  // Store the process history.
458  // Store the reduced ID in the IndexIntoFile
460  // Add lumi to index.
463  fillBranches(InLumi, lb);
464  lumiTree_.optimizeBaskets(10ULL * 1024 * 1024);
465 
466  Service<JobReport> reportSvc;
467  reportSvc->reportLumiSection(reportToken_, lb.id().run(), lb.id().luminosityBlock(), nEventsInLumi_);
468  nEventsInLumi_ = 0;
469  }
470 
472  // Auxiliary branch
473  // NOTE: runAux_ must be filled before calling fillBranches since it gets written out in that routine.
474  runAux_ = r.runAuxiliary();
475  // Use the updated process historyID
476  runAux_.setProcessHistoryID(r.processHistoryID());
477  // Store the process history.
479  // Store the reduced ID in the IndexIntoFile
480  ProcessHistoryID reducedPHID = processHistoryRegistry_.reducedProcessHistoryID(r.processHistoryID());
481  // Add run to index.
482  indexIntoFile_.addEntry(reducedPHID, runAux_.run(), 0U, 0U, runEntryNumber_);
483  r.mergeableRunProductMetadata()->addEntryToStoredMetadata(storedMergeableRunProductMetadata_);
484  ++runEntryNumber_;
485  fillBranches(InRun, r);
486  runTree_.optimizeBaskets(10ULL * 1024 * 1024);
487 
488  Service<JobReport> reportSvc;
489  reportSvc->reportRunNumber(reportToken_, r.run());
490  }
491 
493  Parentage const* desc(nullptr);
494 
495  if (!parentageTree_->Branch(poolNames::parentageBranchName().c_str(), &desc, om_->basketSize(), 0))
496  throw Exception(errors::FatalRootError) << "Failed to create a branch for Parentages in the output file";
497 
499 
500  std::vector<ParentageID> orderedIDs(parentageIDs_.size());
501  for (auto const& parentageID : parentageIDs_) {
502  orderedIDs[parentageID.second] = parentageID.first;
503  }
504  //now put them into the TTree in the correct order
505  for (auto const& orderedID : orderedIDs) {
506  desc = ptReg.getMapped(orderedID);
507  //NOTE: some old format files have missing Parentage info
508  // so a null value of desc can't be fatal.
509  // Root will default construct an object in that case.
510  parentageTree_->Fill();
511  }
512  }
513 
515  FileFormatVersion fileFormatVersion(getFileFormatVersion());
516  FileFormatVersion* pFileFmtVsn = &fileFormatVersion;
517  TBranch* b =
518  metaDataTree_->Branch(poolNames::fileFormatVersionBranchName().c_str(), &pFileFmtVsn, om_->basketSize(), 0);
519  assert(b);
520  b->Fill();
521  }
522 
524  FileID* fidPtr = &fid_;
525  TBranch* b = metaDataTree_->Branch(poolNames::fileIdentifierBranchName().c_str(), &fidPtr, om_->basketSize(), 0);
526  assert(b);
527  b->Fill();
528  }
529 
533  ex << "The number of entries in at least one output TBranch whose entries\n"
534  "were copied from the input does not match the number of events\n"
535  "recorded in IndexIntoFile. This might (or might not) indicate a\n"
536  "problem related to fast copy.";
537  ex.addContext("Calling RootOutputFile::writeIndexIntoFile");
538  throw ex;
539  }
541  IndexIntoFile* iifPtr = &indexIntoFile_;
542  TBranch* b = metaDataTree_->Branch(poolNames::indexIntoFileBranchName().c_str(), &iifPtr, om_->basketSize(), 0);
543  assert(b);
544  b->Fill();
545  }
546 
550  TBranch* b =
551  metaDataTree_->Branch(poolNames::mergeableRunProductMetadataBranchName().c_str(), &ptr, om_->basketSize(), 0);
552  assert(b);
553  b->Fill();
554  }
555 
558  }
559 
561  BranchIDLists const* p = om_->branchIDLists();
562  TBranch* b = metaDataTree_->Branch(poolNames::branchIDListBranchName().c_str(), &p, om_->basketSize(), 0);
563  assert(b);
564  b->Fill();
565  }
566 
568  ThinnedAssociationsHelper const* p = om_->thinnedAssociationsHelper();
569  TBranch* b =
570  metaDataTree_->Branch(poolNames::thinnedAssociationsHelperBranchName().c_str(), &p, om_->basketSize(), 0);
571  assert(b);
572  b->Fill();
573  }
574 
577  }
578 
580  // Make a local copy of the ProductRegistry, removing any transient or pruned products.
581  typedef ProductRegistry::ProductList ProductList;
583  ProductRegistry pReg(reg->productList());
584  ProductList& pList = const_cast<ProductList&>(pReg.productList());
585  for (auto const& prod : pList) {
586  if (prod.second.branchID() != prod.second.originalBranchID()) {
587  if (branchesWithStoredHistory_.find(prod.second.branchID()) != branchesWithStoredHistory_.end()) {
588  branchesWithStoredHistory_.insert(prod.second.originalBranchID());
589  }
590  }
591  }
592  std::set<BranchID>::iterator end = branchesWithStoredHistory_.end();
593  for (ProductList::iterator it = pList.begin(); it != pList.end();) {
594  if (branchesWithStoredHistory_.find(it->second.branchID()) == end) {
595  // avoid invalidating iterator on deletion
596  ProductList::iterator itCopy = it;
597  ++it;
598  pList.erase(itCopy);
599 
600  } else {
601  ++it;
602  }
603  }
604 
605  ProductRegistry* ppReg = &pReg;
606  TBranch* b = metaDataTree_->Branch(poolNames::productDescriptionBranchName().c_str(), &ppReg, om_->basketSize(), 0);
607  assert(b);
608  b->Fill();
609  }
611  BranchChildren& pDeps = const_cast<BranchChildren&>(om_->branchChildren());
612  BranchChildren* ppDeps = &pDeps;
613  TBranch* b =
614  metaDataTree_->Branch(poolNames::productDependenciesBranchName().c_str(), &ppDeps, om_->basketSize(), 0);
615  assert(b);
616  b->Fill();
617  }
618 
620  metaDataTree_->SetEntries(-1);
623 
625 
626  // Create branch aliases for all the branches in the
627  // events/lumis/runs trees. The loop is over all types of data
628  // products.
629  for (int i = InEvent; i < NumBranchTypes; ++i) {
630  if (i == InProcess) {
631  // Output for ProcessBlocks is not implemented yet.
632  continue;
633  }
634  BranchType branchType = static_cast<BranchType>(i);
635  setBranchAliases(treePointers_[branchType]->tree(), om_->keptProducts()[branchType]);
636  treePointers_[branchType]->writeTree();
637  }
638 
639  // close the file -- mfp
640  // Just to play it safe, zero all pointers to objects in the TFile to be closed.
641  metaDataTree_ = parentageTree_ = nullptr;
642  for (auto& treePointer : treePointers_) {
643  if (treePointer.get() == nullptr) {
644  // Output for ProcessBlock is not implemented yet
645  continue;
646  }
647  treePointer->close();
648  treePointer = nullptr;
649  }
650  filePtr_->Close();
651  filePtr_ = nullptr; // propagate_const<T> has no reset() function
652 
653  // report that file has been closed
654  Service<JobReport> reportSvc;
655  reportSvc->outputFileClosed(reportToken_);
656  }
657 
658  void RootOutputFile::setBranchAliases(TTree* tree, SelectedProducts const& branches) const {
659  if (tree && tree->GetNbranches() != 0) {
660  for (auto const& selection : branches) {
661  BranchDescription const& pd = *selection.first;
662  std::string const& full = pd.branchName() + "obj";
663  if (pd.branchAliases().empty()) {
664  std::string const& alias = (pd.productInstanceName().empty() ? pd.moduleLabel() : pd.productInstanceName());
665  tree->SetAlias(alias.c_str(), full.c_str());
666  } else {
667  for (auto const& alias : pd.branchAliases()) {
668  tree->SetAlias(alias.c_str(), full.c_str());
669  }
670  }
671  }
672  }
673  }
674 
676  ProductProvenanceRetriever const* iMapper,
677  bool produced,
678  std::set<BranchID> const& iProducedIDs,
679  std::set<StoredProductProvenance>& oToFill) {
680  assert(om_->dropMetaData() != PoolOutputModule::DropAll);
681  assert(produced || om_->dropMetaData() != PoolOutputModule::DropPrior);
682  if (om_->dropMetaData() == PoolOutputModule::DropDroppedPrior && !produced)
683  return;
684  std::vector<BranchID> const& parentIDs = iGetParents.parentage().parents();
685  for (auto const& parentID : parentIDs) {
686  branchesWithStoredHistory_.insert(parentID);
687  ProductProvenance const* info = iMapper->branchIDToProvenance(parentID);
688  if (info) {
689  if (om_->dropMetaData() == PoolOutputModule::DropNone ||
690  (iProducedIDs.end() != iProducedIDs.find(info->branchID()))) {
691  if (insertProductProvenance(*info, oToFill)) {
692  //haven't seen this one yet
693  insertAncestors(*info, iMapper, produced, iProducedIDs, oToFill);
694  }
695  }
696  }
697  }
698  }
699 
700  void RootOutputFile::fillBranches(BranchType const& branchType,
701  OccurrenceForOutput const& occurrence,
702  StoredProductProvenanceVector* productProvenanceVecPtr,
703  ProductProvenanceRetriever const* provRetriever) {
704  std::vector<std::unique_ptr<WrapperBase> > dummies;
705 
706  OutputItemList& items = om_->selectedOutputItemList()[branchType];
707 
708  bool const doProvenance =
709  (productProvenanceVecPtr != nullptr) && (om_->dropMetaData() != PoolOutputModule::DropAll);
710  bool const keepProvenanceForPrior = doProvenance && om_->dropMetaData() != PoolOutputModule::DropPrior;
711 
712  bool const fastCloning = (branchType == InEvent) && (whyNotFastClonable_ == FileBlock::CanFastClone);
713  std::set<StoredProductProvenance> provenanceToKeep;
714  //
715  //If we are dropping some of the meta data we need to know
716  // which BranchIDs were produced in this process because
717  // we may be storing meta data for only those products
718  // We do this only for event products.
719  std::set<BranchID> producedBranches;
720  if (doProvenance && branchType == InEvent && om_->dropMetaData() != PoolOutputModule::DropNone) {
722  for (auto bd : preg->allBranchDescriptions()) {
723  if (bd->produced() && bd->branchType() == InEvent) {
724  producedBranches.insert(bd->branchID());
725  }
726  }
727  }
728 
729  // Loop over EDProduct branches, possibly fill the provenance, and write the branch.
730  for (auto& item : items) {
731  BranchID const& id = item.branchDescription()->branchID();
732  branchesWithStoredHistory_.insert(id);
733 
734  bool produced = item.branchDescription()->produced();
735  bool getProd =
736  (produced || !fastCloning || treePointers_[branchType]->uncloned(item.branchDescription()->branchName()));
737  bool keepProvenance = doProvenance && (produced || keepProvenanceForPrior);
738 
739  WrapperBase const* product = nullptr;
740  ProductProvenance const* productProvenance = nullptr;
741  if (getProd) {
742  BasicHandle result = occurrence.getByToken(item.token(), item.branchDescription()->unwrappedTypeID());
743  product = result.wrapper();
744  if (result.isValid() && keepProvenance) {
745  productProvenance = result.provenance()->productProvenance();
746  }
747  if (product == nullptr) {
748  // No product with this ID is in the event.
749  // Add a null product.
750  TClass* cp = item.branchDescription()->wrappedType().getClass();
751  assert(cp != nullptr);
752  int offset = cp->GetBaseClassOffset(wrapperBaseTClass_);
753  void* p = cp->New();
754  std::unique_ptr<WrapperBase> dummy = getWrapperBasePtr(p, offset);
755  product = dummy.get();
756  dummies.emplace_back(std::move(dummy));
757  }
758  item.setProduct(product);
759  }
760  if (keepProvenance && productProvenance == nullptr) {
761  productProvenance = provRetriever->branchIDToProvenance(item.branchDescription()->originalBranchID());
762  }
763  if (productProvenance) {
764  insertProductProvenance(*productProvenance, provenanceToKeep);
765  insertAncestors(*productProvenance, provRetriever, produced, producedBranches, provenanceToKeep);
766  }
767  }
768 
769  if (doProvenance)
770  productProvenanceVecPtr->assign(provenanceToKeep.begin(), provenanceToKeep.end());
771  treePointers_[branchType]->fillTree();
772  if (doProvenance)
773  productProvenanceVecPtr->clear();
774  }
775 
777  std::set<edm::StoredProductProvenance>& oToInsert) {
778  StoredProductProvenance toStore;
779  toStore.branchID_ = iProv.branchID().id();
780  std::set<edm::StoredProductProvenance>::iterator itFound = oToInsert.find(toStore);
781  if (itFound == oToInsert.end()) {
782  //get the index to the ParentageID or insert a new value if not already present
783  std::pair<std::map<edm::ParentageID, unsigned int>::iterator, bool> i =
784  parentageIDs_.insert(std::make_pair(iProv.parentageID(), static_cast<unsigned int>(parentageIDs_.size())));
785  toStore.parentageIDIndex_ = i.first->second;
786  if (toStore.parentageIDIndex_ >= parentageIDs_.size()) {
788  << "RootOutputFile::insertProductProvenance\n"
789  << "The parentage ID index value " << toStore.parentageIDIndex_
790  << " is out of bounds. The maximum value is currently " << parentageIDs_.size() - 1 << ".\n"
791  << "This should never happen.\n"
792  << "Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
793  }
794 
795  oToInsert.insert(toStore);
796  return true;
797  }
798  return false;
799  }
800 } // namespace edm
edm::LuminosityBlockAuxiliary::run
RunNumber_t run() const
Definition: LuminosityBlockAuxiliary.h:35
ConstProductRegistry.h
edm::Parentage::parents
std::vector< BranchID > const & parents() const
Definition: Parentage.h:44
edm::RootOutputFile::dataTypeReported_
bool dataTypeReported_
Definition: RootOutputFile.h:141
ThinnedAssociationsHelper.h
edm::FileBlock::BranchMismatch
Definition: FileBlock.h:54
edm::EventAuxiliary::event
EventNumber_t event() const
Definition: EventAuxiliary.h:72
ProcessHistoryID.h
edm::RootOutputFile::shouldWeCloseFile
bool shouldWeCloseFile() const
Definition: RootOutputFile.cc:395
edm::poolNames::branchIDListBranchName
std::string const & branchIDListBranchName()
Definition: BranchType.cc:176
edm::RootOutputFile::RootOutputFile
RootOutputFile(PoolOutputModule *om, std::string const &fileName, std::string const &logicalFileName, std::vector< std::string > const &processesWithSelectedMergeableRunProducts)
Definition: RootOutputFile.cc:81
edm::BranchDescription::productInstanceName
std::string const & productInstanceName() const
Definition: BranchDescription.h:81
edm::RootOutputTree::optimizeBaskets
void optimizeBaskets(ULong64_t size)
Definition: RootOutputTree.h:95
edm::errors::MismatchedInputFiles
Definition: EDMException.h:52
edm::ProcessHistoryRegistry::registerProcessHistory
bool registerProcessHistory(ProcessHistory const &processHistory)
Definition: ProcessHistoryRegistry.cc:11
mps_fire.i
i
Definition: mps_fire.py:428
edm::RootOutputFile::setBranchAliases
void setBranchAliases(TTree *tree, SelectedProducts const &branches) const
Definition: RootOutputFile.cc:658
edm::poolNames::fileFormatVersionBranchName
std::string const & fileFormatVersionBranchName()
Definition: BranchType.cc:182
edm::RootOutputFile::indexIntoFile_
IndexIntoFile indexIntoFile_
Definition: RootOutputFile.h:122
edm::RootOutputFile::pRunAux_
RunAuxiliary const * pRunAux_
Definition: RootOutputFile.h:132
MessageLogger.h
edm::RootOutputFile::runEntryNumber_
IndexIntoFile::EntryNumber_t runEntryNumber_
Definition: RootOutputFile.h:121
edm::FileBlock::OutputMaxEventsTooSmall
Definition: FileBlock.h:52
funct::false
false
Definition: Factorize.h:29
edm::getWrapperBasePtr
std::unique_ptr< WrapperBase > getWrapperBasePtr(void *p, int offset)
Definition: getWrapperBasePtr.h:8
cms::Exception::addContext
void addContext(std::string const &context)
Definition: Exception.cc:165
edm::RootOutputFile::parentageIDs_
std::map< ParentageID, unsigned int > parentageIDs_
Definition: RootOutputFile.h:143
edm::IndexIntoFile::addEntry
void addEntry(ProcessHistoryID const &processHistoryID, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, EntryNumber_t entry)
Definition: IndexIntoFile.cc:75
getWrapperBasePtr.h
edm::BasicHandle
Definition: BasicHandle.h:43
filterRecHits_cfg.splitLevel
splitLevel
Definition: filterRecHits_cfg.py:41
edm::sort_all
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:92
cms::Digest::digest
MD5Result digest()
Definition: Digest.cc:171
edm::errors::LogicError
Definition: EDMException.h:37
edm::FileID::fid
std::string const & fid() const
Definition: FileID.h:19
edm::RootOutputFile::writeProductDescriptionRegistry
void writeProductDescriptionRegistry()
Definition: RootOutputFile.cc:579
MicroEventContent_cff.branch
branch
Definition: MicroEventContent_cff.py:178
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
tree
Definition: tree.py:1
ParameterSetBlob.h
deep_tau::DeepTauBase::BasicDiscriminator
BasicDiscriminator
Definition: DeepTauBase.h:115
edm::RootOutputFile::beginInputFile
void beginInputFile(FileBlock const &fb, int remainingEvents)
Definition: RootOutputFile.cc:309
edm::FileBlock::NoRootInputSource
Definition: FileBlock.h:27
edm::ParentageRegistry::instance
static ParentageRegistry * instance()
Definition: ParentageRegistry.cc:4
RunForOutput.h
edm::poolNames::parameterSetsTreeName
std::string const & parameterSetsTreeName()
Definition: BranchType.cc:204
edm::FileBlock::NotProcessingEvents
Definition: FileBlock.h:29
edm::PoolOutputModule::selectedOutputItemList
OutputItemListArray const & selectedOutputItemList() const
Definition: PoolOutputModule.h:131
edm::BranchListIndexes
std::vector< BranchListIndex > BranchListIndexes
Definition: BranchListIndex.h:18
edm::RootOutputFile::whyNotFastClonable_
int whyNotFastClonable_
Definition: RootOutputFile.h:115
edm::RootOutputFile::treePointers_
RootOutputTreePtrArray treePointers_
Definition: RootOutputFile.h:140
ExceptionPropagate.h
edm::IndexIntoFile
Definition: IndexIntoFile.h:225
Algorithms.h
cms::cuda::assert
assert(be >=bs)
edm::propagate_const::get
constexpr element_type const * get() const
Definition: propagate_const.h:64
edm::RootOutputFile::fid_
FileID fid_
Definition: RootOutputFile.h:118
edm::FileBlock::RunOrLumiNotContiguous
Definition: FileBlock.h:36
edm::StoredProductProvenance::branchID_
unsigned int branchID_
Definition: StoredProductProvenance.h:30
edm::poolNames::indexIntoFileBranchName
std::string const & indexIntoFileBranchName()
Definition: BranchType.cc:191
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
mathSSE::lh
bool int lh
Definition: SIMDVec.h:20
edm::RootOutputFile::lumiEntryNumber_
IndexIntoFile::EntryNumber_t lumiEntryNumber_
Definition: RootOutputFile.h:120
edm::RootOutputFile::lumiTree_
RootOutputTree lumiTree_
Definition: RootOutputFile.h:138
edm::threadLocalException::getException
std::exception_ptr getException()
Definition: ExceptionPropagate.cc:7
CommonProvenanceFiller.h
full
Definition: GenABIO.cc:168
ProductRegistry.h
edm::PoolOutputModule
Definition: PoolOutputModule.h:39
EventForOutput.h
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
edm::RootOutputFile::writeThinnedAssociationsHelper
void writeThinnedAssociationsHelper()
Definition: RootOutputFile.cc:567
edm::FileBlock::EventsToBeSorted
Definition: FileBlock.h:35
Parentage.h
edm::FileID
Definition: FileID.h:14
edm::RootOutputFile::file_
std::string file_
Definition: RootOutputFile.h:111
edm::RootOutputTree::writeTTree
static void writeTTree(TTree *tree)
Definition: RootOutputTree.cc:276
DTskim_cfg.dataType
dataType
Definition: DTskim_cfg.py:56
edm::poolNames::branchListIndexesBranchName
std::string const & branchListIndexesBranchName()
Definition: BranchType.cc:202
edm::RootOutputFile::writeBranchIDListRegistry
void writeBranchIDListRegistry()
Definition: RootOutputFile.cc:560
edm::BranchID::id
unsigned int id() const
Definition: BranchID.h:21
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
edm::InRun
Definition: BranchType.h:11
edm::BranchType
BranchType
Definition: BranchType.h:11
edm::BranchTypeToAuxiliaryBranchName
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:109
edm::RootOutputTree::checkSplitLevelsAndBasketSizes
bool checkSplitLevelsAndBasketSizes(TTree *inputTree) const
Definition: RootOutputTree.cc:132
mps_monitormerge.items
list items
Definition: mps_monitormerge.py:29
edm::NumBranchTypes
Definition: BranchType.h:11
edm::OccurrenceForOutput
Definition: OccurrenceForOutput.h:45
edm::Exception
Definition: EDMException.h:77
edm::SelectedProducts
std::vector< std::pair< BranchDescription const *, EDGetToken > > SelectedProducts
Definition: SelectedProducts.h:11
edm::LuminosityBlockForOutput
Definition: LuminosityBlockForOutput.h:40
edm::RootOutputFile::fillBranches
void fillBranches(BranchType const &branchType, OccurrenceForOutput const &occurrence, StoredProductProvenanceVector *productProvenanceVecPtr=nullptr, ProductProvenanceRetriever const *provRetriever=nullptr)
Definition: RootOutputFile.cc:700
edm::ProductRegistry
Definition: ProductRegistry.h:37
edm::FileBlock
Definition: FileBlock.h:20
edm::poolNames::mergeableRunProductMetadataBranchName
std::string const & mergeableRunProductMetadataBranchName()
Definition: BranchType.cc:194
edm::LuminosityBlockAuxiliary
Definition: LuminosityBlockAuxiliary.h:15
EDMException.h
edm::EventAuxiliary::run
RunNumber_t run() const
Definition: EventAuxiliary.h:73
edm::RunForOutput
Definition: RunForOutput.h:39
edm::InProcess
Definition: BranchType.h:11
edm::RootOutputFile::pLumiAux_
LuminosityBlockAuxiliary const * pLumiAux_
Definition: RootOutputFile.h:131
ParentageRegistry.h
edm::FileBlock::CanFastClone
Definition: FileBlock.h:24
edm::RootOutputFile::metaDataTree_
edm::propagate_const< TTree * > metaDataTree_
Definition: RootOutputFile.h:125
edm::poolNames::parentageBranchName
std::string const & parentageBranchName()
Definition: BranchType.cc:149
edm::RootOutputFile::nEventsInLumi_
unsigned long nEventsInLumi_
Definition: RootOutputFile.h:124
edm::RootOutputFile::pEventEntryInfoVector_
edm::propagate_const< StoredProductProvenanceVector * > pEventEntryInfoVector_
Definition: RootOutputFile.h:134
edm::RootOutputFile::processHistoryRegistry_
ProcessHistoryRegistry processHistoryRegistry_
Definition: RootOutputFile.h:142
edm::RootOutputFile::filePtr_
edm::propagate_const< std::shared_ptr< TFile > > filePtr_
Definition: RootOutputFile.h:117
edm::ProductProvenance
Definition: ProductProvenance.h:24
edm::LuminosityBlockForOutput::luminosityBlockAuxiliary
LuminosityBlockAuxiliary const & luminosityBlockAuxiliary() const
Definition: LuminosityBlockForOutput.h:52
edm::OccurrenceForOutput::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: OccurrenceForOutput.cc:26
cms::Digest
Definition: Digest.h:46
edm::RootOutputTree::maybeFastCloneTree
void maybeFastCloneTree(bool canFastClone, bool canFastCloneAux, TTree *tree, std::string const &option)
Definition: RootOutputTree.cc:292
edm::errors::FatalRootError
Definition: EDMException.h:51
Service.h
edm::RootOutputTree::setAutoFlush
void setAutoFlush(Long64_t size)
Definition: RootOutputTree.h:97
edm::fillParameterSetBranch
void fillParameterSetBranch(TTree *parameterSetsTree, int basketSize)
Definition: CommonProvenanceFiller.cc:18
edm::StoredMergeableRunProductMetadata
Definition: StoredMergeableRunProductMetadata.h:57
EventID.h
edm::BranchID
Definition: BranchID.h:14
mps_fire.end
end
Definition: mps_fire.py:242
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
corrVsCorr.selection
selection
main part
Definition: corrVsCorr.py:100
edm::threadLocalException::setException
void setException(std::exception_ptr e)
Definition: ExceptionPropagate.cc:6
edm::RootOutputFile::insertProductProvenance
bool insertProductProvenance(const ProductProvenance &, std::set< StoredProductProvenance > &oToInsert)
Definition: RootOutputFile.cc:776
edm::RootOutputFile::writeParameterSetRegistry
void writeParameterSetRegistry()
Definition: RootOutputFile.cc:575
edm::ProductProvenance::branchID
BranchID const & branchID() const
Definition: ProductProvenance.h:38
edm::RootOutputFile::branchesWithStoredHistory_
std::set< BranchID > branchesWithStoredHistory_
Definition: RootOutputFile.h:144
edm::Hash< ProcessHistoryType >
edm::RootOutputFile::OutputItemList
PoolOutputModule::OutputItemList OutputItemList
Definition: RootOutputFile.h:48
edm::RootOutputTree::checkIfFastClonable
bool checkIfFastClonable(TTree *inputTree) const
Definition: RootOutputTree.cc:180
edm::InEvent
Definition: BranchType.h:11
edm::RootOutputFile::wrapperBaseTClass_
edm::propagate_const< TClass * > wrapperBaseTClass_
Definition: RootOutputFile.h:145
edm::OccurrenceForOutput::processHistory
virtual ProcessHistory const & processHistory() const
Definition: OccurrenceForOutput.cc:40
edm::RootOutputFile::canFastCloneAux_
bool canFastCloneAux_
Definition: RootOutputFile.h:116
b
double b
Definition: hdecay.h:118
edm::poolNames::parentageTreeName
std::string const & parentageTreeName()
Definition: BranchType.cc:147
edm::BranchIDLists
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
edm::RootOutputFile::insertAncestors
void insertAncestors(ProductProvenance const &iGetParents, ProductProvenanceRetriever const *iMapper, bool produced, std::set< BranchID > const &producedBranches, std::set< StoredProductProvenance > &oToFill)
Definition: RootOutputFile.cc:675
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
edm::EventAuxiliary
Definition: EventAuxiliary.h:14
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::Parentage
Definition: Parentage.h:25
edm::OccurrenceForOutput::getByToken
BasicHandle getByToken(EDGetToken token, TypeID const &typeID) const
Definition: OccurrenceForOutput.cc:44
edm::poolNames::eventSelectionsBranchName
std::string const & eventSelectionsBranchName()
Definition: BranchType.cc:200
edm::RootOutputFile::eventTree_
RootOutputTree eventTree_
Definition: RootOutputFile.h:137
funct::true
true
Definition: Factorize.h:173
edm::RootOutputFile::writeStoredMergeableRunProductMetadata
void writeStoredMergeableRunProductMetadata()
Definition: RootOutputFile.cc:547
edm::RootOutputTree::makeTTree
static TTree * makeTTree(TFile *filePtr, std::string const &name, int splitLevel)
Definition: RootOutputTree.cc:121
edm::ThinnedAssociationsHelper
Definition: ThinnedAssociationsHelper.h:37
edm::ProductRegistry::ProductList
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductRegistry.h:39
edm::getFileFormatVersion
int getFileFormatVersion()
Definition: GetFileFormatVersion.cc:4
edm::FileFormatVersion
Definition: FileFormatVersion.h:7
edm::InLumi
Definition: BranchType.h:11
edm::poolNames::productDescriptionBranchName
std::string const & productDescriptionBranchName()
Definition: BranchType.cc:155
MainPageGenerator.tree
tree
Definition: MainPageGenerator.py:264
edm::RootOutputFile::pBranchListIndexes_
BranchListIndexes const * pBranchListIndexes_
Definition: RootOutputFile.h:135
edm::EventAuxiliary::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventAuxiliary.h:67
edm::ParentageRegistry::getMapped
bool getMapped(key_type const &k, value_type &result) const
Definition: ParentageRegistry.cc:9
edm::ParentageRegistry
Definition: ParentageRegistry.h:12
edm::RootOutputFile::runTree_
RootOutputTree runTree_
Definition: RootOutputFile.h:139
FileFormatVersion.h
edm::RootOutputTree
Definition: RootOutputTree.h:24
edm::FileBlock::FileTooOld
Definition: FileBlock.h:33
edm::RootOutputFile::writeLuminosityBlock
void writeLuminosityBlock(LuminosityBlockForOutput const &lb)
Definition: RootOutputFile.cc:450
edm::FileBlock::HasSecondaryFileSequence
Definition: FileBlock.h:30
GlobalIdentifier.h
edm::FileBlock::EventsOrLumisSelectedByID
Definition: FileBlock.h:37
edm::BranchChildren
Definition: BranchChildren.h:18
edm::RootOutputTree::checkEntriesInReadBranches
bool checkEntriesInReadBranches(Long64_t expectedNumberOfEntries) const
Definition: RootOutputTree.cc:202
edm::Service
Definition: Service.h:30
edm::createGlobalIdentifier
std::string createGlobalIdentifier(bool binary=false)
Definition: GlobalIdentifier.cc:5
edm::RootOutputFile::writeRun
void writeRun(RunForOutput const &r)
Definition: RootOutputFile.cc:471
FrontierConditions_GlobalTag_cff.file
file
Definition: FrontierConditions_GlobalTag_cff.py:13
edm::RootOutputFile::parentageTree_
edm::propagate_const< TTree * > parentageTree_
Definition: RootOutputFile.h:127
edm::RootOutputFile::writeOne
void writeOne(EventForOutput const &e)
Definition: RootOutputFile.cc:401
edm::LuminosityBlockID::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockID.h:42
edm::LuminosityBlockForOutput::id
LuminosityBlockID const & id() const
Definition: LuminosityBlockForOutput.h:53
edm::FileBlock::NoEventsInFile
Definition: FileBlock.h:34
edm::PoolOutputModule::DropDroppedPrior
Definition: PoolOutputModule.h:41
edm::WrapperBase
Definition: WrapperBase.h:23
edm::RootOutputFile::logicalFile_
std::string logicalFile_
Definition: RootOutputFile.h:112
edm::RootOutputFile::reportToken_
JobReport::Token reportToken_
Definition: RootOutputFile.h:113
edm::BranchDescription::branchName
std::string const & branchName() const
Definition: BranchDescription.h:119
edm::ProductProvenance::parentageID
ParentageID const & parentageID() const
Definition: ProductProvenance.h:39
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
BranchIDList.h
edm::ProcessHistoryRegistry::reducedProcessHistoryID
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
Definition: ProcessHistoryRegistry.cc:23
edm::RootOutputFile::runAux_
RunAuxiliary runAux_
Definition: RootOutputFile.h:129
edm::RootOutputFile::finishEndFile
void finishEndFile()
Definition: RootOutputFile.cc:619
FileBlock.h
alignCSCRings.r
r
Definition: alignCSCRings.py:93
edm::PoolOutputModule::DropPrior
Definition: PoolOutputModule.h:41
Registry.h
Digest.h
edm::EventForOutput
Definition: EventForOutput.h:50
L1DTConfigBti_cff.LL
LL
Definition: L1DTConfigBti_cff.py:25
edm::RootOutputTree::setEntries
void setEntries()
Definition: RootOutputTree.h:84
edm::ProductProvenanceRetriever
Definition: ProductProvenanceRetriever.h:56
edm::BranchTypeToProductProvenanceBranchName
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
Definition: BranchType.cc:132
edm::RootOutputFile::om_
edm::propagate_const< PoolOutputModule * > om_
Definition: RootOutputFile.h:114
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::RootOutputFile::writeFileFormatVersion
void writeFileFormatVersion()
Definition: RootOutputFile.cc:514
eostools.move
def move(src, dest)
Definition: eostools.py:511
edm::FileBlock::EventSelectionUsed
Definition: FileBlock.h:49
edm::match
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)
Definition: BranchDescription.cc:351
edm::FileBlock::DisabledInConfigFile
Definition: FileBlock.h:48
edm::LuminosityBlockAuxiliary::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockAuxiliary.h:34
edm::RootOutputFile::eventEntryNumber_
IndexIntoFile::EntryNumber_t eventEntryNumber_
Definition: RootOutputFile.h:119
edm::RootOutputFile::writeFileIdentifier
void writeFileIdentifier()
Definition: RootOutputFile.cc:523
edm::RunAuxiliary::setProcessHistoryID
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: RunAuxiliary.h:26
RootOutputFile.h
MergeableRunProductMetadata.h
edm::BranchDescription::moduleLabel
std::string const & moduleLabel() const
Definition: BranchDescription.h:72
edm::poolNames::metaDataTreeName
std::string const & metaDataTreeName()
Definition: BranchType.cc:152
edm::EventAuxiliary::processHistoryID
ProcessHistoryID const & processHistoryID() const
Definition: EventAuxiliary.h:61
SiStripOfflineCRack_cfg.alias
alias
Definition: SiStripOfflineCRack_cfg.py:128
EventAuxiliary.h
Exception
Definition: hltDiff.cc:246
edm::StoredMergeableRunProductMetadata::optimizeBeforeWrite
void optimizeBeforeWrite()
Definition: StoredMergeableRunProductMetadata.cc:31
edm::RunAuxiliary::run
RunNumber_t run() const
Definition: RunAuxiliary.h:31
edm::RootOutputTree::addAuxiliary
void addAuxiliary(std::string const &branchName, T const *&pAux, int bufSize, bool allowCloning=true)
Definition: RootOutputTree.h:34
BasicHandle.h
edm::ProductProvenanceRetriever::branchIDToProvenance
ProductProvenance const * branchIDToProvenance(BranchID const &bid) const
Definition: ProductProvenanceRetriever.cc:148
edm::errors::OtherCMS
Definition: EDMException.h:27
edm::BranchDescription::branchAliases
std::set< std::string > const & branchAliases() const
Definition: BranchDescription.h:117
edm::fillProcessHistoryBranch
void fillProcessHistoryBranch(TTree *metaDataTree, int basketSize, ProcessHistoryRegistry const &processHistoryRegistry)
Definition: CommonProvenanceFiller.cc:32
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
edm::poolNames::thinnedAssociationsHelperBranchName
std::string const & thinnedAssociationsHelperBranchName()
Definition: BranchType.cc:179
edm::PoolOutputModule::DropNone
Definition: PoolOutputModule.h:41
edm::ProductProvenance::parentage
Parentage const & parentage() const
Definition: ProductProvenance.cc:39
edm::LuminosityBlockID::run
RunNumber_t run() const
Definition: LuminosityBlockID.h:41
test_L1EGCrystalClusterEmulator_cfg.fastCloning
fastCloning
Definition: test_L1EGCrystalClusterEmulator_cfg.py:60
edm::IndexIntoFile::sortVector_Run_Or_Lumi_Entries
void sortVector_Run_Or_Lumi_Entries()
Definition: IndexIntoFile.cc:392
edm::LuminosityBlockAuxiliary::setProcessHistoryID
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: LuminosityBlockAuxiliary.h:33
edm::poolNames::productDependenciesBranchName
std::string const & productDependenciesBranchName()
Definition: BranchType.cc:158
edm::FileBlock::ParallelProcesses
Definition: FileBlock.h:28
edm::StoredProductProvenance::parentageIDIndex_
unsigned int parentageIDIndex_
Definition: StoredProductProvenance.h:31
edm::BranchDescription
Definition: BranchDescription.h:32
edm::RootOutputFile::respondToCloseInputFile
void respondToCloseInputFile(FileBlock const &fb)
Definition: RootOutputFile.cc:389
ParameterSetID.h
mps_fire.result
result
Definition: mps_fire.py:311
JobReport.h
OccurrenceForOutput.h
GetFileFormatVersion.h
ParameterSet.h
dummy
Definition: DummySelector.h:38
edm::EventAuxiliary::isRealData
bool isRealData() const
Definition: EventAuxiliary.h:74
edm::FileBlock::MaxEventsTooSmall
Definition: FileBlock.h:39
LuminosityBlockForOutput.h
edm::RootOutputFile::writeProductDependencies
void writeProductDependencies()
Definition: RootOutputFile.cc:610
edm::poolNames::fileIdentifierBranchName
std::string const & fileIdentifierBranchName()
Definition: BranchType.cc:185
edm::moduleName
std::string moduleName(Provenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
NanoAODEDMEventContent_cff.compressionLevel
compressionLevel
Definition: NanoAODEDMEventContent_cff.py:15
edm::RootOutputFile::pEventAux_
EventAuxiliary const * pEventAux_
Definition: RootOutputFile.h:130
cms::MD5Result::toString
std::string toString() const
Definition: Digest.cc:95
edm::RootOutputFile::pEventEntryInfoVector
StoredProductProvenanceVector const * pEventEntryInfoVector() const
Definition: RootOutputFile.h:103
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
edm::EventSelectionIDVector
std::vector< EventSelectionID > EventSelectionIDVector
Definition: EventSelectionID.h:16
CommonMethods.cp
def cp(fromDir, toDir, listOfFiles, overwrite=False, smallList=False)
Definition: CommonMethods.py:192
edm::RootOutputTree::addBranch
void addBranch(std::string const &branchName, std::string const &className, void const *&pProd, int splitLevel, int basketSize, bool produced)
Definition: RootOutputTree.cc:328
edm::RootOutputFile::lumiAux_
LuminosityBlockAuxiliary lumiAux_
Definition: RootOutputFile.h:128
edm::RootOutputFile::writeParentageRegistry
void writeParentageRegistry()
Definition: RootOutputFile.cc:492
edm::RootOutputFile::pEventSelectionIDs_
EventSelectionIDVector const * pEventSelectionIDs_
Definition: RootOutputFile.h:136
edm::PoolOutputModule::DropAll
Definition: PoolOutputModule.h:41
edm::errors::Configuration
Definition: EDMException.h:36
edm::StoredProductProvenance
Definition: StoredProductProvenance.h:28
edm::RootOutputFile::parameterSetsTree_
edm::propagate_const< TTree * > parameterSetsTree_
Definition: RootOutputFile.h:126
edm::RootOutputFile::storedMergeableRunProductMetadata_
StoredMergeableRunProductMetadata storedMergeableRunProductMetadata_
Definition: RootOutputFile.h:123
edm::FileBlock::MaxLumisTooSmall
Definition: FileBlock.h:40
edm::RootOutputFile::writeIndexIntoFile
void writeIndexIntoFile()
Definition: RootOutputFile.cc:530
benchmark_cfg.fb
fb
Definition: benchmark_cfg.py:14
edm::StoredProductProvenanceVector
std::vector< StoredProductProvenance > StoredProductProvenanceVector
Definition: StoredProductProvenance.h:34
edm::FileBlock::DuplicateEventsRemoved
Definition: FileBlock.h:42
edm::RootOutputFile::writeProcessHistoryRegistry
void writeProcessHistoryRegistry()
Definition: RootOutputFile.cc:556
edm::FileBlock::SplitLevelMismatch
Definition: FileBlock.h:53
edm::RunAuxiliary
Definition: RunAuxiliary.h:15
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
edm::FileBlock::InitialEventsSkipped
Definition: FileBlock.h:38
edm::PoolOutputModule::eventAutoFlushSize
int eventAutoFlushSize() const
Definition: PoolOutputModule.h:51
BranchChildren.h