library: libCore
#include "TFileCacheWrite.h"

TFileCacheWrite


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

class TFileCacheWrite : public TObject

Inheritance Chart:
TObject
<-
TFileCacheWrite

    protected:
TFileCacheWrite(const TFileCacheWrite&) TFileCacheWrite& operator=(const TFileCacheWrite&) public:
TFileCacheWrite() TFileCacheWrite(TFile* file, Int_t buffersize) virtual ~TFileCacheWrite() static TClass* Class() virtual Bool_t Flush() virtual Int_t GetBytesInCache() const virtual TClass* IsA() const 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 Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual Int_t WriteBuffer(const char* buf, Long64_t pos, Int_t len)

Data Members


    protected:
Long64_t fSeekStart Seek value of first block in cache Int_t fBufferSize Allocated size of fBuffer Int_t fNtot Total size of cached blocks TFile* fFile Pointer to file char* fBuffer [fBufferSize] buffer of contiguous prefetched blocks Bool_t fRecursive flag to avoid recursive calls

Class Description

                                                                      
 TFileCacheWrite : a cache when writing 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 write cache system is used by the classes TNetFile,    
 TRFIOFile and TWebFile.                                              
 The write cache is automativally created when writing a remote file. 
                                                                      

TFileCacheWrite()
 Default Constructor.
TFileCacheWrite(TFile *file, Int_t buffersize)
 Creates a TFileCacheWrite data structure.
 The write cache will be connected to file.
 The size of the cache will be buffersize,
 if buffersize < 10000 a default size of 512 Kbytes is used
TFileCacheWrite(const TFileCacheWrite &pf)
 Copy Constructor.
TFileCacheWrite& operator=(const TFileCacheWrite& pf)
 Assignment.
~TFileCacheWrite()
 Destructor.
Bool_t Flush()
 Flush the current write buffer to the file.
 Returns kTRUE in case of error.
void Print(Option_t *option)
 Print class internal structure.
Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len)
 Called by the read cache to check if the requested data is not
 in the write cache buffer. Returns -1 if data not in write cache,
 0 otherwise.
Int_t WriteBuffer(const char *buf, Long64_t pos, Int_t len)
 Write buffer at position pos in the write buffer.
 The function returns 1 if the buffer has been successfully entered into the write buffer.
 The function returns 0 in case WriteBuffer() was recusively called via Flush().
 The function returns -1 in case of error.
void SetFile(TFile *file)
 Set the file using this cache.
Int_t GetBytesInCache()

Author: Rene Brun 18/05/2006
Last update: root/base:$Name: $:$Id: TFileCacheWrite.cxx,v 1.6 2006/06/30 14:24:48 rdm 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.