CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
edm::RootTree Class Reference

#include <RootTree.h>

Public Types

typedef roottree::BranchMap BranchMap
 
typedef roottree::EntryNumber EntryNumber
 

Public Member Functions

void addBranch (BranchKey const &key, 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 ()
 
RootTreeoperator= (RootTree const &)=delete
 
bool previous ()
 
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_
 
std::shared_ptr< BranchMapbranches_
 
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
< RootDelayedReader
rootDelayedReader_
 
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 69 of file RootTree.h.

Member Typedef Documentation

Definition at line 71 of file RootTree.h.

Definition at line 72 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 edm::BranchTypeToProductTreeName(), cacheSize_, Exception, learningEntries_, setCacheSize(), setTreeMaxVirtualSize(), trainedSet_, 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_(new BranchMap),
52  trainNow_(false),
53  switchOverEntry_(-1),
55  learningEntries_(learningEntries),
56  cacheSize_(cacheSize),
57  treeAutoFlush_(0),
58  enablePrefetching_(enablePrefetching),
59  //enableTriggerCache_(branchType_ == InEvent),
60  enableTriggerCache_(false), // Disable, for now. Using the trigger cache in the multithreaded environment causes the assert on line 331 to fire occasionally.
61  rootDelayedReader_(new RootDelayedReader(*this, filePtr, inputType)),
62  branchEntryInfoBranch_(metaTree_ ? getProductProvenanceBranch(metaTree_, branchType_) : (tree_ ? getProductProvenanceBranch(tree_, branchType_) : 0)),
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:191
std::string const & BranchTypeToMetaDataTreeName(BranchType const &branchType)
Definition: BranchType.cc:107
unsigned int learningEntries_
Definition: RootTree.h:199
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
Definition: RootTree.h:187
std::vector< std::string > branchNames_
Definition: RootTree.h:193
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
TTree * tree_
Definition: RootTree.h:177
bool trainNow_
Definition: RootTree.h:195
std::shared_ptr< BranchMap > branches_
Definition: RootTree.h:194
EntryNumber rawTriggerSwitchOverEntry_
Definition: RootTree.h:197
roottree::BranchMap BranchMap
Definition: RootTree.h:71
TTree * metaTree_
Definition: RootTree.h:178
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:188
TBranch * branchEntryInfoBranch_
Definition: RootTree.h:208
EntryNumber entries_
Definition: RootTree.h:190
bool enablePrefetching_
Definition: RootTree.h:204
std::unique_ptr< RootDelayedReader > rootDelayedReader_
Definition: RootTree.h:206
void setTreeMaxVirtualSize(int treeMaxVirtualSize)
Definition: RootTree.cc:187
BranchType branchType() const
Definition: RootTree.h:162
unsigned long treeAutoFlush_
Definition: RootTree.h:201
std::string const & BranchTypeToProductTreeName(BranchType const &branchType)
Definition: BranchType.cc:103
TBranch * auxBranch_
Definition: RootTree.h:180
std::string const & BranchTypeToInfoTreeName(BranchType const &branchType)
Definition: BranchType.cc:111
bool enableTriggerCache_
Definition: RootTree.h:205
static EntryNumber_t const invalidEntry
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:185
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
void setCacheSize(unsigned int cacheSize)
Definition: RootTree.cc:177
std::unique_ptr< std::vector< EntryNumber > > entryNumberForIndex_
Definition: RootTree.h:192
unsigned int cacheSize_
Definition: RootTree.h:200
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:189
EntryNumber switchOverEntry_
Definition: RootTree.h:196
std::shared_ptr< TTreeCache > triggerTreeCache_
Definition: RootTree.h:186
BranchType branchType_
Definition: RootTree.h:179
TTree * infoTree_
Definition: RootTree.h:210
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 ( BranchKey const &  key,
BranchDescription const &  prod,
std::string const &  oldBranchName 
)

Definition at line 132 of file RootTree.cc.

References assert(), branches_, edm::BranchDescription::branchName(), branchNames_, info(), isValid(), metaTree_, edm::BranchDescription::present(), edm::roottree::BranchInfo::productBranch_, edm::roottree::BranchInfo::provenanceBranch_, and tree_.

134  {
135  assert(isValid());
136  //use the translated branch name
137  TBranch* branch = tree_->GetBranch(oldBranchName.c_str());
138  roottree::BranchInfo info = roottree::BranchInfo(BranchDescription(prod));
139  info.productBranch_ = nullptr;
140  if (prod.present()) {
141  info.productBranch_ = branch;
142  //we want the new branch name for the JobReport
143  branchNames_.push_back(prod.branchName());
144  }
145  TTree* provTree = (metaTree_ != nullptr ? metaTree_ : tree_);
146  info.provenanceBranch_ = provTree->GetBranch(oldBranchName.c_str());
147  branches_->insert(std::make_pair(key, info));
148  }
static const TGPicture * info(bool iBackgroundIsBlack)
std::vector< std::string > branchNames_
Definition: RootTree.h:193
TTree * tree_
Definition: RootTree.h:177
std::shared_ptr< BranchMap > branches_
Definition: RootTree.h:194
assert(m_qm.get())
TTree * metaTree_
Definition: RootTree.h:178
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
bool isValid() const
Definition: RootTree.cc:106
TBranch* edm::RootTree::branchEntryInfoBranch ( ) const
inline

Definition at line 154 of file RootTree.h.

References branchEntryInfoBranch_.

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

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

Definition at line 174 of file RootTree.cc.

References branches_.

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

174 {return *branches_;}
std::shared_ptr< BranchMap > branches_
Definition: RootTree.h:194
std::vector<std::string> const& edm::RootTree::branchNames ( ) const
inline

Definition at line 107 of file RootTree.h.

References branchNames_.

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

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

Definition at line 162 of file RootTree.h.

References branchType_.

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

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

Definition at line 224 of file RootTree.cc.

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

Referenced by selectCache().

224  {
225  if (!treeCache_->IsAsyncReading() && enableTriggerCache_ && (trainedSet_.find(branch) == trainedSet_.end())) {
226  return checkTriggerCacheImpl(branch, entryNumber);
227  } else {
228  return NULL;
229  }
230  }
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:188
#define NULL
Definition: scimark2.h:8
TTreeCache * checkTriggerCacheImpl(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:235
EntryNumber const & entryNumber() const
Definition: RootTree.h:102
bool enableTriggerCache_
Definition: RootTree.h:205
TTreeCache * edm::RootTree::checkTriggerCacheImpl ( TBranch *  branch,
EntryNumber  entryNumber 
) const

Definition at line 235 of file RootTree.cc.

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

Referenced by checkTriggerCache().

235  {
236  // This branch is not going to be in the cache.
237  // Assume this is a "trigger pattern".
238  // Always make sure the branch is added to the trigger set.
239  if (triggerSet_.find(branch) == triggerSet_.end()) {
240  triggerSet_.insert(branch);
241  if (triggerTreeCache_.get()) { triggerTreeCache_->AddBranch(branch, kTRUE); }
242  }
243 
244  if (rawTriggerSwitchOverEntry_ < 0) {
245  // The trigger has never fired before. Take everything not in the
246  // trainedSet and load it from disk
247 
248  // Calculate the end of the next cluster; triggers in the next cluster
249  // will use the triggerCache, not the rawTriggerCache.
250  TTree::TClusterIterator clusterIter = tree_->GetClusterIterator(entryNumber);
252  rawTriggerSwitchOverEntry_ = clusterIter();
253  }
254 
255  // ROOT will automatically expand the cache to fit one cluster; hence, we use
256  // 5 MB as the cache size below
257  tree_->SetCacheSize(static_cast<Long64_t>(5*1024*1024));
258  rawTriggerTreeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
259  if(rawTriggerTreeCache_) rawTriggerTreeCache_->SetEnablePrefetching(false);
260  TObjArray *branches = tree_->GetListOfBranches();
261  int branchCount = branches->GetEntriesFast();
262 
263  // Train the rawTriggerCache to have everything not in the regular cache.
264  rawTriggerTreeCache_->SetLearnEntries(0);
266  for (int i=0;i<branchCount;i++) {
267  TBranch *tmp_branch = (TBranch*)branches->UncheckedAt(i);
268  if (trainedSet_.find(tmp_branch) != trainedSet_.end()) {
269  continue;
270  }
271  rawTriggerTreeCache_->AddBranch(tmp_branch, kTRUE);
272  }
273  performedSwitchOver_ = false;
274  rawTriggerTreeCache_->StopLearningPhase();
275  filePtr_->SetCacheRead(0);
276 
277  return rawTriggerTreeCache_.get();
279  // The raw trigger has fired and it contents are valid.
280  return rawTriggerTreeCache_.get();
281  } else if (rawTriggerSwitchOverEntry_ > 0) {
282  // The raw trigger has fired, but we are out of the cache. Use the
283  // triggerCache instead.
284  if (!performedSwitchOver_) {
285  rawTriggerTreeCache_.reset();
286  performedSwitchOver_ = true;
287 
288  // Train the triggerCache
289  tree_->SetCacheSize(static_cast<Long64_t>(5*1024*1024));
290  triggerTreeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
291  triggerTreeCache_->SetEnablePrefetching(false);
292  triggerTreeCache_->SetLearnEntries(0);
293  triggerTreeCache_->SetEntryRange(entryNumber, tree_->GetEntries());
294  for(std::unordered_set<TBranch*>::const_iterator it = triggerSet_.begin(), itEnd = triggerSet_.end();
295  it != itEnd;
296  it++)
297  {
298  triggerTreeCache_->AddBranch(*it, kTRUE);
299  }
300  triggerTreeCache_->StopLearningPhase();
301  filePtr_->SetCacheRead(0);
302  }
303  return triggerTreeCache_.get();
305  // The raw trigger has fired and it contents are valid.
306  return rawTriggerTreeCache_.get();
307  } else if (rawTriggerSwitchOverEntry_ > 0) {
308  // The raw trigger has fired, but we are out of the cache. Use the
309  // triggerCache instead.
310  if (!performedSwitchOver_) {
311  rawTriggerTreeCache_.reset();
312  performedSwitchOver_ = true;
313 
314  // Train the triggerCache
315  tree_->SetCacheSize(static_cast<Long64_t>(5*1024*1024));
316  triggerTreeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
317  triggerTreeCache_->SetEnablePrefetching(false);
318  triggerTreeCache_->SetLearnEntries(0);
319  triggerTreeCache_->SetEntryRange(entryNumber, tree_->GetEntries());
320  for(std::unordered_set<TBranch*>::const_iterator it = triggerSet_.begin(), itEnd = triggerSet_.end();
321  it != itEnd;
322  it++)
323  {
324  triggerTreeCache_->AddBranch(*it, kTRUE);
325  }
326  triggerTreeCache_->StopLearningPhase();
327  filePtr_->SetCacheRead(0);
328  }
329  return triggerTreeCache_.get();
330  }
331 
332  // By construction, this case should be impossible.
333  assert (false);
334  return NULL;
335  }
EntryNumber entryNumber_
Definition: RootTree.h:191
int i
Definition: DBlmapReader.cc:9
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
Definition: RootTree.h:187
TTree * tree_
Definition: RootTree.h:177
EntryNumber rawTriggerSwitchOverEntry_
Definition: RootTree.h:197
assert(m_qm.get())
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:188
#define NULL
Definition: scimark2.h:8
EntryNumber const & entryNumber() const
Definition: RootTree.h:102
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
bool performedSwitchOver_
Definition: RootTree.h:198
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:189
BranchMap const & branches() const
Definition: RootTree.cc:174
std::shared_ptr< TTreeCache > triggerTreeCache_
Definition: RootTree.h:186
void edm::RootTree::close ( void  )

Definition at line 429 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().

429  {
430  // The TFile is about to be closed, and destructed.
431  // Just to play it safe, zero all pointers to quantities that are owned by the TFile.
433  tree_ = metaTree_ = infoTree_ = nullptr;
434  // We own the treeCache_.
435  // We make sure the treeCache_ is detached from the file,
436  // so that ROOT does not also delete it.
437  filePtr_->SetCacheRead(0);
438  // We *must* delete the TTreeCache here because the TFilePrefetch object
439  // references the TFile. If TFile is closed, before the TTreeCache is
440  // deleted, the TFilePrefetch may continue to do TFile operations, causing
441  // deadlocks or exceptions.
442  treeCache_.reset();
443  rawTreeCache_.reset();
444  triggerTreeCache_.reset();
445  rawTriggerTreeCache_.reset();
446  // We give up our shared ownership of the TFile itself.
447  filePtr_.reset();
448  }
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
Definition: RootTree.h:187
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
TTree * tree_
Definition: RootTree.h:177
TTree * metaTree_
Definition: RootTree.h:178
TBranch * branchEntryInfoBranch_
Definition: RootTree.h:208
TBranch * auxBranch_
Definition: RootTree.h:180
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:185
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
std::shared_ptr< TTreeCache > triggerTreeCache_
Definition: RootTree.h:186
TTree * infoTree_
Definition: RootTree.h:210
bool edm::RootTree::current ( ) const
inline

Definition at line 97 of file RootTree.h.

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

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

Definition at line 98 of file RootTree.h.

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

Definition at line 151 of file RootTree.cc.

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

151  {
152  //use the translated branch name
153  TBranch* branch = tree_->GetBranch(oldBranchName.c_str());
154  if (branch != nullptr) {
155  TObjArray* leaves = tree_->GetListOfLeaves();
156  int entries = leaves->GetEntries();
157  for (int i = 0; i < entries; ++i) {
158  TLeaf* leaf = (TLeaf*)(*leaves)[i];
159  if (leaf == nullptr) continue;
160  TBranch* br = leaf->GetBranch();
161  if (br == nullptr) continue;
162  if (br->GetMother() == branch) {
163  leaves->Remove(leaf);
164  }
165  }
166  leaves->Compress();
167  tree_->GetListOfBranches()->Remove(branch);
168  tree_->GetListOfBranches()->Compress();
169  delete branch;
170  }
171  }
int i
Definition: DBlmapReader.cc:9
TTree * tree_
Definition: RootTree.h:177
EntryNumber const & entries() const
Definition: RootTree.h:104
EntryNumber const& edm::RootTree::entries ( ) const
inline

Definition at line 104 of file RootTree.h.

References entries_.

Referenced by dropBranch(), edm::RootFile::fillIndexIntoFile(), edm::RootFile::setIfFastClonable(), and edm::RootFile::validateFile().

104 {return entries_;}
EntryNumber entries_
Definition: RootTree.h:190
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 assert(), entryNumberForIndex_, cmsHarvester::index, and findQualityFiles::size.

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

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

Definition at line 110 of file RootTree.h.

References auxBranch_, entryNumber_, and getEntry().

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

110  {
111  auxBranch_->SetAddress(&pAux);
113  }
EntryNumber entryNumber_
Definition: RootTree.h:191
TBranch * auxBranch_
Definition: RootTree.h:180
void getEntry(TBranch *branch, EntryNumber entry) const
Definition: RootTree.cc:357
template<typename T >
void edm::RootTree::fillBranchEntry ( TBranch *  branch,
T *&  pbuf 
)
inline

Definition at line 126 of file RootTree.h.

References entryNumber_, and getEntry().

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

126  {
127  branch->SetAddress(&pbuf);
128  getEntry(branch, entryNumber_);
129  }
EntryNumber entryNumber_
Definition: RootTree.h:191
void getEntry(TBranch *branch, EntryNumber entry) const
Definition: RootTree.cc:357
template<typename T >
void edm::RootTree::fillBranchEntry ( TBranch *  branch,
EntryNumber  entryNumber,
T *&  pbuf 
)
inline

Definition at line 143 of file RootTree.h.

References getEntry().

143  {
144  branch->SetAddress(&pbuf);
145  getEntry(branch, entryNumber);
146  }
EntryNumber const & entryNumber() const
Definition: RootTree.h:102
void getEntry(TBranch *branch, EntryNumber entry) const
Definition: RootTree.cc:357
template<typename T >
void edm::RootTree::fillBranchEntryMeta ( TBranch *  branch,
T *&  pbuf 
)
inline

Definition at line 115 of file RootTree.h.

References entryNumber_, edm::roottree::getEntry(), and metaTree_.

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

115  {
116  if (metaTree_ != nullptr) {
117  // Metadata was in separate tree. Not cached.
118  branch->SetAddress(&pbuf);
120  } else {
121  fillBranchEntry<T>(branch, pbuf);
122  }
123  }
EntryNumber entryNumber_
Definition: RootTree.h:191
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:490
TTree * metaTree_
Definition: RootTree.h:178
template<typename T >
void edm::RootTree::fillBranchEntryMeta ( TBranch *  branch,
EntryNumber  entryNumber,
T *&  pbuf 
)
inline

Definition at line 132 of file RootTree.h.

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

132  {
133  if (metaTree_ != nullptr) {
134  // Metadata was in separate tree. Not cached.
135  branch->SetAddress(&pbuf);
137  } else {
138  fillBranchEntry<T>(branch, entryNumber, pbuf);
139  }
140  }
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
Definition: RootTree.cc:490
TTree * metaTree_
Definition: RootTree.h:178
EntryNumber const & entryNumber() const
Definition: RootTree.h:102
void edm::RootTree::getEntry ( TBranch *  branch,
EntryNumber  entry 
) const

Definition at line 357 of file RootTree.cc.

References cms::Exception::addContext(), alignCSCRings::e, filePtr_, edm::errors::FileReadError, selectCache(), AlCaHLTBitMon_QueryRunRegistry::string, and t.

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

357  {
358  try {
359  TTreeCache * cache = selectCache(branch, entryNumber);
360  filePtr_->SetCacheRead(cache);
361  branch->GetEntry(entryNumber);
362  filePtr_->SetCacheRead(0);
363  } catch(cms::Exception const& e) {
364  // We make sure the treeCache_ is detached from the file,
365  // so that ROOT does not also delete it.
366  filePtr_->SetCacheRead(0);
368  t.addContext(std::string("Reading branch ")+branch->GetName());
369  throw t;
370  }
371  }
TTreeCache * selectCache(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:338
EntryNumber const & entryNumber() const
Definition: RootTree.h:102
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
void edm::RootTree::insertEntryForIndex ( unsigned int  index)

Definition at line 100 of file RootTree.cc.

References assert(), entryNumber(), cmsHarvester::index, 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  }
assert(m_qm.get())
EntryNumber const & entryNumber() const
Definition: RootTree.h:102
tuple size
Write out results.
bool edm::RootTree::isValid ( void  ) const

Definition at line 106 of file RootTree.cc.

References auxBranch_, branchEntryInfoBranch_, entries_, infoTree_, metaTree_, and tree_.

Referenced by ntuple._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:177
TTree * metaTree_
Definition: RootTree.h:178
TBranch * branchEntryInfoBranch_
Definition: RootTree.h:208
EntryNumber entries_
Definition: RootTree.h:190
TBranch * auxBranch_
Definition: RootTree.h:180
TTree * infoTree_
Definition: RootTree.h:210
TTree const* edm::RootTree::metaTree ( ) const
inline

Definition at line 150 of file RootTree.h.

References metaTree_.

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

150 {return metaTree_;}
TTree * metaTree_
Definition: RootTree.h:178
bool edm::RootTree::next ( void  )
inline
RootTree& edm::RootTree::operator= ( RootTree const &  )
delete
bool edm::RootTree::previous ( )
inline

Definition at line 96 of file RootTree.h.

References entryNumber_.

Referenced by BeautifulSoup.PageElement::_invert().

96 {return --entryNumber_ >= 0;}
EntryNumber entryNumber_
Definition: RootTree.h:191
void edm::RootTree::resetTraining ( )
inline

Definition at line 160 of file RootTree.h.

References trainNow_.

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

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

Definition at line 99 of file RootTree.h.

References entryNumber_.

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

99 {entryNumber_ = 0;}
EntryNumber entryNumber_
Definition: RootTree.h:191
DelayedReader * edm::RootTree::rootDelayedReader ( ) 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:206
TTreeCache * edm::RootTree::selectCache ( TBranch *  branch,
EntryNumber  entryNumber 
) const
inline

Definition at line 338 of file RootTree.cc.

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

Referenced by getEntry().

338  {
339  TTreeCache *triggerCache = NULL;
340  if (!treeCache_) {
341  return NULL;
342  } else if (treeCache_->IsLearning() && rawTreeCache_) {
343  treeCache_->AddBranch(branch, kTRUE);
344  trainedSet_.insert(branch);
345  return rawTreeCache_.get();
346  } else if ((triggerCache = checkTriggerCache(branch, entryNumber))) {
347  // A NULL return value from checkTriggerCache indicates the trigger cache case
348  // does not apply, and we should continue below.
349  return triggerCache;
350  } else {
351  // The "normal" TTreeCache case.
352  return treeCache_.get();
353  }
354  }
TTreeCache * checkTriggerCache(TBranch *branch, EntryNumber entryNumber) const
Definition: RootTree.cc:224
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:188
#define NULL
Definition: scimark2.h:8
EntryNumber const & entryNumber() const
Definition: RootTree.h:102
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:185
void edm::RootTree::setCacheSize ( unsigned int  cacheSize)
private

Definition at line 177 of file RootTree.cc.

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

Referenced by RootTree().

177  {
178  cacheSize_ = cacheSize;
179  tree_->SetCacheSize(static_cast<Long64_t>(cacheSize));
180  treeCache_.reset(dynamic_cast<TTreeCache*>(filePtr_->GetCacheRead()));
181  if(treeCache_) treeCache_->SetEnablePrefetching(enablePrefetching_);
182  filePtr_->SetCacheRead(0);
183  rawTreeCache_.reset();
184  }
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
TTree * tree_
Definition: RootTree.h:177
bool enablePrefetching_
Definition: RootTree.h:204
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:185
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
unsigned int cacheSize_
Definition: RootTree.h:200
void edm::RootTree::setEntryNumber ( EntryNumber  theEntryNumber)

Definition at line 192 of file RootTree.cc.

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

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

192  {
193  filePtr_->SetCacheRead(treeCache_.get());
194 
195  // Detect a backward skip. If the skip is sufficiently large, we roll the dice and reset the treeCache.
196  // This will cause some amount of over-reading: we pre-fetch all the events in some prior cluster.
197  // However, because reading one event in the cluster is supposed to be equivalent to reading all events in the cluster,
198  // we're not incurring additional over-reading - we're just doing it more efficiently.
199  // NOTE: Constructor guarantees treeAutoFlush_ is positive, even if TTree->GetAutoFlush() is negative.
200  if ((theEntryNumber < static_cast<EntryNumber>(entryNumber_-treeAutoFlush_)) &&
201  (treeCache_) && (!treeCache_->IsLearning()) && (entries_ > 0) && (switchOverEntry_ >= 0)) {
202  treeCache_->SetEntryRange(theEntryNumber, entries_);
203  treeCache_->FillBuffer();
204  }
205 
206  entryNumber_ = theEntryNumber;
207  tree_->LoadTree(entryNumber_);
208  filePtr_->SetCacheRead(0);
209  if(treeCache_ && trainNow_ && entryNumber_ >= 0) {
210  startTraining();
211  trainNow_ = false;
212  trainedSet_.clear();
213  triggerSet_.clear();
215  }
216  if (treeCache_ && treeCache_->IsLearning() && switchOverEntry_ >= 0 && entryNumber_ >= switchOverEntry_) {
217  stopTraining();
218  }
219  }
EntryNumber entryNumber_
Definition: RootTree.h:191
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
TTree * tree_
Definition: RootTree.h:177
bool trainNow_
Definition: RootTree.h:195
EntryNumber rawTriggerSwitchOverEntry_
Definition: RootTree.h:197
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:188
void stopTraining()
Definition: RootTree.cc:421
EntryNumber entries_
Definition: RootTree.h:190
unsigned long treeAutoFlush_
Definition: RootTree.h:201
void startTraining()
Definition: RootTree.cc:390
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:189
EntryNumber switchOverEntry_
Definition: RootTree.h:196
void edm::RootTree::setPresence ( BranchDescription prod,
std::string const &  oldBranchName 
)

Definition at line 124 of file RootTree.cc.

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

124  {
125  assert(isValid());
126  if(tree_->GetBranch(oldBranchName.c_str()) == nullptr){
127  prod.setDropped(true);
128  }
129  }
TTree * tree_
Definition: RootTree.h:177
assert(m_qm.get())
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 481 of file RootTree.cc.

References rootDelayedReader_.

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

482  {
483  rootDelayedReader_->setSignals(preEventReadSource,
484  postEventReadSource);
485  }
std::unique_ptr< RootDelayedReader > rootDelayedReader_
Definition: RootTree.h:206
void edm::RootTree::setTreeMaxVirtualSize ( int  treeMaxVirtualSize)
private

Definition at line 187 of file RootTree.cc.

References tree_.

Referenced by RootTree().

187  {
188  if (treeMaxVirtualSize >= 0) tree_->SetMaxVirtualSize(static_cast<Long64_t>(treeMaxVirtualSize));
189  }
TTree * tree_
Definition: RootTree.h:177
bool edm::RootTree::skipEntries ( unsigned int &  offset)

Definition at line 374 of file RootTree.cc.

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

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

374  {
375  entryNumber_ += offset;
376  bool retval = (entryNumber_ < entries_);
377  if(retval) {
378  offset = 0;
379  } else {
380  // Not enough entries in the file to skip.
381  // The +1 is needed because entryNumber_ is -1 at the initialization of the tree, not 0.
382  long long overshoot = entryNumber_ + 1 - entries_;
384  offset = overshoot;
385  }
386  return retval;
387  }
EntryNumber entryNumber_
Definition: RootTree.h:191
EntryNumber entries_
Definition: RootTree.h:190
void edm::RootTree::startTraining ( )
private

Definition at line 390 of file RootTree.cc.

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

Referenced by setEntryNumber().

390  {
391  if (cacheSize_ == 0) {
392  return;
393  }
397  treeCache_->SetLearnEntries(learningEntries_);
398  tree_->SetCacheSize(static_cast<Long64_t>(cacheSize_));
399  rawTreeCache_.reset(dynamic_cast<TTreeCache *>(filePtr_->GetCacheRead()));
400  rawTreeCache_->SetEnablePrefetching(false);
401  filePtr_->SetCacheRead(0);
402  rawTreeCache_->SetLearnEntries(0);
404  rawTreeCache_->StartLearningPhase();
406  rawTreeCache_->AddBranch("*", kTRUE);
407  rawTreeCache_->StopLearningPhase();
408  treeCache_->StartLearningPhase();
409  treeCache_->SetEntryRange(switchOverEntry_, tree_->GetEntries());
410  // Make sure that 'branchListIndexes' branch exist in input file
411  if (filePtr_->Get(poolNames::branchListIndexesBranchName().c_str()) != nullptr) {
412  treeCache_->AddBranch(poolNames::branchListIndexesBranchName().c_str(), kTRUE);
413  }
414  treeCache_->AddBranch(BranchTypeToAuxiliaryBranchName(branchType_).c_str(), kTRUE);
415  trainedSet_.clear();
416  triggerSet_.clear();
417  assert(treeCache_->GetTree() == tree_);
418  }
EntryNumber entryNumber_
Definition: RootTree.h:191
std::string const & BranchTypeToAuxiliaryBranchName(BranchType const &branchType)
Definition: BranchType.cc:115
unsigned int learningEntries_
Definition: RootTree.h:199
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
TTree * tree_
Definition: RootTree.h:177
assert(m_qm.get())
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:188
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:185
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
unsigned int cacheSize_
Definition: RootTree.h:200
std::unordered_set< TBranch * > triggerSet_
Definition: RootTree.h:189
std::string const & branchListIndexesBranchName()
Definition: BranchType.cc:247
EntryNumber switchOverEntry_
Definition: RootTree.h:196
BranchType branchType_
Definition: RootTree.h:179
void edm::RootTree::stopTraining ( )
private

Definition at line 421 of file RootTree.cc.

References filePtr_, rawTreeCache_, and treeCache_.

Referenced by setEntryNumber().

421  {
422  filePtr_->SetCacheRead(treeCache_.get());
423  treeCache_->StopLearningPhase();
424  filePtr_->SetCacheRead(0);
425  rawTreeCache_.reset();
426  }
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
std::shared_ptr< TTreeCache > rawTreeCache_
Definition: RootTree.h:185
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
void edm::RootTree::trainCache ( char const *  branchNames)

Definition at line 451 of file RootTree.cc.

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

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

451  {
452  if (cacheSize_ == 0) {
453  return;
454  }
455  tree_->LoadTree(0);
457  filePtr_->SetCacheRead(treeCache_.get());
458  treeCache_->StartLearningPhase();
459  treeCache_->SetEntryRange(0, tree_->GetEntries());
460  treeCache_->AddBranch(branchNames, kTRUE);
461  treeCache_->StopLearningPhase();
462  assert(treeCache_->GetTree() == tree_);
463  // We own the treeCache_.
464  // We make sure the treeCache_ is detached from the file,
465  // so that ROOT does not also delete it.
466  filePtr_->SetCacheRead(0);
467 
468  // Must also manually add things to the trained set.
469  TObjArray *branches = tree_->GetListOfBranches();
470  int branchCount = branches->GetEntriesFast();
471  for (int i=0;i<branchCount;i++) {
472  TBranch *branch = (TBranch*)branches->UncheckedAt(i);
473  if ((branchNames[0] == '*') || (strcmp(branchNames, branch->GetName()) == 0)) {
474  trainedSet_.insert(branch);
475  }
476  }
477 
478  }
int i
Definition: DBlmapReader.cc:9
std::vector< std::string > const & branchNames() const
Definition: RootTree.h:107
std::shared_ptr< TTreeCache > treeCache_
Definition: RootTree.h:184
TTree * tree_
Definition: RootTree.h:177
assert(m_qm.get())
std::unordered_set< TBranch * > trainedSet_
Definition: RootTree.h:188
std::shared_ptr< InputFile > filePtr_
Definition: RootTree.h:173
unsigned int cacheSize_
Definition: RootTree.h:200
BranchMap const & branches() const
Definition: RootTree.cc:174
TTree const* edm::RootTree::tree ( ) const
inline
TTree* edm::RootTree::tree ( )
inline

Member Data Documentation

TBranch* edm::RootTree::auxBranch_
private

Definition at line 180 of file RootTree.h.

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

TBranch* edm::RootTree::branchEntryInfoBranch_
private

Definition at line 208 of file RootTree.h.

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

std::shared_ptr<BranchMap> edm::RootTree::branches_
private

Definition at line 194 of file RootTree.h.

Referenced by addBranch(), and branches().

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

Definition at line 193 of file RootTree.h.

Referenced by addBranch(), and branchNames().

BranchType edm::RootTree::branchType_
private

Definition at line 179 of file RootTree.h.

Referenced by branchType(), and startTraining().

unsigned int edm::RootTree::cacheSize_
private

Definition at line 200 of file RootTree.h.

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

bool edm::RootTree::enablePrefetching_
private

Definition at line 204 of file RootTree.h.

Referenced by setCacheSize().

bool edm::RootTree::enableTriggerCache_
private

Definition at line 205 of file RootTree.h.

Referenced by checkTriggerCache().

EntryNumber edm::RootTree::entries_
private

Definition at line 190 of file RootTree.h.

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

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

Definition at line 192 of file RootTree.h.

Referenced by entryNumberForIndex().

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

Definition at line 210 of file RootTree.h.

Referenced by close(), and isValid().

unsigned int edm::RootTree::learningEntries_
private

Definition at line 199 of file RootTree.h.

Referenced by RootTree(), and startTraining().

TTree* edm::RootTree::metaTree_
private

Definition at line 178 of file RootTree.h.

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

bool edm::RootTree::performedSwitchOver_
mutableprivate

Definition at line 198 of file RootTree.h.

Referenced by checkTriggerCacheImpl().

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

Definition at line 185 of file RootTree.h.

Referenced by close(), selectCache(), setCacheSize(), startTraining(), and stopTraining().

EntryNumber edm::RootTree::rawTriggerSwitchOverEntry_
mutableprivate

Definition at line 197 of file RootTree.h.

Referenced by checkTriggerCacheImpl(), and setEntryNumber().

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

Definition at line 187 of file RootTree.h.

Referenced by checkTriggerCacheImpl(), and close().

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

Definition at line 206 of file RootTree.h.

Referenced by rootDelayedReader(), and setSignals().

TBranch* edm::RootTree::statusBranch_
private

Definition at line 211 of file RootTree.h.

EntryNumber edm::RootTree::switchOverEntry_
private

Definition at line 196 of file RootTree.h.

Referenced by setEntryNumber(), and startTraining().

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

Definition at line 195 of file RootTree.h.

Referenced by resetTraining(), and setEntryNumber().

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

Definition at line 201 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 189 of file RootTree.h.

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

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

Definition at line 186 of file RootTree.h.

Referenced by checkTriggerCacheImpl(), and close().