]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDsegmentArrayBase.h
Modify assignment operator
[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$ */
7
8 ////////////////////////////////////////////////////////////////////////////
9 //                                                                        //
10 //  Manager class for a general Alice segment                             // 
11 //                                                                        //
12 ////////////////////////////////////////////////////////////////////////////
13
14 #include <TNamed.h>
15
16 class TTree;
17 class TBranch;
18 class TObjArray;
19
20 class AliTRDarrayI;
21 class AliTRDsegmentID;
22  
23 class AliTRDsegmentArrayBase: public TNamed {
24
25  public:
26
27   AliTRDsegmentArrayBase();
28   AliTRDsegmentArrayBase(const char *classname, Int_t n); 
29   AliTRDsegmentArrayBase(const AliTRDsegmentArrayBase &a);
30   virtual ~AliTRDsegmentArrayBase();
31   AliTRDsegmentArrayBase &operator=(const AliTRDsegmentArrayBase &a);
32  
33   const AliTRDsegmentID *At(Int_t i) const; 
34   const AliTRDsegmentID *operator[](Int_t i) const; 
35
36           Bool_t           AddSegment(AliTRDsegmentID *segment);
37           AliTRDsegmentID *AddSegment(Int_t index);  
38   virtual AliTRDsegmentID *NewSegment(); 
39   virtual AliTRDsegmentID *LoadSegment(Int_t index);
40   virtual AliTRDsegmentID *LoadEntry(Int_t index); 
41   virtual void             StoreSegment(Int_t index);
42           void             ClearSegment(Int_t index);
43  
44   virtual void             Copy(TObject &a) const;
45   virtual Bool_t           ConnectTree(const char *treeName);
46
47           Bool_t           MakeArray(Int_t n);    
48   virtual void             MakeTree(char *file = 0);           
49           Bool_t           MakeDictionary(Int_t size);
50
51           Bool_t           SetClass(const char *classname);
52  
53           TClass          *GetClass() const { return fClass; };
54           TTree           *GetTree() const  { return fTree;  };   
55
56  protected:
57
58   TObjArray    *fSegment;            //! Pointer to an array of pointers to a segment
59   AliTRDarrayI *fTreeIndex;          //! Pointers(index) table
60   Int_t         fNSegment;           //  Number of segments 
61   TTree        *fTree;               //! Tree with segment objects
62   TBranch      *fBranch;             //! Branchaddress
63   TClass       *fClass;              //! Class type of included objects 
64
65   ClassDef(AliTRDsegmentArrayBase,1) // TRD detextor segment array base class
66
67 };
68
69 #endif