CMS 3D CMS Logo

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

#include <RootTree.h>

Public Types

using BranchMap = roottree::BranchMap
 
using EntryNumber = roottree::EntryNumber
 

Public Member Functions

void addBranch (BranchDescription const &prod, std::string const &oldBranchName)
 
TBranch * branchEntryInfoBranch () const
 
BranchMap const & branches () const
 
std::vector< std::string > const & branchNames () const
 
BranchType branchType () const
 
TTreeCache * checkTriggerCache (TBranch *branch, EntryNumber entryNumber) const
 
TTreeCache * checkTriggerCacheImpl (TBranch *branch, EntryNumber entryNumber) const
 
void close ()
 
bool current () const
 
bool current (EntryNumber entry) const
 
void dropBranch (std::string const &oldBranchName)
 
EntryNumber const & entries () const
 
EntryNumber const & entryNumber () const
 
EntryNumber const & entryNumberForIndex (unsigned int index) const
 
template<typename T >
void fillAux (T *&pAux)
 
template<typename T >
void fillBranchEntry (TBranch *branch, EntryNumber entryNumber, T *&pbuf)
 
template<typename T >
void fillBranchEntry (TBranch *branch, T *&pbuf)
 
template<typename T >
void fillBranchEntryMeta (TBranch *branch, EntryNumber entryNumber, T *&pbuf)
 
void getEntry (TBranch *branch, EntryNumber entry) const
 
void init (std::string const &productTreeName, unsigned int maxVirtualSize, unsigned int cacheSize)
 
void insertEntryForIndex (unsigned int index)
 
bool isValid () const
 
TTree * metaTree ()
 
TTree const * metaTree () const
 
bool next ()
 
bool nextWithCache ()
 
void numberOfBranchesToAdd (BranchMap::Map::size_type iSize)
 
RootTreeoperator= (RootTree const &)=delete
 
std::string const & processName () const
 
DelayedReaderresetAndGetRootDelayedReader () const
 
void resetTraining ()
 
void rewind ()
 
void rewindToInvalid ()
 
DelayedReaderrootDelayedReader () const
 
 RootTree (RootTree const &)=delete
 
 RootTree (std::shared_ptr< InputFile > filePtr, BranchType const &branchType, std::string const &processName, unsigned int nIndexes, unsigned int maxVirtualSize, unsigned int cacheSize, unsigned int learningEntries, bool enablePrefetching, InputType inputType)
 
 RootTree (std::shared_ptr< InputFile > filePtr, BranchType const &branchType, unsigned int nIndexes, unsigned int learningEntries, bool enablePrefetching, InputType inputType)
 
 RootTree (std::shared_ptr< InputFile > filePtr, BranchType const &branchType, unsigned int nIndexes, unsigned int maxVirtualSize, unsigned int cacheSize, unsigned int learningEntries, bool enablePrefetching, InputType inputType)
 
TTreeCache * selectCache (TBranch *branch, EntryNumber entryNumber) const
 
void setEntryNumber (EntryNumber theEntryNumber)
 
void setPresence (BranchDescription &prod, std::string const &oldBranchName)
 
