1 #ifndef IOPool_Input_RootTree_h
2 #define IOPool_Input_RootTree_h
23 #include <unordered_set>
32 class RootDelayedReader;
37 class ModuleCallingContext;
39 namespace signalslot {
40 template <
typename T>
class Signal;
63 typedef std::map<BranchKey const, BranchInfo>
BranchMap;
73 RootTree(std::shared_ptr<InputFile> filePtr,
75 unsigned int nIndexes,
76 unsigned int maxVirtualSize,
77 unsigned int cacheSize,
78 unsigned int learningEntries,
79 bool enablePrefetching,
97 bool current()
const {
return entryNumber_ < entries_ && entryNumber_ >= 0;}
109 template <
typename T>
114 template <
typename T>
118 branch->SetAddress(&pbuf);
121 fillBranchEntry<T>(branch, pbuf);
125 template <
typename T>
127 branch->SetAddress(&pbuf);
131 template <
typename T>
135 branch->SetAddress(&pbuf);
142 template <
typename T>
144 branch->SetAddress(&pbuf);
bool current(EntryNumber entry) const
Int_t getEntry(TBranch *branch, EntryNumber entryNumber)
unsigned int const defaultNonEventLearningEntries
unsigned int learningEntries_
TTreeCache * checkTriggerCache(TBranch *branch, EntryNumber entryNumber) const
void addBranch(BranchKey const &key, BranchDescription const &prod, std::string const &oldBranchName)
std::shared_ptr< TTreeCache > rawTriggerTreeCache_
void dropBranch(std::string const &oldBranchName)
void fillBranchEntryMeta(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
std::vector< std::string > branchNames_
std::vector< std::string > const & branchNames() const
std::shared_ptr< TTreeCache > treeCache_
std::shared_ptr< BranchMap > branches_
EntryNumber rawTriggerSwitchOverEntry_
roottree::BranchMap BranchMap
EntryNumber const & entries() const
void setSignals(signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *preEventReadSource, signalslot::Signal< void(StreamContext const &, ModuleCallingContext const &)> const *postEventReadSource)
std::unordered_set< TBranch * > trainedSet_
TBranch * branchEntryInfoBranch_
void setPresence(BranchDescription &prod, std::string const &oldBranchName)
void fillBranchEntryMeta(TBranch *branch, T *&pbuf)
void trainCache(char const *branchNames)
unsigned int const defaultCacheSize
std::unique_ptr< RootDelayedReader > rootDelayedReader_
void setTreeMaxVirtualSize(int treeMaxVirtualSize)
TBranch * branchEntryInfoBranch() const
std::map< BranchKey const, BranchInfo > BranchMap
RootTree & operator=(RootTree const &)=delete
TTree const * metaTree() const
Int_t offsetToWrapperBase_
TTree const * tree() const
void insertEntryForIndex(unsigned int index)
BranchDescription const branchDescription_
TTreeCache * selectCache(TBranch *branch, EntryNumber entryNumber) const
BranchType branchType() const
unsigned long treeAutoFlush_
IndexIntoFile::EntryNumber_t EntryNumber
TTreeCache * checkTriggerCacheImpl(TBranch *branch, EntryNumber entryNumber) const
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
EntryNumber const & entryNumber() const
TBranch * provenanceBranch_
DelayedReader * rootDelayedReader() const
EntryNumber const & entryNumberForIndex(unsigned int index) const
std::shared_ptr< TTreeCache > rawTreeCache_
BranchInfo(BranchDescription const &prod)
void getEntry(TBranch *branch, EntryNumber entry) const
void fillBranchEntry(TBranch *branch, T *&pbuf)
std::shared_ptr< InputFile > filePtr_
void setCacheSize(unsigned int cacheSize)
bool performedSwitchOver_
std::unique_ptr< std::vector< EntryNumber > > entryNumberForIndex_
unsigned int const defaultNonEventCacheSize
bool skipEntries(unsigned int &offset)
std::unordered_set< TBranch * > triggerSet_
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)
BranchMap const & branches() const
std::unique_ptr< TTreeCache > trainCache(TTree *tree, InputFile &file, unsigned int cacheSize, char const *branchNames)
unsigned int const defaultLearningEntries
EntryNumber switchOverEntry_
std::shared_ptr< TTreeCache > triggerTreeCache_
void fillBranchEntry(TBranch *branch, EntryNumber entryNumber, T *&pbuf)
void setEntryNumber(EntryNumber theEntryNumber)
roottree::EntryNumber EntryNumber