|
|
Go to the documentation of this file. 1 #ifndef IOPool_Input_RootTree_h
2 #define IOPool_Input_RootTree_h
24 #include <unordered_set>
25 #include <unordered_map>
34 class RootDelayedReader;
39 class ModuleCallingContext;
41 namespace signalslot {
77 auto itFound =
map_.find(iKey.
id());
78 if (itFound ==
map_.end()) {
81 return &itFound->second;
84 auto itFound =
map_.find(iKey.
id());
85 if (itFound ==
map_.end()) {
88 return &itFound->second;
92 std::unordered_map<unsigned int, BranchInfo>
map_;
99 unsigned int cacheSize,
100 char const* branchNames);
107 RootTree(std::shared_ptr<InputFile> filePtr,
109 unsigned int nIndexes,
110 unsigned int maxVirtualSize,
111 unsigned int cacheSize,
112 unsigned int learningEntries,
113 bool enablePrefetching,
130 bool current()
const {
return entryNumber_ < entries_ && entryNumber_ >= 0; }
143 template <
typename T>
148 template <
typename T>
152 branch->SetAddress(&pbuf);
155 fillBranchEntry<T>(
branch, pbuf);
159 template <
typename T>
161 branch->SetAddress(&pbuf);
165 template <
typename T>
169 branch->SetAddress(&pbuf);
176 template <
typename T>
178 branch->SetAddress(&pbuf);
std::shared_ptr< TTreeCache > triggerTreeCache_
TTree const * tree() const
unsigned long treeAutoFlush_
void reserve(size_t iSize)
void addBranch(BranchDescription const &prod, std::string const &oldBranchName)
void trainCache(char const *branchNames)
void setEntryNumber(EntryNumber theEntryNumber)
DelayedReader * rootDelayedReader() const
roottree::EntryNumber EntryNumber
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
std::unordered_map< unsigned int, BranchInfo > map_
BranchMap const & branches() const
BranchInfo const * find(BranchID const &iKey) const
std::unordered_set< TBranch * > trainedSet_
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
void fillBranchEntryMeta(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
std::shared_ptr< TTreeCache > rawTreeCache_
TTreeCache * checkTriggerCacheImpl(TBranch *branch, EntryNumber entryNumber) const
void setCacheSize(unsigned int cacheSize)
RootTree & operator=(RootTree const &)=delete
BranchInfo * find(BranchID const &iKey)
void numberOfBranchesToAdd(size_t iSize)
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)
TBranch * branchEntryInfoBranch_
std::unique_ptr< std::vector< EntryNumber > > entryNumberForIndex_
IndexIntoFile::EntryNumber_t EntryNumber
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::vector< std::string > branchNames_
void fillBranchEntry(TBranch *branch, T *&pbuf)
unsigned const int defaultCacheSize
std::unordered_set< TBranch * > triggerSet_
DelayedReader * resetAndGetRootDelayedReader() const
void getEntry(TBranch *branch, EntryNumber entry) const
TBranch * provenanceBranch_
void dropBranch(std::string const &oldBranchName)
unsigned const int defaultLearningEntries
TTreeCache * checkTriggerCache(TBranch *branch, EntryNumber entryNumber) const
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
EntryNumber const & entries() const
TBranch * branchEntryInfoBranch() const
BranchInfo(BranchDescription const &prod)
EntryNumber rawTriggerSwitchOverEntry_
void insert(edm::BranchID const &iKey, BranchInfo const &iInfo)
bool performedSwitchOver_
void fillBranchEntryMeta(TBranch *branch, T *&pbuf)
BranchType branchType() const
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
std::shared_ptr< TTreeCache > treeCache_
roottree::BranchMap BranchMap
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)