#ifndef ROOT_TBasket #define ROOT_TBasket //+SEQ,CopyRight,T=NOINCLUDE. ////////////////////////////////////////////////////////////////////////// // // // TBasket // // // // The TBasket objects are created at run time to collect TTree events // // 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 TBasket; class TBranch; class TLeaf; class TBasket : public TKey { protected: Int_t fBufferSize; //fBuffer length in bytes Int_t fNevBufSize; //Length in Int_t of fEventOffset Int_t fNevBuf; //Number of events 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 *fEventOffset; //Offset of events 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 *GetEventOffset() {return fEventOffset;} virtual Int_t GetEventPointer(Int_t event); 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 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,1) //the TBranch event buffers }; #endif