#include <RootTree.h>
Public Types | |
using | BranchMap = roottree::BranchMap |
using | EntryNumber = roottree::EntryNumber |
Public Member Functions | |
void | addBranch (BranchDescription const &prod, std::string const &oldBranchName) |
TBranch * | branchEntryInfoBranch () const |
BranchMap const & | branches () const |
std::vector< std::string > const & | branchNames () const |
BranchType | branchType () const |
TTreeCache * | checkTriggerCache (TBranch *branch, EntryNumber entryNumber) const |
TTreeCache * | checkTriggerCacheImpl (TBranch *branch, EntryNumber entryNumber) const |
void | close () |
bool | current () const |
bool | current (EntryNumber entry) const |
void | dropBranch (std::string const &oldBranchName) |
EntryNumber const & | entries () const |
EntryNumber const & | entryNumber () const |
EntryNumber const & | entryNumberForIndex (unsigned int index) const |
template<typename T > | |
void | fillAux (T *&pAux) |
template<typename T > | |
void | fillBranchEntry (TBranch *branch, T *&pbuf) |
template<typename T > | |
void | fillBranchEntry (TBranch *branch, EntryNumber entryNumber, T *&pbuf) |
template<typename T > | |
void | fillBranchEntryMeta (TBranch *branch, EntryNumber entryNumber, T *&pbuf) |
void | getEntry (TBranch *branch, EntryNumber entry) const |
void | init (std::string const &productTreeName, unsigned int maxVirtualSize, unsigned int cacheSize) |
void | insertEntryForIndex (unsigned int index) |
bool | isValid () const |
TTree const * | metaTree () const |
TTree * | metaTree () |
bool | next () |
bool | nextWithCache () |
void | numberOfBranchesToAdd (BranchMap::Map::size_type iSize) |
RootTree & | operator= (RootTree const &)=delete |
std::string const & | processName () const |
DelayedReader * | resetAndGetRootDelayedReader () const |
void | resetTraining () |
void | rewind () |
void | rewindToInvalid () |
DelayedReader * | rootDelayedReader () const |
RootTree (std::shared_ptr< InputFile > filePtr, BranchType const &branchType, unsigned int nIndexes, unsigned int learningEntries, bool enablePrefetching, InputType inputType) | |
RootTree (std::shared_ptr< InputFile > filePtr, BranchType const &branchType, unsigned int nIndexes, unsigned int maxVirtualSize, unsigned int cacheSize, unsigned int learningEntries, bool enablePrefetching, InputType inputType) | |
RootTree (std::shared_ptr< InputFile > filePtr, BranchType const &branchType, std::string const &processName, unsigned int nIndexes, unsigned int maxVirtualSize, unsigned int cacheSize, unsigned int learningEntries, bool enablePrefetching, InputType inputType) | |
RootTree (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_ = nullptr |
TBranch * | branchEntryInfoBranch_ = nullptr |
BranchMap | branches_ |
std::vector< std::string > | branchNames_ |
BranchType | branchType_ |
unsigned int | cacheSize_ = 0 |
bool | enablePrefetching_ |
bool | enableTriggerCache_ |
EntryNumber | entries_ = 0 |
EntryNumber | entryNumber_ = IndexIntoFile::invalidEntry |
std::unique_ptr< std::vector< EntryNumber > > | entryNumberForIndex_ |
std::shared_ptr< InputFile > | filePtr_ |
TTree * | infoTree_ = nullptr |
unsigned int | learningEntries_ |
TTree * | metaTree_ = nullptr |
bool | performedSwitchOver_ = false |
std::string | processName_ |
std::shared_ptr< TTreeCache > | rawTreeCache_ |
EntryNumber | rawTriggerSwitchOverEntry_ = -1 |
std::shared_ptr< TTreeCache > | rawTriggerTreeCache_ |
std::unique_ptr< RootDelayedReader > | rootDelayedReader_ |
EntryNumber | switchOverEntry_ = -1 |
std::unordered_set< TBranch * > | trainedSet_ |
bool | trainNow_ = false |
TTree * | tree_ = nullptr |
unsigned long | treeAutoFlush_ = 0 |
std::shared_ptr< TTreeCache > | treeCache_ |
std::unordered_set< TBranch * > | triggerSet_ |
std::shared_ptr< TTreeCache > | triggerTreeCache_ |
Definition at line 79 of file RootTree.h.
Definition at line 81 of file RootTree.h.
Definition at line 82 of file RootTree.h.
edm::RootTree::RootTree | ( | std::shared_ptr< InputFile > | filePtr, |
BranchType const & | branchType, | ||
unsigned int | nIndexes, | ||
unsigned int | learningEntries, | ||
bool | enablePrefetching, | ||
InputType | inputType | ||
) |
Definition at line 30 of file RootTree.cc.
edm::RootTree::RootTree | ( | std::shared_ptr< InputFile > | filePtr, |
BranchType const & | branchType, | ||
unsigned int | nIndexes, | ||
unsigned int | maxVirtualSize, | ||
unsigned int | cacheSize, | ||
unsigned int | learningEntries, | ||
bool | enablePrefetching, | ||
InputType | inputType | ||
) |
Definition at line 45 of file RootTree.cc.
References auxBranch_, branchEntryInfoBranch_, branchType(), branchType_, edm::BranchTypeToInfoTreeName(), edm::BranchTypeToMetaDataTreeName(), edm::BranchTypeToProductTreeName(), filePtr_, infoTree_, init(), metaTree_, and tree_.
edm::RootTree::RootTree | ( | std::shared_ptr< InputFile > | filePtr, |
BranchType const & | branchType, | ||
std::string const & | processName, | ||
unsigned int | nIndexes, | ||
unsigned int | maxVirtualSize, | ||
unsigned int | cacheSize, | ||
unsigned int | learningEntries, | ||
bool | enablePrefetching, | ||
InputType | inputType | ||
) |
Definition at line 64 of file RootTree.cc.
References branchType(), edm::BranchTypeToProductTreeName(), init(), processName(), and processName_.
edm::RootTree::~RootTree | ( | ) |
Definition at line 111 of file RootTree.cc.
|
delete |
void edm::RootTree::addBranch | ( | BranchDescription const & | prod, |
std::string const & | oldBranchName | ||
) |
Definition at line 156 of file RootTree.cc.
References cms::cuda::assert(), MicroEventContent_cff::branch, branches_, branchNames_, info(), edm::roottree::BranchMap::insert(), isValid(), dumpMFGeometry_cfg::prod, and tree_.
|
inline |
Definition at line 176 of file RootTree.h.
References branchEntryInfoBranch_.
Referenced by edm::FullProvenanceReader::readProvenance().
roottree::BranchMap const & edm::RootTree::branches | ( | ) | const |
Definition at line 194 of file RootTree.cc.
References branches_.
Referenced by edm::RootDelayedReader::branches(), checkTriggerCacheImpl(), and trainCache().
|
inline |
Definition at line 137 of file RootTree.h.
References branchNames_.
Referenced by edm::RootFile::reportOpened(), and trainCache().
|
inline |
Definition at line 184 of file RootTree.h.
References branchType_.
Referenced by edm::RootDelayedReader::getProduct_(), and RootTree().
|
inline |
Definition at line 273 of file RootTree.cc.
References MicroEventContent_cff::branch, checkTriggerCacheImpl(), enableTriggerCache_, entryNumber(), trainedSet_, and treeCache_.
Referenced by selectCache().
TTreeCache * edm::RootTree::checkTriggerCacheImpl | ( | TBranch * | branch, |
EntryNumber | entryNumber | ||
) | const |
Definition at line 283 of file RootTree.cc.
References cms::cuda::assert(), MicroEventContent_cff::branch, branches(), entryNumber(), entryNumber_, filePtr_, mps_fire::i, ALPAKA_ACCELERATOR_NAMESPACE::vertexFinder::it, performedSwitchOver_, rawTriggerSwitchOverEntry_, rawTriggerTreeCache_, trainedSet_, tree_, triggerSet_, and triggerTreeCache_.
Referenced by checkTriggerCache().
void edm::RootTree::close | ( | void | ) |
Definition at line 469 of file RootTree.cc.
References auxBranch_, branchEntryInfoBranch_, filePtr_, infoTree_, metaTree_, rawTreeCache_, rawTriggerTreeCache_, tree_, treeCache_, and triggerTreeCache_.
Referenced by esMonitoring.AsyncLineReaderMixin::handle_close(), and esMonitoring.FDJsonServer::handle_close().
|
inline |
Definition at line 126 of file RootTree.h.
Referenced by 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 170 of file RootTree.cc.
References beamvalidation::br, MicroEventContent_cff::branch, entries(), mps_fire::i, and tree_.
|
inline |
Definition at line 134 of file RootTree.h.
References entries_.
Referenced by dropBranch(), edm::RootFile::fillIndexIntoFile(), edm::RootFile::setIfFastClonable(), and edm::RootFile::validateFile().
|
inline |
Definition at line 132 of file RootTree.h.
References entryNumber_.
Referenced by checkTriggerCache(), checkTriggerCacheImpl(), fillBranchEntry(), fillBranchEntryMeta(), edm::RootFile::fillEventHistory(), edm::RootFile::fillIndexIntoFile(), edm::RootFile::fillThisEventAuxiliary(), getEntry(), edm::RootFileEventFinder::getEventNumberOfEntry(), insertEntryForIndex(), edm::RootFile::readRun_(), and selectCache().
RootTree::EntryNumber const & edm::RootTree::entryNumberForIndex | ( | unsigned int | index | ) | const |
Definition at line 113 of file RootTree.cc.
References cms::cuda::assert(), and entryNumberForIndex_.
Referenced by edm::RootDelayedReader::getProduct_(), and edm::FullProvenanceReader::readProvenance().
|
inline |
Definition at line 141 of file RootTree.h.
References auxBranch_, entryNumber_, and getEntry().
Referenced by edm::RootFile::fillLumiAuxiliary(), edm::RootFile::fillRunAuxiliary(), edm::RootFile::fillThisEventAuxiliary(), and edm::RootFileEventFinder::getEventNumberOfEntry().
|
inline |
Definition at line 147 of file RootTree.h.
References MicroEventContent_cff::branch, entryNumber_, and getEntry().
Referenced by edm::RootFile::fillEventHistory(), and edm::RootFile::fillEventToProcessBlockIndexes().
|
inline |
Definition at line 164 of file RootTree.h.
References MicroEventContent_cff::branch, entryNumber(), and getEntry().
|
inline |
Definition at line 153 of file RootTree.h.
References MicroEventContent_cff::branch, entryNumber(), edm::roottree::getEntry(), and metaTree_.
Referenced by edm::FullProvenanceReader::readProvenance().
void edm::RootTree::getEntry | ( | TBranch * | branch, |
EntryNumber | entry | ||
) | const |
Definition at line 382 of file RootTree.cc.
References MicroEventContent_cff::branch, utilities::cache(), MillePedeFileConverter_cfg::e, entryNumber(), cppFunctionSkipper::exception, filePtr_, edm::errors::FileReadError, selectCache(), AlCaHLTBitMon_QueryRunRegistry::string, and submitPVValidationJobs::t.
Referenced by fillAux(), fillBranchEntry(), and edm::RootDelayedReader::getProduct_().
void edm::RootTree::init | ( | std::string const & | productTreeName, |
unsigned int | maxVirtualSize, | ||
unsigned int | cacheSize | ||
) |
Definition at line 78 of file RootTree.cc.
References branchType_, entries_, Exception, filePtr_, edm::InEvent, learningEntries_, setCacheSize(), setTreeMaxVirtualSize(), trainedSet_, tree_, treeAutoFlush_, and triggerSet_.
Referenced by RootTree().
void edm::RootTree::insertEntryForIndex | ( | unsigned int | index | ) |
Definition at line 118 of file RootTree.cc.
References cms::cuda::assert(), and entryNumber().
Referenced by edm::RootFile::readCurrentEvent(), edm::RootFile::readLuminosityBlock_(), edm::RootFile::readProcessBlock_(), and edm::RootFile::readRun_().
bool edm::RootTree::isValid | ( | void | ) | const |
Definition at line 123 of file RootTree.cc.
References auxBranch_, branchEntryInfoBranch_, branchType_, entries_, infoTree_, edm::InProcess, metaTree_, and tree_.
Referenced by ntupleDataFormat._Object::_checkIsValid(), addBranch(), edm::RootFile::fillIndexIntoFile(), edm::RootFile::readLuminosityBlock_(), edm::RootFile::readLuminosityBlockAuxiliary_(), edm::RootFile::readRun_(), edm::RootFile::readRunAuxiliary_(), core.AutoHandle.AutoHandle::ReallyLoad(), setPresence(), and edm::RootFile::validateFile().
|
inline |
Definition at line 171 of file RootTree.h.
References metaTree_.
Referenced by edm::RootFile::createFileBlock(), and edm::RootFile::updateFileBlock().
|
inline |
|
inline |
Definition at line 124 of file RootTree.h.
References entries_, and entryNumber_.
Referenced by edm::RootFile::fillIndexIntoFile(), and edm::RootFile::initializeDuplicateChecker().
bool edm::RootTree::nextWithCache | ( | ) |
Definition at line 211 of file RootTree.cc.
References entries_, entryNumber_, and setEntryNumber().
Referenced by edm::RootFile::nextEventEntry().
|
inline |
Definition at line 118 of file RootTree.h.
References branches_, and edm::roottree::BranchMap::reserve().
|
inline |
Definition at line 185 of file RootTree.h.
References processName_.
Referenced by edm::RootFile::readProcessBlock_(), and RootTree().
DelayedReader * edm::RootTree::resetAndGetRootDelayedReader | ( | ) | const |
Definition at line 142 of file RootTree.cc.
References rootDelayedReader_.
Referenced by edm::RootFile::readCurrentEvent(), edm::RootFile::readLuminosityBlock_(), edm::RootFile::readProcessBlock_(), and edm::RootFile::readRun_().
|
inline |
Definition at line 182 of file RootTree.h.
References trainNow_.
Referenced by edm::RootFile::RootFile().
|
inline |
Definition at line 128 of file RootTree.h.
References entryNumber_.
Referenced by edm::RootFile::rewind().
|
inline |
Definition at line 129 of file RootTree.h.
References entryNumber_, and edm::IndexIntoFile::invalidEntry.
DelayedReader * edm::RootTree::rootDelayedReader | ( | ) | const |
Definition at line 147 of file RootTree.cc.
References rootDelayedReader_.
|
inline |
Definition at line 364 of file RootTree.cc.
References MicroEventContent_cff::branch, checkTriggerCache(), entryNumber(), rawTreeCache_, trainedSet_, and treeCache_.
Referenced by getEntry().
|
private |
Definition at line 196 of file RootTree.cc.
References cacheSize_, enablePrefetching_, filePtr_, rawTreeCache_, tree_, and treeCache_.
Referenced by init().
void edm::RootTree::setEntryNumber | ( | EntryNumber | theEntryNumber | ) |
Definition at line 219 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::RootFileEventFinder::getEventNumberOfEntry(), edm::RootFile::initializeDuplicateChecker(), nextWithCache(), edm::RootFile::readLuminosityBlock_(), edm::RootFile::readLuminosityBlockAuxiliary_(), edm::RootFile::readRunAuxiliary_(), edm::RootFile::setAtEventEntry(), edm::RootFile::setEntryAtEvent(), edm::RootFile::setEntryAtLumi(), and edm::RootFile::setEntryAtRun().
void edm::RootTree::setPresence | ( | BranchDescription & | prod, |
std::string const & | oldBranchName | ||
) |
Definition at line 149 of file RootTree.cc.
References cms::cuda::assert(), isValid(), dumpMFGeometry_cfg::prod, 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 520 of file RootTree.cc.
References rootDelayedReader_.
Referenced by edm::RootFile::setSignals().
|
private |
bool edm::RootTree::skipEntries | ( | unsigned int & | offset | ) |
Definition at line 410 of file RootTree.cc.
References entries_, entryNumber_, and hltrates_dqm_sourceclient-live_cfg::offset.
Referenced by edm::RootFile::skipEntries().
|
private |
Definition at line 425 of file RootTree.cc.
References cms::cuda::assert(), edm::poolNames::branchListIndexesBranchName(), branchType_, edm::BranchTypeToAuxiliaryBranchName(), cacheSize_, entryNumber_, filePtr_, edm::InEvent, learningEntries_, rawTreeCache_, switchOverEntry_, trainedSet_, tree_, treeCache_, and triggerSet_.
Referenced by setEntryNumber().
|
private |
Definition at line 462 of file RootTree.cc.
References filePtr_, rawTreeCache_, and treeCache_.
Referenced by setEntryNumber().
void edm::RootTree::trainCache | ( | char const * | branchNames | ) |
Definition at line 490 of file RootTree.cc.
References cms::cuda::assert(), MicroEventContent_cff::branch, branches(), branchNames(), branchType_, cacheSize_, filePtr_, mps_fire::i, edm::InEvent, trainedSet_, tree_, and treeCache_.
Referenced by edm::RootFile::RootFile().
|
inline |
Definition at line 169 of file RootTree.h.
References tree_.
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(), python.cmstools.EventTree::SetAlias(), and edm::RootFile::updateFileBlock().
|
inline |
Definition at line 170 of file RootTree.h.
References tree_.
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 205 of file RootTree.h.
Referenced by close(), fillAux(), isValid(), and RootTree().
|
private |
Definition at line 234 of file RootTree.h.
Referenced by branchEntryInfoBranch(), close(), isValid(), and RootTree().
|
private |
Definition at line 220 of file RootTree.h.
Referenced by addBranch(), branches(), and numberOfBranchesToAdd().
|
private |
Definition at line 219 of file RootTree.h.
Referenced by addBranch(), and branchNames().
|
private |
Definition at line 203 of file RootTree.h.
Referenced by branchType(), init(), isValid(), RootTree(), startTraining(), and trainCache().
|
private |
Definition at line 226 of file RootTree.h.
Referenced by setCacheSize(), startTraining(), and trainCache().
|
private |
Definition at line 230 of file RootTree.h.
Referenced by setCacheSize().
|
private |
Definition at line 231 of file RootTree.h.
Referenced by checkTriggerCache().
|
private |
Definition at line 216 of file RootTree.h.
Referenced by entries(), init(), isValid(), next(), nextWithCache(), setEntryNumber(), and skipEntries().
|
private |
Definition at line 217 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), entryNumber(), fillAux(), fillBranchEntry(), next(), nextWithCache(), rewind(), rewindToInvalid(), setEntryNumber(), skipEntries(), and startTraining().
|
private |
Definition at line 218 of file RootTree.h.
Referenced by entryNumberForIndex().
|
private |
Definition at line 197 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), close(), getEntry(), init(), RootTree(), setCacheSize(), setEntryNumber(), startTraining(), stopTraining(), and trainCache().
|
private |
Definition at line 236 of file RootTree.h.
Referenced by close(), isValid(), and RootTree().
|
private |
Definition at line 225 of file RootTree.h.
Referenced by init(), and startTraining().
|
private |
Definition at line 202 of file RootTree.h.
Referenced by close(), fillBranchEntryMeta(), isValid(), metaTree(), and RootTree().
|
mutableprivate |
Definition at line 224 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), and setEntryNumber().
|
private |
Definition at line 204 of file RootTree.h.
Referenced by processName(), and RootTree().
|
private |
Definition at line 210 of file RootTree.h.
Referenced by close(), selectCache(), setCacheSize(), setEntryNumber(), startTraining(), and stopTraining().
|
mutableprivate |
Definition at line 223 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), and setEntryNumber().
|
mutableprivate |
Definition at line 213 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), close(), and setEntryNumber().
|
private |
Definition at line 232 of file RootTree.h.
Referenced by resetAndGetRootDelayedReader(), rootDelayedReader(), and setSignals().
|
private |
Definition at line 222 of file RootTree.h.
Referenced by setEntryNumber(), and startTraining().
|
mutableprivate |
Definition at line 214 of file RootTree.h.
Referenced by checkTriggerCache(), checkTriggerCacheImpl(), init(), selectCache(), setEntryNumber(), startTraining(), and trainCache().
|
private |
Definition at line 221 of file RootTree.h.
Referenced by resetTraining(), and setEntryNumber().
|
private |
Definition at line 201 of file RootTree.h.
Referenced by addBranch(), checkTriggerCacheImpl(), close(), dropBranch(), init(), isValid(), RootTree(), setCacheSize(), setEntryNumber(), setPresence(), setTreeMaxVirtualSize(), startTraining(), trainCache(), and tree().
|
private |
Definition at line 227 of file RootTree.h.
Referenced by init(), and setEntryNumber().
|
private |
Definition at line 209 of file RootTree.h.
Referenced by checkTriggerCache(), close(), selectCache(), setCacheSize(), setEntryNumber(), startTraining(), stopTraining(), and trainCache().
|
mutableprivate |
Definition at line 215 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), init(), setEntryNumber(), and startTraining().
|
mutableprivate |
Definition at line 212 of file RootTree.h.
Referenced by checkTriggerCacheImpl(), close(), and setEntryNumber().