#ifndef ROOT_TBranch
#define ROOT_TBranch
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TObjArray
#include "TObjArray.h"
#endif
#ifndef ROOT_TAttFill
#include "TAttFill.h"
#endif
class TTree;
class TBasket;
class TLeaf;
class TBrowser;
class TDirectory;
class TFile;
class TClonesArray;
const Int_t kDoNotProcess = BIT(10);
const Int_t kIsClone = BIT(11);
const Int_t kBranchObject = BIT(12);
const Int_t kBranchAny = BIT(17);
const Int_t kMapObject = kBranchObject | kBranchAny;
class TBranch : public TNamed , public TAttFill {
protected:
enum { kAutoDelete = BIT(15) };
static Int_t fgCount;
Int_t fCompress;
Int_t fBasketSize;
Int_t fEntryOffsetLen;
Int_t fWriteBasket;
Long64_t fEntryNumber;
Int_t fOffset;
Int_t fMaxBaskets;
Int_t fSplitLevel;
Int_t fNleaves;
Int_t fReadBasket;
Long64_t fReadEntry;
Long64_t fEntries;
Long64_t fFirstEntry;
Long64_t fTotBytes;
Long64_t fZipBytes;
TObjArray fBranches;
TObjArray fLeaves;
TObjArray fBaskets;
Int_t fNBasketRAM;
Int_t *fBasketRAM;
Int_t *fBasketBytes;
Long64_t *fBasketEntry;
Long64_t *fBasketSeek;
TTree *fTree;
TBranch *fMother;
TBranch *fParent;
char *fAddress;
TDirectory *fDirectory;
TString fFileName;
TBuffer *fEntryBuffer;
TList *fBrowsables;
Bool_t fSkipZip;
void SetSkipZip(Bool_t skip = kTRUE) { fSkipZip = skip; }
void Init(const char *name, const char *leaflist, Int_t compress);
Int_t WriteBasket(TBasket* basket, Int_t where);
TString GetRealFileName() const;
private:
TBranch(const TBranch&);
TBranch& operator=(const TBranch&);
public:
TBranch();
TBranch(TTree *tree, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
TBranch(TBranch *parent, const char *name, void *address, const char *leaflist, Int_t basketsize=32000, Int_t compress=-1);
virtual ~TBranch();
virtual void AddBasket(TBasket &b, Bool_t ondisk, Long64_t startEntry);
virtual void AddLastBasket(Long64_t startEntry);
virtual void Browse(TBrowser *b);
virtual void DeleteBaskets(Option_t* option="");
virtual void DropBaskets(Option_t *option = "");
void ExpandBasketArrays();
virtual Int_t Fill();
virtual void FillLeaves(TBuffer &b);
virtual TBranch *FindBranch(const char *name);
virtual TLeaf *FindLeaf(const char *name);
Int_t FlushBaskets();
Int_t FlushOneBasket(UInt_t which);
virtual char *GetAddress() const {return fAddress;}
virtual Int_t GetBasketSize() const {return fBasketSize;}
virtual const char* GetClassName() const { return ""; }
virtual Int_t GetCompressionLevel() const {return fCompress;}
virtual Int_t GetEntry(Long64_t entry=0, Int_t getall = 0);
virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesArray *list, Int_t n);
Int_t GetEvent(Long64_t entry=0) {return GetEntry(entry);}
Int_t GetEntryOffsetLen() const {return fEntryOffsetLen;}
const char *GetIconName() const;
virtual TLeaf *GetLeaf(const char *name) const;
TBasket *GetBasket(Int_t basket);
Int_t *GetBasketBytes() const {return fBasketBytes;}
Long64_t *GetBasketEntry() const {return fBasketEntry;}
virtual Long64_t GetBasketSeek(Int_t basket) const;
virtual TList *GetBrowsables();
TDirectory *GetDirectory() const {return fDirectory;}
virtual TFile *GetFile(Int_t mode=0);
const char *GetFileName() const {return fFileName.Data();}
Int_t GetOffset() const {return fOffset;}
Int_t GetReadBasket() const {return fReadBasket;}
Long64_t GetReadEntry() const {return fReadEntry;}
Int_t GetWriteBasket() const {return fWriteBasket;}
Long64_t GetTotalSize(Option_t *option="") const;
Long64_t GetTotBytes(Option_t *option="") const;
Long64_t GetZipBytes(Option_t *option="") const;
Long64_t GetEntryNumber() const {return fEntryNumber;}
Long64_t GetFirstEntry() const {return fFirstEntry; }
TObjArray *GetListOfBaskets() {return &fBaskets;}
TObjArray *GetListOfBranches() {return &fBranches;}
TObjArray *GetListOfLeaves() {return &fLeaves;}
Int_t GetMaxBaskets() const {return fMaxBaskets;}
Int_t GetNleaves() const {return fNleaves;}
Int_t GetSplitLevel() const {return fSplitLevel;}
Long64_t GetEntries() const {return fEntries;}
TTree *GetTree() const {return fTree;}
virtual Int_t GetRow(Int_t row);
TBranch *GetMother() const;
TBranch *GetSubBranch(const TBranch *br) const;
Bool_t IsAutoDelete() const;
Bool_t IsFolder() const;
virtual void KeepCircular(Long64_t maxEntries);
virtual Int_t LoadBaskets();
virtual void Print(Option_t *option="") const;
virtual void ReadBasket(TBuffer &b);
virtual void ReadLeaves(TBuffer &b);
virtual void Refresh(TBranch *b);
virtual void Reset(Option_t *option="");
virtual void ResetAddress();
virtual void ResetReadEntry() {fReadEntry = -1;}
virtual void SetAddress(void *add);
virtual void SetObject(void *objadd);
virtual void SetAutoDelete(Bool_t autodel=kTRUE);
virtual void SetBasketSize(Int_t buffsize);
virtual void SetBufferAddress(TBuffer *entryBuffer);
virtual void SetCompressionLevel(Int_t level=1);
virtual void SetEntryOffsetLen(Int_t len) {fEntryOffsetLen = len;}
virtual void SetEntries(Long64_t entries);
virtual void SetFirstEntry( Long64_t entry );
virtual void SetFile(TFile *file=0);
virtual void SetFile(const char *filename);
virtual void SetOffset(Int_t offset=0) {fOffset=offset;}
virtual void SetTree(TTree *tree) { fTree = tree;}
virtual void UpdateAddress() {;}
static void ResetCount();
ClassDef(TBranch,11);
};
#endif
Last change: Tue Oct 28 16:13:05 2008
Last generated: 2008-10-28 16:13
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.