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

typedef roottree::BranchMap BranchMap
 
typedef roottree::EntryNumber 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, T *&pbuf)
 
template<typename T >
void fillBranchEntry (TBranch *branch, EntryNumber entryNumber, T *&pbuf)
 
template<typename T >
void fillBranchEntryMeta (TBranch *branch, T *&pbuf)
 
template<typename T >
void fillBranchEntryMeta (TBranch *branch, EntryNumber entryNumber, T *&pbuf)
 
void getEntry (TBranch *branch, EntryNumber entry) const
 
void insertEntryForIndex (unsigned int index)
 
bool isValid () const
 
TTree const * metaTree () const
 
bool next ()
 
bool nextWithCache ()
 
void numberOfBranchesToAdd (size_t iSize)
 
RootTreeoperator= (RootTree const &)=delete
 
bool previous ()
 
DelayedReaderresetAndGetRootDelayedReader () const
 
void resetTraining ()
 
void rewind ()
 
DelayedReaderrootDelayedReader () const
 
 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)
 
 RootTree (RootTree const &)=delete
 
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 const * tree () const
 
TTree * tree ()
 
 ~RootTree ()
 

Private Member Functions

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

Private Attributes

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

Detailed Description

Definition at line 97 of file RootTree.h.

Member Typedef Documentation

Definition at line 99 of file RootTree.h.

Definition at line 100 of file RootTree.h.

Constructor & Destructor Documentation

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 28 of file RootTree.cc.

References branchEntryInfoBranch_, branchType_, edm::BranchTypeToInfoTreeName(), edm::BranchTypeToProductTreeName(), cacheSize_, enablePrefetching_, enableTriggerCache_, Exception, filePtr_, edm::InEvent, infoTree_, learningEntries_, metaTree_, performedSwitchOver_, rawTriggerSwitchOverEntry_, rootDelayedReader_, setCacheSize(), setTreeMaxVirtualSize(), switchOverEntry_, trainedSet_, trainNow_, tree_, treeAutoFlush_, and triggerSet_.

35  :
36  filePtr_(filePtr),
37  tree_(dynamic_cast<TTree*>(filePtr_.get() != nullptr ? filePtr_->Get(BranchTypeToProductTreeName(branchType).c_str()) : nullptr)),
38  metaTree_(dynamic_cast<TTree*>(filePtr_.get() != nullptr ? filePtr_->Get(BranchTypeToMetaDataTreeName(branchType).c_str()) : nullptr)),
40  auxBranch_(tree_ ? getAuxiliaryBranch(tree_, branchType_) : nullptr),
41  treeCache_(),
42  rawTreeCache_(),
45  trainedSet_(),
46  triggerSet_(),
47  entries_(tree_ ? tree_->GetEntries() : 0),
48  entryNumber_(-1),
49  entryNumberForIndex_(new std::vector<EntryNumber>(nIndexes, IndexIntoFile::invalidEntry)),
50  branchNames_(),
51  branches_{},
52  trainNow_(false),
53  switchOverEntry_(-1),
55  performedSwitchOver_{false},
56  learningEntries_(learningEntries),
57  cacheSize_(cacheSize),
58  treeAutoFlush_(0),
59  enablePrefetching_(enablePrefetching),
61  rootDelayedReader_(new RootDelayedReader(*this, filePtr, inputType)),
62  branchEntryInfoBranch_(metaTree_ ? getProductProvenanceBranch(metaTree_, branchType_) : (tree_ ? getProductProvenanceBranch(tree_, branchType_) : nullptr)),
63  infoTree_(dynamic_cast<TTree*>(filePtr_.get() != nullptr ? filePtr->Get(BranchTypeToInfoTreeName(branchType).c_str()) : nullptr)) // backward compatibility
64  {
65  if(not tree_) {
66  throw cms::Exception("WrongFileFormat")<< "The ROOT file does not contain a TTree named "<<BranchTypeToProductTreeName(branchType)<<"\n This is either not an edm ROOT file or is one that has been corrupted.";
67  }
68  // On merged files in older releases of ROOT, the autoFlush setting is always negative; we must guess.
69  // TODO: On newer merged files, we should be able to get this from the cluster iterator.
70  long treeAutoFlush = (tree_ ? tree_->GetAutoFlush() : 0);
71  if (treeAutoFlush < 0) {
72  // The "+1" is here to avoid divide-by-zero in degenerate cases.
73  Long64_t averageEventSizeBytes = tree_->GetZipBytes() / (tree_->GetEntries()+1) + 1;
74  treeAutoFlush_ = cacheSize_/averageEventSizeBytes+1;
75  } else {
76  treeAutoFlush_ = treeAutoFlush;
77  }
80  }
81  setTreeMaxVirtualSize(maxVirtualSize);
82  setCacheSize(cacheSize);
83  if (tree_) {
84  Int_t branchCount = tree_->GetListOfBranches()->GetEntriesFast();
85  trainedSet_.reserve(branchCount);
86  triggerSet_.reserve(branchCount);
87  }
88  }
EntryNumber entryNumber_
Definition: RootTree.h:221
std::string const & BranchTypeToMetaDataTreeName(BranchType const &branchType)
Definition: BranchType.cc:108
unsigned int learningEntries_
Definition: RootTree.h:229
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
Definition: RootTree.h:217
std::vector< std::string > branchNames_
Definition: RootTree.h:223
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
TTree * tree_
Definition: RootTree.h:207
bool trainNow_
Definition: RootTree.h:225
EntryNumber rawTriggerSwitchOverEntry_
Definition: RootTree.h:227
BranchMap branches_
Definition: RootTree.h:224
TTree * metaTree_
Definition: RootTree.h:208
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:218
TBranch * branchEntryInfoBranch_
Definition: RootTree.h:238
EntryNumber entries_
Definition: RootTree.h:220
bool enablePrefetching_
Definition: RootTree.h:234
std::unique_ptr< RootDelayedReader > rootDelayedReader_
Definition: RootTree.h:236
void setTreeMaxVirtualSize(int treeMaxVirtualSize)
Definition: RootTree.cc:191
BranchType branchType() const
Definition: RootTree.h:192
unsigned long treeAutoFlush_
Definition: RootTree.h:231
std::string const & BranchTypeToProductTreeName(BranchType const &branchType)
Definition: BranchType.cc:104
TBranch * auxBranch_
Definition: RootTree.h:210
std::string const & BranchTypeToInfoTreeName(BranchType const &branchType)
Definition: BranchType.cc:112
bool enableTriggerCache_
Definition: RootTree.h:235
static constexpr EntryNumber_t invalidEntry
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:215
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
void setCacheSize(unsigned int cacheSize)
Definition: RootTree.cc:181
bool performedSwitchOver_
Definition: RootTree.h:228
std::unique_ptr< std::vector< EntryNumber > > entryNumberForIndex_
Definition: RootTree.h:222
unsigned int cacheSize_
Definition: RootTree.h:230
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:219
EntryNumber switchOverEntry_
Definition: RootTree.h:226
std::shared_ptr< TTreeCache > triggerTreeCache_
Definition: RootTree.h:216
BranchType branchType_
Definition: RootTree.h:209
TTree * infoTree_
Definition: RootTree.h:240
edm::RootTree::~RootTree ( )

