CMS 3D CMS Logo

List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
edm::RootOutputFile Class Reference

#include <RootOutputFile.h>

Public Types

typedef PoolOutputModule::OutputItem OutputItem
 
typedef PoolOutputModule::OutputItemList OutputItemList
 
typedef std::array< edm::propagate_const< RootOutputTree * >, NumBranchTypesRootOutputTreePtrArray
 

Public Member Functions

void beginInputFile (FileBlock const &fb, int remainingEvents)
 
std::string const & fileName () const
 
void finishEndFile ()
 
void respondToCloseInputFile (FileBlock const &fb)
 
 RootOutputFile (PoolOutputModule *om, std::string const &fileName, std::string const &logicalFileName, std::vector< std::string > const &processesWithSelectedMergeableRunProducts)
 
bool shouldWeCloseFile () const
 
void writeBranchIDListRegistry ()
 
void writeEventAuxiliary ()
 
void writeFileFormatVersion ()
 
void writeFileIdentifier ()
 
void writeIndexIntoFile ()
 
void writeLuminosityBlock (LuminosityBlockForOutput const &lb)
 
void writeOne (EventForOutput const &e)
 
void writeParameterSetRegistry ()
 
void writeParentageRegistry ()
 
void writeProcessHistoryRegistry ()
 
void writeProductDependencies ()
 
void writeProductDescriptionRegistry ()
 
void writeRun (RunForOutput const &r)
 
void writeStoredMergeableRunProductMetadata ()
 
void writeThinnedAssociationsHelper ()
 
 ~RootOutputFile ()
 

Private Member Functions

std::shared_ptr< TFile > & filePtr ()
 
std::shared_ptr< TFile const > filePtr () const
 
void fillBranches (BranchType const &branchType, OccurrenceForOutput const &occurrence, StoredProductProvenanceVector *productProvenanceVecPtr=nullptr, ProductProvenanceRetriever const *provRetriever=nullptr)
 
void insertAncestors (ProductProvenance const &iGetParents, ProductProvenanceRetriever const *iMapper, bool produced, std::set< BranchID > const &producedBranches, std::set< StoredProductProvenance > &oToFill)
 
bool insertProductProvenance (const ProductProvenance &, std::set< StoredProductProvenance > &oToInsert)
 
StoredProductProvenanceVector *& pEventEntryInfoVector ()
 
StoredProductProvenanceVector const * pEventEntryInfoVector () const
 
void setBranchAliases (TTree *tree, SelectedProducts const &branches) const
 

Private Attributes

std::set< BranchIDbranchesWithStoredHistory_
 
bool canFastCloneAux_
 
CompactEventAuxiliaryVector compactEventAuxiliary_
 
bool dataTypeReported_
 
StoredProductProvenanceVector eventEntryInfoVector_
 
IndexIntoFile::EntryNumber_t eventEntryNumber_
 
RootOutputTree eventTree_
 
FileID fid_
 
std::string file_
 
edm::propagate_const< std::shared_ptr< TFile > > filePtr_
 
IndexIntoFile indexIntoFile_
 
std::string logicalFile_
 
LuminosityBlockAuxiliary lumiAux_
 
IndexIntoFile::EntryNumber_t lumiEntryNumber_
 
RootOutputTree lumiTree_
 
edm::propagate_const< TTree * > metaDataTree_
 
unsigned long nEventsInLumi_
 
edm::propagate_const< PoolOutputModule * > om_
 
edm::propagate_const< TTree * > parameterSetsTree_
 
std::map< ParentageID, unsigned int > parentageIDs_
 
edm::propagate_const< TTree * > parentageTree_
 
BranchListIndexes const * pBranchListIndexes_
 
EventAuxiliary const * pEventAux_
 
edm::propagate_const< StoredProductProvenanceVector * > pEventEntryInfoVector_
 
EventSelectionIDVector const * pEventSelectionIDs_
 
LuminosityBlockAuxiliary const * pLumiAux_
 
ProcessHistoryRegistry processHistoryRegistry_
 
RunAuxiliary const * pRunAux_
 
JobReport::Token reportToken_
 
RunAuxiliary runAux_
 
IndexIntoFile::EntryNumber_t runEntryNumber_
 
RootOutputTree runTree_
 
StoredMergeableRunProductMetadata storedMergeableRunProductMetadata_
 
RootOutputTreePtrArray treePointers_
 
int whyNotFastClonable_
 
edm::propagate_const< TClass * > wrapperBaseTClass_
 

Detailed Description

Definition at line 46 of file RootOutputFile.h.

Member Typedef Documentation

◆ OutputItem

Definition at line 48 of file RootOutputFile.h.

◆ OutputItemList

Definition at line 49 of file RootOutputFile.h.

◆ RootOutputTreePtrArray

Definition at line 50 of file RootOutputFile.h.

Constructor & Destructor Documentation

◆ RootOutputFile()

edm::RootOutputFile::RootOutputFile ( PoolOutputModule om,
std::string const &  fileName,
std::string const &  logicalFileName,
std::vector< std::string > const &  processesWithSelectedMergeableRunProducts 
)
explicit

Definition at line 81 of file RootOutputFile.cc.

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_(),
97  storedMergeableRunProductMetadata_(processesWithSelectedMergeableRunProducts),
98  nEventsInLumi_(0),
99  metaDataTree_(nullptr),
100  parameterSetsTree_(nullptr),
101  parentageTree_(nullptr),
102  lumiAux_(),
103  runAux_(),
104  pEventAux_(nullptr),
106  pRunAux_(&runAux_),
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),
117  parentageIDs_(),
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()) {
130  eventTree_.setAutoFlush(-1 * om->eventAutoFlushSize());
131  }
132  if (om_->compactEventAuxiliary()) {
133  eventTree_.addAuxiliary<EventAuxiliary>(
134  BranchTypeToAuxiliaryBranchName(InEvent), pEventAux_, om_->auxItems()[InEvent].basketSize_, false);
135  eventTree_.tree()->SetBranchStatus(BranchTypeToAuxiliaryBranchName(InEvent).c_str(),
136  false); // see writeEventAuxiliary
137  } else {
138  eventTree_.addAuxiliary<EventAuxiliary>(
139  BranchTypeToAuxiliaryBranchName(InEvent), pEventAux_, om_->auxItems()[InEvent].basketSize_);
140  }
141 
144  om_->auxItems()[InEvent].basketSize_);
146  poolNames::eventSelectionsBranchName(), pEventSelectionIDs_, om_->auxItems()[InEvent].basketSize_, false);
149 
150  lumiTree_.addAuxiliary<LuminosityBlockAuxiliary>(
151  BranchTypeToAuxiliaryBranchName(InLumi), pLumiAux_, om_->auxItems()[InLumi].basketSize_);
152 
153  runTree_.addAuxiliary<RunAuxiliary>(
154  BranchTypeToAuxiliaryBranchName(InRun), pRunAux_, om_->auxItems()[InRun].basketSize_);
155 
159  treePointers_[InProcess] = nullptr;
160 
161  for (int i = InEvent; i < NumBranchTypes; ++i) {
162  if (i == InProcess) {
163  // Output for ProcessBlocks is not implemented yet.
164  continue;
165  }
166  BranchType branchType = static_cast<BranchType>(i);
167  RootOutputTree* theTree = treePointers_[branchType];
168  for (auto& item : om_->selectedOutputItemList()[branchType]) {
169  item.setProduct(nullptr);
170  BranchDescription const& desc = *item.branchDescription();
171  theTree->addBranch(desc.branchName(),
172  desc.wrappedName(),
173  item.product(),
174  item.splitLevel(),
175  item.basketSize(),
176  item.branchDescription()->produced());
177  //make sure we always store product registry info for all branches we create
178  branchesWithStoredHistory_.insert(item.branchID());
179  }
180  }
181  // Don't split metadata tree or event description tree
185 
186  fid_ = FileID(createGlobalIdentifier());
187 
188  // For the Job Report, get a vector of branch names in the "Events" tree.
189  // Also create a hash of all the branch names in the "Events" tree
190  // in a deterministic order, except use the full class name instead of the friendly class name.
191  // To avoid extra string copies, we create a vector of pointers into the product registry,
192  // and use a custom comparison operator for sorting.
193  std::vector<std::string> branchNames;
194  std::vector<BranchDescription const*> branches;
195  branchNames.reserve(om_->selectedOutputItemList()[InEvent].size());
196  branches.reserve(om->selectedOutputItemList()[InEvent].size());
197  for (auto const& item : om_->selectedOutputItemList()[InEvent]) {
198  branchNames.push_back(item.branchDescription()->branchName());
199  branches.push_back(item.branchDescription());
200  }
201  // Now sort the branches for the hash.
202  sort_all(branches, sorterForJobReportHash);
203  // Now, make a concatenated string.
204  std::ostringstream oss;
205  char const underscore = '_';
206  for (auto const& branch : branches) {
207  BranchDescription const& bd = *branch;
208  oss << bd.fullClassName() << underscore << bd.moduleLabel() << underscore << bd.productInstanceName()
209  << underscore << bd.processName() << underscore;
210  }
211  std::string stringrep = oss.str();
212  cms::Digest md5alg(stringrep);
213 
214  // Register the output file with the JobReport service
215  // and get back the token for it.
216  std::string moduleName = "PoolOutputModule";
217  Service<JobReport> reportSvc;
218  reportToken_ = reportSvc->outputFileOpened(file_,
219  logicalFile_, // PFN and LFN
220  om_->catalog(), // catalog
221  moduleName, // module class name
222  om_->moduleLabel(), // module label
223  fid_.fid(), // file id (guid)
224  std::string(), // data type (not yet known, so string is empty).
225  md5alg.digest().toString(), // branch hash
226  branchNames); // branch names being written
227  }

