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"
22 class AliArraySubBranch : public TBranch {
25 AliArraySubBranch(const char* name, void* address, const char* leaflist, Int_t basketsize = 32000,
26 Int_t compress = -1):TBranch(name, address, leaflist, basketsize, compress){}
27 virtual ~AliArraySubBranch() {}
28 virtual Int_t GetEntryExport(Long64_t entry, Int_t getall, TClonesArray* list, Int_t n) { return TBranch::GetEntryExport(entry, getall, list, n); }
29 virtual Int_t GetEntryExport(Int_t entry, Int_t getall, AliObjectArray* list, Int_t n);
30 virtual void ReadBasketExport(TBuffer &b, TLeaf *leaf, AliObjectArray *list, Int_t n);
31 ClassDef(AliArraySubBranch,1) //Branch in case of an array of clone objects
34 class AliArrayBranch : public TBranch {
38 AliArrayBranch(const Text_t *name, void *clonesaddress, TTree * tree, Int_t basketsize=32000,Int_t compress=-1);
39 virtual ~AliArrayBranch();
41 virtual void Browse(TBrowser *b);
43 virtual Int_t GetEntry(Long64_t entry=0, Int_t getall = 0);
44 virtual Int_t GetN() const {return fN;}
45 AliObjectArray *GetList() const {return fList;}
46 virtual void Print(Option_t *option="") const;
47 virtual void Reset(Option_t *option="");
48 virtual void SetAddress(void *add);
49 virtual void SetBasketSize(Int_t buffsize);
50 virtual Bool_t IsFolder() const {return kTRUE;}
53 AliObjectArray *fList; //Pointer to the clonesarray
54 Int_t fRead; //flag = 1 if clonesarray has been read
55 Int_t fN; //Number of elements in ClonesArray
56 Int_t fNdataMax; //Maximum value of fN
57 TString fClassName; //name of the class of the objets in the ClonesArray
58 TBranch *fBranchCount; //Branch with clones count
61 AliArrayBranch(const AliArrayBranch &);
62 AliArrayBranch & operator=(const AliArrayBranch &);
63 void Import(TLeaf * leaf, Int_t n); //integer fill leef buffer
64 ClassDef(AliArrayBranch,1) //Branch in case of an array of clone objects
68 class AliObjectBranch: public TBranchObject{
70 AliObjectBranch():TBranchObject(){;}
71 AliObjectBranch(const Text_t *name, const Text_t *classname, void *addobj, TTree * tree,
72 Int_t basketsize=32000, Int_t splitlevel = 0, Int_t compress=-1);
73 void SetAddress(void *add);
74 ClassDef(AliObjectBranch,1)
77 class AliTree : public TTree {
80 AliTree(const char *name,const char *title, Int_t maxvirtualsize=0);
81 TBranch* AliBranch(const char *name, void *clonesaddress, Int_t bufsize =32000,
82 Int_t splitlevel=99,Int_t compres=1);
83 TBranch* AliBranch(const char *name, const char *classname, void *addobj,
84 Int_t bufsize=32000, Int_t splitlevel=99);