library: libCore #include "TFileCacheRead.h" |
TFileCacheRead
class description - header file - source file - inheritance tree (.pdf)
protected:
TFileCacheRead(const TFileCacheRead&)
TFileCacheRead& operator=(const TFileCacheRead&)
public:
TFileCacheRead()
TFileCacheRead(TFile* file, Int_t buffersize)
virtual ~TFileCacheRead()
static TClass* Class()
virtual TClass* IsA() const
virtual void Prefetch(Long64_t pos, Int_t len)
virtual void Print(Option_t* option = "") const
virtual Int_t ReadBuffer(char* buf, Long64_t pos, Int_t len)
virtual void SetFile(TFile* file)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Sort()
virtual void Streamer(TBuffer& b)
void StreamerNVirtual(TBuffer& b)
protected:
Int_t fBufferSizeMin Original size of fBuffer
Int_t fBufferSize Allocated size of fBuffer (at a given time)
Int_t fBufferLen Current buffer length (<= fBufferSize)
Int_t fNseek Number of blocks to be prefetched
Int_t fNtot Total size of prefetched blocks
Int_t fNb Number of long buffers
Int_t fSeekSize Allocated size of fSeek
Long64_t* fSeek [fNseek] Position on file of buffers to be prefetched
Long64_t* fSeekIndex [fNseek] sorted index table of fSeek
Long64_t* fSeekSort [fNseek] Position on file of buffers to be prefetched (sorted)
Long64_t* fPos [fNb] start of long buffers
Int_t* fSeekLen [fNseek] Length of buffers to be prefetched
Int_t* fSeekSortLen [fNseek] Length of buffers to be prefetched (sorted)
Int_t* fSeekPos [fNseek] Position of sorted blocks in fBuffer
Int_t* fLen [fNb] Length of long buffers
TFile* fFile Pointer to file
char* fBuffer [fBufferSize] buffer of contiguous prefetched blocks
Bool_t fIsSorted True if fSeek array is sorted
TFileCacheRead : a cache when reading files on the network
A caching system to speed up network I/O, i.e. when there is
no operating system caching support (like the buffer cache for
local disk I/O). The cache makes sure that every I/O is done with
a (large) fixed length buffer thereby avoiding many small I/O's.
Currently the read cache system is used by the classes TNetFile,
TRFIOFile and TWebFile.
One creates a read cache via TFile::SetCacheRead.
When processing TTree, TChain, a specialized class TTreeCache that
derives from this class is automatically created.
void Prefetch(Long64_t pos, Int_t len)
Add block of length len at position pos in the list of blocks to
be prefetched. If pos <= 0 the current blocks (if any) are reset.
Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len)
Read buffer at position pos.
If pos is in the list of prefetched blocks read from fBuffer,
otherwise need to make a normal read from file. Returns -1 in case of
read error, 0 in case not in cache, 1 in case read from cache.
void Sort()
Sort buffers to be prefetched in increasing order of positions.
Merge consecutive blocks if necessary.
Author: Rene Brun 18/05/2006
Last update: root/base:$Name: $:$Id: TFileCacheRead.cxx,v 1.3 2006/07/04 12:58:09 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
ROOT page - Class index - Class Hierarchy - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.