void setSignals (signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
 
bool skipEntries (unsigned int &offset)
 
void trainCache (char const *branchNames)
 
TTree * tree ()
 
TTree const * tree () const
 
 ~RootTree ()
 

Private Member Functions

void setCacheSize (unsigned int cacheSize)
 
void setTreeMaxVirtualSize (int treeMaxVirtualSize)
 
void startTraining ()
 
void stopTraining ()
 

Private Attributes

TBranch * auxBranch_ = nullptr
 
TBranch * branchEntryInfoBranch_ = nullptr
 
BranchMap branches_
 
std::vector< std::string > branchNames_
 
BranchType branchType_
 
unsigned int cacheSize_ = 0
 
bool enablePrefetching_
 
bool enableTriggerCache_
 
EntryNumber entries_ = 0
 
EntryNumber entryNumber_ = IndexIntoFile::invalidEntry
 
std::unique_ptr< std::vector< EntryNumber > > entryNumberForIndex_
 
std::shared_ptr< InputFilefilePtr_
 
TTree * infoTree_ = nullptr
 
unsigned int learningEntries_
 
TTree * metaTree_ = nullptr
 
bool performedSwitchOver_ = false
 
std::string processName_
 
std::shared_ptr< TTreeCache > rawTreeCache_
 
EntryNumber rawTriggerSwitchOverEntry_ = -1
 
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
 
std::unique_ptr< RootDelayedReaderrootDelayedReader_
 
EntryNumber switchOverEntry_ = -1
 
std::unordered_set< TBranch * > trainedSet_
 
bool trainNow_ = false
 
TTree * tree_ = nullptr
 
unsigned long treeAutoFlush_ = 0
 
std::shared_ptr< TTreeCache > treeCache_
 
std::unordered_set< TBranch * > triggerSet_
 
std::shared_ptr< TTreeCache > triggerTreeCache_
 

Detailed Description

Definition at line 79 of file RootTree.h.

Member Typedef Documentation

◆ BranchMap

Definition at line 81 of file RootTree.h.

◆ EntryNumber

Definition at line 82 of file RootTree.h.

Constructor & Destructor Documentation

◆ RootTree() [1/4]

edm::RootTree::RootTree ( std::shared_ptr< InputFile filePtr,
BranchType const &  branchType,
unsigned int  nIndexes,
unsigned int  learningEntries,
bool  enablePrefetching,
InputType  inputType 
)

Definition at line 30 of file RootTree.cc.

36  : filePtr_(filePtr),
38  entryNumberForIndex_(std::make_unique<std::vector<EntryNumber>>(nIndexes, IndexIntoFile::invalidEntry)),
39  learningEntries_(learningEntries),
40  enablePrefetching_(enablePrefetching),
42  rootDelayedReader_(std::make_unique<RootDelayedReader>(*this, filePtr, inputType)) {}

◆ RootTree() [2/4]

edm::RootTree::RootTree ( std::shared_ptr< InputFile filePtr,
BranchType const &  branchType,
unsigned int  nIndexes,
unsigned int  maxVirtualSize,
unsigned int  cacheSize,
unsigned int  learningEntries,
bool  enablePrefetching,
InputType  inputType 
)

Definition at line 45 of file RootTree.cc.

53  : RootTree(filePtr, branchType, nIndexes, learningEntries, enablePrefetching, inputType) {
54  init(BranchTypeToProductTreeName(branchType), maxVirtualSize, cacheSize);
55  metaTree_ = dynamic_cast<TTree*>(filePtr_->Get(BranchTypeToMetaDataTreeName(branchType).c_str()));
56  auxBranch_ = getAuxiliaryBranch(tree_, branchType_);
58  metaTree_ ? getProductProvenanceBranch(metaTree_, branchType_) : getProductProvenanceBranch(tree_, branchType_);
59  infoTree_ =
60  dynamic_cast<TTree*>(filePtr->Get(BranchTypeToInfoTreeName(branchType).c_str())); // backward compatibility
61  }

References auxBranch_, branchEntryInfoBranch_, branchType(), branchType_, edm::BranchTypeToInfoTreeName(), edm::BranchTypeToMetaDataTreeName(), edm::BranchTypeToProductTreeName(), filePtr_, infoTree_, init(), metaTree_, and tree_.

◆ RootTree() [3/4]

edm::RootTree::RootTree ( std::shared_ptr< InputFile filePtr,
BranchType const &  branchType,
std::string const &  processName,
unsigned int  nIndexes,
unsigned int  maxVirtualSize,
unsigned int  cacheSize,
unsigned int  learningEntries,
bool  enablePrefetching,
InputType  inputType 
)

Definition at line 64 of file RootTree.cc.

73  : RootTree(filePtr, branchType, nIndexes, learningEntries, enablePrefetching, inputType) {
75  init(BranchTypeToProductTreeName(branchType, processName), maxVirtualSize, cacheSize);
76  }

References branchType(), edm::BranchTypeToProductTreeName(), init(), processName(), and processName_.

◆ ~RootTree()

edm::RootTree::~RootTree ( )

Definition at line 111 of file RootTree.cc.

111 {}

◆ RootTree() [4/4]

edm::RootTree::RootTree ( RootTree const &  )
delete

Member Function Documentation

◆ addBranch()

void edm::RootTree::addBranch ( BranchDescription const &  prod,
std::string const &  oldBranchName 
)

Definition at line 156 of file RootTree.cc.

156  {
157  assert(isValid());
158  //use the translated branch name
159  TBranch* branch = tree_->GetBranch(oldBranchName.c_str());
160  roottree::BranchInfo info = roottree::BranchInfo(prod);
161  info.productBranch_ = nullptr;
162  if (prod.present()) {
163  info.productBranch_ = branch;
164  //we want the new branch name for the JobReport
165  branchNames_.push_back(prod.branchName());
166  }
167  branches_.insert(prod.branchID(), info);
168  }

References cms::cuda::assert(), MicroEventContent_cff::branch, branches_, branchNames_, info(), edm::roottree::BranchMap::insert(), isValid(), dumpMFGeometry_cfg::prod, and tree_.

◆ branchEntryInfoBranch()

TBranch* edm::RootTree::branchEntryInfoBranch ( ) const
inline

Definition at line 176 of file RootTree.h.

176 { return branchEntryInfoBranch_; }

References branchEntryInfoBranch_.

Referenced by edm::FullProvenanceReader::readProvenance().

◆ branches()

roottree::BranchMap const & edm::RootTree::branches ( ) const

Definition at line 194 of file RootTree.cc.

194 { return branches_; }

References branches_.

Referenced by edm::RootDelayedReader::branches(), checkTriggerCacheImpl(), and trainCache().

◆ branchNames()

std::vector<std::string> const& edm::RootTree::branchNames ( ) const
inline

Definition at line 137 of file RootTree.h.

137 { return branchNames_; }

References branchNames_.

Referenced by edm::RootFile::reportOpened(), and trainCache().

◆ branchType()

BranchType edm::RootTree::branchType ( ) const
inline

Definition at line 184 of file RootTree.h.

184 { return branchType_; }

References branchType_.

Referenced by edm::RootDelayedReader::getProduct_(), and RootTree().

◆ checkTriggerCache()

TTreeCache * edm::RootTree::checkTriggerCache ( TBranch *  branch,
EntryNumber  entryNumber 
) const
inline

Definition at line 273 of file RootTree.cc.

273  {
274  if (!treeCache_->IsAsyncReading() && enableTriggerCache_ && (trainedSet_.find(branch) == trainedSet_.end())) {
276  } else {
277  return nullptr;
278  }
279  }

References MicroEventContent_cff::branch, checkTriggerCacheImpl(), enableTriggerCache_, entryNumber(), trainedSet_, and treeCache_.

Referenced by selectCache().

◆ checkTriggerCacheImpl()

TTreeCache * edm::RootTree::checkTriggerCacheImpl ( TBranch *  branch,
EntryNumber  entryNumber 
) const

Definition at line 283 of file RootTree.cc.

283  {
284  // This branch is not going to be in the cache.
285  // Assume this is a "trigger pattern".
286  // Always make sure the branch is added to the trigger set.
287  if (triggerSet_.find(branch) == triggerSet_.end()) {
288  triggerSet_.insert(branch);
289  if (triggerTreeCache_.get()) {
290  triggerTreeCache_->AddBranch(branch, kTRUE);
291  }
292  }
293 
294  if (rawTriggerSwitchOverEntry_ < 0) {
295  // The trigger has never fired before. Take everything not in the
296  // trainedSet and load it from disk
297 
298  // Calculate the end of the next cluster; triggers in the next cluster
299  // will use the triggerCache, not the rawTriggerCache.
300  //
301  // Guarantee that rawTriggerSwitchOverEntry_ is positive (non-zero) after completion
302  // of this if-block.
303  TTree::TClusterIterator clusterIter = tree_->GetClusterIterator(entryNumber);
305  rawTriggerSwitchOverEntry_ = clusterIter();
306  }
307 
308  // ROOT will automatically expand the cache to fit one cluster; hence, we use
309  // 5 MB as the cache size below
310  tree_->SetCacheSize(static_cast<Long64_t>(5 * 1024 * 1024));
311  rawTriggerTreeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
313  rawTriggerTreeCache_->SetEnablePrefetching(false);
314  TObjArray* branches = tree_->GetListOfBranches();
315  int branchCount = branches->GetEntriesFast();
316 
317  // Train the rawTriggerCache to have everything not in the regular cache.
318  rawTriggerTreeCache_->SetLearnEntries(0);
320  for (int i = 0; i < branchCount; i++) {
321  TBranch* tmp_branch = (TBranch*)branches->UncheckedAt(i);
322  if (trainedSet_.find(tmp_branch) != trainedSet_.end()) {
323  continue;
324  }
325  rawTriggerTreeCache_->AddBranch(tmp_branch, kTRUE);
326  }
327  performedSwitchOver_ = false;
328  rawTriggerTreeCache_->StopLearningPhase();
329  filePtr_->SetCacheRead(nullptr);
330 
331  return rawTriggerTreeCache_.get();
333  // The raw trigger has fired and it contents are valid.
334  return rawTriggerTreeCache_.get();
335  } else if (rawTriggerSwitchOverEntry_ > 0) {
336  // The raw trigger has fired, but we are out of the cache. Use the
337  // triggerCache instead.
338  if (!performedSwitchOver_) {
339  rawTriggerTreeCache_.reset();
340  performedSwitchOver_ = true;
341 
342  // Train the triggerCache
343  tree_->SetCacheSize(static_cast<Long64_t>(5 * 1024 * 1024));
344  triggerTreeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
345  triggerTreeCache_->SetEnablePrefetching(false);
346  triggerTreeCache_->SetLearnEntries(0);
347  triggerTreeCache_->SetEntryRange(entryNumber, tree_->GetEntries());
348  for (std::unordered_set<TBranch*>::const_iterator it = triggerSet_.begin(), itEnd = triggerSet_.end();
349  it != itEnd;
350  it++) {
351  triggerTreeCache_->AddBranch(*it, kTRUE);
352  }
353  triggerTreeCache_->StopLearningPhase();
354  filePtr_->SetCacheRead(nullptr);
355  }
356  return triggerTreeCache_.get();
357  }
358 
359  // By construction, this case should be impossible.
360  assert(false);
361  return nullptr;
362  }

