CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
< RootOutputTree
*, NumBranchTypes
RootOutputTreePtrArray
 

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)
 
bool shouldWeCloseFile () const
 
void writeBranchIDListRegistry ()
 
void writeFileFormatVersion ()
 
void writeFileIdentifier ()
 
void writeIndexIntoFile ()
 
void writeLuminosityBlock (LuminosityBlockPrincipal const &lb, ModuleCallingContext const *)
 
void writeOne (EventPrincipal const &e, ModuleCallingContext const *)
 
void writeParameterSetRegistry ()
 
void writeParentageRegistry ()
 
void writeProcessHistoryRegistry ()
 
void writeProductDependencies ()
 
void writeProductDescriptionRegistry ()
 
void writeRun (RunPrincipal const &r, ModuleCallingContext const *)
 
 ~RootOutputFile ()
 

Private Member Functions

void fillBranches (BranchType const &branchType, Principal const &principal, StoredProductProvenanceVector *productProvenanceVecPtr, ModuleCallingContext const *)
 
void insertAncestors (ProductProvenance const &iGetParents, EventPrincipal const &principal, bool produced, std::set< StoredProductProvenance > &oToFill, ModuleCallingContext const *)
 
bool insertProductProvenance (const ProductProvenance &, std::set< StoredProductProvenance > &oToInsert)
 
void setBranchAliases (TTree *tree, SelectedProducts const &branches) const
 

Private Attributes

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

Detailed Description

Definition at line 44 of file RootOutputFile.h.

Member Typedef Documentation

Definition at line 46 of file RootOutputFile.h.

Definition at line 47 of file RootOutputFile.h.

Definition at line 48 of file RootOutputFile.h.

Constructor & Destructor Documentation

edm::RootOutputFile::RootOutputFile ( PoolOutputModule om,
std::string const &  fileName,
std::string const &  logicalFileName 
)
explicit

Definition at line 67 of file RootOutputFile.cc.

References edm::RootOutputTree::addAuxiliary(), edm::RootOutputTree::addBranch(), edm::PoolOutputModule::auxItems(), branchesWithStoredHistory_, edm::poolNames::branchListIndexesBranchName(), edm::BranchDescription::branchName(), revisionDML::branchType(), edm::BranchTypeToAuxiliaryBranchName(), edm::BranchTypeToProductProvenanceBranchName(), edm::PoolOutputModule::catalog(), edm::PoolOutputModule::compressionAlgorithm(), edm::errors::Configuration, edm::createGlobalIdentifier(), cms::Digest::digest(), edm::PoolOutputModule::eventAutoFlushSize(), edm::poolNames::eventSelectionsBranchName(), eventTree_, edm::hlt::Exception, fid_, file_, filePtr_, edm::BranchDescription::fullClassName(), i, edm::InEvent, edm::InLumi, edm::InRun, logicalFile_, lumiTree_, edm::RootOutputTree::makeTTree(), metaDataTree_, edm::poolNames::metaDataTreeName(), edm::PoolOutputModule::moduleLabel(), edm::BranchDescription::moduleLabel(), edm::moduleName(), edm::NumBranchTypes, om_, parameterSetsTree_, edm::poolNames::parameterSetsTreeName(), parentageTree_, edm::poolNames::parentageTreeName(), pBranchListIndexes_, pEventAux_, pEventEntryInfoVector_, pEventSelectionIDs_, pLumiAux_, edm::BranchDescription::processName(), edm::BranchDescription::productInstanceName(), pRunAux_, reportToken_, runTree_, edm::PoolOutputModule::selectedOutputItemList(), edm::RootOutputTree::setAutoFlush(), edm::sort_all(), AlCaHLTBitMon_QueryRunRegistry::string, cms::MD5Result::toString(), treePointers_, and edm::BranchDescription::wrappedName().