Definition at line 90 of file RootTree.cc.

90  {
91  }
edm::RootTree::RootTree ( RootTree const &  )
delete

Member Function Documentation

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

Definition at line 137 of file RootTree.cc.

References MicroEventContent_cff::branch, branches_, edm::BranchDescription::branchID(), edm::BranchDescription::branchName(), branchNames_, info(), edm::roottree::BranchMap::insert(), isValid(), metaTree_, edm::BranchDescription::present(), edm::roottree::BranchInfo::productBranch_, edm::roottree::BranchInfo::provenanceBranch_, and tree_.

138  {
139  assert(isValid());
140  //use the translated branch name
141  TBranch* branch = tree_->GetBranch(oldBranchName.c_str());
142  roottree::BranchInfo info = roottree::BranchInfo(prod);
143  info.productBranch_ = nullptr;
144  if (prod.present()) {
145  info.productBranch_ = branch;
146  //we want the new branch name for the JobReport
147  branchNames_.push_back(prod.branchName());
148  }
149  TTree* provTree = (metaTree_ != nullptr ? metaTree_ : tree_);
150  info.provenanceBranch_ = provTree->GetBranch(oldBranchName.c_str());
151  branches_.insert(prod.branchID(), info);
152  }
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< std::string > branchNames_
Definition: RootTree.h:223
TTree * tree_
Definition: RootTree.h:207
BranchMap branches_
Definition: RootTree.h:224
TTree * metaTree_
Definition: RootTree.h:208
void insert(edm::BranchID const &iKey, BranchInfo const &iInfo)
Definition: RootTree.h:74
bool isValid() const
Definition: RootTree.cc:106
TBranch* edm::RootTree::branchEntryInfoBranch ( ) const
inline

Definition at line 184 of file RootTree.h.

References edm::roottree::trainCache().

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

184 {return branchEntryInfoBranch_;}
TBranch * branchEntryInfoBranch_
Definition: RootTree.h:238
roottree::BranchMap const & edm::RootTree::branches ( ) const

Definition at line 178 of file RootTree.cc.

References branches_.

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

178 {return branches_;}
BranchMap branches_
Definition: RootTree.h:224
std::vector<std::string> const& edm::RootTree::branchNames ( ) const
inline

Definition at line 136 of file RootTree.h.

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

136 {return branchNames_;}
std::vector< std::string > branchNames_
Definition: RootTree.h:223
BranchType edm::RootTree::branchType ( ) const
inline

Definition at line 192 of file RootTree.h.

Referenced by edm::RootDelayedReader::getProduct_().

192 {return branchType_;}
BranchType branchType_
Definition: RootTree.h:209
TTreeCache * edm::RootTree::checkTriggerCache ( TBranch *  branch,
EntryNumber  entryNumber 
) const
inline

Definition at line 260 of file RootTree.cc.

References checkTriggerCacheImpl(), enableTriggerCache_, trainedSet_, and treeCache_.

Referenced by selectCache().

