library: libTree #include "TTreeCache.h" |
TTreeCache() | |
TTreeCache(TTree* tree, Int_t buffersize = 0) | |
virtual | ~TTreeCache() |
void | TObject::AbstractMethod(const char* method) const |
void | AddBranch(TBranch* b) |
virtual void | TObject::AppendPad(Option_t* option = "") |
virtual void | TObject::Browse(TBrowser* b) |
static TClass* | Class() |
virtual const char* | TObject::ClassName() const |
virtual void | TObject::Clear(Option_t* = "") |
virtual TObject* | TObject::Clone(const char* newname = "") const |
virtual Int_t | TObject::Compare(const TObject* obj) const |
virtual void | TObject::Copy(TObject& object) const |
virtual void | TObject::Delete(Option_t* option = "") |
virtual Int_t | TObject::DistancetoPrimitive(Int_t px, Int_t py) |
virtual void | TObject::Draw(Option_t* option = "") |
virtual void | TObject::DrawClass() const |
virtual TObject* | TObject::DrawClone(Option_t* option = "") const |
virtual void | TObject::Dump() const |
virtual void | TObject::Error(const char* method, const char* msgfmt) const |
virtual void | TObject::Execute(const char* method, const char* params, Int_t* error = 0) |
virtual void | TObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0) |
virtual void | TObject::ExecuteEvent(Int_t event, Int_t px, Int_t py) |
virtual void | TObject::Fatal(const char* method, const char* msgfmt) const |
Bool_t | FillBuffer() |
virtual TObject* | TObject::FindObject(const char* name) const |
virtual TObject* | TObject::FindObject(const TObject* obj) const |
virtual Option_t* | TObject::GetDrawOption() const |
static Long_t | TObject::GetDtorOnly() |
Double_t | GetEfficiency() |
Double_t | GetEfficiencyRel() |
virtual const char* | TObject::GetIconName() const |
static Int_t | GetLearnEntries() |
virtual const char* | TObject::GetName() const |
virtual char* | TObject::GetObjectInfo(Int_t px, Int_t py) const |
static Bool_t | TObject::GetObjectStat() |
virtual Option_t* | TObject::GetOption() const |
virtual const char* | TObject::GetTitle() const |
TTree* | GetTree() const |
virtual UInt_t | TObject::GetUniqueID() const |
virtual Bool_t | TObject::HandleTimer(TTimer* timer) |
virtual ULong_t | TObject::Hash() const |
virtual void | TObject::Info(const char* method, const char* msgfmt) const |
virtual Bool_t | TObject::InheritsFrom(const char* classname) const |
virtual Bool_t | TObject::InheritsFrom(const TClass* cl) const |
virtual void | TObject::Inspect() const |
void | TObject::InvertBit(UInt_t f) |
virtual TClass* | IsA() const |
virtual Bool_t | TObject::IsEqual(const TObject* obj) const |
virtual Bool_t | TObject::IsFolder() const |
Bool_t | IsLearning() const |
Bool_t | TObject::IsOnHeap() const |
virtual Bool_t | TObject::IsSortable() const |
Bool_t | TObject::IsZombie() const |
virtual void | TObject::ls(Option_t* option = "") const |
void | TObject::MayNotUse(const char* method) const |
virtual Bool_t | TObject::Notify() |
static void | TObject::operator delete(void* ptr) |
static void | TObject::operator delete(void* ptr, void* vp) |
static void | TObject::operator delete[](void* ptr) |
static void | TObject::operator delete[](void* ptr, void* vp) |
void* | TObject::operator new(size_t sz) |
void* | TObject::operator new(size_t sz, void* vp) |
void* | TObject::operator new[](size_t sz) |
void* | TObject::operator new[](size_t sz, void* vp) |
virtual void | TObject::Paint(Option_t* option = "") |
virtual void | TObject::Pop() |
virtual void | TFileCacheRead::Prefetch(Long64_t pos, Int_t len) |
virtual void | TFileCacheRead::Print(Option_t* option = "") const |
virtual Int_t | TObject::Read(const char* name) |
virtual Int_t | ReadBuffer(char* buf, Long64_t pos, Int_t len) |
virtual void | TObject::RecursiveRemove(TObject* obj) |
void | TObject::ResetBit(UInt_t f) |
virtual void | TObject::SaveAs(const char* filename = "", Option_t* option = "") const |
virtual void | TObject::SavePrimitive(ostream& out, Option_t* option = "") |
void | TObject::SetBit(UInt_t f) |
void | TObject::SetBit(UInt_t f, Bool_t set) |
virtual void | TObject::SetDrawOption(Option_t* option = "") |
static void | TObject::SetDtorOnly(void* obj) |
void | SetEntryRange(Long64_t emin, Long64_t emax) |
virtual void | TFileCacheRead::SetFile(TFile* file) |
static void | SetLearnEntries(Int_t n = 100) |
static void | TObject::SetObjectStat(Bool_t stat) |
virtual void | TObject::SetUniqueID(UInt_t uid) |
virtual void | ShowMembers(TMemberInspector& insp, char* parent) |
virtual void | TFileCacheRead::Sort() |
virtual void | Streamer(TBuffer& b) |
void | StreamerNVirtual(TBuffer& b) |
virtual void | TObject::SysError(const char* method, const char* msgfmt) const |
Bool_t | TObject::TestBit(UInt_t f) const |
Int_t | TObject::TestBits(UInt_t f) const |
void | UpdateBranches(TTree* tree) |
virtual void | TObject::UseCurrentStyle() |
virtual void | TObject::Warning(const char* method, const char* msgfmt) const |
virtual Int_t | TObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) |
virtual Int_t | TObject::Write(const char* name = "0", Int_t option = 0, Int_t bufsize = 0) const |
virtual void | TObject::DoError(int level, const char* location, const char* fmt, va_list va) const |
void | TObject::MakeZombie() |
TTreeCache(const TTreeCache&) | |
TTreeCache& | operator=(const TTreeCache&) |
enum TObject::EStatusBits { | kCanDelete | |
kMustCleanup | ||
kObjInCanvas | ||
kIsReferenced | ||
kHasUUID | ||
kCannotPick | ||
kNoContextMenu | ||
kInvalidObject | ||
}; | ||
enum TObject::[unnamed] { | kIsOnHeap | |
kNotDeleted | ||
kZombie | ||
kBitMask | ||
kSingleKey | ||
kOverwrite | ||
kWriteDelete | ||
}; |
Long64_t | fEntryMin | ! first entry in the cache |
Long64_t | fEntryMax | ! last entry in the cache |
Long64_t | fEntryNext | ! next entry number where cache must be filled |
Long64_t | fZipBytes | ! Total compressed size of branches in cache |
Int_t | fNbranches | ! Number of branches in the cache |
Int_t | fNReadOk | Number of blocks read and found in the cache |
Int_t | fNReadMiss | Number of blocks read and not found in the chache |
Int_t | fNReadPref | Number of blocks that were prefetched |
TBranch** | fBranches | ! [fNbranches] List of branches to be stored in the cache |
TList* | fBrNames | ! list of branch names in the cache |
TTree* | fOwner | ! pointer to the owner Tree/chain |
TTree* | fTree | ! pointer to the current Tree |
Bool_t | fIsLearning | ! true if cache is in learning mode |
static Int_t | fgLearnEntries | Number of entries used for learning mode |
Int_t | TFileCacheRead::fBufferSizeMin | Original size of fBuffer |
Int_t | TFileCacheRead::fBufferSize | Allocated size of fBuffer (at a given time) |
Int_t | TFileCacheRead::fBufferLen | Current buffer length (<= fBufferSize) |
Int_t | TFileCacheRead::fNseek | Number of blocks to be prefetched |
Int_t | TFileCacheRead::fNtot | Total size of prefetched blocks |
Int_t | TFileCacheRead::fNb | Number of long buffers |
Int_t | TFileCacheRead::fSeekSize | Allocated size of fSeek |
Long64_t* | TFileCacheRead::fSeek | [fNseek] Position on file of buffers to be prefetched |
Long64_t* | TFileCacheRead::fSeekIndex | [fNseek] sorted index table of fSeek |
Long64_t* | TFileCacheRead::fSeekSort | [fNseek] Position on file of buffers to be prefetched (sorted) |
Long64_t* | TFileCacheRead::fPos | [fNb] start of long buffers |
Int_t* | TFileCacheRead::fSeekLen | [fNseek] Length of buffers to be prefetched |
Int_t* | TFileCacheRead::fSeekSortLen | [fNseek] Length of buffers to be prefetched (sorted) |
Int_t* | TFileCacheRead::fSeekPos | [fNseek] Position of sorted blocks in fBuffer |
Int_t* | TFileCacheRead::fLen | [fNb] Length of long buffers |
TFile* | TFileCacheRead::fFile | Pointer to file |
char* | TFileCacheRead::fBuffer | [fBufferSize] buffer of contiguous prefetched blocks |
Bool_t | TFileCacheRead::fIsSorted | True if fSeek array is sorted |
TTreeCache A specialized TFileCacheRead object for a TTree This class acts as a file cache, registering automatically the baskets from the branches being processed (TTree::Draw or TTree::Process and TSelectors) when in the learning phase. The learning phase is by default 100 entries. It can be changed via TTreeCache::SetLearnEntries. This cache speeds-up considerably the performance, in particular when the Tree is accessed remotely via a high latency network. The default cache size (10 Mbytes) may be changed via the function TTreeCache::SetCacheSize Only the baskets for the requested entry range are put in the cache For each Tree being processed a TTreeCache object is created. This object is automatically deleted when the Tree is deleted or when the file is deleted. -Special case of a TChain Once the training is done on the first Tree, the list of branches in the cache is kept for the following files. -Special case of a TEventlist if the Tree or TChain has a TEventlist, only the buffers referenced by the list are put in the cache.
add a branch to the list of branches to be stored in the cache this function is called by TBranch::GetBasket
Give the total efficiency of the cache... defined as the ratio of blocks found in the cache vs. the number of blocks prefetched ( it could be more than 1 if we read the same block from the cache more than once ) Note: This should eb used at the end of the processing or we will get uncomplete stats
This will indicate a sort of relative efficiency... a ratio of the reads found in the cache to the number of reads so far
static function returning the number of entries used to train the cache see SetLearnEntries
Read buffer at position pos. If pos is in the list of prefetched blocks read from fBuffer, then try to fill the cache from the list of selected branches, otherwise normal read from file. Returns -1 in case of read failure, 0 in case not in cache and 1 in case read from cache. This function overloads TFileCacheRead::ReadBuffer.
Set the minimum and maximum entry number to be processed this information helps to optimize the number of baskets to read when prefetching the branch buffers.
Static function to set the number of entries to be used in learning mode The default value for n is 10. n must be >= 1
update pointer to current Tree and recompute pointers to the branches in the cache