67  :
68  file_(fileName),
69  logicalFile_(logicalFileName),
70  reportToken_(0),
71  om_(om),
73  canFastCloneAux_(false),
74  filePtr_(TFile::Open(file_.c_str(), "recreate", "", om_->compressionLevel())),
75  fid_(),
76  eventEntryNumber_(0LL),
77  lumiEntryNumber_(0LL),
78  runEntryNumber_(0LL),
80  metaDataTree_(nullptr),
81  parameterSetsTree_(nullptr),
82  parentageTree_(nullptr),
83  lumiAux_(),
84  runAux_(),
85  pEventAux_(nullptr),
87  pRunAux_(&runAux_),
90  pBranchListIndexes_(nullptr),
91  pEventSelectionIDs_(nullptr),
95  treePointers_(),
96  dataTypeReported_(false),
98  parentageIDs_(),
100  wrapperBaseTClass_(gROOT->GetClass("edm::WrapperBase")) {
101 #if ROOT_VERSION_CODE >= ROOT_VERSION(5,30,0)
102  if (om_->compressionAlgorithm() == std::string("ZLIB")) {
103  filePtr_->SetCompressionAlgorithm(ROOT::kZLIB);
104  } else if (om_->compressionAlgorithm() == std::string("LZMA")) {
105  filePtr_->SetCompressionAlgorithm(ROOT::kLZMA);
106  } else {
107  throw Exception(errors::Configuration) << "PoolOutputModule configured with unknown compression algorithm '" << om_->compressionAlgorithm() << "'\n"
108  << "Allowed compression algorithms are ZLIB and LZMA\n";
109  }
110 #endif
111  if (-1 != om->eventAutoFlushSize()) {
112  eventTree_.setAutoFlush(-1*om->eventAutoFlushSize());
113  }
115  pEventAux_, om_->auxItems()[InEvent].basketSize_);
117  pEventEntryInfoVector_, om_->auxItems()[InEvent].basketSize_);
119  pEventSelectionIDs_, om_->auxItems()[InEvent].basketSize_,false);
121  pBranchListIndexes_, om_->auxItems()[InEvent].basketSize_);
122 
124  pLumiAux_, om_->auxItems()[InLumi].basketSize_);
125 
127  pRunAux_, om_->auxItems()[InRun].basketSize_);
128 
130  treePointers_[InLumi] = &lumiTree_;
131  treePointers_[InRun] = &runTree_;
132 
133  for(int i = InEvent; i < NumBranchTypes; ++i) {
134  BranchType branchType = static_cast<BranchType>(i);
135  RootOutputTree *theTree = treePointers_[branchType];
136  for(auto const& item : om_->selectedOutputItemList()[branchType]) {
137  item.product_ = nullptr;
138  BranchDescription const& desc = *item.branchDescription_;
139  theTree->addBranch(desc.branchName(),
140  desc.wrappedName(),
141  item.product_,
142  item.splitLevel_,
143  item.basketSize_,
144  item.branchDescription_->produced());
145  //make sure we always store product registry info for all branches we create
146  branchesWithStoredHistory_.insert(item.branchID());
147  }
148  }
149  // Don't split metadata tree or event description tree
153 
154  fid_ = FileID(createGlobalIdentifier());
155 
156  // For the Job Report, get a vector of branch names in the "Events" tree.
157  // Also create a hash of all the branch names in the "Events" tree
158  // in a deterministic order, except use the full class name instead of the friendly class name.
159  // To avoid extra string copies, we create a vector of pointers into the product registry,
160  // and use a custom comparison operator for sorting.
161  std::vector<std::string> branchNames;
162  std::vector<BranchDescription const*> branches;
163  branchNames.reserve(om_->selectedOutputItemList()[InEvent].size());
164  branches.reserve(om->selectedOutputItemList()[InEvent].size());
165  for(auto const& item : om_->selectedOutputItemList()[InEvent]) {
166  branchNames.push_back(item.branchDescription_->branchName());
167  branches.push_back(item.branchDescription_);
168  }
169  // Now sort the branches for the hash.
170  sort_all(branches, sorterForJobReportHash);
171  // Now, make a concatenated string.
172  std::ostringstream oss;
173  char const underscore = '_';
174  for(auto const& branch : branches) {
175  BranchDescription const& bd = *branch;
176  oss << bd.fullClassName() << underscore
177  << bd.moduleLabel() << underscore
178  << bd.productInstanceName() << underscore
179  << bd.processName() << underscore;
180  }
181  std::string stringrep = oss.str();
182  cms::Digest md5alg(stringrep);
183 
184  // Register the output file with the JobReport service
185  // and get back the token for it.
186  std::string moduleName = "PoolOutputModule";
187  Service<JobReport> reportSvc;
188  reportToken_ = reportSvc->outputFileOpened(
189  file_, logicalFile_, // PFN and LFN
190  om_->catalog(), // catalog
191  moduleName, // module class name
192  om_->moduleLabel(), // module label
193  fid_.fid(), // file id (guid)
194  std::string(), // data type (not yet known, so string is empty).
195  md5alg.digest().toString(), // branch hash
196  branchNames); // branch names being written
197  }
int i
Definition: DBlmapReader.cc:9
LuminosityBlockAuxiliary lumiAux_
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:114
std::shared_ptr< TFile > filePtr_
std::string const & parentageTreeName()
Definition: BranchType.cc:158
std::string const & catalog() const
std::string const & moduleLabel() const
int const & compressionLevel() const
OutputItemListArray const & selectedOutputItemList() const
ProcessHistoryRegistry processHistoryRegistry_
std::string const & eventSelectionsBranchName()
Definition: BranchType.cc:237
void setAutoFlush(Long64_t size)
BranchType
Definition: BranchType.h:11
std::set< BranchID > branchesWithStoredHistory_
std::vector< EventSelectionID > EventSelectionIDVector
std::string const & parameterSetsTreeName()
Definition: BranchType.cc:245
std::string const & fileName() const
std::map< ParentageID, unsigned int > parentageIDs_
RootOutputTree eventTree_
std::vector< BranchListIndex > BranchListIndexes
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
PoolOutputModule const * om_
std::string const & compressionAlgorithm() const
IndexIntoFile::EntryNumber_t eventEntryNumber_
LuminosityBlockAuxiliary const * pLumiAux_
std::string logicalFile_
int const & splitLevel() const
std::string const & metaDataTreeName()
Definition: BranchType.cc:167
static TTree * makeTTree(TFile *filePtr, std::string const &name, int splitLevel)
int const & whyNotFastClonable() const
EventSelectionIDVector const * pEventSelectionIDs_
StoredProductProvenanceVector * pEventEntryInfoVector_
void sort_all(RandomAccessSequence &s)
wrappers for std::sort
Definition: Algorithms.h:120
RootOutputTree runTree_
StoredProductProvenanceVector eventEntryInfoVector_
AuxItemArray const & auxItems() const
void addAuxiliary(std::string const &branchName, T const *&pAux, int bufSize, bool allowCloning=true)
std::vector< StoredProductProvenance > StoredProductProvenanceVector
IndexIntoFile indexIntoFile_
int const & treeMaxVirtualSize() const
IndexIntoFile::EntryNumber_t runEntryNumber_
EventAuxiliary const * pEventAux_
RunAuxiliary runAux_
std::string const & BranchTypeToProductProvenanceBranchName(BranchType const &BranchType)
Definition: BranchType.cc:130
std::string const & branchListIndexesBranchName()
Definition: BranchType.cc:241
RootOutputTreePtrArray treePointers_
BranchListIndexes const * pBranchListIndexes_
IndexIntoFile::EntryNumber_t lumiEntryNumber_
RootOutputTree lumiTree_
RunAuxiliary const * pRunAux_
JobReport::Token reportToken_
std::string createGlobalIdentifier()
edm::RootOutputFile::~RootOutputFile ( )
inline

Definition at line 51 of file RootOutputFile.h.

51 {}

Member Function Documentation

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

Definition at line 289 of file RootOutputFile.cc.

References edm::PoolOutputModule::basketOrder(), edm::FileBlock::BranchMismatch, edm::FileBlock::CanFastClone, canFastCloneAux_, edm::RootOutputTree::checkIfFastClonable(), edm::RootOutputTree::checkSplitLevelsAndBasketSizes(), eventTree_, edm::hlt::Exception, file_, edm::FileBlock::fileName(), edm::PoolOutputModule::inputFileCount(), edm::match(), edm::RootOutputTree::maybeFastCloneTree(), edm::errors::MismatchedInputFiles, edm::FileBlock::NoRootInputSource, om_, edm::FileBlock::OutputMaxEventsTooSmall, edm::PoolOutputModule::overrideInputFileSplitLevels(), reportToken_, edm::FileBlock::SplitLevelMismatch, edm::FileBlock::tree(), edm::PoolOutputModule::whyNotFastClonable(), edm::FileBlock::whyNotFastClonable(), and whyNotFastClonable_.

