12 #ifndef ROOT_TFileCacheRead 
   13 #define ROOT_TFileCacheRead 
   22 class TFileCacheRead : 
public TObject {
 
   25    TFilePrefetch *fPrefetch;         
 
   31    Long64_t       fBytesReadExtra;   
 
   33    Long64_t       fNoCacheBytesRead; 
 
   34    Int_t          fNoCacheReadCalls; 
 
   37    Bool_t         fEnablePrefetching;
 
   54    Bool_t         fIsTransferred;    
 
   55    Long64_t       fPrefetchedBlocks; 
 
   71    Bool_t         fBIsTransferred;
 
   73    void SetEnablePrefetchingImpl(Bool_t setPrefetching = kFALSE); 
 
   76    TFileCacheRead(
const TFileCacheRead &) = 
delete;            
 
   77    TFileCacheRead& operator=(
const TFileCacheRead &) = 
delete;
 
   81    TFileCacheRead(TFile *file, Int_t buffersize, TObject *tree = 
nullptr);
 
   82    virtual ~TFileCacheRead();
 
   83    virtual Int_t       AddBranch(TBranch * , Bool_t  = kFALSE) { 
return 0; }
 
   84    virtual Int_t       AddBranch(
const char * , Bool_t  = kFALSE) { 
return 0; }
 
   85    virtual void        AddNoCacheBytesRead(Long64_t len) { fNoCacheBytesRead += len; }
 
   86    virtual void        AddNoCacheReadCalls(Int_t reads) { fNoCacheReadCalls += reads; }
 
   87    virtual void        Close(Option_t *option=
"");
 
   88    virtual Int_t       GetBufferSize()
 const { 
return fBufferSize; };
 
   89    virtual Long64_t    GetBytesRead()
 const { 
return fBytesRead; }
 
   90    virtual Long64_t    GetNoCacheBytesRead()
 const { 
return fNoCacheBytesRead; }
 
   91    virtual Long64_t    GetBytesReadExtra()
 const { 
return fBytesReadExtra; }
 
   92            TFile      *GetFile()
 const { 
return fFile; }   
 
   93            Int_t       GetNseek()
 const { 
return fNseek; } 
 
   94            Int_t       GetNtot()
 const { 
return fNtot; }   
 
   95    virtual Int_t       GetReadCalls()
 const { 
return fReadCalls; }
 
   96    virtual Int_t       GetNoCacheReadCalls()
 const { 
return fNoCacheReadCalls; }
 
   97    virtual Int_t       GetUnzipBuffer(
char ** , Long64_t , Int_t , Bool_t * ) { 
return -1; }
 
   98            Long64_t    GetPrefetchedBlocks()
 const { 
return fPrefetchedBlocks; }
 
   99    virtual Bool_t      IsAsyncReading()
 const { 
return fAsyncReading; };
 
  100    virtual void        SetEnablePrefetching(Bool_t setPrefetching = kFALSE);
 
  101    virtual Bool_t      IsEnablePrefetching()
 const { 
return fEnablePrefetching; };
 
  102    virtual Bool_t      IsLearning()
 const {
return kFALSE;}
 
  103    virtual Int_t       LearnBranch(TBranch * , Bool_t  = kFALSE) { 
return 0; }
 
  104    virtual void        Prefetch(Long64_t pos, Int_t len);
 
  105    virtual void        Print(Option_t *option=
"") 
const;
 
  106    virtual Int_t       ReadBufferExt(
char *buf, Long64_t pos, Int_t len, Int_t &loc);
 
  107    virtual Int_t       ReadBufferExtNormal(
char *buf, Long64_t pos, Int_t len, Int_t &loc);
 
  108    virtual Int_t       ReadBufferExtPrefetch(
char *buf, Long64_t pos, Int_t len, Int_t &loc);
 
  109    virtual Int_t       ReadBuffer(
char *buf, Long64_t pos, Int_t len);
 
  110    virtual Int_t       SetBufferSize(Int_t buffersize);
 
  111    virtual void        SetFile(TFile *file, TFile::ECacheAction action = TFile::kDisconnect);
 
  112    virtual void        SetSkipZip(Bool_t  = kTRUE) {} 
 
  114    virtual void        SecondSort();                          
 
  115    virtual void        SecondPrefetch(Long64_t, Int_t);       
 
  116    virtual TFilePrefetch* GetPrefetchObj();
 
  117    virtual void        WaitFinishPrefetch();                  
 
  119    ClassDef(TFileCacheRead,2)