References cms::cuda::assert(), MicroEventContent_cff::branch, branches(), entryNumber(), entryNumber_, filePtr_, mps_fire::i, performedSwitchOver_, rawTriggerSwitchOverEntry_, rawTriggerTreeCache_, trainedSet_, tree_, triggerSet_, and triggerTreeCache_.

Referenced by checkTriggerCache().

◆ close()

void edm::RootTree::close ( void  )

Definition at line 457 of file RootTree.cc.

457  {
458  // The TFile is about to be closed, and destructed.
459  // Just to play it safe, zero all pointers to quantities that are owned by the TFile.
461  tree_ = metaTree_ = infoTree_ = nullptr;
462  // We own the treeCache_.
463  // We make sure the treeCache_ is detached from the file,
464  // so that ROOT does not also delete it.
465  filePtr_->SetCacheRead(nullptr);
466  // We *must* delete the TTreeCache here because the TFilePrefetch object
467  // references the TFile. If TFile is closed, before the TTreeCache is
468  // deleted, the TFilePrefetch may continue to do TFile operations, causing
469  // deadlocks or exceptions.
470  treeCache_.reset();
471  rawTreeCache_.reset();
472  triggerTreeCache_.reset();
473  rawTriggerTreeCache_.reset();
474  // We give up our shared ownership of the TFile itself.
475  filePtr_.reset();
476  }

References auxBranch_, branchEntryInfoBranch_, filePtr_, infoTree_, metaTree_, rawTreeCache_, rawTriggerTreeCache_, tree_, treeCache_, and triggerTreeCache_.

Referenced by esMonitoring.AsyncLineReaderMixin::handle_close(), and esMonitoring.FDJsonServer::handle_close().

◆ current() [1/2]

bool edm::RootTree::current ( ) const
inline

Definition at line 126 of file RootTree.h.

126 { return entryNumber_ < entries_ && entryNumber_ >= 0; }

Referenced by edm::RootFile::readCurrentEvent(), edm::RootFile::readLuminosityBlockAuxiliary_(), and edm::RootFile::readRunAuxiliary_().

◆ current() [2/2]

bool edm::RootTree::current ( EntryNumber  entry) const
inline

Definition at line 127 of file RootTree.h.

127 { return entry < entries_ && entry >= 0; }

◆ dropBranch()

void edm::RootTree::dropBranch ( std::string const &  oldBranchName)

Definition at line 170 of file RootTree.cc.

170  {
171  //use the translated branch name
172  TBranch* branch = tree_->GetBranch(oldBranchName.c_str());
173  if (branch != nullptr) {
174  TObjArray* leaves = tree_->GetListOfLeaves();
175  int entries = leaves->GetEntries();
176  for (int i = 0; i < entries; ++i) {
177  TLeaf* leaf = (TLeaf*)(*leaves)[i];
178  if (leaf == nullptr)
179  continue;
180  TBranch* br = leaf->GetBranch();
181  if (br == nullptr)
182  continue;
183  if (br->GetMother() == branch) {
184  leaves->Remove(leaf);
185  }
186  }
187  leaves->Compress();
188  tree_->GetListOfBranches()->Remove(branch);
189  tree_->GetListOfBranches()->Compress();
190  delete branch;
191  }
192  }

References beamvalidation::br, MicroEventContent_cff::branch, entries(), mps_fire::i, and tree_.

◆ entries()

EntryNumber const& edm::RootTree::entries ( ) const
inline

◆ entryNumber()

EntryNumber const& edm::RootTree::entryNumber ( ) const
inline

◆ entryNumberForIndex()

RootTree::EntryNumber const & edm::RootTree::entryNumberForIndex ( unsigned int  index) const

Definition at line 113 of file RootTree.cc.

113  {
114  assert(index < entryNumberForIndex_->size());
115  return (*entryNumberForIndex_)[index];
116  }

References cms::cuda::assert(), entryNumberForIndex_, and findQualityFiles::size.

Referenced by edm::RootDelayedReader::getProduct_(), and edm::FullProvenanceReader::readProvenance().

◆ fillAux()

template<typename T >
void edm::RootTree::fillAux ( T *&  pAux)
inline

◆ fillBranchEntry() [1/2]

template<typename T >
void edm::RootTree::fillBranchEntry ( TBranch *  branch,
EntryNumber  entryNumber,
T *&  pbuf 
)
inline

Definition at line 164 of file RootTree.h.

164  {
165  branch->SetAddress(&pbuf);
167  }

References MicroEventContent_cff::branch, entryNumber(), and getEntry().

◆ fillBranchEntry() [2/2]

template<typename T >
void edm::RootTree::fillBranchEntry ( TBranch *  branch,
T *&  pbuf 
)
inline

Definition at line 147 of file RootTree.h.

147  {
148  branch->SetAddress(&pbuf);
150  }

References MicroEventContent_cff::branch, entryNumber_, and getEntry().

Referenced by edm::RootFile::fillEventHistory(), and edm::RootFile::fillEventToProcessBlockIndexes().

◆ fillBranchEntryMeta()

template<typename T >
void edm::RootTree::fillBranchEntryMeta ( TBranch *  branch,
EntryNumber  entryNumber,
T *&  pbuf 
)
inline