289  {
290 
291  // Reset per input file information
293  canFastCloneAux_ = false;
294 
295  if(fb.tree() != nullptr) {
296 
297  whyNotFastClonable_ |= fb.whyNotFastClonable();
298 
299  if(remainingEvents >= 0 && remainingEvents < fb.tree()->GetEntries()) {
301  }
302 
304  if(!match) {
306  // We may be fast copying. We must disable fast copying if the split levels
307  // or basket sizes do not match.
309  } else {
310  // We are using the input split levels and basket sizes from the first input file
311  // for copied output branches. In this case, we throw an exception if any branches
312  // have different split levels or basket sizes in a subsequent input file.
313  // If the mismatch is in the first file, there is a bug somewhere, so we assert.
314  assert(om_->inputFileCount() > 1);
315  throw Exception(errors::MismatchedInputFiles, "RootOutputFile::beginInputFile()") <<
316  "Merge failure because input file " << file_ << " has different ROOT split levels or basket sizes\n" <<
317  "than previous files. To allow merging in splite of this, use the configuration parameter\n" <<
318  "overrideInputFileSplitLevels=cms.untracked.bool(True)\n" <<
319  "in every PoolOutputModule.\n";
320  }
321  }
322 
323  // Since this check can be time consuming, we do it only if we would otherwise fast clone.
325  if(!eventTree_.checkIfFastClonable(fb.tree())) {
327  }
328  }
329  // We now check if we can fast copy the auxiliary branches.
330  // We can do so only if we can otherwise fast copy,
331  // the input file has the current format (these branches are in the Events Tree),
332  // there are no newly dropped or produced products,
333  // no metadata has been dropped,
334  // ID's have not been modified,
335  // and the branch list indexes do not need modification.
336 
337  // Note: Fast copy of the EventProductProvenance branch is unsafe
338  // unless we can enforce that the parentage information for a fully copied
339  // output file will be the same as for the input file, with nothing dropped.
340  // This has never been enforced, and, withthe EDAlias feature, it may no longer
341  // work by accident.
342  // So, for now, we do not enable fast cloning of the non-product branches.
343 /*
344  Service<ConstProductRegistry> reg;
345  canFastCloneAux_ = (whyNotFastClonable_ == FileBlock::CanFastClone) &&
346  fb.fileFormatVersion().noMetaDataTrees() &&
347  !om_->hasNewlyDroppedBranch()[InEvent] &&
348  !fb.hasNewlyDroppedBranch()[InEvent] &&
349  om_->dropMetaData() == PoolOutputModule::DropNone &&
350  !reg->anyProductProduced() &&
351  !fb.modifiedIDs() &&
352  fb.branchListIndexesUnchanged();
353 */
354 
355  // Report the fast copying status.
356  Service<JobReport> reportSvc;
357  reportSvc->reportFastCopyingStatus(reportToken_, fb.fileName(), whyNotFastClonable_ == FileBlock::CanFastClone);
358  } else {
360  }
361 
363 
364  // Possibly issue warning or informational message if we haven't fast cloned.
365  if(fb.tree() != nullptr && whyNotFastClonable_ != FileBlock::CanFastClone) {
366  maybeIssueWarning(whyNotFastClonable_, fb.fileName(), file_);
367  }
368  }
bool const & overrideInputFileSplitLevels() const
bool checkSplitLevelsAndBasketSizes(TTree *inputTree) const
bool checkIfFastClonable(TTree *inputTree) const
RootOutputTree eventTree_
PoolOutputModule const * om_
std::string const & basketOrder() const
int const & whyNotFastClonable() const
void maybeFastCloneTree(bool canFastClone, bool canFastCloneAux, TTree *tree, std::string const &option)
int const & inputFileCount() const
JobReport::Token reportToken_
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName)
std::string const& edm::RootOutputFile::fileName ( ) const
inline

Definition at line 71 of file RootOutputFile.h.

References file_.

71 {return file_;}
void edm::RootOutputFile::fillBranches ( BranchType const &  branchType,
Principal const &  principal,
StoredProductProvenanceVector productProvenanceVecPtr,
ModuleCallingContext const *  mcc 
)
private

Definition at line 670 of file RootOutputFile.cc.

References branchesWithStoredHistory_, revisionDML::branchType(), edm::FileBlock::CanFastClone, compareJSON::const, CommonMethods::cp(), edm::PoolOutputModule::DropDroppedPrior, edm::PoolOutputModule::dropMetaData(), edm::PoolOutputModule::DropNone, edm::PoolOutputModule::DropPrior, read312RV_cfg::fastCloning, edm::Principal::getForOutput(), edm::getWrapperBasePtr(), edm::InEvent, insertAncestors(), insertProductProvenance(), evf::evtn::offset(), om_, AlCaHLTBitMon_ParallelJobs::p, cmsRelvalreport::principal(), edm::es::produced, edm::OutputHandle::productProvenance(), edm::PoolOutputModule::selectedOutputItemList(), treePointers_, whyNotFastClonable_, edm::OutputHandle::wrapper(), and wrapperBaseTClass_.

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

674  {
675 
676  std::vector<std::unique_ptr<WrapperBase> > dummies;
677 
679 
681 
682  std::set<StoredProductProvenance> provenanceToKeep;
683 
684  // Loop over EDProduct branches, fill the provenance, and write the branch.
685  for(auto const& item : items) {
686 
687  BranchID const& id = item.branchDescription_->branchID();
688  branchesWithStoredHistory_.insert(id);
689 
690  bool produced = item.branchDescription_->produced();
691  bool keepProvenance = productProvenanceVecPtr != nullptr &&
695  bool getProd = (produced || !fastCloning ||
696  treePointers_[branchType]->uncloned(item.branchDescription_->branchName()));
697 
698  WrapperBase const* product = nullptr;
699  OutputHandle const oh = principal.getForOutput(id, getProd, mcc);
700  if(keepProvenance && oh.productProvenance()) {
701  insertProductProvenance(*oh.productProvenance(),provenanceToKeep);
702  //provenanceToKeep.insert(*oh.productProvenance());
703  EventPrincipal const& eventPrincipal = dynamic_cast<EventPrincipal const&>(principal);
704  assert(eventPrincipal.productProvenanceRetrieverPtr());
705  insertAncestors(*oh.productProvenance(), eventPrincipal, produced, provenanceToKeep, mcc);
706  }
707  product = oh.wrapper();
708  if(getProd) {
709  if(product == nullptr) {
710  // No product with this ID is in the event.
711  // Add a null product.
712  TClass* cp = gROOT->GetClass(item.branchDescription_->wrappedName().c_str());
713  int offset = cp->GetBaseClassOffset(wrapperBaseTClass_);
714  void* p = cp->New();
715  std::unique_ptr<WrapperBase> dummy = getWrapperBasePtr(p, offset);
716  product = dummy.get();
717  dummies.emplace_back(std::move(dummy));
718  }
719  item.product_ = product;
720  }
721  }
722 
723  if(productProvenanceVecPtr != nullptr) productProvenanceVecPtr->assign(provenanceToKeep.begin(), provenanceToKeep.end());
724  treePointers_[branchType]->fillTree();
725  if(productProvenanceVecPtr != nullptr) productProvenanceVecPtr->clear();
726  }
DropMetaData const & dropMetaData() const
OutputItemListArray const & selectedOutputItemList() const
std::set< BranchID > branchesWithStoredHistory_
PoolOutputModule const * om_
void insertAncestors(ProductProvenance const &iGetParents, EventPrincipal const &principal, bool produced, std::set< StoredProductProvenance > &oToFill, ModuleCallingContext const *)
PoolOutputModule::OutputItemList OutputItemList
unsigned int offset(bool)
eventsetup::produce::Produce produced
Definition: ESProducts.cc:20
string const
Definition: compareJSON.py:14
bool insertProductProvenance(const ProductProvenance &, std::set< StoredProductProvenance > &oToInsert)
std::unique_ptr< WrapperBase > getWrapperBasePtr(void *p, int offset)
RootOutputTreePtrArray treePointers_
void edm::RootOutputFile::finishEndFile ( )

