]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDsegmentArrayBase.h
Double defined data members corrected.
[u/mrichter/AliRoot.git] / TRD / AliTRDsegmentArrayBase.h
index b5d71881b10a4fb0bb443a2af09476a51e243b5c..01d1475b15c652fe4a869dd4f1cb288d2b601916 100644 (file)
@@ -9,9 +9,7 @@
 //  Manager class for a general Alice segment // 
 ////////////////////////////////////////////////
 
-#include "TNamed.h"
-#include "TError.h"
-#include "TObjArray.h"
+#include <TNamed.h>
 
 class TTree;
 class TBranch;
@@ -25,16 +23,17 @@ class AliTRDsegmentArrayBase: public TNamed {
 
   AliTRDsegmentArrayBase();
   AliTRDsegmentArrayBase(Text_t *classname, Int_t n); 
-  AliTRDsegmentArrayBase(AliTRDsegmentArrayBase &a);
+  AliTRDsegmentArrayBase(const AliTRDsegmentArrayBase &a);
   virtual ~AliTRDsegmentArrayBase();
+  AliTRDsegmentArrayBase &operator=(const AliTRDsegmentArrayBase &a);
  
-  const AliTRDsegmentID *At(Int_t i); 
+  const AliTRDsegmentID *At(Int_t i) const
   const AliTRDsegmentID *operator[](Int_t i); 
 
           Bool_t           AddSegment(AliTRDsegmentID *segment);
           AliTRDsegmentID *AddSegment(Int_t index);  
           void             ClearSegment(Int_t index); 
-  virtual void             Copy(AliTRDsegmentArrayBase &a);
+  virtual void             Copy(TObject &a);
   virtual Bool_t           ConnectTree(const char *treeName);
           Bool_t           MakeArray(Int_t n);    
   virtual AliTRDsegmentID *NewSegment(); 
@@ -46,10 +45,8 @@ class AliTRDsegmentArrayBase: public TNamed {
 
           Bool_t           SetClass(Text_t *classname);
  
-          TClass          *GetClass() { return fClass; };
-          TTree           *GetTree()  { return fTree;  };   
-
-  inline  AliTRDsegmentArrayBase &operator=(AliTRDsegmentArrayBase &a);
+          TClass          *GetClass() const { return fClass; };
+          TTree           *GetTree() const  { return fTree;  };   
 
  protected:
 
@@ -64,17 +61,4 @@ class AliTRDsegmentArrayBase: public TNamed {
 
 };
 
-//_____________________________________________________________________________
-AliTRDsegmentArrayBase &AliTRDsegmentArrayBase
-                        ::operator=(AliTRDsegmentArrayBase &a)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &a) a.Copy(*this);
-  return *this;
-
-}
-
 #endif