Definition at line 153 of file RootTree.h.

153  {
154  if (metaTree_ != nullptr) {
155  // Metadata was in separate tree. Not cached.
156  branch->SetAddress(&pbuf);
158  } else {
159  fillBranchEntry<T>(branch, entryNumber, pbuf);
160  }
161  }

References MicroEventContent_cff::branch, entryNumber(), edm::roottree::getEntry(), and metaTree_.

Referenced by edm::FullProvenanceReader::readProvenance().

◆ getEntry()

void edm::RootTree::getEntry ( TBranch *  branch,
EntryNumber  entry 
) const

Definition at line 382 of file RootTree.cc.

382  {
383  try {
384  TTreeCache* cache = selectCache(branch, entryNumber);
385  filePtr_->SetCacheRead(cache);
386  branch->GetEntry(entryNumber);
387  filePtr_->SetCacheRead(nullptr);
388  } catch (cms::Exception const& e) {
389  // We make sure the treeCache_ is detached from the file,
390  // so that ROOT does not also delete it.
391  filePtr_->SetCacheRead(nullptr);
393  t.addContext(std::string("Reading branch ") + branch->GetName());
394  throw t;
395  }
396  }

References MicroEventContent_cff::branch, utilities::cache(), MillePedeFileConverter_cfg::e, entryNumber(), filePtr_, edm::errors::FileReadError, selectCache(), AlCaHLTBitMon_QueryRunRegistry::string, and submitPVValidationJobs::t.

Referenced by fillAux(), fillBranchEntry(), and edm::RootDelayedReader::getProduct_().

◆ init()

void edm::RootTree::init ( std::string const &  productTreeName,
unsigned int  maxVirtualSize,
unsigned int  cacheSize 
)

Definition at line 78 of file RootTree.cc.

78  {
79  if (filePtr_.get() != nullptr) {
80  tree_ = dynamic_cast<TTree*>(filePtr_->Get(productTreeName.c_str()));
81  }
82  if (not tree_) {
83  throw cms::Exception("WrongFileFormat")
84  << "The ROOT file does not contain a TTree named " << productTreeName
85  << "\n This is either not an edm ROOT file or is one that has been corrupted.";
86  }
87  entries_ = tree_->GetEntries();
88 
89  // On merged files in older releases of ROOT, the autoFlush setting is always negative; we must guess.
90  // TODO: On newer merged files, we should be able to get this from the cluster iterator.
91  long treeAutoFlush = tree_->GetAutoFlush();
92  if (treeAutoFlush < 0) {
93  // The "+1" is here to avoid divide-by-zero in degenerate cases.
94  Long64_t averageEventSizeBytes = tree_->GetZipBytes() / (tree_->GetEntries() + 1) + 1;
95  treeAutoFlush_ = cacheSize / averageEventSizeBytes + 1;
96  } else {
97  treeAutoFlush_ = treeAutoFlush;
98  }
101  }
102  setTreeMaxVirtualSize(maxVirtualSize);
103  setCacheSize(cacheSize);
104  if (branchType_ == InEvent) {
105  Int_t branchCount = tree_->GetListOfBranches()->GetEntriesFast();
106  trainedSet_.reserve(branchCount);
107  triggerSet_.reserve(branchCount);
108  }
109  }

References branchType_, entries_, Exception, filePtr_, edm::InEvent, learningEntries_, setCacheSize(), setTreeMaxVirtualSize(), trainedSet_, tree_, treeAutoFlush_, and triggerSet_.

Referenced by RootTree().

◆ insertEntryForIndex()

void edm::RootTree::insertEntryForIndex ( unsigned int  index)

Definition at line 118 of file RootTree.cc.

118  {
119  assert(index < entryNumberForIndex_->size());
120  (*entryNumberForIndex_)[index] = entryNumber();
121  }

References cms::cuda::assert(), entryNumber(), and findQualityFiles::size.

Referenced by edm::RootFile::readCurrentEvent(), edm::RootFile::readLuminosityBlock_(), edm::RootFile::readProcessBlock_(), and edm::RootFile::readRun_().

◆ isValid()

bool edm::RootTree::isValid ( void  ) const

Definition at line 123 of file RootTree.cc.

123  {
124  // ProcessBlock
125  if (branchType_ == InProcess) {
126  return tree_ != nullptr;
127  }
128  // Run/Lumi/Event
129  if (metaTree_ == nullptr || metaTree_->GetNbranches() == 0) {
130  return tree_ != nullptr && auxBranch_ != nullptr;
131  }
132  // Backward compatibility for Run/Lumi/Event
133  if (tree_ != nullptr && auxBranch_ != nullptr && metaTree_ != nullptr) { // backward compatibility
134  if (branchEntryInfoBranch_ != nullptr || infoTree_ != nullptr)
135  return true; // backward compatibility
136  return (entries_ == metaTree_->GetEntries() &&
137  tree_->GetNbranches() <= metaTree_->GetNbranches() + 1); // backward compatibility
138  } // backward compatibility
139  return false;
140  }

References auxBranch_, branchEntryInfoBranch_, branchType_, entries_, infoTree_, edm::InProcess, metaTree_, and tree_.

Referenced by ntupleDataFormat._Object::_checkIsValid(), addBranch(), edm::RootFile::fillIndexIntoFile(), edm::RootFile::readLuminosityBlock_(), edm::RootFile::readLuminosityBlockAuxiliary_(), edm::RootFile::readRun_(), edm::RootFile::readRunAuxiliary_(), core.AutoHandle.AutoHandle::ReallyLoad(), setPresence(), and edm::RootFile::validateFile().

◆ metaTree() [1/2]

TTree* edm::RootTree::metaTree ( )
inline

Definition at line 172 of file RootTree.h.

172 { return metaTree_; }

References metaTree_.

◆ metaTree() [2/2]

TTree const* edm::RootTree::metaTree ( ) const
inline

Definition at line 171 of file RootTree.h.

171 { return metaTree_; }

References metaTree_.

Referenced by edm::RootFile::createFileBlock(), and edm::RootFile::updateFileBlock().

◆ next()

bool edm::RootTree::next ( void  )
inline

Definition at line 124 of file RootTree.h.

124 { return ++entryNumber_ < entries_; }

References entries_, and entryNumber_.

Referenced by edm::RootFile::fillIndexIntoFile(), and edm::RootFile::initializeDuplicateChecker().

◆ nextWithCache()

bool edm::RootTree::nextWithCache ( )

Definition at line 211 of file RootTree.cc.