References edm::RootOutputTree::addAuxiliary(), edm::RootOutputTree::addBranch(), MicroEventContent_cff::branch, branchesWithStoredHistory_, edm::poolNames::branchListIndexesBranchName(), edm::BranchTypeToAuxiliaryBranchName(), edm::BranchTypeToProductProvenanceBranchName(), edm::errors::Configuration, edm::createGlobalIdentifier(), submitPVResolutionJobs::desc, cms::Digest::digest(), edm::PoolOutputModule::eventAutoFlushSize(), edm::poolNames::eventSelectionsBranchName(), eventTree_, Exception, edm::FileID::fid(), fid_, file_, filePtr_, edm::propagate_const< T >::get(), mps_fire::i, edm::InEvent, edm::InLumi, edm::InProcess, edm::InRun, B2GTnPMonitor_cfi::item, logicalFile_, lumiTree_, edm::RootOutputTree::makeTTree(), metaDataTree_, edm::poolNames::metaDataTreeName(), edm::moduleName(), edm::NumBranchTypes, om_, parameterSetsTree_, edm::poolNames::parameterSetsTreeName(), parentageTree_, edm::poolNames::parentageTreeName(), pBranchListIndexes_, pEventAux_, pEventEntryInfoVector(), pEventSelectionIDs_, pLumiAux_, pRunAux_, reportToken_, runTree_, edm::PoolOutputModule::selectedOutputItemList(), edm::RootOutputTree::setAutoFlush(), edm::sort_all(), AlCaHLTBitMon_QueryRunRegistry::string, cms::MD5Result::toString(), edm::RootOutputTree::tree(), and treePointers_.

◆ ~RootOutputFile()

edm::RootOutputFile::~RootOutputFile ( )
inline

Definition at line 55 of file RootOutputFile.h.

55 {}

Member Function Documentation

◆ beginInputFile()

void edm::RootOutputFile::beginInputFile ( FileBlock const &  fb,
int  remainingEvents 
)

Definition at line 317 of file RootOutputFile.cc.

317  {
318  // Reset per input file information
319  whyNotFastClonable_ = om_->whyNotFastClonable();
320  canFastCloneAux_ = false;
321 
322  if (fb.tree() != nullptr) {
323  whyNotFastClonable_ |= fb.whyNotFastClonable();
324 
325  if (remainingEvents >= 0 && remainingEvents < fb.tree()->GetEntries()) {
327  }
328 
330  if (!match) {
331  if (om_->overrideInputFileSplitLevels()) {
332  // We may be fast copying. We must disable fast copying if the split levels
333  // or basket sizes do not match.
335  } else {
336  // We are using the input split levels and basket sizes from the first input file
337  // for copied output branches. In this case, we throw an exception if any branches
338  // have different split levels or basket sizes in a subsequent input file.
339  // If the mismatch is in the first file, there is a bug somewhere, so we assert.
340  assert(om_->inputFileCount() > 1);
341  throw Exception(errors::MismatchedInputFiles, "RootOutputFile::beginInputFile()")
342  << "Merge failure because input file " << file_ << " has different ROOT split levels or basket sizes\n"
343  << "than previous files. To allow merging in splite of this, use the configuration parameter\n"
344  << "overrideInputFileSplitLevels=cms.untracked.bool(True)\n"
345  << "in every PoolOutputModule.\n";
346  }
347  }
348 
349  // Since this check can be time consuming, we do it only if we would otherwise fast clone.
351  if (!eventTree_.checkIfFastClonable(fb.tree())) {
353  }
354  }
355  // We now check if we can fast copy the auxiliary branches.
356  // We can do so only if we can otherwise fast copy,
357  // the input file has the current format (these branches are in the Events Tree),
358  // there are no newly dropped or produced products,
359  // no metadata has been dropped,
360  // ID's have not been modified,
361  // and the branch list indexes do not need modification.
362 
363  // Note: Fast copy of the EventProductProvenance branch is unsafe
364  // unless we can enforce that the parentage information for a fully copied
365  // output file will be the same as for the input file, with nothing dropped.
366  // This has never been enforced, and, withthe EDAlias feature, it may no longer
367  // work by accident.
368  // So, for now, we do not enable fast cloning of the non-product branches.
369  /*
370  Service<ConstProductRegistry> reg;
371  canFastCloneAux_ = (whyNotFastClonable_ == FileBlock::CanFastClone) &&
372  fb.fileFormatVersion().noMetaDataTrees() &&
373  !om_->hasNewlyDroppedBranch()[InEvent] &&
374  !fb.hasNewlyDroppedBranch()[InEvent] &&
375  om_->dropMetaData() == PoolOutputModule::DropNone &&
376  !reg->anyProductProduced() &&
377  !fb.modifiedIDs() &&
378  fb.branchListIndexesUnchanged();
379 */
380 
381  // Report the fast copying status.
382  Service<JobReport> reportSvc;
383  reportSvc->reportFastCopyingStatus(reportToken_, fb.fileName(), whyNotFastClonable_ == FileBlock::CanFastClone);
384  } else {
386  }
387 
390 
391  // Possibly issue warning or informational message if we haven't fast cloned.
392  if (fb.tree() != nullptr && whyNotFastClonable_ != FileBlock::CanFastClone) {
393  maybeIssueWarning(whyNotFastClonable_, fb.fileName(), file_);
394  }
395 
396  if (om_->compactEventAuxiliary() &&
399  long long int reserve = remainingEvents;
400  if (fb.tree() != nullptr) {
401  reserve = reserve > 0 ? std::min(fb.tree()->GetEntries(), reserve) : fb.tree()->GetEntries();
402  }
403  if (reserve > 0) {
405  }
406  }
407  }

References cms::cuda::assert(), edm::FileBlock::BranchMismatch, edm::FileBlock::CanFastClone, canFastCloneAux_, edm::RootOutputTree::checkIfFastClonable(), edm::RootOutputTree::checkSplitLevelsAndBasketSizes(), compactEventAuxiliary_, edm::FileBlock::EventSelectionUsed, edm::FileBlock::EventsOrLumisSelectedByID, eventTree_, Exception, benchmark_cfg::fb, file_, edm::FileBlock::InitialEventsSkipped, edm::match(), edm::RootOutputTree::maybeFastCloneTree(), min(), edm::errors::MismatchedInputFiles, edm::FileBlock::NoRootInputSource, om_, edm::FileBlock::OutputMaxEventsTooSmall, reportToken_, edm::CompactEventAuxiliaryVector::reserve(), edm::CompactEventAuxiliaryVector::size(), edm::FileBlock::SplitLevelMismatch, and whyNotFastClonable_.

◆ fileName()

std::string const& edm::RootOutputFile::fileName ( ) const
inline

Definition at line 78 of file RootOutputFile.h.

78 { return file_; }

References file_.

◆ filePtr() [1/2]

std::shared_ptr<TFile>& edm::RootOutputFile::filePtr ( )
inlineprivate

Definition at line 104 of file RootOutputFile.h.

104 { return get_underlying_safe(filePtr_); }

