56 if (buffersize < 10000) buffersize = 512000;
64 if (
gDebug > 0)
Info(
"TFileCacheWrite",
"Creating a write cache with buffersize=%d bytes",buffersize);
98 printf(
"Size of write cache: %d bytes to be written at %lld\n",
fNtot,
fSeekStart);
129 if (
Flush())
return -1;
132 if (
Flush())
return -1;
virtual const char * GetName() const
Returns name of object.
Int_t fNtot
Total size of cached blocks.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
TFileCacheWrite()
Default Constructor.
virtual void Seek(Long64_t offset, ERelativeTo pos=kBeg)
Seek to a specific position in the file. Pos it either kBeg, kCur or kEnd.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
void ToLower()
Change string to lower-case.
char * fBuffer
[fBufferSize] buffer of contiguous prefetched blocks
virtual ~TFileCacheWrite()
Destructor.
virtual Bool_t Flush()
Flush the current write buffer to the file.
virtual Bool_t WriteBuffer(const char *buf, Int_t len)
Write a buffer to the file.
TFile * fFile
Pointer to file.
virtual 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...
Bool_t fRecursive
flag to avoid recursive calls
Mother of all ROOT objects.
virtual Int_t WriteBuffer(const char *buf, Long64_t pos, Int_t len)
Write buffer at position pos in the write buffer.
virtual void Print(Option_t *option="") const
Print class internal structure.
Int_t fBufferSize
Allocated size of fBuffer.
Long64_t fSeekStart
Seek value of first block in cache.
virtual void SetFile(TFile *file)
Set the file using this cache.
virtual void SetCacheWrite(TFileCacheWrite *cache)
Set a pointer to the write cache.
A cache when writing files over the network.