#ifndef ROOT_TBasket #define ROOT_TBasket //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // TBasket // // // // The TBasket objects are created at run time to collect TTree entries // // in buffers. When a Basket is full, it is written to the file. // // The Basket is kept in memory if there is enough space. // // (see the fMaxVirtualsize of TTree). // // // // The Basket class derives from TKey. // ////////////////////////////////////////////////////////////////////////// #ifndef ROOT_TKey //*KEEP,TKey. #include "TKey.h" //*KEND. #endif class TTree; class TBranch; class TBasket : public TKey { protected: Int_t fBufferSize; //fBuffer length in bytes Int_t fNevBufSize; //Length in Int_t of fEntryOffset Int_t fNevBuf; //Number of entries in basket Int_t fLast; //Pointer to last used byte in basket Bool_t fWritingBuffer; //True when writing buffer char *fZipBuffer; //Basket compressed buffer (if compression) Int_t *fEntryOffset; //Offset of entries in fBuffer(TKey) TBranch *fBranch; //Pointer to the basket support branch public: TBasket(); TBasket(const Text_t *name, const Text_t *title, TBranch *branch); virtual ~TBasket(); virtual void AdjustSize(Int_t newsize); virtual Int_t DropBuffers(); TBranch *GetBranch() {return fBranch;} virtual Int_t GetBufferSize() {return fBufferSize;} virtual Int_t *GetEntryOffset() {return fEntryOffset;} virtual Int_t GetEntryPointer(Int_t Entry); char *GetZipBuffer() {return fZipBuffer;} virtual Int_t GetNevBuf() {return fNevBuf;} virtual Int_t GetNevBufSize() {return fNevBufSize;} virtual Int_t GetLast() {return fLast;} virtual void Print(Option_t *option=""); virtual void ReadBasketBuffers(); virtual void ReadBasketBuffers(char *buf); virtual void Reset(Option_t *option=""); virtual void SetNevBufSize(Int_t n) {fNevBufSize=n;} virtual void SetReadMode(); virtual void SetWriteMode(); virtual void Update(Int_t newlast); virtual Int_t WriteBuffer(); ClassDef(TBasket,2) //the TBranch buffers }; #endif