55 if (bufsize < 10000) bufsize = 512000;
63 if (
gDebug > 0)
Info(
"TFileCacheWrite",
"Creating a write cache with buffersize=%d bytes",bufsize);
96 printf(
"Write cache for file %s\n",
fFile->GetName());
97 printf(
"Size of write cache: %d bytes to be written at %lld\n",
fNtot,
fSeekStart);
128 if (
Flush())
return -1;
131 if (
Flush())
return -1;
136 if (
fFile->WriteBuffer(buf,len))
return -1;
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
long long Long64_t
Portable signed long integer 8 bytes.
const char Option_t
Option string (const char).
Int_t fBufferSize
Allocated size of fBuffer.
Int_t fNtot
Total size of cached blocks.
char * fBuffer
[fBufferSize] buffer of contiguous prefetched blocks
virtual Bool_t Flush()
Flush the current write buffer to the file.
TFile * fFile
Pointer to file.
TFileCacheWrite()
Default Constructor.
~TFileCacheWrite() override
Destructor.
Bool_t fRecursive
flag to avoid recursive calls
void Print(Option_t *option="") const override
Print class internal structure.
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.
virtual void SetFile(TFile *file)
Set the file using this cache.
Long64_t fSeekStart
Seek value of first block in cache.
virtual Int_t WriteBuffer(const char *buf, Long64_t pos, Int_t len)
Write buffer at position pos in the write buffer.
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
virtual void SetCacheWrite(TFileCacheWrite *cache)
Set a pointer to the write cache.
TObject()
TObject constructor.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
void ToLower()
Change string to lower-case.