#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) |
RootTree & | operator= (RootTree const &)=delete |
bool | previous () |
DelayedReader * | resetAndGetRootDelayedReader () const |
void | resetTraining () |
void | rewind () |
DelayedReader * | rootDelayedReader () 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< InputFile > | filePtr_ |
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_ |
Definition at line 97 of file RootTree.h.
Definition at line 99 of file RootTree.h.
Definition at line 100 of file RootTree.h.
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_.
edm::RootTree::~RootTree | ( | ) |
Definition at line 90 of file RootTree.cc.
|
delete |
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_.
|
inline |
Definition at line 184 of file RootTree.h.
References edm::roottree::trainCache().
Referenced by edm::FullProvenanceReader::readProvenance().
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().
|
inline |
|
inline |
|
inline |
Definition at line 260 of file RootTree.cc.
References checkTriggerCacheImpl(), enableTriggerCache_, trainedSet_, and treeCache_.
Referenced by selectCache().
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().
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().
|
inline |
Definition at line 126 of file RootTree.h.
Referenced by edm::RootFile::fillEventAuxiliary(), edm::RootFile::readCurrentEvent(), edm::RootFile::readLuminosityBlockAuxiliary_(), and edm::RootFile::readRunAuxiliary_().
|
inline |
Definition at line 127 of file RootTree.h.
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_.
|
inline |
Definition at line 133 of file RootTree.h.
Referenced by dropBranch(), edm::RootFile::fillIndexIntoFile(), edm::RootFile::setIfFastClonable(), and edm::RootFile::validateFile().
|
inline |
Definition at line 131 of file RootTree.h.
Referenced by edm::RootFile::fillEventHistory(), edm::RootFile::fillIndexIntoFile(), edm::RootFile::fillThisEventAuxiliary(), and insertEntryForIndex().
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().
|
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().
|
inline |
Definition at line 156 of file RootTree.h.
References edm::roottree::getEntry().
Referenced by edm::RootFile::fillEventHistory().
|
inline |
Definition at line 173 of file RootTree.h.
References edm::roottree::getEntry().
|
inline |
Definition at line 145 of file RootTree.h.
References MicroEventContent_cff::branch, and edm::roottree::getEntry().
Referenced by edm::FullProvenanceReader::readProvenance().
|
inline |
Definition at line 162 of file RootTree.h.
References MicroEventContent_cff::branch, and edm::roottree::getEntry().
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_().
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_().
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().
|
inline |
|
inline |
Definition at line 123 of file RootTree.h.
Referenced by edm::RootFile::fillIndexIntoFile(), and edm::RootFile::initializeDuplicateChecker().
bool edm::RootTree::nextWithCache | ( | ) |
Definition at line 196 of file RootTree.cc.
References entries_, entryNumber_, and setEntryNumber().
|
inline |
Definition at line 115 of file RootTree.h.
References MicroEventContent_cff::branch, mps_splice::entry, edm::roottree::getEntry(), parseEventContent::prod, and AlCaHLTBitMon_QueryRunRegistry::string.
|
inline |
Definition at line 125 of file RootTree.h.
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_().
|
inline |
|
inline |
Definition at line 128 of file RootTree.h.
References PFRecoTauDiscriminationByIsolation_cfi::offset.
DelayedReader * edm::RootTree::rootDelayedReader | ( | ) | const |
Definition at line 124 of file RootTree.cc.
References rootDelayedReader_.
Referenced by edm::FullProvenanceReader::readProvenanceAsync().
|
inline |
Definition at line 351 of file RootTree.cc.
References checkTriggerCache(), rawTreeCache_, trainedSet_, and treeCache_.
Referenced by getEntry().
|
private |
Definition at line 181 of file RootTree.cc.
References cacheSize_, enablePrefetching_, filePtr_, rawTreeCache_, tree_, and treeCache_.
Referenced by RootTree().
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().
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_.
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().
|
private |
Definition at line 191 of file RootTree.cc.
References tree_.
Referenced by RootTree().
bool edm::RootTree::skipEntries | ( | unsigned int & | offset | ) |
Definition at line 387 of file RootTree.cc.
References entries_, entryNumber_, and PFRecoTauDiscriminationByIsolation_cfi::offset.
|
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().
|
private |
Definition at line 441 of file RootTree.cc.
References filePtr_, rawTreeCache_, and treeCache_.
Referenced by setEntryNumber().
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().
|
inline |
Definition at line 178 of file RootTree.h.
Referenced by ZJetsTreeAnalyzer.ZJetsTreeAnalyzer::beginLoop(), edm::RootFile::createFileBlock(), MetTreeProducer.MetTreeProducer::declareVariables(), core.AutoFillTreeProducer.AutoFillTreeProducer::declareVariables(), edm::RootFile::fillEventHistory(), core.AutoFillTreeProducer.AutoFillTreeProducer::fillTree(), ZJetsTreeAnalyzer.ZJetsTreeAnalyzer::process(), MetTreeProducer.MetTreeProducer::process(), and python.cmstools.EventTree::SetAlias().
|
inline |
Definition at line 179 of file RootTree.h.
Referenced by ZJetsTreeAnalyzer.ZJetsTreeAnalyzer::beginLoop(), MetTreeProducer.MetTreeProducer::declareVariables(), core.AutoFillTreeProducer.AutoFillTreeProducer::declareVariables(), core.AutoFillTreeProducer.AutoFillTreeProducer::fillTree(), ZJetsTreeAnalyzer.ZJetsTreeAnalyzer::process(), MetTreeProducer.MetTreeProducer::process(), and python.cmstools.EventTree::SetAlias().
|
private |
Definition at line 210 of file RootTree.h.
|
private |
Definition at line 238 of file RootTree.h.
Referenced by close(), isValid(), and RootTree().
|
private |
Definition at line 224 of file RootTree.h.
Referenced by addBranch(), and branches().
|
private |
Definition at line 223 of file RootTree.h.
Referenced by addBranch().
|
private |
Definition at line 209 of file RootTree.h.
Referenced by RootTree(), and startTraining().
|
private |
Definition at line 230 of file RootTree.h.
Referenced by RootTree(), setCacheSize(), startTraining(), and trainCache().
|
private |
Definition at line 234 of file RootTree.h.
Referenced by RootTree(), and setCacheSize().
|
private |
Definition at line 235 of file RootTree.h.
Referenced by checkTriggerCache(), and RootTree().
|
private |
Definition at line 220 of file RootTree.h.
Referenced by isValid(), nextWithCache(), setEntryNumber(), and skipEntries().
|
private |
Definition at line 221 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), nextWithCache(), setEntryNumber(), skipEntries(), and startTraining().
|
private |
Definition at line 222 of file RootTree.h.
Referenced by entryNumberForIndex().
|
private |
Definition at line 203 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), close(), getEntry(), RootTree(), setCacheSize(), setEntryNumber(), startTraining(), stopTraining(), and trainCache().
|
private |
Definition at line 240 of file RootTree.h.
Referenced by close(), isValid(), and RootTree().
|
private |
Definition at line 229 of file RootTree.h.
Referenced by RootTree(), and startTraining().
|
private |
Definition at line 208 of file RootTree.h.
Referenced by addBranch(), close(), isValid(), and RootTree().
|
mutableprivate |
Definition at line 228 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), RootTree(), and setEntryNumber().
|
private |
Definition at line 215 of file RootTree.h.
Referenced by close(), selectCache(), setCacheSize(), setEntryNumber(), startTraining(), and stopTraining().
|
mutableprivate |
Definition at line 227 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), RootTree(), and setEntryNumber().
|
mutableprivate |
Definition at line 217 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), close(), and setEntryNumber().
|
private |
Definition at line 236 of file RootTree.h.
Referenced by resetAndGetRootDelayedReader(), rootDelayedReader(), RootTree(), and setSignals().
|
private |
Definition at line 241 of file RootTree.h.
|
private |
Definition at line 226 of file RootTree.h.
Referenced by RootTree(), setEntryNumber(), and startTraining().
|
mutableprivate |
Definition at line 218 of file RootTree.h.
Referenced by checkTriggerCache(), checkTriggerCacheImpl(), RootTree(), selectCache(), setEntryNumber(), startTraining(), and trainCache().
|
private |
Definition at line 225 of file RootTree.h.
Referenced by RootTree(), and setEntryNumber().
|
private |
Definition at line 207 of file RootTree.h.
Referenced by addBranch(), checkTriggerCacheImpl(), close(), dropBranch(), isValid(), RootTree(), setCacheSize(), setEntryNumber(), setPresence(), setTreeMaxVirtualSize(), startTraining(), and trainCache().
|
private |
Definition at line 231 of file RootTree.h.
Referenced by RootTree(), and setEntryNumber().
|
private |
Definition at line 214 of file RootTree.h.
Referenced by checkTriggerCache(), close(), selectCache(), setCacheSize(), setEntryNumber(), startTraining(), stopTraining(), and trainCache().
|
mutableprivate |
Definition at line 219 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), RootTree(), setEntryNumber(), and startTraining().
|
mutableprivate |
Definition at line 216 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), close(), and setEntryNumber().