References filePtr_, and edm::get_underlying_safe().

◆ filePtr() [2/2]

std::shared_ptr<TFile const> edm::RootOutputFile::filePtr ( ) const
inlineprivate

Definition at line 103 of file RootOutputFile.h.

103 { return get_underlying_safe(filePtr_); }

References filePtr_, and edm::get_underlying_safe().

◆ fillBranches()

void edm::RootOutputFile::fillBranches ( BranchType const &  branchType,
OccurrenceForOutput const &  occurrence,
StoredProductProvenanceVector productProvenanceVecPtr = nullptr,
ProductProvenanceRetriever const *  provRetriever = nullptr 
)
private

Definition at line 764 of file RootOutputFile.cc.

767  {
768  std::vector<std::unique_ptr<WrapperBase> > dummies;
769 
770  OutputItemList& items = om_->selectedOutputItemList()[branchType];
771 
772  bool const doProvenance =
773  (productProvenanceVecPtr != nullptr) && (om_->dropMetaData() != PoolOutputModule::DropAll);
774  bool const keepProvenanceForPrior = doProvenance && om_->dropMetaData() != PoolOutputModule::DropPrior;
775 
776  bool const fastCloning = (branchType == InEvent) && (whyNotFastClonable_ == FileBlock::CanFastClone);
777  std::set<StoredProductProvenance> provenanceToKeep;
778  //
779  //If we are dropping some of the meta data we need to know
780  // which BranchIDs were produced in this process because
781  // we may be storing meta data for only those products
782  // We do this only for event products.
783  std::set<BranchID> producedBranches;
784  if (doProvenance && branchType == InEvent && om_->dropMetaData() != PoolOutputModule::DropNone) {
786  for (auto bd : preg->allBranchDescriptions()) {
787  if (bd->produced() && bd->branchType() == InEvent) {
788  producedBranches.insert(bd->branchID());
789  }
790  }
791  }
792 
793  // Loop over EDProduct branches, possibly fill the provenance, and write the branch.
794  for (auto& item : items) {
795  BranchID const& id = item.branchDescription()->branchID();
796  branchesWithStoredHistory_.insert(id);
797 
798  bool produced = item.branchDescription()->produced();
799  bool getProd =
800  (produced || !fastCloning || treePointers_[branchType]->uncloned(item.branchDescription()->branchName()));
801  bool keepProvenance = doProvenance && (produced || keepProvenanceForPrior);
802 
803  WrapperBase const* product = nullptr;
804  ProductProvenance const* productProvenance = nullptr;
805  if (getProd) {
806  BasicHandle result = occurrence.getByToken(item.token(), item.branchDescription()->unwrappedTypeID());
807  product = result.wrapper();
808  if (result.isValid() && keepProvenance) {
809  productProvenance = result.provenance()->productProvenance();
810  }
811  if (product == nullptr) {
812  // No product with this ID is in the event.
813  // Add a null product.
814  TClass* cp = item.branchDescription()->wrappedType().getClass();
815  assert(cp != nullptr);
816  int offset = cp->GetBaseClassOffset(wrapperBaseTClass_);
817  void* p = cp->New();
818  std::unique_ptr<WrapperBase> dummy = getWrapperBasePtr(p, offset);
819  product = dummy.get();
820  dummies.emplace_back(std::move(dummy));
821  }
822  item.setProduct(product);
823  }
824  if (keepProvenance && productProvenance == nullptr) {
825  productProvenance = provRetriever->branchIDToProvenance(item.branchDescription()->originalBranchID());
826  }
827  if (productProvenance) {
828  insertProductProvenance(*productProvenance, provenanceToKeep);
829  insertAncestors(*productProvenance, provRetriever, produced, producedBranches, provenanceToKeep);
830  }
831  }
832 
833  if (doProvenance)
834  productProvenanceVecPtr->assign(provenanceToKeep.begin(), provenanceToKeep.end());
835  treePointers_[branchType]->fillTree();
836  if (doProvenance)
837  productProvenanceVecPtr->clear();
838  }

References cms::cuda::assert(), branchesWithStoredHistory_, edm::ProductProvenanceRetriever::branchIDToProvenance(), edm::FileBlock::CanFastClone, edm::PoolOutputModule::DropAll, edm::PoolOutputModule::DropNone, edm::PoolOutputModule::DropPrior, test_L1EGCrystalClusterEmulator_cfg::fastCloning, edm::OccurrenceForOutput::getByToken(), edm::getWrapperBasePtr(), edm::InEvent, insertAncestors(), insertProductProvenance(), B2GTnPMonitor_cfi::item, mps_monitormerge::items, eostools::move(), hltrates_dqm_sourceclient-live_cfg::offset, om_, AlCaHLTBitMon_ParallelJobs::p, mps_fire::result, treePointers_, whyNotFastClonable_, and wrapperBaseTClass_.

Referenced by writeLuminosityBlock(), writeOne(), and writeRun().

◆ finishEndFile()

void edm::RootOutputFile::finishEndFile ( )

Definition at line 683 of file RootOutputFile.cc.

683  {
684  metaDataTree_->SetEntries(-1);
687 
689 
690  // Create branch aliases for all the branches in the
691  // events/lumis/runs trees. The loop is over all types of data
692  // products.
693  for (int i = InEvent; i < NumBranchTypes; ++i) {
694  if (i == InProcess) {
695  // Output for ProcessBlocks is not implemented yet.
696  continue;
697  }
698  BranchType branchType = static_cast<BranchType>(i);
699  setBranchAliases(treePointers_[branchType]->tree(), om_->keptProducts()[branchType]);
700  treePointers_[branchType]->writeTree();
701  }
702 
703  // close the file -- mfp
704  // Just to play it safe, zero all pointers to objects in the TFile to be closed.
705  metaDataTree_ = parentageTree_ = nullptr;
706  for (auto& treePointer : treePointers_) {
707  if (treePointer.get() == nullptr) {
708  // Output for ProcessBlock is not implemented yet
709  continue;
710  }
711  treePointer->close();
712  treePointer = nullptr;
713  }
714  filePtr_->Close();
715  filePtr_ = nullptr; // propagate_const<T> has no reset() function
716 
717  // report that file has been closed
718  Service<JobReport> reportSvc;
719  reportSvc->outputFileClosed(reportToken_);
720  }

References filePtr_, mps_fire::i, edm::InEvent, edm::InProcess, metaDataTree_, edm::NumBranchTypes, om_, parameterSetsTree_, parentageTree_, reportToken_, setBranchAliases(), MainPageGenerator::tree, treePointers_, and edm::RootOutputTree::writeTTree().

◆ insertAncestors()

void edm::RootOutputFile::insertAncestors ( ProductProvenance const &  iGetParents,
ProductProvenanceRetriever const *  iMapper,
bool  produced,
std::set< BranchID > const &  producedBranches,
std::set< StoredProductProvenance > &  oToFill 
)
private

Definition at line 739 of file RootOutputFile.cc.

743  {
744  assert(om_->dropMetaData() != PoolOutputModule::DropAll);
745  assert(produced || om_->dropMetaData() != PoolOutputModule::DropPrior);
746  if (om_->dropMetaData() == PoolOutputModule::DropDroppedPrior && !produced)
747  return;
748  std::vector<BranchID> const& parentIDs = iGetParents.parentage().parents();
749  for (auto const& parentID : parentIDs) {
750  branchesWithStoredHistory_.insert(parentID);
751  ProductProvenance const* info = iMapper->branchIDToProvenance(parentID);
752  if (info) {
753  if (om_->dropMetaData() == PoolOutputModule::DropNone ||
754  (iProducedIDs.end() != iProducedIDs.find(info->branchID()))) {
755  if (insertProductProvenance(*info, oToFill)) {
756  //haven't seen this one yet
757  insertAncestors(*info, iMapper, produced, iProducedIDs, oToFill);
758  }
759  }
760  }
761  }
762  }

References cms::cuda::assert(), branchesWithStoredHistory_, edm::ProductProvenanceRetriever::branchIDToProvenance(), edm::PoolOutputModule::DropAll, edm::PoolOutputModule::DropDroppedPrior, edm::PoolOutputModule::DropNone, edm::PoolOutputModule::DropPrior, info(), insertProductProvenance(), om_, edm::ProductProvenance::parentage(), and edm::Parentage::parents().

Referenced by fillBranches().

◆ insertProductProvenance()