Definition at line 593 of file RootOutputFile.cc.

References revisionDML::branchType(), filePtr_, i, edm::InEvent, edm::one::OutputModuleBase::keptProducts(), metaDataTree_, edm::NumBranchTypes, om_, parameterSetsTree_, parentageTree_, reportToken_, setBranchAliases(), diffTreeTool::tree, treePointers_, and edm::RootOutputTree::writeTTree().

593  {
594  metaDataTree_->SetEntries(-1);
597 
599 
600  // Create branch aliases for all the branches in the
601  // events/lumis/runs trees. The loop is over all types of data
602  // products.
603  for(int i = InEvent; i < NumBranchTypes; ++i) {
604  BranchType branchType = static_cast<BranchType>(i);
606  treePointers_[branchType]->writeTree();
607  }
608 
609  // close the file -- mfp
610  // Just to play it safe, zero all pointers to objects in the TFile to be closed.
611  metaDataTree_ = parentageTree_ = nullptr;
612  for(auto& treePointer : treePointers_) {
613  treePointer->close();
614  treePointer = nullptr;
615  }
616  filePtr_->Close();
617  filePtr_.reset();
618 
619  // report that file has been closed
620  Service<JobReport> reportSvc;
621  reportSvc->outputFileClosed(reportToken_);
622 
623  }
int i
Definition: DBlmapReader.cc:9
std::shared_ptr< TFile > filePtr_
BranchType
Definition: BranchType.h:11
PoolOutputModule const * om_
SelectedProductsForBranchType const & keptProducts() const
void setBranchAliases(TTree *tree, SelectedProducts const &branches) const
static void writeTTree(TTree *tree)
RootOutputTreePtrArray treePointers_
JobReport::Token reportToken_
void edm::RootOutputFile::insertAncestors ( ProductProvenance const &  iGetParents,
EventPrincipal const &  principal,
bool  produced,
std::set< StoredProductProvenance > &  oToFill,
ModuleCallingContext const *  mcc 
)
private

Definition at line 645 of file RootOutputFile.cc.

References branchesWithStoredHistory_, edm::ProductProvenance::branchID(), edm::ProductProvenanceRetriever::branchIDToProvenance(), edm::PoolOutputModule::DropAll, edm::PoolOutputModule::DropDroppedPrior, edm::PoolOutputModule::dropMetaData(), edm::PoolOutputModule::DropNone, edm::PoolOutputModule::DropPrior, edm::EventPrincipal::getProvenance(), info(), insertProductProvenance(), om_, edm::ProductProvenance::parentage(), edm::Parentage::parents(), edm::es::produced, and edm::EventPrincipal::productProvenanceRetrieverPtr().

Referenced by fillBranches().

649  {
653  ProductProvenanceRetriever const& iMapper = *principal.productProvenanceRetrieverPtr();
654  std::vector<BranchID> const& parentIDs = iGetParents.parentage().parents();
655  for(auto const& parentID : parentIDs) {
656  branchesWithStoredHistory_.insert(parentID);
657  ProductProvenance const* info = iMapper.branchIDToProvenance(parentID);
658  if(info) {
660  principal.getProvenance(info->branchID(), mcc).product().produced()) {
661  if(insertProductProvenance(*info,oToFill) ) {
662  //haven't seen this one yet
663  insertAncestors(*info, principal, produced, oToFill, mcc);
664  }
665  }
666  }
667  }
668  }
static const TGPicture * info(bool iBackgroundIsBlack)
DropMetaData const & dropMetaData() const
std::set< BranchID > branchesWithStoredHistory_
PoolOutputModule const * om_
void insertAncestors(ProductProvenance const &iGetParents, EventPrincipal const &principal, bool produced, std::set< StoredProductProvenance > &oToFill, ModuleCallingContext const *)
eventsetup::produce::Produce produced
Definition: ESProducts.cc:20
bool insertProductProvenance(const ProductProvenance &, std::set< StoredProductProvenance > &oToInsert)
bool edm::RootOutputFile::insertProductProvenance ( const ProductProvenance ,
std::set< StoredProductProvenance > &  oToInsert 
)
private

Definition at line 729 of file RootOutputFile.cc.

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

Referenced by fillBranches(), and insertAncestors().

730  {
731  StoredProductProvenance toStore;
732  toStore.branchID_ = iProv.branchID().id();
733  std::set<edm::StoredProductProvenance>::iterator itFound = oToInsert.find(toStore);
734  if(itFound == oToInsert.end()) {
735  //get the index to the ParentageID or insert a new value if not already present
736  std::pair<std::map<edm::ParentageID,unsigned int>::iterator,bool> i = parentageIDs_.insert(std::make_pair(iProv.parentageID(),static_cast<unsigned int>(parentageIDs_.size())));
737  toStore.parentageIDIndex_ = i.first->second;
738  if(toStore.parentageIDIndex_ >= parentageIDs_.size()) {
740  << "RootOutputFile::insertProductProvenance\n"
741  << "The parentage ID index value " << toStore.parentageIDIndex_ << " is out of bounds. The maximum value is currently " << parentageIDs_.size()-1 << ".\n"
742  << "This should never happen.\n"
743  << "Please report this to the framework hypernews forum 'hn-cms-edmFramework@cern.ch'.\n";
744  }
745 
746  oToInsert.insert(toStore);
747  return true;
748  }
749  return false;
750  }
int i
Definition: DBlmapReader.cc:9
std::map< ParentageID, unsigned int > parentageIDs_
void edm::RootOutputFile::respondToCloseInputFile ( FileBlock const &  fb)

