|
|
Go to the documentation of this file. 1 #ifndef IOPool_Input_RootTree_h
2 #define IOPool_Input_RootTree_h
26 #include <unordered_set>
27 #include <unordered_map>
34 class RootDelayedReader;
55 using Map = std::unordered_map<unsigned int, BranchInfo>;
60 auto itFound =
map_.find(iKey.
id());
61 if (itFound ==
map_.end()) {
64 return &itFound->second;
75 unsigned int cacheSize,
76 char const* branchNames);
84 RootTree(std::shared_ptr<InputFile> filePtr,
86 unsigned int nIndexes,
87 unsigned int learningEntries,
88 bool enablePrefetching,
91 RootTree(std::shared_ptr<InputFile> filePtr,
93 unsigned int nIndexes,
94 unsigned int maxVirtualSize,
95 unsigned int cacheSize,
96 unsigned int learningEntries,
97 bool enablePrefetching,
100 RootTree(std::shared_ptr<InputFile> filePtr,
103 unsigned int nIndexes,
104 unsigned int maxVirtualSize,
105 unsigned int cacheSize,
106 unsigned int learningEntries,
107 bool enablePrefetching,
110 void init(
std::string const& productTreeName,
unsigned int maxVirtualSize,
unsigned int cacheSize);
126 bool current()
const {
return entryNumber_ < entries_ && entryNumber_ >= 0; }
140 template <
typename T>
146 template <
typename T>
148 branch->SetAddress(&pbuf);
152 template <
typename T>
156 branch->SetAddress(&pbuf);
163 template <
typename T>
165 branch->SetAddress(&pbuf);
void reserve(Map::size_type iSize)
std::shared_ptr< TTreeCache > triggerTreeCache_
TTree const * tree() const
unsigned long treeAutoFlush_
IndexIntoFile::EntryNumber_t EntryNumber
void addBranch(BranchDescription const &prod, std::string const &oldBranchName)
void trainCache(char const *branchNames)
void setEntryNumber(EntryNumber theEntryNumber)
DelayedReader * rootDelayedReader() const
void fillBranchEntry(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
std::unique_ptr< TTreeCache > trainCache(TTree *tree, InputFile &file, unsigned int cacheSize, char const *branchNames)
unsigned const int defaultNonEventLearningEntries
BranchMap const & branches() const
BranchInfo const * find(BranchID const &iKey) const
RootTree(std::shared_ptr< InputFile > filePtr, BranchType const &branchType, unsigned int nIndexes, unsigned int learningEntries, bool enablePrefetching, InputType inputType)
std::string const & processName() const
std::unordered_set< TBranch * > trainedSet_
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
void fillBranchEntryMeta(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
static constexpr EntryNumber_t invalidEntry
std::shared_ptr< TTreeCache > rawTreeCache_
TTreeCache * checkTriggerCacheImpl(TBranch *branch, EntryNumber entryNumber) const
void setCacheSize(unsigned int cacheSize)
RootTree & operator=(RootTree const &)=delete
void numberOfBranchesToAdd(BranchMap::Map::size_type iSize)
TBranch * branchEntryInfoBranch_
std::unique_ptr< std::vector< EntryNumber > > entryNumberForIndex_
bool skipEntries(unsigned int &offset)
TTree const * metaTree() const
EntryNumber switchOverEntry_
TTreeCache * selectCache(TBranch *branch, EntryNumber entryNumber) const
Int_t offsetToWrapperBase_
std::shared_ptr< InputFile > filePtr_
EntryNumber const & entryNumberForIndex(unsigned int index) const
std::unordered_map< unsigned int, BranchInfo > Map
std::vector< std::string > branchNames_
void fillBranchEntry(TBranch *branch, T *&pbuf)
unsigned const int defaultCacheSize
std::unordered_set< TBranch * > triggerSet_
DelayedReader * resetAndGetRootDelayedReader() const
roottree::BranchMap BranchMap
void getEntry(TBranch *branch, EntryNumber entry) const
void dropBranch(std::string const &oldBranchName)
unsigned const int defaultLearningEntries
TTreeCache * checkTriggerCache(TBranch *branch, EntryNumber entryNumber) const
void init(std::string const &productTreeName, unsigned int maxVirtualSize, unsigned int cacheSize)
std::vector< std::string > const & branchNames() const
void insertEntryForIndex(unsigned int index)
bool current(EntryNumber entry) const
const BranchDescription branchDescription_
unsigned const int defaultNonEventCacheSize
unsigned int learningEntries_
void setTreeMaxVirtualSize(int treeMaxVirtualSize)
EntryNumber const & entryNumber() const
roottree::EntryNumber EntryNumber
EntryNumber const & entries() const
TBranch * branchEntryInfoBranch() const
BranchInfo(BranchDescription const &prod)
EntryNumber rawTriggerSwitchOverEntry_
void insert(edm::BranchID const &iKey, BranchInfo const &iInfo)
bool performedSwitchOver_
BranchType branchType() const
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
std::shared_ptr< TTreeCache > treeCache_
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
std::unique_ptr< RootDelayedReader > rootDelayedReader_
void setPresence(BranchDescription &prod, std::string const &oldBranchName)