1 #ifndef ALITRDSEGMENTARRAY_H
2 #define ALITRDSEGMENTARRAY_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
8 ////////////////////////////////////////////////////////////////////////////
10 // Array for TRD detector segments containing digits //
12 ////////////////////////////////////////////////////////////////////////////
21 class AliTRDdataArray;
22 class AliTRDsegmentID;
24 class AliTRDsegmentArray : public TNamed {
29 AliTRDsegmentArray(const char *classname, Int_t n);
30 AliTRDsegmentArray(AliTRDsegmentArray &a);
31 virtual ~AliTRDsegmentArray();
32 AliTRDsegmentArray &operator=(const AliTRDsegmentArray &a);
34 const AliTRDsegmentID *At(Int_t i) const;
35 const AliTRDsegmentID *operator[](Int_t i) const;
37 Bool_t AddSegment(AliTRDsegmentID *segment);
38 AliTRDsegmentID *AddSegment(Int_t index);
39 virtual AliTRDsegmentID *NewSegment();
40 virtual AliTRDsegmentID *LoadSegment(Int_t index);
41 virtual AliTRDsegmentID *LoadEntry(Int_t index);
42 virtual void StoreSegment(Int_t index);
43 void ClearSegment(Int_t index);
45 virtual void Copy(TObject &a) const;
46 virtual Bool_t ConnectTree(const char *treeName);
47 virtual void Delete();
48 virtual void Delete(const char *) { Delete(); };
50 Bool_t MakeArray(Int_t n);
51 virtual void MakeTree(char *file = 0);
52 Bool_t MakeDictionary(Int_t size);
54 Bool_t SetClass(const char *classname);
56 TClass *GetClass() const { return fClass; };
57 TTree *GetTree() const { return fTree; };
59 virtual Bool_t LoadArray(const Char_t *branchname, TTree *tree = 0);
60 virtual Bool_t StoreArray(const Char_t *branchname, TTree *tree = 0);
62 virtual AliTRDdataArray *GetDataArray(Int_t det) const;
63 virtual AliTRDdataArray *GetDataArray(Int_t sec, Int_t cha, Int_t pla) const;
67 TObjArray *fSegment; //! Pointer to an array of pointers to a segment
68 AliTRDarrayI *fTreeIndex; //! Pointers(index) table
69 Int_t fNSegment; // Number of segments
70 TTree *fTree; //! Tree with segment objects
71 TBranch *fBranch; //! Branchaddress
72 TClass *fClass; //! Class type of included objects
74 ClassDef(AliTRDsegmentArray,2) // TRD detector segment array