Definition at line 370 of file RootOutputFile.cc.

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

370  {
374  }
RootOutputTree eventTree_
RootOutputTree runTree_
RootOutputTree lumiTree_
void edm::RootOutputFile::setBranchAliases ( TTree *  tree,
SelectedProducts const &  branches 
) const
private

Definition at line 626 of file RootOutputFile.cc.

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

Referenced by finishEndFile().

626  {
627  if(tree && tree->GetNbranches() != 0) {
628  for(auto const& selection : branches) {
629  BranchDescription const& pd = *selection;
630  std::string const& full = pd.branchName() + "obj";
631  if(pd.branchAliases().empty()) {
632  std::string const& alias =
633  (pd.productInstanceName().empty() ? pd.moduleLabel() : pd.productInstanceName());
634  tree->SetAlias(alias.c_str(), full.c_str());
635  } else {
636  for(auto const& alias : pd.branchAliases()) {
637  tree->SetAlias(alias.c_str(), full.c_str());
638  }
639  }
640  }
641  }
642  }
selection
main part
Definition: corrVsCorr.py:98
Definition: GenABIO.cc:180
bool edm::RootOutputFile::shouldWeCloseFile ( ) const

Definition at line 376 of file RootOutputFile.cc.

References filePtr_, edm::PoolOutputModule::maxFileSize(), om_, and findQualityFiles::size.

376  {
377  unsigned int const oneK = 1024;
378  Long64_t size = filePtr_->GetSize()/oneK;
379  return(size >= om_->maxFileSize());
380  }
std::shared_ptr< TFile > filePtr_
unsigned int const & maxFileSize() const
PoolOutputModule const * om_
tuple size
Write out results.
void edm::RootOutputFile::writeBranchIDListRegistry ( )

Definition at line 534 of file RootOutputFile.cc.

References b, edm::PoolOutputModule::basketSize(), edm::poolNames::branchIDListBranchName(), edm::one::OutputModuleBase::branchIDLists(), metaDataTree_, om_, and AlCaHLTBitMon_ParallelJobs::p.

534  {
535  BranchIDLists const* p = om_->branchIDLists();
536  TBranch* b = metaDataTree_->Branch(poolNames::branchIDListBranchName().c_str(), &p, om_->basketSize(), 0);
537  assert(b);
538  b->Fill();
539  }
BranchIDLists const * branchIDLists() const
int const & basketSize() const
std::vector< BranchIDList > BranchIDLists
Definition: BranchIDList.h:19
PoolOutputModule const * om_
double b
Definition: hdecay.h:120
std::string const & branchIDListBranchName()
Definition: BranchType.cc:207
void edm::RootOutputFile::writeFileFormatVersion ( )

Definition at line 491 of file RootOutputFile.cc.

References b, edm::PoolOutputModule::basketSize(), edm::poolNames::fileFormatVersionBranchName(), edm::getFileFormatVersion(), metaDataTree_, and om_.

491  {
492  FileFormatVersion fileFormatVersion(getFileFormatVersion());
493  FileFormatVersion* pFileFmtVsn = &fileFormatVersion;
494  TBranch* b = metaDataTree_->Branch(poolNames::fileFormatVersionBranchName().c_str(), &pFileFmtVsn, om_->basketSize(), 0);
495  assert(b);
496  b->Fill();
497  }
int const & basketSize() const
std::string const & fileFormatVersionBranchName()
Definition: BranchType.cc:212
PoolOutputModule const * om_
int getFileFormatVersion()
double b
Definition: hdecay.h:120
void edm::RootOutputFile::writeFileIdentifier ( )

Definition at line 499 of file RootOutputFile.cc.

References b, edm::PoolOutputModule::basketSize(), fid_, edm::poolNames::fileIdentifierBranchName(), metaDataTree_, and om_.

499  {
500  FileID* fidPtr = &fid_;
501  TBranch* b = metaDataTree_->Branch(poolNames::fileIdentifierBranchName().c_str(), &fidPtr, om_->basketSize(), 0);
502  assert(b);
503  b->Fill();
504  }
int const & basketSize() const
PoolOutputModule const * om_
double b
Definition: hdecay.h:120
std::string const & fileIdentifierBranchName()
Definition: BranchType.cc:217
void edm::RootOutputFile::writeIndexIntoFile ( )

Definition at line 506 of file RootOutputFile.cc.

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

506  {
509  ex << "The number of entries in at least one output TBranch whose entries\n"
510  "were copied from the input does not match the number of events\n"
511  "recorded in IndexIntoFile. This might (or might not) indicate a\n"
512  "problem related to fast copy.";
513  ex.addContext("Calling RootOutputFile::writeIndexIntoFile");
514  throw ex;
515  }
517  IndexIntoFile* iifPtr = &indexIntoFile_;
518  TBranch* b = metaDataTree_->Branch(poolNames::indexIntoFileBranchName().c_str(), &iifPtr, om_->basketSize(), 0);
519  assert(b);
520  b->Fill();
521  }
int const & basketSize() const
void sortVector_Run_Or_Lumi_Entries()
RootOutputTree eventTree_
PoolOutputModule const * om_
IndexIntoFile::EntryNumber_t eventEntryNumber_
std::string const & indexIntoFileBranchName()
Definition: BranchType.cc:227
bool checkEntriesInReadBranches(Long64_t expectedNumberOfEntries) const
double b
Definition: hdecay.h:120
IndexIntoFile indexIntoFile_
void edm::RootOutputFile::writeLuminosityBlock ( LuminosityBlockPrincipal const &  lb,
ModuleCallingContext const *  mcc 
)

Definition at line 427 of file RootOutputFile.cc.

References edm::IndexIntoFile::addEntry(), edm::LuminosityBlockPrincipal::aux(), fillBranches(), edm::LuminosityBlockPrincipal::id(), indexIntoFile_, edm::InLumi, lumiAux_, lumiEntryNumber_, edm::LuminosityBlockID::luminosityBlock(), edm::LuminosityBlockAuxiliary::luminosityBlock(), lumiTree_, edm::RootOutputTree::optimizeBaskets(), edm::Principal::processHistory(), edm::Principal::processHistoryID(), processHistoryRegistry_, edm::ProcessHistoryRegistry::reducedProcessHistoryID(), edm::ProcessHistoryRegistry::registerProcessHistory(), reportToken_, edm::LuminosityBlockID::run(), edm::LuminosityBlockAuxiliary::run(), and edm::LuminosityBlockAuxiliary::setProcessHistoryID().