bool edm::RootOutputFile::insertProductProvenance ( const ProductProvenance ,
std::set< StoredProductProvenance > &  oToInsert 
)
private

Definition at line 840 of file RootOutputFile.cc.

841  {
842  StoredProductProvenance toStore;
843  toStore.branchID_ = iProv.branchID().id();
844  std::set<edm::StoredProductProvenance>::iterator itFound = oToInsert.find(toStore);
845  if (itFound == oToInsert.end()) {
846  //get the index to the ParentageID or insert a new value if not already present
847  std::pair<std::map<edm::ParentageID, unsigned int>::iterator, bool> i =
848  parentageIDs_.insert(std::make_pair(iProv.parentageID(), static_cast<unsigned int>(parentageIDs_.size())));
849  toStore.parentageIDIndex_ = i.first->second;
850  if (toStore.parentageIDIndex_ >= parentageIDs_.size()) {
852  << "RootOutputFile::insertProductProvenance\n"
853  << "The parentage ID index value " << toStore.parentageIDIndex_
854  << " is out of bounds. The maximum value is currently " << parentageIDs_.size() - 1 << ".\n"
855  << "This should never happen.\n"
856  << "Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
857  }
858 
859  oToInsert.insert(toStore);
860  return true;
861  }
862  return false;
863  }

References edm::ProductProvenance::branchID(), edm::StoredProductProvenance::branchID_, Exception, mps_fire::i, edm::BranchID::id(), edm::errors::LogicError, edm::ProductProvenance::parentageID(), edm::StoredProductProvenance::parentageIDIndex_, and parentageIDs_.

Referenced by fillBranches(), and insertAncestors().

◆ pEventEntryInfoVector() [1/2]

StoredProductProvenanceVector*& edm::RootOutputFile::pEventEntryInfoVector ( )
inlineprivate

◆ pEventEntryInfoVector() [2/2]

StoredProductProvenanceVector const* edm::RootOutputFile::pEventEntryInfoVector ( ) const
inlineprivate

Definition at line 105 of file RootOutputFile.h.

105  {
107  }

References edm::get_underlying_safe(), and pEventEntryInfoVector_.

Referenced by RootOutputFile().

◆ respondToCloseInputFile()

void edm::RootOutputFile::respondToCloseInputFile ( FileBlock const &  fb)

Definition at line 409 of file RootOutputFile.cc.

409  {
410  // We can't do setEntries() on the event tree if the EventAuxiliary branch is empty & disabled
411  if (not om_->compactEventAuxiliary()) {
413  }
416  }

References eventTree_, lumiTree_, om_, runTree_, and edm::RootOutputTree::setEntries().

◆ setBranchAliases()

void edm::RootOutputFile::setBranchAliases ( TTree *  tree,
SelectedProducts const &  branches 
) const
private

Definition at line 722 of file RootOutputFile.cc.

722  {
723  if (tree && tree->GetNbranches() != 0) {
724  for (auto const& selection : branches) {
725  BranchDescription const& pd = *selection.first;
726  std::string const& full = pd.branchName() + "obj";
727  if (pd.branchAliases().empty()) {
728  std::string const& alias = (pd.productInstanceName().empty() ? pd.moduleLabel() : pd.productInstanceName());
729  tree->SetAlias(alias.c_str(), full.c_str());
730  } else {
731  for (auto const& alias : pd.branchAliases()) {
732  tree->SetAlias(alias.c_str(), full.c_str());
733  }
734  }
735  }
736  }
737  }

References SiStripOfflineCRack_cfg::alias, edm::BranchDescription::branchAliases(), edm::BranchDescription::branchName(), full, edm::BranchDescription::moduleLabel(), edm::BranchDescription::productInstanceName(), corrVsCorr::selection, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by finishEndFile().

◆ shouldWeCloseFile()

bool edm::RootOutputFile::shouldWeCloseFile ( ) const

Definition at line 418 of file RootOutputFile.cc.

418  {
419  unsigned int const oneK = 1024;
420  Long64_t size = filePtr_->GetSize() / oneK;
421  return (size >= om_->maxFileSize());
422  }

References filePtr_, om_, and findQualityFiles::size.

◆ writeBranchIDListRegistry()

void edm::RootOutputFile::writeBranchIDListRegistry ( )

Definition at line 587 of file RootOutputFile.cc.

587  {
588  BranchIDLists const* p = om_->branchIDLists();
589  TBranch* b = metaDataTree_->Branch(poolNames::branchIDListBranchName().c_str(), &p, om_->basketSize(), 0);
590  assert(b);
591  b->Fill();
592  }

References cms::cuda::assert(), b, edm::poolNames::branchIDListBranchName(), metaDataTree_, om_, and AlCaHLTBitMon_ParallelJobs::p.

◆ writeEventAuxiliary()

void edm::RootOutputFile::writeEventAuxiliary ( )

Definition at line 653 of file RootOutputFile.cc.

653  {
654  constexpr std::size_t maxEaBasketSize = 4 * 1024 * 1024;
655 
656  if (om_->compactEventAuxiliary()) {
657  auto tree = eventTree_.tree();
658  auto const& bname = BranchTypeToAuxiliaryBranchName(InEvent).c_str();
659 
660  tree->SetBranchStatus(bname, true);
661  auto basketsize =
662  std::min(maxEaBasketSize,
663  compactEventAuxiliary_.size() * (sizeof(EventAuxiliary) + 26)); // 26 is an empirical fudge factor
664  tree->SetBasketSize(bname, basketsize);
665  auto b = tree->GetBranch(bname);
666 
667  assert(b);
668 
669  LogDebug("writeEventAuxiliary") << "EventAuxiliary ratio extras/GUIDs/all = "
672 
673  for (auto const& aux : compactEventAuxiliary_) {
674  const auto ea = aux.eventAuxiliary();
675  pEventAux_ = &ea;
676  // Fill EventAuxiliary branch
677  b->Fill();
678  }
680  }
681  }

References cms::cuda::assert(), printConversionInfo::aux, b, edm::BranchTypeToAuxiliaryBranchName(), compactEventAuxiliary_, eventTree_, edm::CompactEventAuxiliaryVector::extrasSize(), edm::CompactEventAuxiliaryVector::guidsSize(), edm::InEvent, LogDebug, min(), om_, pEventAux_, edm::RootOutputTree::setEntries(), edm::CompactEventAuxiliaryVector::size(), and edm::RootOutputTree::tree().

◆ writeFileFormatVersion()

void edm::RootOutputFile::writeFileFormatVersion ( )

Definition at line 541 of file RootOutputFile.cc.

541  {
542  FileFormatVersion fileFormatVersion(getFileFormatVersion());
543  FileFormatVersion* pFileFmtVsn = &fileFormatVersion;
544  TBranch* b =
545  metaDataTree_->Branch(poolNames::fileFormatVersionBranchName().c_str(), &pFileFmtVsn, om_->basketSize(), 0);
546  assert(b);
547  b->Fill();
548  }

References cms::cuda::assert(), b, edm::poolNames::fileFormatVersionBranchName(), edm::getFileFormatVersion(), metaDataTree_, and om_.

◆ writeFileIdentifier()

void edm::RootOutputFile::writeFileIdentifier ( )

Definition at line 550 of file RootOutputFile.cc.

550  {
551  FileID* fidPtr = &fid_;
552  TBranch* b = metaDataTree_->Branch(poolNames::fileIdentifierBranchName().c_str(), &fidPtr, om_->basketSize(), 0);
553  assert(b);
554  b->Fill();
555  }

References cms::cuda::assert(), b, fid_, edm::poolNames::fileIdentifierBranchName(), metaDataTree_, and om_.

◆ writeIndexIntoFile()

void edm::RootOutputFile::writeIndexIntoFile ( )

Definition at line 557 of file RootOutputFile.cc.

557  {
560  ex << "The number of entries in at least one output TBranch whose entries\n"
561  "were copied from the input does not match the number of events\n"
562  "recorded in IndexIntoFile. This might (or might not) indicate a\n"
563  "problem related to fast copy.";
564  ex.addContext("Calling RootOutputFile::writeIndexIntoFile");
565  throw ex;
566  }
568  IndexIntoFile* iifPtr = &indexIntoFile_;
569  TBranch* b = metaDataTree_->Branch(poolNames::indexIntoFileBranchName().c_str(), &iifPtr, om_->basketSize(), 0);
570  assert(b);
571  b->Fill();
572  }

