]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDsegmentArray.h
Fix compiler warnings (Theodor)
[u/mrichter/AliRoot.git] / TRD / AliTRDsegmentArray.h
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                               */
5
6 /* $Id$ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  Array for TRD detector segments containing digits                     //
11 //                                                                        //
12 ////////////////////////////////////////////////////////////////////////////
13
14 #include <TNamed.h>
15
16 class TTree;
17 class TBranch;
18 class TObjArray;
19
20 class AliTRDarrayI;
21 class AliTRDdataArray;
22 class AliTRDsegmentID;
23
24 class AliTRDsegmentArray : public TNamed {
25
26  public:
27
28   AliTRDsegmentArray();
29   AliTRDsegmentArray(const char *classname, Int_t n);
30   AliTRDsegmentArray(AliTRDsegmentArray &a);
31   virtual ~AliTRDsegmentArray();
32   AliTRDsegmentArray &operator=(const AliTRDsegmentArray &a);
33
34   const   AliTRDsegmentID *At(Int_t i) const; 
35   const   AliTRDsegmentID *operator[](Int_t i) const; 
36
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);
44  
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(); };
49
50           Bool_t           MakeArray(Int_t n);    
51   virtual void             MakeTree(char *file = 0);           
52           Bool_t           MakeDictionary(Int_t size);
53
54           Bool_t           SetClass(const char *classname);
55  
56           TClass          *GetClass() const { return fClass; };
57           TTree           *GetTree() const  { return fTree;  };   
58
59   virtual Bool_t           LoadArray(const Char_t *branchname, TTree *tree = 0);
60   virtual Bool_t           StoreArray(const Char_t *branchname, TTree *tree = 0);
61
62   virtual AliTRDdataArray *GetDataArray(Int_t det) const;
63   virtual AliTRDdataArray *GetDataArray(Int_t sec, Int_t cha, Int_t pla) const;
64
65  protected:
66
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 
73
74   ClassDef(AliTRDsegmentArray,2)     //  TRD detector segment array 
75
76 };
77
78 #endif