427  {
428  // Auxiliary branch
429  // NOTE: lumiAux_ must be filled before calling fillBranches since it gets written out in that routine.
430  lumiAux_ = lb.aux();
431  // Use the updated process historyID
432  lumiAux_.setProcessHistoryID(lb.processHistoryID());
433  // Store the process history.
434  processHistoryRegistry_.registerProcessHistory(lb.processHistory());
435  // Store the reduced ID in the IndexIntoFile
436  ProcessHistoryID reducedPHID = processHistoryRegistry_.reducedProcessHistoryID(lb.processHistoryID());
437  // Add lumi to index.
440  fillBranches(InLumi, lb, nullptr, mcc);
441  lumiTree_.optimizeBaskets(10ULL*1024*1024);
442 
443  Service<JobReport> reportSvc;
444  reportSvc->reportLumiSection(reportToken_, lb.id().run(), lb.id().luminosityBlock());
445  }
void fillBranches(BranchType const &branchType, Principal const &principal, StoredProductProvenanceVector *productProvenanceVecPtr, ModuleCallingContext const *)
LuminosityBlockAuxiliary lumiAux_
bool registerProcessHistory(ProcessHistory const &processHistory)
ProcessHistoryRegistry processHistoryRegistry_
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
void setProcessHistoryID(ProcessHistoryID const &phid)
LuminosityBlockNumber_t luminosityBlock() const
void addEntry(ProcessHistoryID const &processHistoryID, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, EntryNumber_t entry)
Hash< ProcessHistoryType > ProcessHistoryID
IndexIntoFile indexIntoFile_
IndexIntoFile::EntryNumber_t lumiEntryNumber_
RootOutputTree lumiTree_
void optimizeBaskets(ULong64_t size)
JobReport::Token reportToken_
void edm::RootOutputFile::writeOne ( EventPrincipal const &  e,
ModuleCallingContext const *  mcc 
)

Definition at line 382 of file RootOutputFile.cc.

References edm::IndexIntoFile::addEntry(), edm::EventPrincipal::aux(), edm::EventPrincipal::branchListIndexes(), dtTPAnalyzer_cfg::dataType, dataTypeReported_, edm::EventID::event(), edm::EventAuxiliary::event(), eventEntryNumber_, edm::EventPrincipal::eventSelectionIDs(), fillBranches(), edm::EventPrincipal::id(), indexIntoFile_, edm::InEvent, edm::EventAuxiliary::isRealData(), edm::EventAuxiliary::luminosityBlock(), om_, pBranchListIndexes_, pEventAux_, pEventEntryInfoVector_, pEventSelectionIDs_, edm::Principal::processHistory(), edm::EventAuxiliary::processHistoryID(), edm::Principal::processHistoryID(), processHistoryRegistry_, edm::ProcessHistoryRegistry::reducedProcessHistoryID(), edm::ProcessHistoryRegistry::registerProcessHistory(), reportToken_, edm::EventID::run(), edm::EventAuxiliary::run(), edm::one::OutputModuleBase::selectorConfig(), AlCaHLTBitMon_QueryRunRegistry::string, and edm::one::OutputModuleBase::wantAllEvents().

383  {
384  // Auxiliary branch
385  pEventAux_ = &e.aux();
386 
387  // Because getting the data may cause an exception to be thrown we want to do that
388  // first before writing anything to the file about this event
389  // NOTE: pEventAux_, pBranchListIndexes_, pEventSelectionIDs_, and pEventEntryInfoVector_
390  // must be set before calling fillBranches since they get written out in that routine.
391  assert(pEventAux_->processHistoryID() == e.processHistoryID());
392  pBranchListIndexes_ = &e.branchListIndexes();
393 
394  // Note: The EventSelectionIDVector should have a one to one correspondence with the processes in the process history.
395  // Therefore, a new entry should be added if and only if the current process has been added to the process history,
396  // which is done if and only if there is a produced product.
398  EventSelectionIDVector esids = e.eventSelectionIDs();
399  if (reg->anyProductProduced() || !om_->wantAllEvents()) {
400  esids.push_back(om_->selectorConfig());
401  }
402  pEventSelectionIDs_ = &esids;
404 
405  // Add the dataType to the job report if it hasn't already been done
406  if(!dataTypeReported_) {
407  Service<JobReport> reportSvc;
408  std::string dataType("MC");
409  if(pEventAux_->isRealData()) dataType = "Data";
410  reportSvc->reportDataType(reportToken_, dataType);
411  dataTypeReported_ = true;
412  }
413 
414  // Store the process history.
416  // Store the reduced ID in the IndexIntoFile
417  ProcessHistoryID reducedPHID = processHistoryRegistry_.reducedProcessHistoryID(e.processHistoryID());
418  // Add event to index
421 
422  // Report event written
423  Service<JobReport> reportSvc;
424  reportSvc->eventWrittenToFile(reportToken_, e.id().run(), e.id().event());
425  }
void fillBranches(BranchType const &branchType, Principal const &principal, StoredProductProvenanceVector *productProvenanceVecPtr, ModuleCallingContext const *)
bool isRealData() const
bool registerProcessHistory(ProcessHistory const &processHistory)
RunNumber_t run() const
ProcessHistoryRegistry processHistoryRegistry_
ParameterSetID selectorConfig() const
std::vector< EventSelectionID > EventSelectionIDVector
LuminosityBlockNumber_t luminosityBlock() const
PoolOutputModule const * om_
IndexIntoFile::EntryNumber_t eventEntryNumber_
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
void addEntry(ProcessHistoryID const &processHistoryID, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, EntryNumber_t entry)
Hash< ProcessHistoryType > ProcessHistoryID
EventSelectionIDVector const * pEventSelectionIDs_
StoredProductProvenanceVector * pEventEntryInfoVector_
IndexIntoFile indexIntoFile_
ProcessHistoryID const & processHistoryID() const
EventAuxiliary const * pEventAux_
BranchListIndexes const * pBranchListIndexes_
EventNumber_t event() const
JobReport::Token reportToken_
void edm::RootOutputFile::writeParameterSetRegistry ( )

Definition at line 541 of file RootOutputFile.cc.

References b, edm::PoolOutputModule::basketSize(), edm::poolNames::idToParameterSetBlobsBranchName(), edm::pset::Registry::instance(), om_, and parameterSetsTree_.