References cms::Exception::addContext(), cms::cuda::assert(), b, edm::RootOutputTree::checkEntriesInReadBranches(), eventEntryNumber_, eventTree_, indexIntoFile_, edm::poolNames::indexIntoFileBranchName(), metaDataTree_, om_, edm::errors::OtherCMS, and edm::IndexIntoFile::sortVector_Run_Or_Lumi_Entries().

◆ writeLuminosityBlock()

void edm::RootOutputFile::writeLuminosityBlock ( LuminosityBlockForOutput const &  lb)

Definition at line 477 of file RootOutputFile.cc.

477  {
478  // Auxiliary branch
479  // NOTE: lumiAux_ must be filled before calling fillBranches since it gets written out in that routine.
480  lumiAux_ = lb.luminosityBlockAuxiliary();
481  // Use the updated process historyID
482  lumiAux_.setProcessHistoryID(lb.processHistoryID());
483  // Store the process history.
484  processHistoryRegistry_.registerProcessHistory(lb.processHistory());
485  // Store the reduced ID in the IndexIntoFile
486  ProcessHistoryID reducedPHID = processHistoryRegistry_.reducedProcessHistoryID(lb.processHistoryID());
487  // Add lumi to index.
490  fillBranches(InLumi, lb);
491  lumiTree_.optimizeBaskets(10ULL * 1024 * 1024);
492 
493  Service<JobReport> reportSvc;
494  reportSvc->reportLumiSection(reportToken_, lb.id().run(), lb.id().luminosityBlock(), nEventsInLumi_);
495  nEventsInLumi_ = 0;
496  }

References edm::IndexIntoFile::addEntry(), fillBranches(), edm::LuminosityBlockForOutput::id(), indexIntoFile_, edm::InLumi, lumiAux_, lumiEntryNumber_, edm::LuminosityBlockAuxiliary::luminosityBlock(), edm::LuminosityBlockID::luminosityBlock(), edm::LuminosityBlockForOutput::luminosityBlockAuxiliary(), lumiTree_, nEventsInLumi_, edm::RootOutputTree::optimizeBaskets(), edm::OccurrenceForOutput::processHistory(), edm::OccurrenceForOutput::processHistoryID(), processHistoryRegistry_, edm::ProcessHistoryRegistry::reducedProcessHistoryID(), edm::ProcessHistoryRegistry::registerProcessHistory(), reportToken_, edm::LuminosityBlockAuxiliary::run(), edm::LuminosityBlockID::run(), edm::LuminosityBlockAuxiliary::setProcessHistoryID(), and mitigatedMETSequence_cff::U.

◆ writeOne()

void edm::RootOutputFile::writeOne ( EventForOutput const &  e)

Definition at line 424 of file RootOutputFile.cc.

424  {
425  // Auxiliary branch
426  pEventAux_ = &e.eventAuxiliary();
427 
428  // Because getting the data may cause an exception to be thrown we want to do that
429  // first before writing anything to the file about this event
430  // NOTE: pEventAux_, pBranchListIndexes_, pEventSelectionIDs_, and pEventEntryInfoVector_
431  // must be set before calling fillBranches since they get written out in that routine.
432  assert(pEventAux_->processHistoryID() == e.processHistoryID());
433  pBranchListIndexes_ = &e.branchListIndexes();
434 
435  // Note: The EventSelectionIDVector should have a one to one correspondence with the processes in the process history.
436  // Therefore, a new entry should be added if and only if the current process has been added to the process history,
437  // which is done if and only if there is a produced product.
439  EventSelectionIDVector esids = e.eventSelectionIDs();
440  if (reg->anyProductProduced() || !om_->wantAllEvents()) {
441  esids.push_back(om_->selectorConfig());
442  }
443  pEventSelectionIDs_ = &esids;
444  ProductProvenanceRetriever const* provRetriever = e.productProvenanceRetrieverPtr();
445  assert(provRetriever);
446  fillBranches(InEvent, e, pEventEntryInfoVector_, provRetriever);
447 
448  // Add the dataType to the job report if it hasn't already been done
449  if (!dataTypeReported_) {
450  Service<JobReport> reportSvc;
451  std::string dataType("MC");
452  if (pEventAux_->isRealData())
453  dataType = "Data";
454  reportSvc->reportDataType(reportToken_, dataType);
455  dataTypeReported_ = true;
456  }
457 
458  // Store the process history.
460  // Store the reduced ID in the IndexIntoFile
461  ProcessHistoryID reducedPHID = processHistoryRegistry_.reducedProcessHistoryID(e.processHistoryID());
462  // Add event to index
466 
467  if (om_->compactEventAuxiliary()) {
469  }
470 
471  // Report event written
472  Service<JobReport> reportSvc;
473  reportSvc->eventWrittenToFile(reportToken_, e.id().run(), e.id().event());
474  ++nEventsInLumi_;
475  }

References edm::IndexIntoFile::addEntry(), cms::cuda::assert(), compactEventAuxiliary_, DTskim_cfg::dataType, dataTypeReported_, MillePedeFileConverter_cfg::e, edm::EventAuxiliary::event(), eventEntryNumber_, fillBranches(), indexIntoFile_, edm::InEvent, edm::EventAuxiliary::isRealData(), edm::EventAuxiliary::luminosityBlock(), nEventsInLumi_, om_, pBranchListIndexes_, pEventAux_, pEventEntryInfoVector_, pEventSelectionIDs_, edm::EventAuxiliary::processHistoryID(), processHistoryRegistry_, edm::CompactEventAuxiliaryVector::push_back(), edm::ProcessHistoryRegistry::reducedProcessHistoryID(), edm::ProcessHistoryRegistry::registerProcessHistory(), reportToken_, edm::EventAuxiliary::run(), and AlCaHLTBitMon_QueryRunRegistry::string.

◆ writeParameterSetRegistry()

void edm::RootOutputFile::writeParameterSetRegistry ( )

Definition at line 602 of file RootOutputFile.cc.

602  {
604  }

References edm::fillParameterSetBranch(), edm::propagate_const< T >::get(), om_, and parameterSetsTree_.

◆ writeParentageRegistry()

void edm::RootOutputFile::writeParentageRegistry ( )

Definition at line 519 of file RootOutputFile.cc.

519  {
520  Parentage const* desc(nullptr);
521 
522  if (!parentageTree_->Branch(poolNames::parentageBranchName().c_str(), &desc, om_->basketSize(), 0))
523  throw Exception(errors::FatalRootError) << "Failed to create a branch for Parentages in the output file";
524 
525  ParentageRegistry& ptReg = *ParentageRegistry::instance();
526 
527  std::vector<ParentageID> orderedIDs(parentageIDs_.size());
528  for (auto const& parentageID : parentageIDs_) {
529  orderedIDs[parentageID.second] = parentageID.first;
530  }
531  //now put them into the TTree in the correct order
532  for (auto const& orderedID : orderedIDs) {
533  desc = ptReg.getMapped(orderedID);
534  //NOTE: some old format files have missing Parentage info
535  // so a null value of desc can't be fatal.
536  // Root will default construct an object in that case.
537  parentageTree_->Fill();
538  }
539  }

References submitPVResolutionJobs::desc, Exception, edm::errors::FatalRootError, edm::ParentageRegistry::getMapped(), edm::ParentageRegistry::instance(), om_, edm::poolNames::parentageBranchName(), parentageIDs_, and parentageTree_.

◆ writeProcessHistoryRegistry()

void edm::RootOutputFile::writeProcessHistoryRegistry ( )

◆ writeProductDependencies()

void edm::RootOutputFile::writeProductDependencies ( )

Definition at line 637 of file RootOutputFile.cc.

637  {
638  BranchChildren& pDeps = const_cast<BranchChildren&>(om_->branchChildren());
639  BranchChildren* ppDeps = &pDeps;
640  TBranch* b =
641  metaDataTree_->Branch(poolNames::productDependenciesBranchName().c_str(), &ppDeps, om_->basketSize(), 0);
642  assert(b);
643  b->Fill();
644  }

References cms::cuda::assert(), b, metaDataTree_, om_, and edm::poolNames::productDependenciesBranchName().

◆ writeProductDescriptionRegistry()

void edm::RootOutputFile::writeProductDescriptionRegistry ( )

Definition at line 606 of file RootOutputFile.cc.