260  {
261  if (!treeCache_->IsAsyncReading() && enableTriggerCache_ && (trainedSet_.find(branch) == trainedSet_.end())) {
263  } else {
264  return nullptr;
265  }
266  }
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:218
TTreeCache * checkTriggerCacheImpl(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:271
EntryNumber const & entryNumber() const
Definition: RootTree.h:131
bool enableTriggerCache_
Definition: RootTree.h:235
TTreeCache * edm::RootTree::checkTriggerCacheImpl ( TBranch *  branch,
EntryNumber  entryNumber 
) const

Definition at line 271 of file RootTree.cc.

References branches(), entryNumber_, filePtr_, mps_fire::i, performedSwitchOver_, rawTriggerSwitchOverEntry_, rawTriggerTreeCache_, trainedSet_, tree_, triggerSet_, and triggerTreeCache_.

Referenced by checkTriggerCache().

271  {
272  // This branch is not going to be in the cache.
273  // Assume this is a "trigger pattern".
274  // Always make sure the branch is added to the trigger set.
275  if (triggerSet_.find(branch) == triggerSet_.end()) {
276  triggerSet_.insert(branch);
277  if (triggerTreeCache_.get()) { triggerTreeCache_->AddBranch(branch, kTRUE); }
278  }
279 
280  if (rawTriggerSwitchOverEntry_ < 0) {
281  // The trigger has never fired before. Take everything not in the
282  // trainedSet and load it from disk
283 
284  // Calculate the end of the next cluster; triggers in the next cluster
285  // will use the triggerCache, not the rawTriggerCache.
286  //
287  // Guarantee that rawTriggerSwitchOverEntry_ is positive (non-zero) after completion
288  // of this if-block.
289  TTree::TClusterIterator clusterIter = tree_->GetClusterIterator(entryNumber);
291  rawTriggerSwitchOverEntry_ = clusterIter();
292  }
293 
294  // ROOT will automatically expand the cache to fit one cluster; hence, we use
295  // 5 MB as the cache size below
296  tree_->SetCacheSize(static_cast<Long64_t>(5*1024*1024));
297  rawTriggerTreeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
298  if(rawTriggerTreeCache_) rawTriggerTreeCache_->SetEnablePrefetching(false);
299  TObjArray *branches = tree_->GetListOfBranches();
300  int branchCount = branches->GetEntriesFast();
301 
302  // Train the rawTriggerCache to have everything not in the regular cache.
303  rawTriggerTreeCache_->SetLearnEntries(0);
305  for (int i=0;i<branchCount;i++) {
306  TBranch *tmp_branch = (TBranch*)branches->UncheckedAt(i);
307  if (trainedSet_.find(tmp_branch) != trainedSet_.end()) {
308  continue;
309  }
310  rawTriggerTreeCache_->AddBranch(tmp_branch, kTRUE);
311  }
312  performedSwitchOver_ = false;
313  rawTriggerTreeCache_->StopLearningPhase();
314  filePtr_->SetCacheRead(nullptr);
315 
316  return rawTriggerTreeCache_.get();
318  // The raw trigger has fired and it contents are valid.
319  return rawTriggerTreeCache_.get();
320  } else if (rawTriggerSwitchOverEntry_ > 0) {
321  // The raw trigger has fired, but we are out of the cache. Use the
322  // triggerCache instead.
323  if (!performedSwitchOver_) {
324  rawTriggerTreeCache_.reset();
325  performedSwitchOver_ = true;
326 
327  // Train the triggerCache
328  tree_->SetCacheSize(static_cast<Long64_t>(5*1024*1024));
329  triggerTreeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
330  triggerTreeCache_->SetEnablePrefetching(false);
331  triggerTreeCache_->SetLearnEntries(0);
332  triggerTreeCache_->SetEntryRange(entryNumber, tree_->GetEntries());
333  for(std::unordered_set<TBranch*>::const_iterator it = triggerSet_.begin(), itEnd = triggerSet_.end();
334  it != itEnd;
335  it++)
336  {
337  triggerTreeCache_->AddBranch(*it, kTRUE);
338  }
339  triggerTreeCache_->StopLearningPhase();
340  filePtr_->SetCacheRead(nullptr);
341  }
342  return triggerTreeCache_.get();
343  }
344 
345  // By construction, this case should be impossible.
346  assert (false);
347  return nullptr;
348  }
EntryNumber entryNumber_
Definition: RootTree.h:221
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
Definition: RootTree.h:217
TTree * tree_
Definition: RootTree.h:207
EntryNumber rawTriggerSwitchOverEntry_
Definition: RootTree.h:227
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:218
EntryNumber const & entryNumber() const
Definition: RootTree.h:131
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
bool performedSwitchOver_
Definition: RootTree.h:228
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:219
BranchMap const & branches() const
Definition: RootTree.cc:178
std::shared_ptr< TTreeCache > triggerTreeCache_
Definition: RootTree.h:216
void edm::RootTree::close ( void  )

Definition at line 449 of file RootTree.cc.

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

Referenced by lumiQTWidget.ApplicationWindow::fileQuit(), esMonitoring.AsyncLineReaderMixin::handle_close(), esMonitoring.FDJsonServer::handle_close(), Vispa.Gui.BoxContentDialog.BoxContentDialog::keyPressEvent(), and Vispa.Gui.FindDialog.FindDialog::keyPressEvent().