211  {
212  bool returnValue = ++entryNumber_ < entries_;
213  if (returnValue) {
215  }
216  return returnValue;
217  }

References entries_, entryNumber_, and setEntryNumber().

Referenced by edm::RootFile::nextEventEntry().

◆ numberOfBranchesToAdd()

void edm::RootTree::numberOfBranchesToAdd ( BranchMap::Map::size_type  iSize)
inline

Definition at line 118 of file RootTree.h.

118 { branches_.reserve(iSize); }

References branches_, and edm::roottree::BranchMap::reserve().

◆ operator=()

RootTree& edm::RootTree::operator= ( RootTree const &  )
delete

◆ processName()

std::string const& edm::RootTree::processName ( ) const
inline

Definition at line 185 of file RootTree.h.

185 { return processName_; }

References processName_.

Referenced by edm::RootFile::readProcessBlock_(), and RootTree().

◆ resetAndGetRootDelayedReader()

DelayedReader * edm::RootTree::resetAndGetRootDelayedReader ( ) const

◆ resetTraining()

void edm::RootTree::resetTraining ( )
inline

Definition at line 182 of file RootTree.h.

182 { trainNow_ = true; }

References trainNow_.

Referenced by edm::RootFile::RootFile().

◆ rewind()

void edm::RootTree::rewind ( )
inline

Definition at line 128 of file RootTree.h.

128 { entryNumber_ = 0; }

References entryNumber_.

Referenced by edm::RootFile::rewind().

◆ rewindToInvalid()

void edm::RootTree::rewindToInvalid ( )
inline

Definition at line 129 of file RootTree.h.

References entryNumber_, and edm::IndexIntoFile::invalidEntry.

◆ rootDelayedReader()

DelayedReader * edm::RootTree::rootDelayedReader ( ) const

Definition at line 147 of file RootTree.cc.

147 { return rootDelayedReader_.get(); }

References rootDelayedReader_.

Referenced by edm::FullProvenanceReader::readProvenanceAsync().

◆ selectCache()

TTreeCache * edm::RootTree::selectCache ( TBranch *  branch,
EntryNumber  entryNumber 
) const
inline

Definition at line 364 of file RootTree.cc.

364  {
365  TTreeCache* triggerCache = nullptr;
366  if (!treeCache_) {
367  return nullptr;
368  } else if (treeCache_->IsLearning() && rawTreeCache_) {
369  treeCache_->AddBranch(branch, kTRUE);
370  trainedSet_.insert(branch);
371  return rawTreeCache_.get();
372  } else if ((triggerCache = checkTriggerCache(branch, entryNumber))) {
373  // A NULL return value from checkTriggerCache indicates the trigger cache case
374  // does not apply, and we should continue below.
375  return triggerCache;
376  } else {
377  // The "normal" TTreeCache case.
378  return treeCache_.get();
379  }
380  }

References MicroEventContent_cff::branch, checkTriggerCache(), entryNumber(), rawTreeCache_, trainedSet_, and treeCache_.

Referenced by getEntry().

◆ setCacheSize()

void edm::RootTree::setCacheSize ( unsigned int  cacheSize)
private

Definition at line 196 of file RootTree.cc.

196  {
197  cacheSize_ = cacheSize;
198  tree_->SetCacheSize(static_cast<Long64_t>(cacheSize));
199  treeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
200  if (treeCache_)
201  treeCache_->SetEnablePrefetching(enablePrefetching_);
202  filePtr_->SetCacheRead(nullptr);
203  rawTreeCache_.reset();
204  }

References cacheSize_, enablePrefetching_, filePtr_, rawTreeCache_, tree_, and treeCache_.

Referenced by init().

◆ setEntryNumber()

void edm::RootTree::setEntryNumber ( EntryNumber  theEntryNumber)

Definition at line 219 of file RootTree.cc.

219  {
220  filePtr_->SetCacheRead(treeCache_.get());
221 
222  // Detect a backward skip. If the skip is sufficiently large, we roll the dice and reset the treeCache.
223  // This will cause some amount of over-reading: we pre-fetch all the events in some prior cluster.
224  // However, because reading one event in the cluster is supposed to be equivalent to reading all events in the cluster,
225  // we're not incurring additional over-reading - we're just doing it more efficiently.
226  // NOTE: Constructor guarantees treeAutoFlush_ is positive, even if TTree->GetAutoFlush() is negative.
227  if (theEntryNumber < entryNumber_ and theEntryNumber >= 0) {
228  //We started reading the file near the end, now we need to correct for the learning length
229  if (switchOverEntry_ > tree_->GetEntries()) {
230  switchOverEntry_ = switchOverEntry_ - tree_->GetEntries();
231  if (rawTreeCache_) {
232  rawTreeCache_->SetEntryRange(theEntryNumber, switchOverEntry_);
233  rawTreeCache_->FillBuffer();
234  }
235  }
237  //We are using the triggerTreeCache_ not the rawTriggerTreeCache_.
238  //The triggerTreeCache was originally told to start from an entry further in the file.
239  triggerTreeCache_->SetEntryRange(theEntryNumber, tree_->GetEntries());
240  } else if (rawTriggerTreeCache_) {
241  //move the switch point to the end of the cluster holding theEntryNumber
243  TTree::TClusterIterator clusterIter = tree_->GetClusterIterator(theEntryNumber);
244  while ((rawTriggerSwitchOverEntry_ < theEntryNumber) || (rawTriggerSwitchOverEntry_ <= 0)) {
245  rawTriggerSwitchOverEntry_ = clusterIter();
246  }
247  rawTriggerTreeCache_->SetEntryRange(theEntryNumber, rawTriggerSwitchOverEntry_);
248  }
249  }
250  if ((theEntryNumber < static_cast<EntryNumber>(entryNumber_ - treeAutoFlush_)) && (treeCache_) &&
251  (!treeCache_->IsLearning()) && (entries_ > 0) && (switchOverEntry_ >= 0)) {
252  treeCache_->SetEntryRange(theEntryNumber, entries_);
253  treeCache_->FillBuffer();
254  }
255 
256  entryNumber_ = theEntryNumber;
257  tree_->LoadTree(entryNumber_);
258  filePtr_->SetCacheRead(nullptr);
259  if (treeCache_ && trainNow_ && entryNumber_ >= 0) {
260  startTraining();
261  trainNow_ = false;
262  trainedSet_.clear();
263  triggerSet_.clear();
265  }
266  if (treeCache_ && treeCache_->IsLearning() && switchOverEntry_ >= 0 && entryNumber_ >= switchOverEntry_) {
267  stopTraining();
268  }
269  }