606  {
607  // Make a local copy of the ProductRegistry, removing any transient or pruned products.
608  typedef ProductRegistry::ProductList ProductList;
610  ProductRegistry pReg(reg->productList());
611  ProductList& pList = const_cast<ProductList&>(pReg.productList());
612  for (auto const& prod : pList) {
613  if (prod.second.branchID() != prod.second.originalBranchID()) {
614  if (branchesWithStoredHistory_.find(prod.second.branchID()) != branchesWithStoredHistory_.end()) {
615  branchesWithStoredHistory_.insert(prod.second.originalBranchID());
616  }
617  }
618  }
619  std::set<BranchID>::iterator end = branchesWithStoredHistory_.end();
620  for (ProductList::iterator it = pList.begin(); it != pList.end();) {
621  if (branchesWithStoredHistory_.find(it->second.branchID()) == end) {
622  // avoid invalidating iterator on deletion
623  ProductList::iterator itCopy = it;
624  ++it;
625  pList.erase(itCopy);
626 
627  } else {
628  ++it;
629  }
630  }
631 
632  ProductRegistry* ppReg = &pReg;
633  TBranch* b = metaDataTree_->Branch(poolNames::productDescriptionBranchName().c_str(), &ppReg, om_->basketSize(), 0);
634  assert(b);
635  b->Fill();
636  }

References cms::cuda::assert(), b, branchesWithStoredHistory_, mps_fire::end, metaDataTree_, om_, dumpMFGeometry_cfg::prod, and edm::poolNames::productDescriptionBranchName().

◆ writeRun()

void edm::RootOutputFile::writeRun ( RunForOutput const &  r)

Definition at line 498 of file RootOutputFile.cc.

498  {
499  // Auxiliary branch
500  // NOTE: runAux_ must be filled before calling fillBranches since it gets written out in that routine.
501  runAux_ = r.runAuxiliary();
502  // Use the updated process historyID
503  runAux_.setProcessHistoryID(r.processHistoryID());
504  // Store the process history.
506  // Store the reduced ID in the IndexIntoFile
507  ProcessHistoryID reducedPHID = processHistoryRegistry_.reducedProcessHistoryID(r.processHistoryID());
508  // Add run to index.
509  indexIntoFile_.addEntry(reducedPHID, runAux_.run(), 0U, 0U, runEntryNumber_);
510  r.mergeableRunProductMetadata()->addEntryToStoredMetadata(storedMergeableRunProductMetadata_);
511  ++runEntryNumber_;
512  fillBranches(InRun, r);
513  runTree_.optimizeBaskets(10ULL * 1024 * 1024);
514 
515  Service<JobReport> reportSvc;
516  reportSvc->reportRunNumber(reportToken_, r.run());
517  }

References edm::IndexIntoFile::addEntry(), fillBranches(), indexIntoFile_, edm::InRun, edm::RootOutputTree::optimizeBaskets(), processHistoryRegistry_, alignCSCRings::r, edm::ProcessHistoryRegistry::reducedProcessHistoryID(), edm::ProcessHistoryRegistry::registerProcessHistory(), reportToken_, edm::RunAuxiliary::run(), runAux_, runEntryNumber_, runTree_, edm::RunAuxiliary::setProcessHistoryID(), storedMergeableRunProductMetadata_, and mitigatedMETSequence_cff::U.

◆ writeStoredMergeableRunProductMetadata()

void edm::RootOutputFile::writeStoredMergeableRunProductMetadata ( )

◆ writeThinnedAssociationsHelper()

void edm::RootOutputFile::writeThinnedAssociationsHelper ( )

Definition at line 594 of file RootOutputFile.cc.

594  {
595  ThinnedAssociationsHelper const* p = om_->thinnedAssociationsHelper();
596  TBranch* b =
597  metaDataTree_->Branch(poolNames::thinnedAssociationsHelperBranchName().c_str(), &p, om_->basketSize(), 0);
598  assert(b);
599  b->Fill();
600  }

References cms::cuda::assert(), b, metaDataTree_, om_, AlCaHLTBitMon_ParallelJobs::p, and edm::poolNames::thinnedAssociationsHelperBranchName().

Member Data Documentation

◆ branchesWithStoredHistory_

std::set<BranchID> edm::RootOutputFile::branchesWithStoredHistory_
private

◆ canFastCloneAux_

bool edm::RootOutputFile::canFastCloneAux_
private

Definition at line 118 of file RootOutputFile.h.

Referenced by beginInputFile().

◆ compactEventAuxiliary_

CompactEventAuxiliaryVector edm::RootOutputFile::compactEventAuxiliary_
private

Definition at line 148 of file RootOutputFile.h.

Referenced by beginInputFile(), writeEventAuxiliary(), and writeOne().

◆ dataTypeReported_

bool edm::RootOutputFile::dataTypeReported_
private

Definition at line 143 of file RootOutputFile.h.

Referenced by writeOne().

◆ eventEntryInfoVector_

StoredProductProvenanceVector edm::RootOutputFile::eventEntryInfoVector_
private

Definition at line 135 of file RootOutputFile.h.

◆ eventEntryNumber_

IndexIntoFile::EntryNumber_t edm::RootOutputFile::eventEntryNumber_
private

Definition at line 121 of file RootOutputFile.h.

Referenced by writeIndexIntoFile(), and writeOne().

◆ eventTree_

RootOutputTree edm::RootOutputFile::eventTree_
private

◆ fid_

FileID edm::RootOutputFile::fid_
private

Definition at line 120 of file RootOutputFile.h.

Referenced by RootOutputFile(), and writeFileIdentifier().

◆ file_

std::string edm::RootOutputFile::file_
private

Definition at line 113 of file RootOutputFile.h.

Referenced by beginInputFile(), fileName(), and RootOutputFile().

◆ filePtr_

edm::propagate_const<std::shared_ptr<TFile> > edm::RootOutputFile::filePtr_
private

Definition at line 119 of file RootOutputFile.h.

Referenced by filePtr(), finishEndFile(), RootOutputFile(), and shouldWeCloseFile().

◆ indexIntoFile_

IndexIntoFile edm::RootOutputFile::indexIntoFile_
private

Definition at line 124 of file RootOutputFile.h.

Referenced by writeIndexIntoFile(), writeLuminosityBlock(), writeOne(), and writeRun().

◆ logicalFile_

std::string edm::RootOutputFile::logicalFile_
private

Definition at line 114 of file RootOutputFile.h.

Referenced by RootOutputFile().

◆ lumiAux_

LuminosityBlockAuxiliary edm::RootOutputFile::lumiAux_
private

Definition at line 130 of file RootOutputFile.h.

Referenced by writeLuminosityBlock().

◆ lumiEntryNumber_

IndexIntoFile::EntryNumber_t edm::RootOutputFile::lumiEntryNumber_
private

Definition at line 122 of file RootOutputFile.h.

Referenced by writeLuminosityBlock().

◆ lumiTree_

RootOutputTree edm::RootOutputFile::lumiTree_
private

Definition at line 140 of file RootOutputFile.h.

Referenced by respondToCloseInputFile(), RootOutputFile(), and writeLuminosityBlock().

◆ metaDataTree_

edm::propagate_const<TTree*> edm::RootOutputFile::metaDataTree_
private

◆ nEventsInLumi_

unsigned long edm::RootOutputFile::nEventsInLumi_
private

Definition at line 126 of file RootOutputFile.h.

Referenced by writeLuminosityBlock(), and writeOne().

◆ om_

edm::propagate_const<PoolOutputModule*> edm::RootOutputFile::om_
private

◆ parameterSetsTree_

edm::propagate_const<TTree*> edm::RootOutputFile::parameterSetsTree_
private

Definition at line 128 of file RootOutputFile.h.

Referenced by finishEndFile(), RootOutputFile(), and writeParameterSetRegistry().

◆ parentageIDs_

std::map<ParentageID, unsigned int> edm::RootOutputFile::parentageIDs_
private

Definition at line 145 of file RootOutputFile.h.

Referenced by insertProductProvenance(), and writeParentageRegistry().

◆ parentageTree_

edm::propagate_const<TTree*> edm::RootOutputFile::parentageTree_
private

Definition at line 129 of file RootOutputFile.h.

Referenced by finishEndFile(), RootOutputFile(), and writeParentageRegistry().

◆ pBranchListIndexes_

BranchListIndexes const* edm::RootOutputFile::pBranchListIndexes_
private

Definition at line 137 of file RootOutputFile.h.