541  {
542  std::pair<ParameterSetID, ParameterSetBlob> idToBlob;
543  std::pair<ParameterSetID, ParameterSetBlob>* pIdToBlob = &idToBlob;
544  TBranch* b = parameterSetsTree_->Branch(poolNames::idToParameterSetBlobsBranchName().c_str(),&pIdToBlob,om_->basketSize(), 0);
545 
546  for(auto const& pset : *pset::Registry::instance()) {
547  idToBlob.first = pset.first;
548  idToBlob.second.pset() = pset.second.toString();
549 
550  b->Fill();
551  }
552  }
std::string const & idToParameterSetBlobsBranchName()
Definition: BranchType.cc:249
int const & basketSize() const
PoolOutputModule const * om_
double b
Definition: hdecay.h:120
static Registry * instance()
Definition: Registry.cc:14
void edm::RootOutputFile::writeParentageRegistry ( )

Definition at line 467 of file RootOutputFile.cc.

References edm::PoolOutputModule::basketSize(), edm::hlt::Exception, edm::errors::FatalRootError, edm::ParentageRegistry::getMapped(), edm::ParentageRegistry::instance(), om_, edm::poolNames::parentageBranchName(), parentageIDs_, and parentageTree_.

467  {
468  Parentage const* desc(nullptr);
469 
470  if(!parentageTree_->Branch(poolNames::parentageBranchName().c_str(),
471  &desc, om_->basketSize(), 0))
473  << "Failed to create a branch for Parentages in the output file";
474 
475  ParentageRegistry& ptReg = *ParentageRegistry::instance();
476 
477  std::vector<ParentageID> orderedIDs(parentageIDs_.size());
478  for(auto const& parentageID : parentageIDs_) {
479  orderedIDs[parentageID.second] = parentageID.first;
480  }
481  //now put them into the TTree in the correct order
482  for(auto const& orderedID : orderedIDs) {
483  desc = ptReg.getMapped(orderedID);
484  //NOTE: some old format files have missing Parentage info
485  // so a null value of desc can't be fatal.
486  // Root will default construct an object in that case.
487  parentageTree_->Fill();
488  }
489  }
int const & basketSize() const
std::map< ParentageID, unsigned int > parentageIDs_
PoolOutputModule const * om_
std::string const & parentageBranchName()
Definition: BranchType.cc:162
static ParentageRegistry * instance()
void edm::RootOutputFile::writeProcessHistoryRegistry ( )

Definition at line 523 of file RootOutputFile.cc.

References b, edm::PoolOutputModule::basketSize(), metaDataTree_, om_, AlCaHLTBitMon_ParallelJobs::p, edm::poolNames::processHistoryBranchName(), and processHistoryRegistry_.

523  {
524  ProcessHistoryVector procHistoryVector;
525  for(auto const& ph : processHistoryRegistry_) {
526  procHistoryVector.push_back(ph.second);
527  }
528  ProcessHistoryVector* p = &procHistoryVector;
529  TBranch* b = metaDataTree_->Branch(poolNames::processHistoryBranchName().c_str(), &p, om_->basketSize(), 0);
530  assert(b);
531  b->Fill();
532  }
std::vector< ProcessHistory > ProcessHistoryVector
int const & basketSize() const
ProcessHistoryRegistry processHistoryRegistry_
PoolOutputModule const * om_
std::string const & processHistoryBranchName()
Definition: BranchType.cc:197
double b
Definition: hdecay.h:120
void edm::RootOutputFile::writeProductDependencies ( )

Definition at line 585 of file RootOutputFile.cc.

References b, edm::PoolOutputModule::basketSize(), edm::one::OutputModuleBase::branchChildren(), metaDataTree_, om_, and edm::poolNames::productDependenciesBranchName().

585  {
586  BranchChildren& pDeps = const_cast<BranchChildren&>(om_->branchChildren());
587  BranchChildren* ppDeps = &pDeps;
588  TBranch* b = metaDataTree_->Branch(poolNames::productDependenciesBranchName().c_str(), &ppDeps, om_->basketSize(), 0);
589  assert(b);
590  b->Fill();
591  }
int const & basketSize() const
PoolOutputModule const * om_
BranchChildren const & branchChildren() const
double b
Definition: hdecay.h:120
std::string const & productDependenciesBranchName()
Definition: BranchType.cc:177
void edm::RootOutputFile::writeProductDescriptionRegistry ( )

Definition at line 554 of file RootOutputFile.cc.

References b, edm::PoolOutputModule::basketSize(), branchesWithStoredHistory_, end, metaDataTree_, om_, parseEventContent::prod, and edm::poolNames::productDescriptionBranchName().

554  {
555  // Make a local copy of the ProductRegistry, removing any transient or pruned products.
556  typedef ProductRegistry::ProductList ProductList;
558  ProductRegistry pReg(reg->productList());
559  ProductList& pList = const_cast<ProductList &>(pReg.productList());
560  for(auto const& prod : pList) {
561  if(prod.second.branchID() != prod.second.originalBranchID()) {
562  if(branchesWithStoredHistory_.find(prod.second.branchID()) != branchesWithStoredHistory_.end()) {
563  branchesWithStoredHistory_.insert(prod.second.originalBranchID());
564  }
565  }
566  }
567  std::set<BranchID>::iterator end = branchesWithStoredHistory_.end();
568  for(ProductList::iterator it = pList.begin(); it != pList.end();) {
569  if(branchesWithStoredHistory_.find(it->second.branchID()) == end) {
570  // avoid invalidating iterator on deletion
571  ProductList::iterator itCopy = it;
572  ++it;
573  pList.erase(itCopy);
574 
575  } else {
576  ++it;
577  }
578  }
579 
580  ProductRegistry* ppReg = &pReg;
581  TBranch* b = metaDataTree_->Branch(poolNames::productDescriptionBranchName().c_str(), &ppReg, om_->basketSize(), 0);
582  assert(b);
583  b->Fill();
584  }
int const & basketSize() const
std::map< BranchKey, BranchDescription > ProductList
std::set< BranchID > branchesWithStoredHistory_
PoolOutputModule const * om_
#define end
Definition: vmac.h:37
double b
Definition: hdecay.h:120
std::string const & productDescriptionBranchName()
Definition: BranchType.cc:172
void edm::RootOutputFile::writeRun ( RunPrincipal const &  r,
ModuleCallingContext const *  mcc 
)

Definition at line 447 of file RootOutputFile.cc.