References entries_, entryNumber_, filePtr_, performedSwitchOver_, rawTreeCache_, rawTriggerSwitchOverEntry_, rawTriggerTreeCache_, startTraining(), stopTraining(), switchOverEntry_, trainedSet_, trainNow_, tree_, treeAutoFlush_, treeCache_, triggerSet_, and triggerTreeCache_.

Referenced by edm::RootFile::fillEventAuxiliary(), edm::RootFile::fillIndexIntoFile(), edm::RootFileEventFinder::getEventNumberOfEntry(), edm::RootFile::initializeDuplicateChecker(), nextWithCache(), edm::RootFile::readLuminosityBlock_(), edm::RootFile::readLuminosityBlockAuxiliary_(), edm::RootFile::readRunAuxiliary_(), edm::RootFile::setAtEventEntry(), edm::RootFile::setEntryAtEvent(), edm::RootFile::setEntryAtLumi(), and edm::RootFile::setEntryAtRun().

◆ setPresence()

void edm::RootTree::setPresence ( BranchDescription prod,
std::string const &  oldBranchName 
)

Definition at line 149 of file RootTree.cc.

149  {
150  assert(isValid());
151  if (tree_->GetBranch(oldBranchName.c_str()) == nullptr) {
152  prod.setDropped(true);
153  }
154  }

References cms::cuda::assert(), isValid(), dumpMFGeometry_cfg::prod, and tree_.

◆ setSignals()

void edm::RootTree::setSignals ( signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *  preEventReadSource,
signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *  postEventReadSource 
)

Definition at line 508 of file RootTree.cc.

510  {
511  rootDelayedReader_->setSignals(preEventReadSource, postEventReadSource);
512  }

References rootDelayedReader_.

Referenced by edm::RootFile::setSignals().

◆ setTreeMaxVirtualSize()

void edm::RootTree::setTreeMaxVirtualSize ( int  treeMaxVirtualSize)
private

Definition at line 206 of file RootTree.cc.

206  {
207  if (treeMaxVirtualSize >= 0)
208  tree_->SetMaxVirtualSize(static_cast<Long64_t>(treeMaxVirtualSize));
209  }

References tree_.

Referenced by init().

◆ skipEntries()

bool edm::RootTree::skipEntries ( unsigned int &  offset)

Definition at line 398 of file RootTree.cc.

398  {
399  entryNumber_ += offset;
400  bool retval = (entryNumber_ < entries_);
401  if (retval) {
402  offset = 0;
403  } else {
404  // Not enough entries in the file to skip.
405  // The +1 is needed because entryNumber_ is -1 at the initialization of the tree, not 0.
406  long long overshoot = entryNumber_ + 1 - entries_;
408  offset = overshoot;
409  }
410  return retval;
411  }

References entries_, entryNumber_, and hltrates_dqm_sourceclient-live_cfg::offset.

Referenced by edm::RootFile::skipEntries().

◆ startTraining()

void edm::RootTree::startTraining ( )
private

Definition at line 413 of file RootTree.cc.

413  {
414  if (cacheSize_ == 0) {
415  return;
416  }
420  treeCache_->SetLearnEntries(learningEntries_);
421  tree_->SetCacheSize(static_cast<Long64_t>(cacheSize_));
422  rawTreeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
423  rawTreeCache_->SetEnablePrefetching(false);
424  filePtr_->SetCacheRead(nullptr);
425  rawTreeCache_->SetLearnEntries(0);
427  auto rawStart = entryNumber_;
428  auto rawEnd = switchOverEntry_;
429  auto treeStart = switchOverEntry_;
430  if (switchOverEntry_ >= tree_->GetEntries()) {
431  treeStart = switchOverEntry_ - tree_->GetEntries();
432  rawEnd = tree_->GetEntries();
433  }
434  rawTreeCache_->StartLearningPhase();
435  rawTreeCache_->SetEntryRange(rawStart, rawEnd);
436  rawTreeCache_->AddBranch("*", kTRUE);
437  rawTreeCache_->StopLearningPhase();
438  treeCache_->StartLearningPhase();
439  treeCache_->SetEntryRange(treeStart, tree_->GetEntries());
440  // Make sure that 'branchListIndexes' branch exist in input file
441  if (filePtr_->Get(poolNames::branchListIndexesBranchName().c_str()) != nullptr) {
442  treeCache_->AddBranch(poolNames::branchListIndexesBranchName().c_str(), kTRUE);
443  }
444  treeCache_->AddBranch(BranchTypeToAuxiliaryBranchName(branchType_).c_str(), kTRUE);
445  trainedSet_.clear();
446  triggerSet_.clear();
447  assert(treeCache_->GetTree() == tree_);
448  }

References cms::cuda::assert(), edm::poolNames::branchListIndexesBranchName(), branchType_, edm::BranchTypeToAuxiliaryBranchName(), cacheSize_, entryNumber_, filePtr_, edm::InEvent, learningEntries_, rawTreeCache_, switchOverEntry_, trainedSet_, tree_, treeCache_, and triggerSet_.

Referenced by setEntryNumber().

◆ stopTraining()

void edm::RootTree::stopTraining ( )
private

Definition at line 450 of file RootTree.cc.

450  {
451  filePtr_->SetCacheRead(treeCache_.get());
452  treeCache_->StopLearningPhase();
453  filePtr_->SetCacheRead(nullptr);
454  rawTreeCache_.reset();
455  }

References filePtr_, rawTreeCache_, and treeCache_.

Referenced by setEntryNumber().

◆ trainCache()

void edm::RootTree::trainCache ( char const *  branchNames)

Definition at line 478 of file RootTree.cc.

478  {
479  if (cacheSize_ == 0) {
480  return;
481  }
482  tree_->LoadTree(0);
484  filePtr_->SetCacheRead(treeCache_.get());
485  treeCache_->StartLearningPhase();
486  treeCache_->SetEntryRange(0, tree_->GetEntries());
487  treeCache_->AddBranch(branchNames, kTRUE);
488  treeCache_->StopLearningPhase();
489  assert(treeCache_->GetTree() == tree_);
490  // We own the treeCache_.
491  // We make sure the treeCache_ is detached from the file,
492  // so that ROOT does not also delete it.
493  filePtr_->SetCacheRead(nullptr);
494 
495  if (branchType_ == InEvent) {
496  // Must also manually add things to the trained set.
497  TObjArray* branches = tree_->GetListOfBranches();
498  int branchCount = branches->GetEntriesFast();
499  for (int i = 0; i < branchCount; i++) {
500  TBranch* branch = (TBranch*)branches->UncheckedAt(i);
501  if ((branchNames[0] == '*') || (strcmp(branchNames, branch->GetName()) == 0)) {
502  trainedSet_.insert(branch);
503  }
504  }
505  }
506  }

