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 */
6 /* $Id: AliTRDsegmentArrayBase.h,v */
8 ////////////////////////////////////////////////
9 // Manager class for a general Alice segment //
10 ////////////////////////////////////////////////
14 #include "TObjArray.h"
19 class AliTRDsegmentID;
22 class AliTRDsegmentArrayBase: public TNamed {
26 AliTRDsegmentArrayBase();
27 AliTRDsegmentArrayBase(Text_t *classname, Int_t n);
28 AliTRDsegmentArrayBase(AliTRDsegmentArrayBase &a);
29 virtual ~AliTRDsegmentArrayBase();
31 const AliTRDsegmentID *At(Int_t i);
32 const AliTRDsegmentID *operator[](Int_t i);
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);
47 Bool_t SetClass(Text_t *classname);
49 TClass *GetClass() { return fClass; };
50 TTree *GetTree() { return fTree; };
52 inline AliTRDsegmentArrayBase &operator=(AliTRDsegmentArrayBase &a);
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
63 ClassDef(AliTRDsegmentArrayBase,1) // TRD detextor segment array base class
67 //_____________________________________________________________________________
68 AliTRDsegmentArrayBase &AliTRDsegmentArrayBase
69 ::operator=(AliTRDsegmentArrayBase &a)
72 // Assignment operator
75 if (this != &a) a.Copy(*this);