]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDsegmentArrayBase.h
Make code compliant to coding conventions
[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(AliTRDsegmentArrayBase &a);
29   virtual ~AliTRDsegmentArrayBase();
30  
31   const AliTRDsegmentID *At(Int_t i); 
32   const AliTRDsegmentID *operator[](Int_t i); 
33
34           Bool_t           AddSegment(AliTRDsegmentID *segment);
35           AliTRDsegmentID *AddSegment(Int_t index);  
36           void             ClearSegment(Int_t index); 
37   virtual void             Copy(AliTRDsegmentArrayBase &a);
38   virtual Bool_t           ConnectTree(const char *treeName);
39           Bool_t           MakeArray(Int_t n);    
40   virtual AliTRDsegmentID *NewSegment(); 
41   virtual void             MakeTree();           
42   virtual AliTRDsegmentID *LoadSegment(Int_t index);
43   virtual AliTRDsegmentID *LoadEntry(Int_t index); 
44   virtual void             StoreSegment(Int_t index);
45           Bool_t           MakeDictionary(Int_t size);
46
47           Bool_t           SetClass(Text_t *classname);
48  
49           TClass          *GetClass() { return fClass; };
50           TTree           *GetTree()  { return fTree;  };   
51
52   inline  AliTRDsegmentArrayBase &operator=(AliTRDsegmentArrayBase &a);
53
54  protected:
55
56   TObjArray    *fSegment;            //! Pointer to an array of pointers to a segment
57   AliTRDarrayI *fTreeIndex;          //! Pointers(index) table
58   Int_t         fNSegment;           //  Number of segments 
59   TTree        *fTree;               //! Tree with segment objects
60   TBranch      *fBranch;             //! Branchaddress
61   TClass       *fClass;              //! Class type of included objects 
62
63   ClassDef(AliTRDsegmentArrayBase,1) // TRD detextor segment array base class
64
65 };
66
67 //_____________________________________________________________________________
68 AliTRDsegmentArrayBase &AliTRDsegmentArrayBase
69                         ::operator=(AliTRDsegmentArrayBase &a)
70 {
71   //
72   // Assignment operator
73   //
74
75   if (this != &a) a.Copy(*this);
76   return *this;
77
78 }
79
80 #endif