12 #ifndef ROOT_TFileCacheRead 13 #define ROOT_TFileCacheRead Int_t fNtot
Total size of prefetched blocks.
Long64_t * fBSeek
[fBNseek]
TFile * fFile
Pointer to file.
char * fBuffer
[fBufferSize] buffer of contiguous prefetched blocks
virtual void SetEnablePrefetching(Bool_t setPrefetching=kFALSE)
Set the prefetching mode of this file.
virtual Int_t GetNoCacheReadCalls() const
A cache when reading files over the network.
virtual void SecondSort()
Sort buffers to be prefetched in increasing order of positions.
virtual Bool_t IsLearning() const
void SetEnablePrefetchingImpl(Bool_t setPrefetching=kFALSE)
TFileCacheRead implementation of SetEnablePrefetching.
Int_t fBufferSize
Allocated size of fBuffer (at a given time)
virtual Int_t AddBranch(TBranch *, Bool_t=kFALSE)
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Long64_t fPrefetchedBlocks
Number of blocks prefetched.
virtual void Sort()
Sort buffers to be prefetched in increasing order of positions.
Bool_t fIsSorted
True if fSeek array is sorted.
virtual void Prefetch(Long64_t pos, Int_t len)
Add block of length len at position pos in the list of blocks to be prefetched.
virtual Long64_t GetBytesReadExtra() const
Int_t fReadCalls
Number of read calls for this cache.
virtual ~TFileCacheRead()
Destructor.
virtual TFilePrefetch * GetPrefetchObj()
#define ClassDef(name, id)
virtual void SecondPrefetch(Long64_t, Int_t)
Int_t * fBSeekPos
[fBNseek]
virtual void Print(Option_t *option="") const
Print cache statistics.
Long64_t * fBSeekSort
[fBNseek]
Int_t * fSeekLen
[fNseek] Length of buffers to be prefetched
Bool_t fIsTransferred
True when fBuffer contains something valid.
virtual Bool_t IsEnablePrefetching() const
Long64_t GetPrefetchedBlocks() const
Int_t fBufferLen
Current buffer length (<= fBufferSize)
Long64_t fBytesRead
Number of bytes read for this cache.
Int_t * fBSeekSortLen
[fBNseek]
TFileCacheRead & operator=(const TFileCacheRead &)
virtual Int_t ReadBufferExt(char *buf, Long64_t pos, Int_t len, Int_t &loc)
Int_t * fBSeekIndex
[fBNseek]
TFileCacheRead()
Default Constructor.
virtual Int_t ReadBufferExtNormal(char *buf, Long64_t pos, Int_t len, Int_t &loc)
Base function for ReadBuffer.
Int_t fSeekSize
Allocated size of fSeek.
virtual Bool_t IsAsyncReading() const
virtual Long64_t GetBytesRead() const
virtual void AddNoCacheReadCalls(Int_t reads)
Int_t * fSeekIndex
[fNseek] sorted index table of fSeek
virtual void SetFile(TFile *file, TFile::ECacheAction action=TFile::kDisconnect)
Set the file using this cache and reset the current blocks (if any).
Long64_t fBytesReadExtra
Number of extra bytes (overhead) read by the readahead buffer.
Long64_t fNoCacheBytesRead
Number of bytes read by basket to fill cached tree.
virtual Int_t SetBufferSize(Int_t buffersize)
Sets the buffer size.
Long64_t * fPos
[fNb] start of long buffers
Int_t * fBSeekLen
[fBNseek]
Int_t fNb
Number of long buffers.
virtual Long64_t GetNoCacheBytesRead() const
Int_t fBufferSizeMin
Original size of fBuffer.
virtual void WaitFinishPrefetch()
virtual Int_t GetBufferSize() const
The prefetching mechanism uses two classes (TFilePrefetch and TFPBlock) to prefetch in advance a bloc...
Int_t * fSeekPos
[fNseek] Position of sorted blocks in fBuffer
Mother of all ROOT objects.
virtual Int_t GetUnzipBuffer(char **, Long64_t, Int_t, Bool_t *)
Long64_t * fSeekSort
[fNseek] Position on file of buffers to be prefetched (sorted)
virtual Int_t ReadBufferExtPrefetch(char *buf, Long64_t pos, Int_t len, Int_t &loc)
prefetch the first block
Bool_t fEnablePrefetching
reading by prefetching asynchronously
virtual Int_t AddBranch(const char *, Bool_t=kFALSE)
virtual void SetSkipZip(Bool_t=kTRUE)
TFilePrefetch * fPrefetch
! Object that does the asynchronous reading in another thread
Int_t * fLen
[fNb] Length of long buffers
virtual Int_t GetReadCalls() const
Long64_t * fSeek
[fNseek] Position on file of buffers to be prefetched
virtual Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len)
Read buffer at position pos.
virtual void Close(Option_t *option="")
Close out any threads or asynchronous fetches used by the underlying implementation.
A TTree is a list of TBranches.
Int_t * fSeekSortLen
[fNseek] Length of buffers to be prefetched (sorted)
Int_t fNoCacheReadCalls
Number of read calls by basket to fill cached tree.
Int_t fNseek
Number of blocks to be prefetched.
virtual void AddNoCacheBytesRead(Long64_t len)
ECacheAction
TTreeCache flushing semantics.