library: libCore
#include "TFilePrefetch.h"

TFilePrefetch


class description - source file - inheritance tree (.pdf)

class TFilePrefetch : public TObject

Inheritance Chart:
TObject
<-
TFilePrefetch
<-
TTreeFilePrefetch

    protected:
TFilePrefetch(const TFilePrefetch&) TFilePrefetch& operator=(const TFilePrefetch&) public:
TFilePrefetch() TFilePrefetch(TFile* file, Int_t buffersize) virtual ~TFilePrefetch() static TClass* Class() virtual TClass* IsA() const virtual void Prefetch(Long64_t pos, Int_t len) virtual void Print(Option_t* option = "") const virtual Bool_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)

Data Members


    protected:
Int_t fBufferSize Allocated size of fBuffer 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

Class Description


TFilePrefetch() : TObject()
 Default Constructor.

TFilePrefetch(TFile *file, Int_t buffersize) : TObject()
 Creates a TFilePrefetch data structure.

TFilePrefetch(const TFilePrefetch &pf) : TObject(pf)
 Copy Constructor.

~TFilePrefetch()
 Destructor.

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.

void Print(Option_t *option) const
 Print class internal structure.

Bool_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 normal read from file. Returns kTRUE in case of failure.

void SetFile(TFile *file)
set the file using this cache

void Sort()
 Sort buffers to be prefetched in increasing order of positions.
 Merge consecutive blocks if necessary.



Inline Functions


        TFilePrefetch& operator=(const TFilePrefetch&)
               TClass* Class()
               TClass* IsA() const
                  void ShowMembers(TMemberInspector& insp, char* parent)
                  void Streamer(TBuffer& b)
                  void StreamerNVirtual(TBuffer& b)


Author: Rene Brun 18/05/2006
Last update: root/base:$Name: $:$Id: TFilePrefetch.cxx,v 1.5 2006/06/09 11:53:20 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.