1 #ifndef ALIARRAYBRANCH_H
2 #define ALIARRAYBRANCH_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 //////////////////////////////////////////////////////////////////////////
12 // A Branch for the case of an array of clone objects. //
13 //////////////////////////////////////////////////////////////////////////
18 #include "TBranchObject.h"
21 class AliArraySubBranch : public TBranch {
23 AliArraySubBranch(){;}
24 AliArraySubBranch(const char* name, void* address, const char* leaflist, Int_t basketsize = 32000,
25 Int_t compress = -1):TBranch(name, address, leaflist, basketsize, compress){;}
26 virtual Int_t GetEntryExport(Int_t entry, Int_t getall, AliObjectArray* list, Int_t n);
27 virtual void ReadBasketExport(TBuffer &b, TLeaf *leaf, AliObjectArray *list, Int_t n);
28 ClassDef(AliArraySubBranch,1) //Branch in case of an array of clone objects
31 class AliArrayBranch : public TBranch {
34 void Import(TLeaf * leaf, Int_t n); //integer fill leef buffer
36 AliObjectArray *fList; //Pointer to the clonesarray
37 Int_t fRead; //flag = 1 if clonesarray has been read
38 Int_t fN; //Number of elements in ClonesArray
39 Int_t fNdataMax; //Maximum value of fN
40 TString fClassName; //name of the class of the objets in the ClonesArray
41 TBranch *fBranchCount; //Branch with clones count
45 AliArrayBranch(const Text_t *name, void *clonesaddress, TTree * tree, Int_t basketsize=32000,Int_t compress=-1);
46 virtual ~AliArrayBranch();
48 virtual void Browse(TBrowser *b);
50 virtual Int_t GetEntry(Int_t entry=0, Int_t getall = 0);
51 virtual Int_t GetN() {return fN;}
52 AliObjectArray *GetList() {return fList;}
53 Bool_t IsFolder() {return kTRUE;}
54 virtual void Print(Option_t *option="") const;
55 virtual void Reset(Option_t *option="");
56 virtual void SetAddress(void *add);
57 virtual void SetBasketSize(Int_t buffsize);
58 virtual Bool_t IsFolder() const {return kTRUE;}
59 ClassDef(AliArrayBranch,1) //Branch in case of an array of clone objects
63 class AliObjectBranch: public TBranchObject{
65 AliObjectBranch():TBranchObject(){;}
66 AliObjectBranch(const Text_t *name, const Text_t *classname, void *addobj, TTree * tree,
67 Int_t basketsize=32000, Int_t splitlevel = 0, Int_t compress=-1);
68 void SetAddress(void *add);
69 ClassDef(AliObjectBranch,1)
72 class AliTree : public TTree {
75 AliTree(const char *name,const char *title, Int_t maxvirtualsize=0);
76 TBranch* AliBranch(const char *name, void *clonesaddress, Int_t bufsize =32000,
77 Int_t splitlevel=99,Int_t compres=1);
78 TBranch* AliBranch(const char *name, const char *classname, void *addobj,
79 Int_t bufsize=32000, Int_t splitlevel=99);