File indexing completed on 2025-01-18 10:11:45
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TFileCacheWrite
0013 #define ROOT_TFileCacheWrite
0014
0015 #include "TObject.h"
0016
0017 class TFile;
0018
0019 class TFileCacheWrite : public TObject {
0020
0021 protected:
0022 Long64_t fSeekStart;
0023 Int_t fBufferSize;
0024 Int_t fNtot;
0025 TFile *fFile;
0026 char *fBuffer;
0027 Bool_t fRecursive;
0028
0029 private:
0030 TFileCacheWrite(const TFileCacheWrite &) = delete;
0031 TFileCacheWrite& operator=(const TFileCacheWrite &) = delete;
0032
0033 public:
0034 TFileCacheWrite();
0035 TFileCacheWrite(TFile *file, Int_t buffersize);
0036 ~TFileCacheWrite() override;
0037 virtual Bool_t Flush();
0038 virtual Int_t GetBytesInCache() const { return fNtot; }
0039 void Print(Option_t *option="") const override;
0040 virtual Int_t ReadBuffer(char *buf, Long64_t pos, Int_t len);
0041 virtual Int_t WriteBuffer(const char *buf, Long64_t pos, Int_t len);
0042 virtual void SetFile(TFile *file);
0043
0044 ClassDefOverride(TFileCacheWrite,1)
0045 };
0046
0047 #endif