References cms::cuda::assert(), MicroEventContent_cff::branch, branches(), branchNames(), branchType_, cacheSize_, filePtr_, mps_fire::i, edm::InEvent, trainedSet_, tree_, and treeCache_.

Referenced by edm::RootFile::RootFile().

◆ tree() [1/2]

TTree* edm::RootTree::tree ( )
inline

◆ tree() [2/2]

TTree const* edm::RootTree::tree ( ) const
inline

Member Data Documentation

◆ auxBranch_

TBranch* edm::RootTree::auxBranch_ = nullptr
private

Definition at line 205 of file RootTree.h.

Referenced by close(), fillAux(), isValid(), and RootTree().

◆ branchEntryInfoBranch_

TBranch* edm::RootTree::branchEntryInfoBranch_ = nullptr
private

Definition at line 234 of file RootTree.h.

Referenced by branchEntryInfoBranch(), close(), isValid(), and RootTree().

◆ branches_

BranchMap edm::RootTree::branches_
private

Definition at line 220 of file RootTree.h.

Referenced by addBranch(), branches(), and numberOfBranchesToAdd().

◆ branchNames_

std::vector<std::string> edm::RootTree::branchNames_
private

Definition at line 219 of file RootTree.h.

Referenced by addBranch(), and branchNames().

◆ branchType_

BranchType edm::RootTree::branchType_
private

Definition at line 203 of file RootTree.h.

Referenced by branchType(), init(), isValid(), RootTree(), startTraining(), and trainCache().

◆ cacheSize_

unsigned int edm::RootTree::cacheSize_ = 0
private

Definition at line 226 of file RootTree.h.

Referenced by setCacheSize(), startTraining(), and trainCache().

◆ enablePrefetching_

bool edm::RootTree::enablePrefetching_
private

Definition at line 230 of file RootTree.h.

Referenced by setCacheSize().

◆ enableTriggerCache_

bool edm::RootTree::enableTriggerCache_
private

Definition at line 231 of file RootTree.h.

Referenced by checkTriggerCache().

◆ entries_

EntryNumber edm::RootTree::entries_ = 0
private

Definition at line 216 of file RootTree.h.

Referenced by entries(), init(), isValid(), next(), nextWithCache(), setEntryNumber(), and skipEntries().

◆ entryNumber_

EntryNumber edm::RootTree::entryNumber_ = IndexIntoFile::invalidEntry
private

◆ entryNumberForIndex_

std::unique_ptr<std::vector<EntryNumber> > edm::RootTree::entryNumberForIndex_
private

Definition at line 218 of file RootTree.h.

Referenced by entryNumberForIndex().

◆ filePtr_

std::shared_ptr<InputFile> edm::RootTree::filePtr_
private

◆ infoTree_

TTree* edm::RootTree::infoTree_ = nullptr
private

Definition at line 236 of file RootTree.h.

Referenced by close(), isValid(), and RootTree().

◆ learningEntries_

unsigned int edm::RootTree::learningEntries_
private

Definition at line 225 of file RootTree.h.

Referenced by init(), and startTraining().

◆ metaTree_

TTree* edm::RootTree::metaTree_ = nullptr
private

Definition at line 202 of file RootTree.h.

Referenced by close(), fillBranchEntryMeta(), isValid(), metaTree(), and RootTree().

◆ performedSwitchOver_

bool edm::RootTree::performedSwitchOver_ = false
mutableprivate

Definition at line 224 of file RootTree.h.

Referenced by checkTriggerCacheImpl(), and setEntryNumber().

◆ processName_

std::string edm::RootTree::processName_
private

Definition at line 204 of file RootTree.h.

Referenced by processName(), and RootTree().

◆ rawTreeCache_

std::shared_ptr<TTreeCache> edm::RootTree::rawTreeCache_
private

◆ rawTriggerSwitchOverEntry_

EntryNumber edm::RootTree::rawTriggerSwitchOverEntry_ = -1
mutableprivate

Definition at line 223 of file RootTree.h.

Referenced by checkTriggerCacheImpl(), and setEntryNumber().

◆ rawTriggerTreeCache_

std::shared_ptr<TTreeCache> edm::RootTree::rawTriggerTreeCache_
mutableprivate

Definition at line 213 of file RootTree.h.

Referenced by checkTriggerCacheImpl(), close(), and setEntryNumber().

◆ rootDelayedReader_

std::unique_ptr<RootDelayedReader> edm::RootTree::rootDelayedReader_
private

Definition at line 232 of file RootTree.h.

Referenced by resetAndGetRootDelayedReader(), rootDelayedReader(), and setSignals().

◆ switchOverEntry_

EntryNumber edm::RootTree::switchOverEntry_ = -1
private

Definition at line 222 of file RootTree.h.

Referenced by setEntryNumber(), and startTraining().

◆ trainedSet_

std::unordered_set<TBranch*> edm::RootTree::trainedSet_
mutableprivate

◆ trainNow_

bool edm::RootTree::trainNow_ = false
private

Definition at line 221 of file RootTree.h.

Referenced by resetTraining(), and setEntryNumber().

◆ tree_

TTree* edm::RootTree::tree_ = nullptr
private

◆ treeAutoFlush_

unsigned long edm::RootTree::treeAutoFlush_ = 0
private

Definition at line 227 of file RootTree.h.

Referenced by init(), and setEntryNumber().

◆ treeCache_

std::shared_ptr<TTreeCache> edm::RootTree::treeCache_
private

◆ triggerSet_

std::unordered_set<TBranch*> edm::RootTree::triggerSet_
mutableprivate

Definition at line 215 of file RootTree.h.

Referenced by checkTriggerCacheImpl(), init(), setEntryNumber(), and startTraining().

◆ triggerTreeCache_

std::shared_ptr<TTreeCache> edm::RootTree::triggerTreeCache_
mutableprivate

Definition at line 212 of file RootTree.h.

Referenced by checkTriggerCacheImpl(), close(), and setEntryNumber().

