00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TBasket
00013 #define ROOT_TBasket
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef ROOT_TKey
00030 #include "TKey.h"
00031 #endif
00032
00033
00034 class TFile;
00035 class TTree;
00036 class TBranch;
00037
00038 class TBasket : public TKey {
00039
00040 private:
00041 TBasket(const TBasket&);
00042 TBasket& operator=(const TBasket&);
00043
00044 protected:
00045 Int_t fBufferSize;
00046 Int_t fNevBufSize;
00047 Int_t fNevBuf;
00048 Int_t fLast;
00049 Bool_t fHeaderOnly;
00050 Int_t *fDisplacement;
00051 Int_t *fEntryOffset;
00052 TBranch *fBranch;
00053 Int_t fCompressedSize;
00054 char *fCompressedBuffer;
00055
00056 public:
00057
00058 TBasket();
00059 TBasket(TDirectory *motherDir);
00060 TBasket(const char *name, const char *title, TBranch *branch);
00061 virtual ~TBasket();
00062
00063 virtual void AdjustSize(Int_t newsize);
00064 virtual void DeleteEntryOffset();
00065 virtual Int_t DropBuffers();
00066 TBranch *GetBranch() const {return fBranch;}
00067 Int_t GetBufferSize() const {return fBufferSize;}
00068 Int_t *GetDisplacement() const {return fDisplacement;}
00069 Int_t *GetEntryOffset() const {return fEntryOffset;}
00070 Int_t GetEntryPointer(Int_t Entry);
00071 Int_t GetNevBuf() const {return fNevBuf;}
00072 Int_t GetNevBufSize() const {return fNevBufSize;}
00073 Int_t GetLast() const {return fLast;}
00074 virtual void MoveEntries(Int_t dentries);
00075 virtual void PrepareBasket(Long64_t ) {};
00076 Int_t ReadBasketBuffers(Long64_t pos, Int_t len, TFile *file);
00077 Int_t ReadBasketBytes(Long64_t pos, TFile *file);
00078 virtual void Reset();
00079
00080 Int_t LoadBasketBuffers(Long64_t pos, Int_t len, TFile *file);
00081 Long64_t CopyTo(TFile *to);
00082
00083 void SetBranch(TBranch *branch) { fBranch = branch; }
00084 void SetNevBufSize(Int_t n) { fNevBufSize=n; }
00085 virtual void SetReadMode();
00086 virtual void SetWriteMode();
00087 inline void Update(Int_t newlast) { Update(newlast,newlast); };
00088 virtual void Update(Int_t newlast, Int_t skipped);
00089 virtual Int_t WriteBuffer();
00090
00091 ClassDef(TBasket,2);
00092 };
00093
00094 #endif