449  {
450  // The TFile is about to be closed, and destructed.
451  // Just to play it safe, zero all pointers to quantities that are owned by the TFile.
453  tree_ = metaTree_ = infoTree_ = nullptr;
454  // We own the treeCache_.
455  // We make sure the treeCache_ is detached from the file,
456  // so that ROOT does not also delete it.
457  filePtr_->SetCacheRead(nullptr);
458  // We *must* delete the TTreeCache here because the TFilePrefetch object
459  // references the TFile. If TFile is closed, before the TTreeCache is
460  // deleted, the TFilePrefetch may continue to do TFile operations, causing
461  // deadlocks or exceptions.
462  treeCache_.reset();
463  rawTreeCache_.reset();
464  triggerTreeCache_.reset();
465  rawTriggerTreeCache_.reset();
466  // We give up our shared ownership of the TFile itself.
467  filePtr_.reset();
468  }
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
Definition: RootTree.h:217
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
TTree * tree_
Definition: RootTree.h:207
TTree * metaTree_
Definition: RootTree.h:208
TBranch * branchEntryInfoBranch_
Definition: RootTree.h:238
TBranch * auxBranch_
Definition: RootTree.h:210
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:215
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
std::shared_ptr< TTreeCache > triggerTreeCache_
Definition: RootTree.h:216
TTree * infoTree_
Definition: RootTree.h:240
bool edm::RootTree::current ( ) const
inline

Definition at line 126 of file RootTree.h.

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

126 {return entryNumber_ < entries_ && entryNumber_ >= 0;}
bool edm::RootTree::current ( EntryNumber  entry) const
inline

Definition at line 127 of file RootTree.h.

127 {return entry < entries_ && entry >= 0;}
void edm::RootTree::dropBranch ( std::string const &  oldBranchName)

Definition at line 155 of file RootTree.cc.

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

155  {
156  //use the translated branch name
157  TBranch* branch = tree_->GetBranch(oldBranchName.c_str());
158  if (branch != nullptr) {
159  TObjArray* leaves = tree_->GetListOfLeaves();
160  int entries = leaves->GetEntries();
161  for (int i = 0; i < entries; ++i) {
162  TLeaf* leaf = (TLeaf*)(*leaves)[i];
163  if (leaf == nullptr) continue;
164  TBranch* br = leaf->GetBranch();
165  if (br == nullptr) continue;
166  if (br->GetMother() == branch) {
167  leaves->Remove(leaf);
168  }
169  }
170  leaves->Compress();
171  tree_->GetListOfBranches()->Remove(branch);
172  tree_->GetListOfBranches()->Compress();
173  delete branch;
174  }
175  }
TTree * tree_
Definition: RootTree.h:207
EntryNumber const & entries() const
Definition: RootTree.h:133
EntryNumber const& edm::RootTree::entries ( ) const
inline
EntryNumber const& edm::RootTree::entryNumber ( ) const
inline
RootTree::EntryNumber const & edm::RootTree::entryNumberForIndex ( unsigned int  index) const

Definition at line 94 of file RootTree.cc.

References entryNumberForIndex_, and findQualityFiles::size.

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

94  {
95  assert(index < entryNumberForIndex_->size());
96  return (*entryNumberForIndex_)[index];
97  }
size
Write out results.
std::unique_ptr< std::vector< EntryNumber > > entryNumberForIndex_
Definition: RootTree.h:222
template<typename T >
void edm::RootTree::fillAux ( T *&  pAux)
inline

Definition at line 140 of file RootTree.h.

References edm::roottree::getEntry().

Referenced by edm::RootFile::fillLumiAuxiliary(), edm::RootFile::fillRunAuxiliary(), and edm::RootFile::fillThisEventAuxiliary().

140  {
141  auxBranch_->SetAddress(&pAux);
143  }
EntryNumber entryNumber_
Definition: RootTree.h:221
TBranch * auxBranch_
Definition: RootTree.h:210
void getEntry(TBranch *branch, EntryNumber entry) const
Definition: RootTree.cc:370
template<typename T >
void edm::RootTree::fillBranchEntry ( TBranch *  branch,
T *&  pbuf 
)
inline

Definition at line 156 of file RootTree.h.

References edm::roottree::getEntry().

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

156  {
157  branch->SetAddress(&pbuf);
159  }
EntryNumber entryNumber_
Definition: RootTree.h:221
void getEntry(TBranch *branch, EntryNumber entry) const
Definition: RootTree.cc:370
template<typename T >
void edm::RootTree::fillBranchEntry ( TBranch *  branch,
EntryNumber  entryNumber,
T *&  pbuf 
)
inline

Definition at line 173 of file RootTree.h.

References edm::roottree::getEntry().

173  {
174  branch->SetAddress(&pbuf);
176  }
EntryNumber const & entryNumber() const
Definition: RootTree.h:131
void getEntry(TBranch *branch, EntryNumber entry) const
Definition: RootTree.cc:370
template<typename T >
void edm::RootTree::fillBranchEntryMeta ( TBranch *  branch,
T *&  pbuf 
)
inline

Definition at line 145 of file RootTree.h.

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

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

145  {
146  if (metaTree_ != nullptr) {
147  // Metadata was in separate tree. Not cached.
148  branch->SetAddress(&pbuf);
150  } else {
151  fillBranchEntry<T>(branch, pbuf);
152  }
153  }
EntryNumber entryNumber_
Definition: RootTree.h:221
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:510
TTree * metaTree_
Definition: RootTree.h:208
template<typename T >
void edm::RootTree::fillBranchEntryMeta ( TBranch *  branch,
EntryNumber  entryNumber,
T *&  pbuf 
)
inline