edm::roottree::BranchMap::reserve
void reserve(Map::size_type iSize)
Definition: RootTree.h:57
edm::RootTree::triggerTreeCache_
std::shared_ptr< TTreeCache > triggerTreeCache_
Definition: RootTree.h:212
edm::RootTree::treeAutoFlush_
unsigned long treeAutoFlush_
Definition: RootTree.h:227
mps_fire.i
i
Definition: mps_fire.py:428
edm::RootTree::setEntryNumber
void setEntryNumber(EntryNumber theEntryNumber)
Definition: RootTree.cc:219
edm::RootTree::cacheSize_
unsigned int cacheSize_
Definition: RootTree.h:226
edm::RootTree::startTraining
void startTraining()
Definition: RootTree.cc:413
edm::RootTree::tree_
TTree * tree_
Definition: RootTree.h:201
edm::RootTree::branches
BranchMap const & branches() const
Definition: RootTree.cc:194
MicroEventContent_cff.branch
branch
Definition: MicroEventContent_cff.py:174
edm::RootTree::auxBranch_
TBranch * auxBranch_
Definition: RootTree.h:205
edm::RootTree::RootTree
RootTree(std::shared_ptr< InputFile > filePtr, BranchType const &branchType, unsigned int nIndexes, unsigned int learningEntries, bool enablePrefetching, InputType inputType)
Definition: RootTree.cc:30
edm::RootTree::processName
std::string const & processName() const
Definition: RootTree.h:185
edm::RootTree::trainedSet_
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:214
edm::RootTree::rawTriggerTreeCache_
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
Definition: RootTree.h:213
edm::IndexIntoFile::invalidEntry
static constexpr EntryNumber_t invalidEntry
Definition: IndexIntoFile.h:236
edm::RootTree::rawTreeCache_
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:210
edm::RootTree::checkTriggerCacheImpl
TTreeCache * checkTriggerCacheImpl(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:283
cms::cuda::assert
assert(be >=bs)
edm::RootTree::entries_
EntryNumber entries_
Definition: RootTree.h:216
info
static const TGPicture * info(bool iBackgroundIsBlack)
Definition: FWCollectionSummaryWidget.cc:153
edm::BranchTypeToProductTreeName
std::string const & BranchTypeToProductTreeName(BranchType const &branchType)
Definition: BranchType.cc:95
edm::RootTree::setCacheSize
void setCacheSize(unsigned int cacheSize)
Definition: RootTree.cc:196
edm::poolNames::branchListIndexesBranchName
std::string const & branchListIndexesBranchName()
Definition: BranchType.cc:212
edm::RootTree::branches_
BranchMap branches_
Definition: RootTree.h:220
edm::BranchTypeToAuxiliaryBranchName
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:116
edm::InProcess
Definition: BranchType.h:11
edm::RootTree::branchEntryInfoBranch_
TBranch * branchEntryInfoBranch_
Definition: RootTree.h:234
edm::RootTree::entryNumberForIndex_
std::unique_ptr< std::vector< EntryNumber > > entryNumberForIndex_
Definition: RootTree.h:218
edm::BranchTypeToInfoTreeName
std::string const & BranchTypeToInfoTreeName(BranchType const &branchType)
Definition: BranchType.cc:111
edm::RootTree::enablePrefetching_
bool enablePrefetching_
Definition: RootTree.h:230
edm::RootTree::switchOverEntry_
EntryNumber switchOverEntry_
Definition: RootTree.h:222
edm::RootTree::selectCache
TTreeCache * selectCache(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:364
edm::RootTree::filePtr_
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:197
dumpMFGeometry_cfg.prod
prod
Definition: dumpMFGeometry_cfg.py:24
edm::RootTree::branchNames_
std::vector< std::string > branchNames_
Definition: RootTree.h:219
edm::RootTree::processName_
std::string processName_
Definition: RootTree.h:204
edm::InEvent
Definition: BranchType.h:11
edm::RootTree::triggerSet_
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:215
edm::RootTree::infoTree_
TTree * infoTree_
Definition: RootTree.h:236
utilities.cache
def cache(function)
Definition: utilities.py:3
edm::RootTree::getEntry
void getEntry(TBranch *branch, EntryNumber entry) const
Definition: RootTree.cc:382
edm::RootTree::branchType_
BranchType branchType_
Definition: RootTree.h:203
edm::RootTree::enableTriggerCache_
bool enableTriggerCache_
Definition: RootTree.h:231
edm::RootTree::entryNumber_
EntryNumber entryNumber_
Definition: RootTree.h:217
Exception
edm::BranchTypeToMetaDataTreeName
std::string const & BranchTypeToMetaDataTreeName(BranchType const &branchType)
Definition: BranchType.cc:105
beamvalidation.br
br
Definition: beamvalidation.py:397
edm::RootTree::checkTriggerCache
TTreeCache * checkTriggerCache(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:273
edm::RootTree::trainNow_
bool trainNow_
Definition: RootTree.h:221
edm::RootTree::init
void init(std::string const &productTreeName, unsigned int maxVirtualSize, unsigned int cacheSize)
Definition: RootTree.cc:78
edm::RootTree::branchNames
std::vector< std::string > const & branchNames() const
Definition: RootTree.h:137
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
edm::RootTree::isValid
bool isValid() const
Definition: RootTree.cc:123
edm::RootTree::learningEntries_
unsigned int learningEntries_
Definition: RootTree.h:225
edm::RootTree::stopTraining
void stopTraining()
Definition: RootTree.cc:450
edm::RootTree::setTreeMaxVirtualSize
void setTreeMaxVirtualSize(int treeMaxVirtualSize)
Definition: RootTree.cc:206
edm::RootTree::entryNumber
EntryNumber const & entryNumber() const
Definition: RootTree.h:132
edm::RootTree::entries
EntryNumber const & entries() const
Definition: RootTree.h:134
Exception
Definition: hltDiff.cc:245
edm::RootTree::rawTriggerSwitchOverEntry_
EntryNumber rawTriggerSwitchOverEntry_
Definition: RootTree.h:223
edm::roottree::BranchMap::insert
void insert(edm::BranchID const &iKey, BranchInfo const &iInfo)
Definition: RootTree.h:58
edm::RootTree::performedSwitchOver_
bool performedSwitchOver_
Definition: RootTree.h:224
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
edm::RootTree::branchType
BranchType branchType() const
Definition: RootTree.h:184
cms::Exception
Definition: Exception.h:70
edm::roottree::getEntry
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:515
edm::RootTree::treeCache_
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:209
edm::RootTree::metaTree_
TTree * metaTree_
Definition: RootTree.h:202
hltrates_dqm_sourceclient-live_cfg.offset
offset
Definition: hltrates_dqm_sourceclient-live_cfg.py:82
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::errors::FileReadError
Definition: EDMException.h:50
edm::RootTree::rootDelayedReader_
std::unique_ptr< RootDelayedReader > rootDelayedReader_
Definition: RootTree.h:232
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37