References edm::IndexIntoFile::addEntry(), edm::RunPrincipal::aux(), fillBranches(), indexIntoFile_, edm::InRun, edm::RootOutputTree::optimizeBaskets(), edm::Principal::processHistory(), edm::Principal::processHistoryID(), processHistoryRegistry_, edm::ProcessHistoryRegistry::reducedProcessHistoryID(), edm::ProcessHistoryRegistry::registerProcessHistory(), reportToken_, edm::RunAuxiliary::run(), edm::RunPrincipal::run(), runAux_, runEntryNumber_, runTree_, and edm::RunAuxiliary::setProcessHistoryID().

447  {
448  // Auxiliary branch
449  // NOTE: runAux_ must be filled before calling fillBranches since it gets written out in that routine.
450  runAux_ = r.aux();
451  // Use the updated process historyID
452  runAux_.setProcessHistoryID(r.processHistoryID());
453  // Store the process history.
455  // Store the reduced ID in the IndexIntoFile
456  ProcessHistoryID reducedPHID = processHistoryRegistry_.reducedProcessHistoryID(r.processHistoryID());
457  // Add run to index.
458  indexIntoFile_.addEntry(reducedPHID, runAux_.run(), 0U, 0U, runEntryNumber_);
459  ++runEntryNumber_;
460  fillBranches(InRun, r, nullptr, mcc);
461  runTree_.optimizeBaskets(10ULL*1024*1024);
462 
463  Service<JobReport> reportSvc;
464  reportSvc->reportRunNumber(reportToken_, r.run());
465  }
void fillBranches(BranchType const &branchType, Principal const &principal, StoredProductProvenanceVector *productProvenanceVecPtr, ModuleCallingContext const *)
bool registerProcessHistory(ProcessHistory const &processHistory)
ProcessHistoryRegistry processHistoryRegistry_
ProcessHistoryID const & reducedProcessHistoryID(ProcessHistoryID const &fullID) const
void addEntry(ProcessHistoryID const &processHistoryID, RunNumber_t run, LuminosityBlockNumber_t lumi, EventNumber_t event, EntryNumber_t entry)
Hash< ProcessHistoryType > ProcessHistoryID
RootOutputTree runTree_
IndexIntoFile indexIntoFile_
IndexIntoFile::EntryNumber_t runEntryNumber_
RunAuxiliary runAux_
void setProcessHistoryID(ProcessHistoryID const &phid)
Definition: RunAuxiliary.h:36
void optimizeBaskets(ULong64_t size)
RunNumber_t run() const
Definition: RunAuxiliary.h:41
JobReport::Token reportToken_

Member Data Documentation

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

Definition at line 105 of file RootOutputFile.h.

Referenced by beginInputFile().

bool edm::RootOutputFile::dataTypeReported_
private

Definition at line 128 of file RootOutputFile.h.

Referenced by writeOne().

StoredProductProvenanceVector edm::RootOutputFile::eventEntryInfoVector_
private

Definition at line 120 of file RootOutputFile.h.

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

Definition at line 108 of file RootOutputFile.h.

Referenced by writeIndexIntoFile(), and writeOne().

RootOutputTree edm::RootOutputFile::eventTree_
private
FileID edm::RootOutputFile::fid_
private

Definition at line 107 of file RootOutputFile.h.

Referenced by RootOutputFile(), and writeFileIdentifier().

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

Definition at line 100 of file RootOutputFile.h.

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

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

Definition at line 106 of file RootOutputFile.h.

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

IndexIntoFile edm::RootOutputFile::indexIntoFile_
private

Definition at line 111 of file RootOutputFile.h.

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

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

Definition at line 101 of file RootOutputFile.h.

Referenced by RootOutputFile().

LuminosityBlockAuxiliary edm::RootOutputFile::lumiAux_
private

Definition at line 115 of file RootOutputFile.h.

Referenced by writeLuminosityBlock().

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

Definition at line 109 of file RootOutputFile.h.

Referenced by writeLuminosityBlock().

RootOutputTree edm::RootOutputFile::lumiTree_
private

Definition at line 125 of file RootOutputFile.h.

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

TTree* edm::RootOutputFile::metaDataTree_
private
PoolOutputModule const* edm::RootOutputFile::om_
private
TTree* edm::RootOutputFile::parameterSetsTree_
private

Definition at line 113 of file RootOutputFile.h.

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

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

Definition at line 130 of file RootOutputFile.h.

Referenced by insertProductProvenance(), and writeParentageRegistry().

TTree* edm::RootOutputFile::parentageTree_
private

Definition at line 114 of file RootOutputFile.h.

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

BranchListIndexes const* edm::RootOutputFile::pBranchListIndexes_
private

Definition at line 122 of file RootOutputFile.h.

Referenced by RootOutputFile(), and writeOne().

EventAuxiliary const* edm::RootOutputFile::pEventAux_
private

Definition at line 117 of file RootOutputFile.h.

Referenced by RootOutputFile(), and writeOne().

StoredProductProvenanceVector* edm::RootOutputFile::pEventEntryInfoVector_
private

Definition at line 121 of file RootOutputFile.h.

Referenced by RootOutputFile(), and writeOne().

EventSelectionIDVector const* edm::RootOutputFile::pEventSelectionIDs_
private

Definition at line 123 of file RootOutputFile.h.

Referenced by RootOutputFile(), and writeOne().

LuminosityBlockAuxiliary const* edm::RootOutputFile::pLumiAux_
private

Definition at line 118 of file RootOutputFile.h.

Referenced by RootOutputFile().

ProcessHistoryRegistry edm::RootOutputFile::processHistoryRegistry_
private
RunAuxiliary const* edm::RootOutputFile::pRunAux_
private

Definition at line 119 of file RootOutputFile.h.

Referenced by RootOutputFile().

JobReport::Token edm::RootOutputFile::reportToken_
private
RunAuxiliary edm::RootOutputFile::runAux_
private

Definition at line 116 of file RootOutputFile.h.

Referenced by writeRun().

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

Definition at line 110 of file RootOutputFile.h.

Referenced by writeRun().

RootOutputTree edm::RootOutputFile::runTree_
private

Definition at line 126 of file RootOutputFile.h.

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

RootOutputTreePtrArray edm::RootOutputFile::treePointers_
private

Definition at line 127 of file RootOutputFile.h.

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

int edm::RootOutputFile::whyNotFastClonable_
private

Definition at line 104 of file RootOutputFile.h.

Referenced by beginInputFile(), and fillBranches().

TClass* edm::RootOutputFile::wrapperBaseTClass_
private

Definition at line 132 of file RootOutputFile.h.

Referenced by fillBranches().