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 #include "AliTRDsegmentArrayBase.h"
10 ////////////////////////////////////////////////////////////////////////////
12 // Array for TRD detector segments containing digits //
14 ////////////////////////////////////////////////////////////////////////////
23 class AliTRDdataArray;
24 class AliTRDsegmentID;
26 class AliTRDsegmentArray : public TNamed {
31 AliTRDsegmentArray(const char *classname, Int_t n);
32 AliTRDsegmentArray(AliTRDsegmentArray &a);
33 virtual ~AliTRDsegmentArray();
34 AliTRDsegmentArray &operator=(const AliTRDsegmentArray &a);
36 const AliTRDsegmentID *At(Int_t i) const;
37 const AliTRDsegmentID *operator[](Int_t i) const;
39 Bool_t AddSegment(AliTRDsegmentID *segment);
40 AliTRDsegmentID *AddSegment(Int_t index);
41 virtual AliTRDsegmentID *NewSegment();
42 virtual AliTRDsegmentID *LoadSegment(Int_t index);
43 virtual AliTRDsegmentID *LoadEntry(Int_t index);
44 virtual void StoreSegment(Int_t index);
45 void ClearSegment(Int_t index);
47 virtual void Copy(TObject &a) const;
48 virtual Bool_t ConnectTree(const char *treeName);
49 virtual void Delete();
50 virtual void Delete(const char *) { Delete(); };
52 Bool_t MakeArray(Int_t n);
53 virtual void MakeTree(char *file = 0);
54 Bool_t MakeDictionary(Int_t size);
56 Bool_t SetClass(const char *classname);
58 TClass *GetClass() const { return fClass; };
59 TTree *GetTree() const { return fTree; };
61 virtual Bool_t LoadArray(const Char_t *branchname, TTree *tree = 0);
62 virtual Bool_t StoreArray(const Char_t *branchname, TTree *tree = 0);
64 virtual AliTRDdataArray *GetDataArray(Int_t det) const;
65 virtual AliTRDdataArray *GetDataArray(Int_t sec, Int_t cha, Int_t pla) const;
69 TObjArray *fSegment; //! Pointer to an array of pointers to a segment
70 AliTRDarrayI *fTreeIndex; //! Pointers(index) table
71 Int_t fNSegment; // Number of segments
72 TTree *fTree; //! Tree with segment objects
73 TBranch *fBranch; //! Branchaddress
74 TClass *fClass; //! Class type of included objects
76 ClassDef(AliTRDsegmentArray,2) // TRD detector segment array