]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDsegmentArrayBase.h
Compiler warnings and coding conventions, next round
[u/mrichter/AliRoot.git] / TRD / AliTRDsegmentArrayBase.h
1 #ifndef ALITRDSEGMENTARRAYBASE_H
2 #define ALITRDSEGMENTARRAYBASE_H
3 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4  * See cxx source for full Copyright notice                               */
5
6 /* $Id: AliTRDsegmentArrayBase.h,v */
7
8 ////////////////////////////////////////////////
9 //  Manager class for a general Alice segment // 
10 ////////////////////////////////////////////////
11
12 #include "TNamed.h"
13 #include "TError.h"
14 #include "TObjArray.h"
15
16 class TTree;
17 class TBranch;
18 class AliTRDarrayI;
19 class AliTRDsegmentID;
20 class TObjArray;
21  
22 class AliTRDsegmentArrayBase: public TNamed {
23
24  public:
25
26   AliTRDsegmentArrayBase();
27   AliTRDsegmentArrayBase(Text_t *classname, Int_t n); 
28   AliTRDsegmentArrayBase(const AliTRDsegmentArrayBase &a);
29   virtual ~AliTRDsegmentArrayBase();
30   AliTRDsegmentArrayBase &operator=(const AliTRDsegmentArrayBase &a);
31  
32   const AliTRDsegmentID *At(Int_t i); 
33   const AliTRDsegmentID *operator[](Int_t i); 
34
35           Bool_t           AddSegment(AliTRDsegmentID *segment);
36           AliTRDsegmentID *AddSegment(Int_t index);  
37           void             ClearSegment(Int_t index); 
38   virtual void             Copy(TObject &a);
39   virtual Bool_t           ConnectTree(const char *treeName);
40           Bool_t           MakeArray(Int_t n);    
41   virtual AliTRDsegmentID *NewSegment(); 
42   virtual void             MakeTree();           
43   virtual AliTRDsegmentID *LoadSegment(Int_t index);
44   virtual AliTRDsegmentID *LoadEntry(Int_t index); 
45   virtual void             StoreSegment(Int_t index);
46           Bool_t           MakeDictionary(Int_t size);
47
48           Bool_t           SetClass(Text_t *classname);
49  
50           TClass          *GetClass() { return fClass; };
51           TTree           *GetTree()  { return fTree;  };   
52
53  protected:
54
55   TObjArray    *fSegment;            //! Pointer to an array of pointers to a segment
56   AliTRDarrayI *fTreeIndex;          //! Pointers(index) table
57   Int_t         fNSegment;           //  Number of segments 
58   TTree        *fTree;               //! Tree with segment objects
59   TBranch      *fBranch;             //! Branchaddress
60   TClass       *fClass;              //! Class type of included objects 
61
62   ClassDef(AliTRDsegmentArrayBase,1) // TRD detextor segment array base class
63
64 };
65
66 #endif