Definition at line 162 of file RootTree.h.

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

162  {
163  if (metaTree_ != nullptr) {
164  // Metadata was in separate tree. Not cached.
165  branch->SetAddress(&pbuf);
167  } else {
168  fillBranchEntry<T>(branch, entryNumber, pbuf);
169  }
170  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:510
TTree * metaTree_
Definition: RootTree.h:208
EntryNumber const & entryNumber() const
Definition: RootTree.h:131
void edm::RootTree::getEntry ( TBranch *  branch,
EntryNumber  entry 
) const

Definition at line 370 of file RootTree.cc.

References cms::Exception::addContext(), helperFunctions::cache(), MillePedeFileConverter_cfg::e, filePtr_, edm::errors::FileReadError, selectCache(), AlCaHLTBitMon_QueryRunRegistry::string, and lumiQTWidget::t.

Referenced by edm::RootDelayedReader::getProduct_().

370  {
371  try {
372  TTreeCache * cache = selectCache(branch, entryNumber);
373  filePtr_->SetCacheRead(cache);
374  branch->GetEntry(entryNumber);
375  filePtr_->SetCacheRead(nullptr);
376  } catch(cms::Exception const& e) {
377  // We make sure the treeCache_ is detached from the file,
378  // so that ROOT does not also delete it.
379  filePtr_->SetCacheRead(nullptr);
381  t.addContext(std::string("Reading branch ")+branch->GetName());
382  throw t;
383  }
384  }
TTreeCache * selectCache(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:351
def cache(function)
EntryNumber const & entryNumber() const
Definition: RootTree.h:131
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
void edm::RootTree::insertEntryForIndex ( unsigned int  index)

Definition at line 100 of file RootTree.cc.

References entryNumber(), and findQualityFiles::size.

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

100  {
101  assert(index < entryNumberForIndex_->size());
102  (*entryNumberForIndex_)[index] = entryNumber();
103  }
size
Write out results.
EntryNumber const & entryNumber() const
Definition: RootTree.h:131
bool edm::RootTree::isValid ( void  ) const

Definition at line 106 of file RootTree.cc.

References auxBranch_, branchEntryInfoBranch_, entries_, infoTree_, 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().

106  {
107  if (metaTree_ == nullptr || metaTree_->GetNbranches() == 0) {
108  return tree_ != nullptr && auxBranch_ != nullptr;
109  }
110  if (tree_ != nullptr && auxBranch_ != nullptr && metaTree_ != nullptr) { // backward compatibility
111  if (branchEntryInfoBranch_ != nullptr || infoTree_ != nullptr) return true; // backward compatibility
112  return (entries_ == metaTree_->GetEntries() && tree_->GetNbranches() <= metaTree_->GetNbranches() + 1); // backward compatibility
113  } // backward compatibility
114  return false;
115  }
TTree * tree_
Definition: RootTree.h:207
TTree * metaTree_
Definition: RootTree.h:208
TBranch * branchEntryInfoBranch_
Definition: RootTree.h:238
EntryNumber entries_
Definition: RootTree.h:220
TBranch * auxBranch_
Definition: RootTree.h:210
TTree * infoTree_
Definition: RootTree.h:240
TTree const* edm::RootTree::metaTree ( ) const
inline

Definition at line 180 of file RootTree.h.

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

180 {return metaTree_;}
TTree * metaTree_
Definition: RootTree.h:208
bool edm::RootTree::next ( void  )
inline

Definition at line 123 of file RootTree.h.

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

123 {return ++entryNumber_ < entries_;}
EntryNumber entryNumber_
Definition: RootTree.h:221
EntryNumber entries_
Definition: RootTree.h:220
bool edm::RootTree::nextWithCache ( )

Definition at line 196 of file RootTree.cc.

References entries_, entryNumber_, and setEntryNumber().

196  {
197  bool returnValue = ++entryNumber_ < entries_;
198  if(returnValue) {
200  }
201  return returnValue;
202  }
EntryNumber entryNumber_
Definition: RootTree.h:221
EntryNumber entries_
Definition: RootTree.h:220
void setEntryNumber(EntryNumber theEntryNumber)
Definition: RootTree.cc:205
void edm::RootTree::numberOfBranchesToAdd ( size_t  iSize)
inline
RootTree& edm::RootTree::operator= ( RootTree const &  )
delete
bool edm::RootTree::previous ( )
inline

Definition at line 125 of file RootTree.h.

125 {return --entryNumber_ >= 0;}
EntryNumber entryNumber_
Definition: RootTree.h:221
DelayedReader * edm::RootTree::resetAndGetRootDelayedReader ( ) const

Definition at line 118 of file RootTree.cc.

References rootDelayedReader_.

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

118  {
119  rootDelayedReader_->reset();
120  return rootDelayedReader_.get();
121  }
std::unique_ptr< RootDelayedReader > rootDelayedReader_
Definition: RootTree.h:236
void edm::RootTree::resetTraining ( )
inline

Definition at line 190 of file RootTree.h.

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

190 {trainNow_ = true;}
bool trainNow_
Definition: RootTree.h:225
void edm::RootTree::rewind ( )
inline

Definition at line 128 of file RootTree.h.

References PFRecoTauDiscriminationByIsolation_cfi::offset.

128 {entryNumber_ = 0;}
EntryNumber entryNumber_
Definition: RootTree.h:221
DelayedReader * edm::RootTree::rootDelayedReader ( ) const

Definition at line 124 of file RootTree.cc.

References rootDelayedReader_.

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

124  {
125  return rootDelayedReader_.get();
126  }
std::unique_ptr< RootDelayedReader > rootDelayedReader_
Definition: RootTree.h:236
TTreeCache * edm::RootTree::selectCache ( TBranch *  branch,
EntryNumber  entryNumber 
) const
inline

Definition at line 351 of file RootTree.cc.

References checkTriggerCache(), rawTreeCache_, trainedSet_, and treeCache_.

Referenced by getEntry().

351  {
352  TTreeCache *triggerCache = nullptr;
353  if (!treeCache_) {
354  return nullptr;
355  } else if (treeCache_->IsLearning() && rawTreeCache_) {
356  treeCache_->AddBranch(branch, kTRUE);
357  trainedSet_.insert(branch);
358  return rawTreeCache_.get();
359  } else if ((triggerCache = checkTriggerCache(branch, entryNumber))) {
360  // A NULL return value from checkTriggerCache indicates the trigger cache case
361  // does not apply, and we should continue below.
362  return triggerCache;
363  } else {
364  // The "normal" TTreeCache case.
365  return treeCache_.get();
366  }
367  }
TTreeCache * checkTriggerCache(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:260
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:218
EntryNumber const & entryNumber() const
Definition: RootTree.h:131
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:215
void edm::RootTree::setCacheSize ( unsigned int  cacheSize)
private

Definition at line 181 of file RootTree.cc.

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

Referenced by RootTree().

181  {
182  cacheSize_ = cacheSize;
183  tree_->SetCacheSize(static_cast<Long64_t>(cacheSize));
184  treeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
185  if(treeCache_) treeCache_->SetEnablePrefetching(enablePrefetching_);
186  filePtr_->SetCacheRead(nullptr);
187  rawTreeCache_.reset();
188  }
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
TTree * tree_
Definition: RootTree.h:207
bool enablePrefetching_
Definition: RootTree.h:234
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:215
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
unsigned int cacheSize_
Definition: RootTree.h:230
void edm::RootTree::setEntryNumber ( EntryNumber  theEntryNumber)

Definition at line 205 of file RootTree.cc.

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::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().

205  {
206  filePtr_->SetCacheRead(treeCache_.get());
207 
208  // Detect a backward skip. If the skip is sufficiently large, we roll the dice and reset the treeCache.
209  // This will cause some amount of over-reading: we pre-fetch all the events in some prior cluster.
210  // However, because reading one event in the cluster is supposed to be equivalent to reading all events in the cluster,
211  // we're not incurring additional over-reading - we're just doing it more efficiently.
212  // NOTE: Constructor guarantees treeAutoFlush_ is positive, even if TTree->GetAutoFlush() is negative.
213  if(theEntryNumber < entryNumber_ and theEntryNumber >=0) {
214  //We started reading the file near the end, now we need to correct for the learning length
215  if(switchOverEntry_ >tree_->GetEntries()) {
216  switchOverEntry_ = switchOverEntry_-tree_->GetEntries();
217  if(rawTreeCache_) {
218  rawTreeCache_->SetEntryRange(theEntryNumber, switchOverEntry_);
219  rawTreeCache_->FillBuffer();
220  }
221  }
223  //We are using the triggerTreeCache_ not the rawTriggerTreeCache_.
224  //The triggerTreeCache was originally told to start from an entry further in the file.
225  triggerTreeCache_->SetEntryRange(theEntryNumber, tree_->GetEntries());
226  } else if(rawTriggerTreeCache_) {
227  //move the switch point to the end of the cluster holding theEntryNumber
229  TTree::TClusterIterator clusterIter = tree_->GetClusterIterator(theEntryNumber);
230  while ((rawTriggerSwitchOverEntry_ < theEntryNumber) || (rawTriggerSwitchOverEntry_ <= 0)) {
231  rawTriggerSwitchOverEntry_ = clusterIter();
232  }
233  rawTriggerTreeCache_->SetEntryRange(theEntryNumber, rawTriggerSwitchOverEntry_);
234  }
235  }
236  if ((theEntryNumber < static_cast<EntryNumber>(entryNumber_-treeAutoFlush_)) &&
237  (treeCache_) && (!treeCache_->IsLearning()) && (entries_ > 0) && (switchOverEntry_ >= 0)) {
238  treeCache_->SetEntryRange(theEntryNumber, entries_);
239  treeCache_->FillBuffer();
240  }
241 
242  entryNumber_ = theEntryNumber;
243  tree_->LoadTree(entryNumber_);
244  filePtr_->SetCacheRead(nullptr);
245  if(treeCache_ && trainNow_ && entryNumber_ >= 0) {
246  startTraining();
247  trainNow_ = false;
248  trainedSet_.clear();
249  triggerSet_.clear();
251  }
252  if (treeCache_ && treeCache_->IsLearning() && switchOverEntry_ >= 0 && entryNumber_ >= switchOverEntry_) {
253  stopTraining();
254  }
255  }
EntryNumber entryNumber_
Definition: RootTree.h:221
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
Definition: RootTree.h:217
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
TTree * tree_
Definition: RootTree.h:207
bool trainNow_
Definition: RootTree.h:225
EntryNumber rawTriggerSwitchOverEntry_
Definition: RootTree.h:227
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:218
void stopTraining()
Definition: RootTree.cc:441
EntryNumber entries_
Definition: RootTree.h:220
unsigned long treeAutoFlush_
Definition: RootTree.h:231
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:215
void startTraining()
Definition: RootTree.cc:403
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
bool performedSwitchOver_
Definition: RootTree.h:228
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:219
EntryNumber switchOverEntry_
Definition: RootTree.h:226
std::shared_ptr< TTreeCache > triggerTreeCache_
Definition: RootTree.h:216
void edm::RootTree::setPresence ( BranchDescription prod,
std::string const &  oldBranchName 
)

Definition at line 129 of file RootTree.cc.

References isValid(), edm::BranchDescription::setDropped(), and tree_.

129  {
130  assert(isValid());
131  if(tree_->GetBranch(oldBranchName.c_str()) == nullptr){
132  prod.setDropped(true);
133  }
134  }
TTree * tree_
Definition: RootTree.h:207
bool isValid() const
Definition: RootTree.cc:106
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 501 of file RootTree.cc.

References rootDelayedReader_.

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

502  {
503  rootDelayedReader_->setSignals(preEventReadSource,
504  postEventReadSource);
505  }
std::unique_ptr< RootDelayedReader > rootDelayedReader_
Definition: RootTree.h:236
void edm::RootTree::setTreeMaxVirtualSize ( int  treeMaxVirtualSize)
private

Definition at line 191 of file RootTree.cc.

References tree_.

Referenced by RootTree().

191  {
192  if (treeMaxVirtualSize >= 0) tree_->SetMaxVirtualSize(static_cast<Long64_t>(treeMaxVirtualSize));
193  }
TTree * tree_
Definition: RootTree.h:207
bool edm::RootTree::skipEntries ( unsigned int &  offset)

Definition at line 387 of file RootTree.cc.

References entries_, entryNumber_, and PFRecoTauDiscriminationByIsolation_cfi::offset.

387  {
388  entryNumber_ += offset;
389  bool retval = (entryNumber_ < entries_);
390  if(retval) {
391  offset = 0;
392  } else {
393  // Not enough entries in the file to skip.
394  // The +1 is needed because entryNumber_ is -1 at the initialization of the tree, not 0.
395  long long overshoot = entryNumber_ + 1 - entries_;
397  offset = overshoot;
398  }
399  return retval;
400  }
EntryNumber entryNumber_
Definition: RootTree.h:221
EntryNumber entries_
Definition: RootTree.h:220
void edm::RootTree::startTraining ( )
private

Definition at line 403 of file RootTree.cc.

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

Referenced by setEntryNumber().

403  {
404  if (cacheSize_ == 0) {
405  return;
406  }
407  assert(treeCache_);
408  assert(branchType_ == InEvent);
409  assert(!rawTreeCache_);
410  treeCache_->SetLearnEntries(learningEntries_);
411  tree_->SetCacheSize(static_cast<Long64_t>(cacheSize_));
412  rawTreeCache_.reset(dynamic_cast<TTreeCache *>(filePtr_->GetCacheRead()));
413  rawTreeCache_->SetEnablePrefetching(false);
414  filePtr_->SetCacheRead(nullptr);
415  rawTreeCache_->SetLearnEntries(0);
417  auto rawStart = entryNumber_;
418  auto rawEnd = switchOverEntry_;
419  auto treeStart =switchOverEntry_;
420  if(switchOverEntry_ >= tree_->GetEntries()) {
421  treeStart = switchOverEntry_-tree_->GetEntries();
422  rawEnd = tree_->GetEntries();
423  }
424  rawTreeCache_->StartLearningPhase();
425  rawTreeCache_->SetEntryRange(rawStart, rawEnd);
426  rawTreeCache_->AddBranch("*", kTRUE);
427  rawTreeCache_->StopLearningPhase();
428  treeCache_->StartLearningPhase();
429  treeCache_->SetEntryRange(treeStart, tree_->GetEntries());
430  // Make sure that 'branchListIndexes' branch exist in input file
431  if (filePtr_->Get(poolNames::branchListIndexesBranchName().c_str()) != nullptr) {
432  treeCache_->AddBranch(poolNames::branchListIndexesBranchName().c_str(), kTRUE);
433  }
434  treeCache_->AddBranch(BranchTypeToAuxiliaryBranchName(branchType_).c_str(), kTRUE);
435  trainedSet_.clear();
436  triggerSet_.clear();
437  assert(treeCache_->GetTree() == tree_);
438  }
EntryNumber entryNumber_
Definition: RootTree.h:221
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:116
unsigned int learningEntries_
Definition: RootTree.h:229
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
TTree * tree_
Definition: RootTree.h:207
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:218
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:215
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
unsigned int cacheSize_
Definition: RootTree.h:230
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:219
std::string const & branchListIndexesBranchName()
Definition: BranchType.cc:253
EntryNumber switchOverEntry_
Definition: RootTree.h:226
BranchType branchType_
Definition: RootTree.h:209
void edm::RootTree::stopTraining ( )
private

Definition at line 441 of file RootTree.cc.

References filePtr_, rawTreeCache_, and treeCache_.

Referenced by setEntryNumber().

441  {
442  filePtr_->SetCacheRead(treeCache_.get());
443  treeCache_->StopLearningPhase();
444  filePtr_->SetCacheRead(nullptr);
445  rawTreeCache_.reset();
446  }
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:215
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
void edm::RootTree::trainCache ( char const *  branchNames)

Definition at line 471 of file RootTree.cc.

References branches(), cacheSize_, filePtr_, mps_fire::i, trainedSet_, tree_, and treeCache_.

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

471  {
472  if (cacheSize_ == 0) {
473  return;
474  }
475  tree_->LoadTree(0);
476  assert(treeCache_);
477  filePtr_->SetCacheRead(treeCache_.get());
478  treeCache_->StartLearningPhase();
479  treeCache_->SetEntryRange(0, tree_->GetEntries());
480  treeCache_->AddBranch(branchNames, kTRUE);
481  treeCache_->StopLearningPhase();
482  assert(treeCache_->GetTree() == tree_);
483  // We own the treeCache_.
484  // We make sure the treeCache_ is detached from the file,
485  // so that ROOT does not also delete it.
486  filePtr_->SetCacheRead(nullptr);
487 
488  // Must also manually add things to the trained set.
489  TObjArray *branches = tree_->GetListOfBranches();
490  int branchCount = branches->GetEntriesFast();
491  for (int i=0;i<branchCount;i++) {
492  TBranch *branch = (TBranch*)branches->UncheckedAt(i);
493  if ((branchNames[0] == '*') || (strcmp(branchNames, branch->GetName()) == 0)) {
494  trainedSet_.insert(branch);
495  }
496  }
497 
498  }
std::vector< std::string > const & branchNames() const
Definition: RootTree.h:136
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:214
TTree * tree_
Definition: RootTree.h:207
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:218
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:203
unsigned int cacheSize_
Definition: RootTree.h:230
BranchMap const & branches() const
Definition: RootTree.cc:178
TTree const* edm::RootTree::tree ( ) const
inline
TTree* edm::RootTree::tree ( )
inline

Member Data Documentation

TBranch* edm::RootTree::auxBranch_
private

Definition at line 210 of file RootTree.h.

Referenced by close(), and isValid().

TBranch* edm::RootTree::branchEntryInfoBranch_
private

Definition at line 238 of file RootTree.h.

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

BranchMap edm::RootTree::branches_
private

Definition at line 224 of file RootTree.h.

Referenced by addBranch(), and branches().

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

Definition at line 223 of file RootTree.h.

Referenced by addBranch().

BranchType edm::RootTree::branchType_
private

Definition at line 209 of file RootTree.h.

Referenced by RootTree(), and startTraining().

unsigned int edm::RootTree::cacheSize_
private

Definition at line 230 of file RootTree.h.

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

bool edm::RootTree::enablePrefetching_
private

Definition at line 234 of file RootTree.h.

Referenced by RootTree(), and setCacheSize().

bool edm::RootTree::enableTriggerCache_
private

Definition at line 235 of file RootTree.h.

Referenced by checkTriggerCache(), and RootTree().

EntryNumber edm::RootTree::entries_
private

Definition at line 220 of file RootTree.h.

Referenced by isValid(), nextWithCache(), setEntryNumber(), and skipEntries().

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

Definition at line 222 of file RootTree.h.

Referenced by entryNumberForIndex().

std::shared_ptr<InputFile> edm::RootTree::filePtr_
private
TTree* edm::RootTree::infoTree_
private

Definition at line 240 of file RootTree.h.

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

unsigned int edm::RootTree::learningEntries_
private

Definition at line 229 of file RootTree.h.

Referenced by RootTree(), and startTraining().

TTree* edm::RootTree::metaTree_
private

Definition at line 208 of file RootTree.h.

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

bool edm::RootTree::performedSwitchOver_
mutableprivate

Definition at line 228 of file RootTree.h.

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

std::shared_ptr<TTreeCache> edm::RootTree::rawTreeCache_
private
EntryNumber edm::RootTree::rawTriggerSwitchOverEntry_
mutableprivate

Definition at line 227 of file RootTree.h.

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

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

Definition at line 217 of file RootTree.h.

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

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

Definition at line 236 of file RootTree.h.

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

TBranch* edm::RootTree::statusBranch_
private

Definition at line 241 of file RootTree.h.

EntryNumber edm::RootTree::switchOverEntry_
private

Definition at line 226 of file RootTree.h.

Referenced by RootTree(), setEntryNumber(), and startTraining().

std::unordered_set<TBranch*> edm::RootTree::trainedSet_
mutableprivate
bool edm::RootTree::trainNow_
private

Definition at line 225 of file RootTree.h.

Referenced by RootTree(), and setEntryNumber().

TTree* edm::RootTree::tree_
private
unsigned long edm::RootTree::treeAutoFlush_
private

Definition at line 231 of file RootTree.h.

Referenced by RootTree(), and setEntryNumber().

std::shared_ptr<TTreeCache> edm::RootTree::treeCache_
private
std::unordered_set<TBranch*> edm::RootTree::triggerSet_
mutableprivate

Definition at line 219 of file RootTree.h.

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

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

Definition at line 216 of file RootTree.h.

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