Referenced by RootOutputFile(), and writeOne().

◆ pEventAux_

EventAuxiliary const* edm::RootOutputFile::pEventAux_
private

Definition at line 132 of file RootOutputFile.h.

Referenced by RootOutputFile(), writeEventAuxiliary(), and writeOne().

◆ pEventEntryInfoVector_

edm::propagate_const<StoredProductProvenanceVector*> edm::RootOutputFile::pEventEntryInfoVector_
private

Definition at line 136 of file RootOutputFile.h.

Referenced by pEventEntryInfoVector(), and writeOne().

◆ pEventSelectionIDs_

EventSelectionIDVector const* edm::RootOutputFile::pEventSelectionIDs_
private

Definition at line 138 of file RootOutputFile.h.

Referenced by RootOutputFile(), and writeOne().

◆ pLumiAux_

LuminosityBlockAuxiliary const* edm::RootOutputFile::pLumiAux_
private

Definition at line 133 of file RootOutputFile.h.

Referenced by RootOutputFile().

◆ processHistoryRegistry_

ProcessHistoryRegistry edm::RootOutputFile::processHistoryRegistry_
private

◆ pRunAux_

RunAuxiliary const* edm::RootOutputFile::pRunAux_
private

Definition at line 134 of file RootOutputFile.h.

Referenced by RootOutputFile().

◆ reportToken_

JobReport::Token edm::RootOutputFile::reportToken_
private

◆ runAux_

RunAuxiliary edm::RootOutputFile::runAux_
private

Definition at line 131 of file RootOutputFile.h.

Referenced by writeRun().

◆ runEntryNumber_

IndexIntoFile::EntryNumber_t edm::RootOutputFile::runEntryNumber_
private

Definition at line 123 of file RootOutputFile.h.

Referenced by writeRun().

◆ runTree_

RootOutputTree edm::RootOutputFile::runTree_
private

Definition at line 141 of file RootOutputFile.h.

Referenced by respondToCloseInputFile(), RootOutputFile(), and writeRun().

◆ storedMergeableRunProductMetadata_

StoredMergeableRunProductMetadata edm::RootOutputFile::storedMergeableRunProductMetadata_
private

Definition at line 125 of file RootOutputFile.h.

Referenced by writeRun(), and writeStoredMergeableRunProductMetadata().

◆ treePointers_

RootOutputTreePtrArray edm::RootOutputFile::treePointers_
private

Definition at line 142 of file RootOutputFile.h.

Referenced by fillBranches(), finishEndFile(), and RootOutputFile().

◆ whyNotFastClonable_

int edm::RootOutputFile::whyNotFastClonable_
private

Definition at line 117 of file RootOutputFile.h.

Referenced by beginInputFile(), and fillBranches().

◆ wrapperBaseTClass_

edm::propagate_const<TClass*> edm::RootOutputFile::wrapperBaseTClass_
private

Definition at line 147 of file RootOutputFile.h.

Referenced by fillBranches().

edm::LuminosityBlockAuxiliary::run
RunNumber_t run() const
Definition: LuminosityBlockAuxiliary.h:35
edm::RootOutputFile::dataTypeReported_
bool dataTypeReported_
Definition: RootOutputFile.h:143
edm::FileBlock::BranchMismatch
Definition: FileBlock.h:54
edm::EventAuxiliary::event
EventNumber_t event() const
Definition: EventAuxiliary.h:72
edm::poolNames::branchIDListBranchName
std::string const & branchIDListBranchName()
Definition: BranchType.cc:176
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:722
edm::poolNames::fileFormatVersionBranchName
std::string const & fileFormatVersionBranchName()
Definition: BranchType.cc:182
edm::RootOutputFile::indexIntoFile_
IndexIntoFile indexIntoFile_
Definition: RootOutputFile.h:124
edm::RootOutputFile::pRunAux_
RunAuxiliary const * pRunAux_
Definition: RootOutputFile.h:134
edm::RootOutputFile::runEntryNumber_
IndexIntoFile::EntryNumber_t runEntryNumber_
Definition: RootOutputFile.h:123
edm::FileBlock::OutputMaxEventsTooSmall
Definition: FileBlock.h:52
edm::getWrapperBasePtr
std::unique_ptr< WrapperBase > getWrapperBasePtr(void *p, int offset)
Definition: getWrapperBasePtr.h:8
edm::RootOutputFile::filePtr
std::shared_ptr< TFile const > filePtr() const
Definition: RootOutputFile.h:103
edm::RootOutputFile::parentageIDs_
std::map< ParentageID, unsigned int > parentageIDs_
Definition: RootOutputFile.h:145
edm::IndexIntoFile::addEntry
void addEntry(ProcessHistoryID const &processHistoryID, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, EntryNumber_t entry)
Definition: IndexIntoFile.cc:75
edm::sort_all
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:92
edm::errors::LogicError
Definition: EDMException.h:37
edm::FileID::fid
std::string const & fid() const
Definition: FileID.h:19
min
T min(T a, T b)
Definition: MathUtil.h:58
MicroEventContent_cff.branch
branch
Definition: MicroEventContent_cff.py:169
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
tree
Definition: tree.py:1
deep_tau::DeepTauBase::BasicDiscriminator
BasicDiscriminator
Definition: DeepTauBase.h:115
edm::FileBlock::NoRootInputSource
Definition: FileBlock.h:27
edm::ParentageRegistry::instance
static ParentageRegistry * instance()
Definition: ParentageRegistry.cc:4
edm::moduleName
std::string moduleName(StableProvenance const &provenance, ProcessHistory const &history)
Definition: Provenance.cc:27
edm::poolNames::parameterSetsTreeName
std::string const & parameterSetsTreeName()
Definition: BranchType.cc:204
edm::BranchListIndexes
std::vector< BranchListIndex > BranchListIndexes
Definition: BranchListIndex.h:18
edm::RootOutputFile::whyNotFastClonable_
int whyNotFastClonable_
Definition: RootOutputFile.h:117
edm::RootOutputFile::treePointers_
RootOutputTreePtrArray treePointers_
Definition: RootOutputFile.h:142
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:120
edm::poolNames::indexIntoFileBranchName
std::string const & indexIntoFileBranchName()
Definition: BranchType.cc:191
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
edm::RootOutputFile::lumiEntryNumber_
IndexIntoFile::EntryNumber_t lumiEntryNumber_
Definition: RootOutputFile.h:122
edm::RootOutputFile::lumiTree_
RootOutputTree lumiTree_
Definition: RootOutputFile.h:140
hgcal_conditions::parameters
Definition: HGCConditions.h:86
edm::get_underlying_safe
constexpr std::shared_ptr< T > & get_underlying_safe(propagate_const< std::shared_ptr< T >> &iP)
Definition: get_underlying_safe.h:41
full
Definition: GenABIO.cc:168
edm::RootOutputFile::file_
std::string file_
Definition: RootOutputFile.h:113
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::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::RootOutputFile::fillBranches
void fillBranches(BranchType const &branchType, OccurrenceForOutput const &occurrence, StoredProductProvenanceVector *productProvenanceVecPtr=nullptr, ProductProvenanceRetriever const *provRetriever=nullptr)
Definition: RootOutputFile.cc:764
edm::poolNames::mergeableRunProductMetadataBranchName
std::string const & mergeableRunProductMetadataBranchName()
Definition: BranchType.cc:194
edm::RootOutputFile::fileName
std::string const & fileName() const
Definition: RootOutputFile.h:78
edm::EventAuxiliary::run
RunNumber_t run() const
Definition: EventAuxiliary.h:73
edm::InProcess
Definition: BranchType.h:11
edm::RootOutputFile::pLumiAux_
LuminosityBlockAuxiliary const * pLumiAux_
Definition: RootOutputFile.h:133
edm::FileBlock::CanFastClone
Definition: FileBlock.h:24
edm::RootOutputFile::metaDataTree_
edm::propagate_const< TTree * > metaDataTree_
Definition: RootOutputFile.h:127
edm::poolNames::parentageBranchName
std::string const & parentageBranchName()
Definition: BranchType.cc:149
edm::RootOutputFile::nEventsInLumi_
unsigned long nEventsInLumi_
Definition: RootOutputFile.h:126
edm::RootOutputFile::pEventEntryInfoVector_
edm::propagate_const< StoredProductProvenanceVector * > pEventEntryInfoVector_
Definition: RootOutputFile.h:136
edm::RootOutputFile::processHistoryRegistry_
ProcessHistoryRegistry processHistoryRegistry_
Definition: RootOutputFile.h:144
edm::RootOutputFile::filePtr_
edm::propagate_const< std::shared_ptr< TFile > > filePtr_
Definition: RootOutputFile.h:119
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
edm::RootOutputTree::setAutoFlush
void setAutoFlush(Long64_t size)
Definition: RootOutputTree.h:97
edm::fillParameterSetBranch
void fillParameterSetBranch(TTree *parameterSetsTree, int basketSize)
Definition: CommonProvenanceFiller.cc:18
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::RootOutputFile::insertProductProvenance
bool insertProductProvenance(const ProductProvenance &, std::set< StoredProductProvenance > &oToInsert)
Definition: RootOutputFile.cc:840
Service
edm::RootOutputFile::branchesWithStoredHistory_
std::set< BranchID > branchesWithStoredHistory_
Definition: RootOutputFile.h:146
edm::RootOutputFile::OutputItemList
PoolOutputModule::OutputItemList OutputItemList
Definition: RootOutputFile.h:49
edm::RootOutputTree::checkIfFastClonable
bool checkIfFastClonable(TTree *inputTree) const
Definition: RootOutputTree.cc:180
edm::CompactEventAuxiliaryVector::guidsSize
size_type guidsSize() const
Definition: CompactEventAuxiliaryVector.h:142
edm::RootOutputFile::compactEventAuxiliary_
CompactEventAuxiliaryVector compactEventAuxiliary_
Definition: RootOutputFile.h:148
edm::InEvent
Definition: BranchType.h:11
edm::RootOutputFile::wrapperBaseTClass_
edm::propagate_const< TClass * > wrapperBaseTClass_
Definition: RootOutputFile.h:147
edm::RootOutputFile::canFastCloneAux_
bool canFastCloneAux_
Definition: RootOutputFile.h:118
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:739
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::poolNames::eventSelectionsBranchName
std::string const & eventSelectionsBranchName()
Definition: BranchType.cc:200
edm::RootOutputFile::eventTree_
RootOutputTree eventTree_
Definition: RootOutputFile.h:139
edm::RootOutputTree::makeTTree
static TTree * makeTTree(TFile *filePtr, std::string const &name, int splitLevel)
Definition: RootOutputTree.cc:121
edm::ProductRegistry::ProductList
std::map< BranchKey, BranchDescription > ProductList
Definition: ProductRegistry.h:39
LogDebug
#define LogDebug(id)
Definition: MessageLogger.h:233
edm::getFileFormatVersion
int getFileFormatVersion()
Definition: GetFileFormatVersion.cc:4
edm::CompactEventAuxiliaryVector::extrasSize
size_type extrasSize() const
Definition: CompactEventAuxiliaryVector.h:141
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:137
edm::EventAuxiliary::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: EventAuxiliary.h:67
edm::CompactEventAuxiliaryVector::push_back
void push_back(const EventAuxiliary &ea)
Definition: CompactEventAuxiliaryVector.h:144
edm::RootOutputFile::runTree_
RootOutputTree runTree_
Definition: RootOutputFile.h:141
Exception
edm::RootOutputFile::eventEntryInfoVector_
StoredProductProvenanceVector eventEntryInfoVector_
Definition: RootOutputFile.h:135
edm::FileBlock::EventsOrLumisSelectedByID
Definition: FileBlock.h:37
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
edm::RootOutputTree::checkEntriesInReadBranches
bool checkEntriesInReadBranches(Long64_t expectedNumberOfEntries) const
Definition: RootOutputTree.cc:202
edm::createGlobalIdentifier
std::string createGlobalIdentifier(bool binary=false)
Definition: GlobalIdentifier.cc:5
edm::RootOutputFile::parentageTree_
edm::propagate_const< TTree * > parentageTree_
Definition: RootOutputFile.h:129
edm::PoolOutputModule::DropDroppedPrior
Definition: PoolOutputModule.h:41
edm::RootOutputFile::logicalFile_
std::string logicalFile_
Definition: RootOutputFile.h:114
edm::RootOutputFile::reportToken_
JobReport::Token reportToken_
Definition: RootOutputFile.h:115
B2GTnPMonitor_cfi.item
item
Definition: B2GTnPMonitor_cfi.py:147
edm::ProcessHistoryRegistry::reducedProcessHistoryID
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
Definition: ProcessHistoryRegistry.cc:23
edm::RootOutputFile::runAux_
RunAuxiliary runAux_
Definition: RootOutputFile.h:131
edm::RootOutputTree::tree
TTree const * tree() const
Definition: RootOutputTree.h:80
alignCSCRings.r
r
Definition: alignCSCRings.py:93
edm::PoolOutputModule::DropPrior
Definition: PoolOutputModule.h:41
L1DTConfigBti_cff.LL
LL
Definition: L1DTConfigBti_cff.py:25
edm::RootOutputTree::setEntries
void setEntries()
Definition: RootOutputTree.h:84
edm::BranchTypeToProductProvenanceBranchName
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
Definition: BranchType.cc:132
edm::CompactEventAuxiliaryVector::reserve
void reserve(std::size_t size)
Definition: CompactEventAuxiliaryVector.h:135
edm::RootOutputFile::om_
edm::propagate_const< PoolOutputModule * > om_
Definition: RootOutputFile.h:116
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
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::LuminosityBlockAuxiliary::luminosityBlock
LuminosityBlockNumber_t luminosityBlock() const
Definition: LuminosityBlockAuxiliary.h:34
edm::ProcessHistoryID
Hash< ProcessHistoryType > ProcessHistoryID
Definition: ProcessHistoryID.h:8
edm::RootOutputFile::eventEntryNumber_
IndexIntoFile::EntryNumber_t eventEntryNumber_
Definition: RootOutputFile.h:121
edm::RunAuxiliary::setProcessHistoryID
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: RunAuxiliary.h:26
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
Exception
Definition: hltDiff.cc:245
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
edm::CompactEventAuxiliaryVector::size
size_type size() const
Definition: CompactEventAuxiliaryVector.h:134
edm::errors::OtherCMS
Definition: EDMException.h:27
edm::fillProcessHistoryBranch
void fillProcessHistoryBranch(TTree *metaDataTree, int basketSize, ProcessHistoryRegistry const &processHistoryRegistry)
Definition: CommonProvenanceFiller.cc:32
edm::poolNames::thinnedAssociationsHelperBranchName
std::string const & thinnedAssociationsHelperBranchName()
Definition: BranchType.cc:179
StoredProductProvenance
edm::PoolOutputModule::DropNone
Definition: PoolOutputModule.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
mps_fire.result
result
Definition: mps_fire.py:311
edm::EventAuxiliary::isRealData
bool isRealData() const
Definition: EventAuxiliary.h:74
dummy
Definition: DummySelector.h:38
edm::poolNames::fileIdentifierBranchName
std::string const & fileIdentifierBranchName()
Definition: BranchType.cc:185
edm::RootOutputFile::pEventAux_
EventAuxiliary const * pEventAux_
Definition: RootOutputFile.h:132
edm::RootOutputFile::pEventEntryInfoVector
StoredProductProvenanceVector const * pEventEntryInfoVector() const
Definition: RootOutputFile.h:105
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
edm::RootOutputFile::lumiAux_
LuminosityBlockAuxiliary lumiAux_
Definition: RootOutputFile.h:130
edm::RootOutputFile::pEventSelectionIDs_
EventSelectionIDVector const * pEventSelectionIDs_
Definition: RootOutputFile.h:138
edm::PoolOutputModule::DropAll
Definition: PoolOutputModule.h:41
edm::errors::Configuration
Definition: EDMException.h:36
edm::RootOutputFile::parameterSetsTree_
edm::propagate_const< TTree * > parameterSetsTree_
Definition: RootOutputFile.h:128
edm::RootOutputFile::storedMergeableRunProductMetadata_
StoredMergeableRunProductMetadata storedMergeableRunProductMetadata_
Definition: RootOutputFile.h:125
benchmark_cfg.fb
fb
Definition: benchmark_cfg.py:14
edm::StoredProductProvenanceVector
std::vector< StoredProductProvenance > StoredProductProvenanceVector
Definition: StoredProductProvenance.h:34
edm::FileBlock::SplitLevelMismatch
Definition: FileBlock.h:53
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