]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Compiler warnings and coding conventions, next round
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Jun 2000 11:10:27 +0000 (11:10 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 9 Jun 2000 11:10:27 +0000 (11:10 +0000)
34 files changed:
TRD/AliTRD.cxx
TRD/AliTRD.h
TRD/AliTRDarrayF.cxx
TRD/AliTRDarrayF.h
TRD/AliTRDarrayI.cxx
TRD/AliTRDarrayI.h
TRD/AliTRDclusterizer.cxx
TRD/AliTRDclusterizer.h
TRD/AliTRDclusterizerV0.h
TRD/AliTRDclusterizerV1.cxx
TRD/AliTRDclusterizerV1.h
TRD/AliTRDdataArray.cxx
TRD/AliTRDdataArray.h
TRD/AliTRDdataArrayF.cxx
TRD/AliTRDdataArrayF.h
TRD/AliTRDdataArrayI.cxx
TRD/AliTRDdataArrayI.h
TRD/AliTRDdigitizer.cxx
TRD/AliTRDdigitizer.h
TRD/AliTRDdigitsManager.cxx
TRD/AliTRDdigitsManager.h
TRD/AliTRDgeometry.h
TRD/AliTRDgeometryFull.h
TRD/AliTRDgeometryHole.h
TRD/AliTRDmatrix.cxx
TRD/AliTRDmatrix.h
TRD/AliTRDpixel.cxx
TRD/AliTRDpixel.h
TRD/AliTRDrecPoint.cxx
TRD/AliTRDrecPoint.h
TRD/AliTRDsegmentArrayBase.cxx
TRD/AliTRDsegmentArrayBase.h
TRD/AliTRDv1.cxx
TRD/AliTRDv1.h

index 9c176e2133ec7a29773eb58f360dbe33b459d0eb..12c4551271b5e09888ab32da0a6a471c2336cc2a 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.20  2000/06/08 18:32:57  cblume
+Make code compliant to coding conventions
+
 Revision 1.19  2000/06/07 16:25:37  cblume
 Try to remove compiler warnings on Sun and HP
 
@@ -146,13 +149,13 @@ AliTRD::AliTRD(const char *name, const char *title)
 }
 
 //_____________________________________________________________________________
-AliTRD::AliTRD(AliTRD &trd)
+AliTRD::AliTRD(const AliTRD &trd)
 {
   //
   // Copy constructor
   //
 
-  trd.Copy(*this);
+  ((AliTRD &) trd).Copy(*this);
 
 }
 
@@ -245,16 +248,16 @@ void AliTRD::BuildGeometry()
 }
  
 //_____________________________________________________________________________
-void AliTRD::Copy(AliTRD &trd)
+void AliTRD::Copy(TObject &trd)
 {
   //
   // Copy function
   //
 
-  trd.fGasMix     = fGasMix;
-  trd.fGeometry   = fGeometry;
-  trd.fRecPoints  = fRecPoints;
-  trd.fNRecPoints = fNRecPoints;
+  ((AliTRD &) trd).fGasMix     = fGasMix;
+  ((AliTRD &) trd).fGeometry   = fGeometry;
+  ((AliTRD &) trd).fRecPoints  = fRecPoints;
+  ((AliTRD &) trd).fNRecPoints = fNRecPoints;
 
   //AliDetector::Copy(trd);
 
@@ -617,3 +620,14 @@ void AliTRD::SetGasMix(Int_t imix)
 
 }
 
+//_____________________________________________________________________________
+AliTRD &AliTRD::operator=(const AliTRD &trd)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &trd) ((AliTRD &) trd).Copy(*this);
+  return *this;
+
+}
index ceab60cbcb25959951697378d1681ce511a57faa..a7d926478c2818da674a266923b03bdb49857464 100644 (file)
@@ -24,14 +24,17 @@ class AliTRD : public AliDetector {
 
   AliTRD();
   AliTRD(const char *name, const char *title);
-  AliTRD(AliTRD &trd);
+  AliTRD(const AliTRD &trd);
   virtual           ~AliTRD();
+
+          AliTRD    &operator=(const AliTRD &trd);
+
   virtual void       AddHit(Int_t track, Int_t *det, Float_t *hits);
   virtual void       AddDigit(Int_t *digits, Int_t *amp);    
   virtual void       AddRecPoint(Float_t *pos, Int_t *digits
                                , Int_t det, Float_t amp);
   virtual void       BuildGeometry();
-  virtual void       Copy(AliTRD &trd);
+  virtual void       Copy(TObject &trd);
   virtual void       CreateGeometry();
   virtual void       CreateMaterials();
   virtual void       DrawModule();
@@ -61,8 +64,6 @@ class AliTRD : public AliDetector {
   virtual Int_t      GetSensSector()      = 0;
   virtual Int_t      GetSensSectorRange() = 0; 
 
-  inline  AliTRD    &operator=(AliTRD &trd);
-
  protected:
 
   Int_t              fGasMix;            //  Gas mixture. 0: Xe/Isobutane 1: Xe/CO2
@@ -76,16 +77,4 @@ class AliTRD : public AliDetector {
 
 };
 
-//_____________________________________________________________________________
-AliTRD &AliTRD::operator=(AliTRD &trd)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &trd) trd.Copy(*this);
-  return *this;
-
-}
-
 #endif
index 223375dabf88660fbba0144ae0f5e3e2924cefc6..e46a4cbc054c3a736b8ff3ce45f9a6b8ef5786cb 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.2  2000/05/08 16:17:27  cblume
 Merge TRD-develop
 
@@ -48,14 +51,14 @@ AliTRDarrayF::~AliTRDarrayF()
 }
 
 //_____________________________________________________________________________
-void AliTRDarrayF::Copy(AliTRDarrayF &a)
+void AliTRDarrayF::Copy(TObject &a)
 {
   //
   // Copy function
   //
 
   TObject::Copy(a);
-  TArrayF::Copy(a);
+  TArrayF::Copy(((TArrayF &) a));
 
 }
 
index 15bc52ef9e6cd254bb2deab1a9122e98dd7e9f10..7b0444681db315ede2dfedbc7d33991324118449 100644 (file)
@@ -13,7 +13,7 @@ class AliTRDarrayF: public TObject ,public TArrayF {
 public:
 
   ~AliTRDarrayF();
-  void Copy(AliTRDarrayF &a);
+  void Copy(TObject &a);
   void Expand(Int_t n);  
 
   ClassDef(AliTRDarrayF,1)  
index ace0b347684b75e1f74a48029c240024a65860f6..cf4bf61332d916973fa502753704016bd7210078 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.2  2000/05/08 16:17:27  cblume
 Merge TRD-develop
 
@@ -51,14 +54,14 @@ AliTRDarrayI::~AliTRDarrayI()
 }
 
 //_____________________________________________________________________________
-void AliTRDarrayI::Copy(AliTRDarrayI &a)
+void AliTRDarrayI::Copy(TObject &a)
 {
   //
   // Copy function
   //
 
   TObject::Copy(a);
-  TArrayI::Copy(a);
+  TArrayI::Copy(((TArrayI &) a));
 
 }
 
index be1a2e1bd618ffb76cd06256fd8c1a4db64e9ad5..577a9c21511ca0416f1aef2f1062d3e195d21c98 100644 (file)
@@ -13,7 +13,7 @@ class AliTRDarrayI: public TObject ,public TArrayI {
 public:
 
   ~AliTRDarrayI();
-  void Copy(AliTRDarrayI &a);
+  void Copy(TObject &a);
   void Expand(Int_t n);  
 
   ClassDef(AliTRDarrayI,1)  
index b51dd38ee63abecd88a680a7e1fc8daf2dd153f6..f13669d953faaa9ded0499fa81d456986fc897a3 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.2  2000/05/08 16:17:27  cblume
 Merge TRD-develop
 
@@ -67,13 +70,13 @@ AliTRDclusterizer::AliTRDclusterizer(const Text_t* name, const Text_t* title)
 }
 
 //_____________________________________________________________________________
-AliTRDclusterizer::AliTRDclusterizer(AliTRDclusterizer &c)
+AliTRDclusterizer::AliTRDclusterizer(const AliTRDclusterizer &c)
 {
   //
   // AliTRDclusterizer copy constructor
   //
 
-  c.Copy(*this);
+  ((AliTRDclusterizer &) c).Copy(*this);
 
 }
 
@@ -92,14 +95,26 @@ AliTRDclusterizer::~AliTRDclusterizer()
 }
 
 //_____________________________________________________________________________
-void AliTRDclusterizer::Copy(AliTRDclusterizer &c)
+AliTRDclusterizer &AliTRDclusterizer::operator=(const AliTRDclusterizer &c)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &c) ((AliTRDclusterizer &) c).Copy(*this);
+  return *this;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDclusterizer::Copy(TObject &c)
 {
   //
   // Copy function
   //
 
-  c.fInputFile = NULL;
-  c.fEvent     = 0;  
+  ((AliTRDclusterizer &) c).fInputFile = NULL;
+  ((AliTRDclusterizer &) c).fEvent     = 0;  
 
 }
 
index ab3089c96c5337bc965c002f50599aa402b8c395..b38b5dbb3a3319b471d328c20bb676376a987f83 100644 (file)
@@ -18,11 +18,11 @@ class AliTRDclusterizer : public TNamed {
 
   AliTRDclusterizer();
   AliTRDclusterizer(const Text_t* name, const Text_t* title);
-  AliTRDclusterizer(AliTRDclusterizer &c);
+  AliTRDclusterizer(const AliTRDclusterizer &c);
   virtual ~AliTRDclusterizer();
-  
-  inline  AliTRDclusterizer &operator=(AliTRDclusterizer &c);
-  virtual void    Copy(AliTRDclusterizer &c);
+  AliTRDclusterizer &operator=(const AliTRDclusterizer &c);
+
+  virtual void    Copy(TObject &c);
   virtual void    Init();
   virtual Bool_t  Open(const Char_t *name, Int_t nEvent = 0);
   virtual Bool_t  MakeCluster() = 0;
@@ -38,16 +38,4 @@ class AliTRDclusterizer : public TNamed {
 
 };
 
-//_____________________________________________________________________________
-AliTRDclusterizer &AliTRDclusterizer::operator=(AliTRDclusterizer &c)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &c) c.Copy(*this);
-  return *this;
-
-}
-
 #endif
index c3297d75a0f5f3b1897c107ed75b07d64d549a08..9a16d6fcd37c4ef6a1b298b4e88383349b551c97 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITRDCLUSTERIZERV0_h
-#define ALITRDCLUSTERIZERV0_h
+#ifndef ALITRDCLUSTERIZERV0_H
+#define ALITRDCLUSTERIZERV0_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
index 8d515119274525963de03fbe136c72a28760eb61..aa6d9bff896ddd632d7c77ae2df71c60466fed10 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.5  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.4  2000/06/07 16:27:01  cblume
 Try to remove compiler warnings on Sun and HP
 
@@ -72,13 +75,13 @@ AliTRDclusterizerV1::AliTRDclusterizerV1(const Text_t* name, const Text_t* title
 }
 
 //_____________________________________________________________________________
-AliTRDclusterizerV1::AliTRDclusterizerV1(AliTRDclusterizerV1 &c)
+AliTRDclusterizerV1::AliTRDclusterizerV1(const AliTRDclusterizerV1 &c)
 {
   //
   // AliTRDclusterizerV1 copy constructor
   //
 
-  c.Copy(*this);
+  ((AliTRDclusterizerV1 &) c).Copy(*this);
 
 }
 
@@ -95,6 +98,18 @@ AliTRDclusterizerV1::~AliTRDclusterizerV1()
 
 }
 
+//_____________________________________________________________________________
+AliTRDclusterizerV1 &AliTRDclusterizerV1::operator=(const AliTRDclusterizerV1 &c)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &c) ((AliTRDclusterizerV1 &) c).Copy(*this);
+  return *this;
+
+}
+
 //_____________________________________________________________________________
 void AliTRDclusterizerV1::Copy(AliTRDclusterizerV1 &c)
 {
@@ -203,10 +218,12 @@ Bool_t AliTRDclusterizerV1::MakeCluster()
           Int_t sens1 = trd->GetSensSector();
           Int_t sens2 = sens1 + trd->GetSensSectorRange();
           sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
-          if (sens1 < sens2) 
+          if (sens1 < sens2) {
             if ((isect < sens1) || (isect >= sens2)) continue;
-          else
+         }
+          else {
             if ((isect < sens1) && (isect >= sens2)) continue;
+         }
        }
 
         Int_t idet = geo->GetDetector(iplan,icham,isect);
index 614cca7c4ed11a45547ff844f98aaad953bca772..e638440b6ec3585c45d0e4d081e924128db30b6d 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITRDCLUSTERIZERV1_h
-#define ALITRDCLUSTERIZERV1_h
+#ifndef ALITRDCLUSTERIZERV1_H
+#define ALITRDCLUSTERIZERV1_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -19,8 +19,9 @@ class AliTRDclusterizerV1 : public AliTRDclusterizer {
 
   AliTRDclusterizerV1();
   AliTRDclusterizerV1(const Text_t* name, const Text_t* title);
-  AliTRDclusterizerV1(AliTRDclusterizerV1 &c);
+  AliTRDclusterizerV1(const AliTRDclusterizerV1 &c);
   virtual ~AliTRDclusterizerV1();
+  AliTRDclusterizerV1 &operator=(const AliTRDclusterizerV1 &c);
 
   virtual void    Copy(AliTRDclusterizerV1 &c);
   virtual void    Init();
@@ -35,8 +36,6 @@ class AliTRDclusterizerV1 : public AliTRDclusterizer {
   virtual Float_t GetClusSigThresh()                        { return fClusSigThresh; };
   virtual Int_t   GetClusMethod()                           { return fClusMethod;    };
 
-  inline  AliTRDclusterizerV1 &operator=(AliTRDclusterizerV1 &c);
-
  protected:
 
   AliTRDdigitsManager *fDigitsManager; //! TRD digits manager
@@ -54,16 +53,4 @@ class AliTRDclusterizerV1 : public AliTRDclusterizer {
 
 };
 
-//_____________________________________________________________________________
-AliTRDclusterizerV1 &AliTRDclusterizerV1::operator=(AliTRDclusterizerV1 &c)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &c) c.Copy(*this);
-  return *this;
-
-}
-
 #endif
index 759014a488c34520369c5d9ef3b7cc47d7b9690d..0cd7633d4cb94320c7997a204de2b796b7873cda 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.5  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.4  2000/06/07 16:27:01  cblume
 Try to remove compiler warnings on Sun and HP
 
@@ -83,13 +86,13 @@ AliTRDdataArray::AliTRDdataArray(Int_t nrow, Int_t ncol, Int_t ntime)
 }
 
 //_____________________________________________________________________________
-AliTRDdataArray::AliTRDdataArray(AliTRDdataArray &d)
+AliTRDdataArray::AliTRDdataArray(const AliTRDdataArray &d)
 {
   //
   // AliTRDdataArray copy constructor
   //
 
-  d.Copy(*this);
+  ((AliTRDdataArray &) d).Copy(*this);
 
 }
 
@@ -105,27 +108,39 @@ AliTRDdataArray::~AliTRDdataArray()
 }
 
 //_____________________________________________________________________________
-void AliTRDdataArray::Copy(AliTRDdataArray &d)
+AliTRDdataArray &AliTRDdataArray::operator=(const AliTRDdataArray &d)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &d) ((AliTRDdataArray &) d).Copy(*this);
+  return *this;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdataArray::Copy(TObject &d)
 {
   //
   // Copy function
   //
 
-  d.fNrow         = fNrow;
-  d.fNcol         = fNcol;
-  d.fNtime        = fNtime;
+  ((AliTRDdataArray &) d).fNrow         = fNrow;
+  ((AliTRDdataArray &) d).fNcol         = fNcol;
+  ((AliTRDdataArray &) d).fNtime        = fNtime;
 
-  d.fNdim1        = fNdim1;
-  d.fNdim2        = fNdim2;
+  ((AliTRDdataArray &) d).fNdim1        = fNdim1;
+  ((AliTRDdataArray &) d).fNdim2        = fNdim2;
 
-  d.fBufType      = fBufType;
-  d.fNelems       = fNelems;
+  ((AliTRDdataArray &) d).fBufType      = fBufType;
+  ((AliTRDdataArray &) d).fNelems       = fNelems;
 
-  d.fCurrentIdx1  = 0;
-  d.fCurrentIdx2  = 0;
-  d.fCurrentIndex = 0;
+  ((AliTRDdataArray &) d).fCurrentIdx1  = 0;
+  ((AliTRDdataArray &) d).fCurrentIdx2  = 0;
+  ((AliTRDdataArray &) d).fCurrentIndex = 0;
 
-  fIndex->Copy(*d.fIndex);
+  fIndex->Copy(*((AliTRDdataArray &) d).fIndex);
 
 }
 
@@ -173,6 +188,38 @@ void AliTRDdataArray::Allocate(Int_t nrow, Int_t ncol,Int_t ntime)
 
 }
 
+//_____________________________________________________________________________
+Bool_t AliTRDdataArray::CheckBounds(const char *where, Int_t idx1, Int_t idx2) 
+{
+  //
+  // Does the boundary checking
+  //
+
+  if ((idx2 >= fNdim2) || (idx2 < 0)) 
+    return OutOfBoundsError(where,idx1,idx2);
+
+  Int_t index = (*fIndex).At(idx2) + idx1;
+  if ((index < 0) || (index > fNelems)) 
+    return OutOfBoundsError(where,idx1,idx2);
+
+  return kTRUE;  
+
+}
+
+//_____________________________________________________________________________
+Bool_t AliTRDdataArray::OutOfBoundsError(const char *where, Int_t idx1, Int_t idx2) 
+{
+  //
+  // Generate an out-of-bounds error. Always returns false.
+  //
+
+  TObject::Error(where, "idx1 %d  idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
+          ,idx1,idx2,fNdim1,fNdim2,this);
+
+  return kFALSE;
+
+}
+
 //_____________________________________________________________________________
 void AliTRDdataArray::Reset() 
 { 
index 81069cec371e347dc04c6de11a0bfe7b006b5707..c6ecdf51e44f2b7497abb5e165cbe7a5b7545b9c 100644 (file)
@@ -21,10 +21,11 @@ class AliTRDdataArray : public AliTRDsegmentID {
 
   AliTRDdataArray();
   AliTRDdataArray(Int_t nrow, Int_t ncol,Int_t ntime);
-  AliTRDdataArray(AliTRDdataArray &d);
+  AliTRDdataArray(const AliTRDdataArray &d);
   virtual ~AliTRDdataArray();
+  AliTRDdataArray &operator=(const AliTRDdataArray &d);
 
-  virtual void   Copy(AliTRDdataArray &d);
+  virtual void   Copy(TObject &d);
   virtual void   Allocate(Int_t nrow, Int_t ncol,Int_t ntime);
   virtual void   Reset();
 
@@ -33,7 +34,6 @@ class AliTRDdataArray : public AliTRDsegmentID {
   virtual Int_t  GetNtime()                    { return fNtime;      };
 
           Int_t  GetIndex(Int_t row, Int_t col, Int_t time);
-  inline  AliTRDdataArray &operator=(AliTRDdataArray &d);
 
  protected:
 
@@ -59,49 +59,5 @@ class AliTRDdataArray : public AliTRDsegmentID {
 
 };
  
-//_____________________________________________________________________________
-Bool_t AliTRDdataArray::CheckBounds(const char *where, Int_t idx1, Int_t idx2) 
-{
-  //
-  // Does the boundary checking
-  //
-
-  if ((idx2 >= fNdim2) || (idx2 < 0)) 
-    return OutOfBoundsError(where,idx1,idx2);
-
-  Int_t index = (*fIndex).At(idx2) + idx1;
-  if ((index < 0) || (index > fNelems)) 
-    return OutOfBoundsError(where,idx1,idx2);
-
-  return kTRUE;  
-
-}
-
-//_____________________________________________________________________________
-Bool_t AliTRDdataArray::OutOfBoundsError(const char *where, Int_t idx1, Int_t idx2) 
-{
-  //
-  // Generate an out-of-bounds error. Always returns false.
-  //
-
-  TObject::Error(where, "idx1 %d  idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
-          ,idx1,idx2,fNdim1,fNdim2,this);
-
-  return kFALSE;
-
-}
-
-//_____________________________________________________________________________
-AliTRDdataArray &AliTRDdataArray::operator=(AliTRDdataArray &d)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &d) d.Copy(*this);
-  return *this;
-
-}
-
 #endif
 
index aa1eb0ebcaba63a04b9aa106a32fc9ce7a6f5ff3..1037942dd99622c549d43c7a6dcfad203601aa6d 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.2  2000/05/08 16:17:27  cblume
 Merge TRD-develop
 
@@ -59,13 +62,13 @@ AliTRDdataArrayF::AliTRDdataArrayF(Int_t nrow, Int_t ncol, Int_t ntime)
 }
 
 //_____________________________________________________________________________
-AliTRDdataArrayF::AliTRDdataArrayF(AliTRDdataArrayF &a)
+AliTRDdataArrayF::AliTRDdataArrayF(const AliTRDdataArrayF &a)
 {
   //
   // AliTRDdataArrayF copy constructor
   //
 
-  a.Copy(*this);
+  ((AliTRDdataArrayF &) a).Copy(*this);
 
 }
 
@@ -606,3 +609,67 @@ Float_t AliTRDdataArrayF::GetData1(Int_t idx1, Int_t idx2)
 
 }
 
+//____________________________________________________________________________
+Float_t AliTRDdataArrayF::GetDataFast(Int_t idx1, Int_t idx2)
+{
+  //
+  // Returns the value at a given position in the array
+  //
+
+  return fElements->At(fIndex->At(idx2) + idx1); 
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdataArrayF::SetData(Int_t row, Int_t col, Int_t time, Float_t value)
+{
+  //
+  // Sets the data value at a given position of the array
+  // Includes boundary checking
+  //
+
+  if ((row >= 0) && (col >= 0) && (time >= 0)) {
+    Int_t idx1 = GetIdx1(row,col);
+    if ((idx1 >= 0) && (time < fNdim2)) {
+      SetDataFast(idx1,time,value);
+    }
+    else {
+      if (idx1 >= 0) {
+        TObject::Error("SetData"
+                      ,"time %d out of bounds (size: %d, this: 0x%08x)"
+                      ,time,fNdim2,this);
+      }
+    }
+  }
+
+}
+
+//_____________________________________________________________________________
+void  AliTRDdataArrayF::SetDataFast(Int_t idx1, Int_t idx2, Float_t value)
+{
+  //
+  // Set the value at a given position in the array
+  //
+
+  if ((idx1 < 0) || (idx1 >= fNdim1) || 
+      (idx2 < 0) || (idx2 >= fNdim2)) { 
+    TObject::Error("SetDataFast"
+                  ,"idx1 %d  idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
+                  ,idx1,idx2,fNdim1,fNdim2,this);
+  }
+
+  (*fElements)[fIndex->fArray[idx2] + idx1] = value; 
+
+}
+
+//_____________________________________________________________________________
+AliTRDdataArrayF &AliTRDdataArrayF::operator=(const AliTRDdataArrayF &a)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &a) ((AliTRDdataArrayF &) a).Copy(*this);
+  return *this;
+
+}
index 93740e7090ce985a174f926c8cab14b2b713fcef..8223ce545b3d2d006a88dd0a9bf7e05dff93a51e 100644 (file)
@@ -22,8 +22,9 @@ class AliTRDdataArrayF : public AliTRDdataArray {
 
   AliTRDdataArrayF();
   AliTRDdataArrayF(Int_t nrow, Int_t ncol,Int_t ntime);
-  AliTRDdataArrayF(AliTRDdataArrayF &a);
+  AliTRDdataArrayF(const AliTRDdataArrayF &a);
   virtual ~AliTRDdataArrayF();
+  AliTRDdataArrayF &operator=(const AliTRDdataArrayF &a);
 
   virtual void    Allocate(Int_t nrow, Int_t ncol,Int_t ntime);
   virtual void    Copy(AliTRDdataArrayF &a);
@@ -44,8 +45,6 @@ class AliTRDdataArrayF : public AliTRDdataArray {
   virtual Int_t   GetDataSize(); 
   virtual Int_t   GetOverThreshold(Float_t threshold);  
 
-  inline  AliTRDdataArrayF &operator=(AliTRDdataArrayF &a);
-
  protected:
 
   inline  void    SetDataFast(Int_t idx1, Int_t idx2, Float_t value); 
@@ -68,70 +67,5 @@ class AliTRDdataArrayF : public AliTRDdataArray {
 
 };
  
-//____________________________________________________________________________
-Float_t AliTRDdataArrayF::GetDataFast(Int_t idx1, Int_t idx2)
-{
-  //
-  // Returns the value at a given position in the array
-  //
-
-  return fElements->At(fIndex->At(idx2) + idx1); 
-
-}
-
-//_____________________________________________________________________________
-void AliTRDdataArrayF::SetData(Int_t row, Int_t col, Int_t time, Float_t value)
-{
-  //
-  // Sets the data value at a given position of the array
-  // Includes boundary checking
-  //
-
-  if ((row >= 0) && (col >= 0) && (time >= 0)) {
-    Int_t idx1 = GetIdx1(row,col);
-    if ((idx1 >= 0) && (time < fNdim2)) {
-      SetDataFast(idx1,time,value);
-    }
-    else {
-      if (idx1 >= 0) {
-        TObject::Error("SetData"
-                      ,"time %d out of bounds (size: %d, this: 0x%08x)"
-                      ,time,fNdim2,this);
-      }
-    }
-  }
-
-}
-
-//_____________________________________________________________________________
-void  AliTRDdataArrayF::SetDataFast(Int_t idx1, Int_t idx2, Float_t value)
-{
-  //
-  // Set the value at a given position in the array
-  //
-
-  if ((idx1 < 0) || (idx1 >= fNdim1) || 
-      (idx2 < 0) || (idx2 >= fNdim2)) { 
-    TObject::Error("SetDataFast"
-                  ,"idx1 %d  idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
-                  ,idx1,idx2,fNdim1,fNdim2,this);
-  }
-
-  (*fElements)[fIndex->fArray[idx2] + idx1] = value; 
-
-}
-
-//_____________________________________________________________________________
-AliTRDdataArrayF &AliTRDdataArrayF::operator=(AliTRDdataArrayF &a)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &a) a.Copy(*this);
-  return *this;
-
-}
-
 #endif
 
index 4d5dc91ca9f5de04724d5a935c74691634e60804..dec9059ab0c1609396bc005b7eb586f911710de3 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.3  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.2  2000/05/08 16:17:27  cblume
 Merge TRD-develop
 
@@ -59,13 +62,13 @@ AliTRDdataArrayI::AliTRDdataArrayI(Int_t nrow, Int_t ncol, Int_t ntime)
 }
 
 //_____________________________________________________________________________
-AliTRDdataArrayI::AliTRDdataArrayI(AliTRDdataArrayI &a)
+AliTRDdataArrayI::AliTRDdataArrayI(const AliTRDdataArrayI &a)
 {
   //
   // AliTRDdataArrayI copy constructor
   //
 
-  a.Copy(*this);
+  ((AliTRDdataArrayI &) a).Copy(*this);
 
 }
 
@@ -605,3 +608,67 @@ Int_t AliTRDdataArrayI::GetData1(Int_t idx1, Int_t idx2)
 
 }
 
+//_____________________________________________________________________________
+Int_t AliTRDdataArrayI::GetDataFast(Int_t idx1, Int_t idx2)
+{
+  //
+  // Returns the value at a given position in the array
+  //
+  
+  return fElements->At(fIndex->At(idx2) + idx1); 
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdataArrayI::SetData(Int_t row, Int_t col, Int_t time, Int_t value)
+{
+  //
+  // Sets the data value at a given position of the array
+  // Includes boundary checking
+  //
+
+  if ((row >= 0) && (col >= 0) && (time >= 0)) {
+    Int_t idx1 = GetIdx1(row,col);
+    if ((idx1 >= 0) && (time < fNdim2)) {
+       SetDataFast(idx1,time,value);
+    }
+    else {
+      if (idx1 >= 0) {
+        TObject::Error("SetData"
+                      ,"time %d out of bounds (size: %d, this: 0x%08x)"
+                      ,time,fNdim2,this);
+      }
+    }
+  }
+
+}
+
+//_____________________________________________________________________________
+void  AliTRDdataArrayI::SetDataFast(Int_t idx1, Int_t idx2, Int_t value)
+{
+  //
+  // Set the value at a given position in the array
+  //
+
+  if ((idx1 < 0) || (idx1 >= fNdim1) || 
+      (idx2 < 0) || (idx2 >= fNdim2)) { 
+    TObject::Error("SetDataFast"
+                  ,"idx1 %d  idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
+                  ,idx1,idx2,fNdim1,fNdim2,this);
+  }
+
+  (*fElements)[fIndex->fArray[idx2] + idx1] = value; 
+
+}
+
+//_____________________________________________________________________________
+AliTRDdataArrayI &AliTRDdataArrayI::operator=(const AliTRDdataArrayI &a)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &a) ((AliTRDdataArrayI &) a).Copy(*this);
+  return *this;
+
+}
index d189b26af1b5bba42c09a51e8f97c4164384c64c..c3231b1c253fb27d1917eacdce0f5ab03a5bfd85 100644 (file)
@@ -22,8 +22,9 @@ class AliTRDdataArrayI : public AliTRDdataArray {
 
   AliTRDdataArrayI();
   AliTRDdataArrayI(Int_t nrow, Int_t ncol, Int_t ntime);
-  AliTRDdataArrayI(AliTRDdataArrayI &a);
+  AliTRDdataArrayI(const AliTRDdataArrayI &a);
   virtual ~AliTRDdataArrayI();
+  AliTRDdataArrayI &operator=(const AliTRDdataArrayI &a);
 
   virtual void   Allocate(Int_t nrow, Int_t ncol, Int_t ntime);
   virtual void   Copy(AliTRDdataArrayI &a);
@@ -44,8 +45,6 @@ class AliTRDdataArrayI : public AliTRDdataArray {
   virtual Int_t  GetDataSize(); 
   virtual Int_t  GetOverThreshold(Int_t threshold);  
 
-  inline  AliTRDdataArrayI &operator=(AliTRDdataArrayI &a);
-
  protected:
 
   inline  void   SetDataFast(Int_t idx1, Int_t idx2, Int_t value); 
@@ -68,71 +67,5 @@ class AliTRDdataArrayI : public AliTRDdataArray {
 
 };
  
-
-//_____________________________________________________________________________
-Int_t AliTRDdataArrayI::GetDataFast(Int_t idx1, Int_t idx2)
-{
-  //
-  // Returns the value at a given position in the array
-  //
-  
-  return fElements->At(fIndex->At(idx2) + idx1); 
-
-}
-
-//_____________________________________________________________________________
-void AliTRDdataArrayI::SetData(Int_t row, Int_t col, Int_t time, Int_t value)
-{
-  //
-  // Sets the data value at a given position of the array
-  // Includes boundary checking
-  //
-
-  if ((row >= 0) && (col >= 0) && (time >= 0)) {
-    Int_t idx1 = GetIdx1(row,col);
-    if ((idx1 >= 0) && (time < fNdim2)) {
-       SetDataFast(idx1,time,value);
-    }
-    else {
-      if (idx1 >= 0) {
-        TObject::Error("SetData"
-                      ,"time %d out of bounds (size: %d, this: 0x%08x)"
-                      ,time,fNdim2,this);
-      }
-    }
-  }
-
-}
-
-//_____________________________________________________________________________
-void  AliTRDdataArrayI::SetDataFast(Int_t idx1, Int_t idx2, Int_t value)
-{
-  //
-  // Set the value at a given position in the array
-  //
-
-  if ((idx1 < 0) || (idx1 >= fNdim1) || 
-      (idx2 < 0) || (idx2 >= fNdim2)) { 
-    TObject::Error("SetDataFast"
-                  ,"idx1 %d  idx2 %d out of bounds (size: %d x %d, this: 0x%08x)"
-                  ,idx1,idx2,fNdim1,fNdim2,this);
-  }
-
-  (*fElements)[fIndex->fArray[idx2] + idx1] = value; 
-
-}
-
-//_____________________________________________________________________________
-AliTRDdataArrayI &AliTRDdataArrayI::operator=(AliTRDdataArrayI &a)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &a) a.Copy(*this);
-  return *this;
-
-}
-
 #endif
 
index 93d69600cccfccc2a102c06252e4f70a2c8f9358..bf508826e0252cbd12110f262ec7dd92e5175dc3 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.7  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.6  2000/06/07 16:27:32  cblume
 Try to remove compiler warnings on Sun and HP
 
@@ -118,13 +121,13 @@ AliTRDdigitizer::AliTRDdigitizer(const Text_t *name, const Text_t *title)
 }
 
 //_____________________________________________________________________________
-AliTRDdigitizer::AliTRDdigitizer(AliTRDdigitizer &d)
+AliTRDdigitizer::AliTRDdigitizer(const AliTRDdigitizer &d)
 {
   //
   // AliTRDdigitizer copy constructor
   //
 
-  d.Copy(*this);
+  ((AliTRDdigitizer &) d).Copy(*this);
 
 }
 
@@ -149,35 +152,47 @@ AliTRDdigitizer::~AliTRDdigitizer()
 }
 
 //_____________________________________________________________________________
-void AliTRDdigitizer::Copy(AliTRDdigitizer &d)
+AliTRDdigitizer &AliTRDdigitizer::operator=(const AliTRDdigitizer &d)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &d) ((AliTRDdigitizer &) d).Copy(*this);
+  return *this;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDdigitizer::Copy(TObject &d)
 {
   //
   // Copy function
   //
 
-  d.fInputFile     = NULL;
-  d.fDigits        = NULL;
-  d.fTRD           = NULL;
-  d.fGeo           = NULL;
-
-  d.fEvent         = 0;
-
-  d.fGasGain       = fGasGain;
-  d.fNoise         = fNoise;
-  d.fChipGain      = fChipGain;
-  d.fADCoutRange   = fADCoutRange;
-  d.fADCinRange    = fADCinRange;
-  d.fADCthreshold  = fADCthreshold;
-  d.fDiffusionOn   = fDiffusionOn; 
-  d.fDiffusionT    = fDiffusionT;
-  d.fDiffusionL    = fDiffusionL;
-  d.fElAttachOn    = fElAttachOn;
-  d.fElAttachProp  = fElAttachProp;
-  d.fExBOn         = fExBOn;
-  d.fLorentzAngle  = fLorentzAngle;
-  d.fLorentzFactor = fLorentzFactor;
-
-  fPRF->Copy(*d.fPRF);
+  ((AliTRDdigitizer &) d).fInputFile     = NULL;
+  ((AliTRDdigitizer &) d).fDigits        = NULL;
+  ((AliTRDdigitizer &) d).fTRD           = NULL;
+  ((AliTRDdigitizer &) d).fGeo           = NULL;
+
+  ((AliTRDdigitizer &) d).fEvent         = 0;
+
+  ((AliTRDdigitizer &) d).fGasGain       = fGasGain;
+  ((AliTRDdigitizer &) d).fNoise         = fNoise;
+  ((AliTRDdigitizer &) d).fChipGain      = fChipGain;
+  ((AliTRDdigitizer &) d).fADCoutRange   = fADCoutRange;
+  ((AliTRDdigitizer &) d).fADCinRange    = fADCinRange;
+  ((AliTRDdigitizer &) d).fADCthreshold  = fADCthreshold;
+  ((AliTRDdigitizer &) d).fDiffusionOn   = fDiffusionOn; 
+  ((AliTRDdigitizer &) d).fDiffusionT    = fDiffusionT;
+  ((AliTRDdigitizer &) d).fDiffusionL    = fDiffusionL;
+  ((AliTRDdigitizer &) d).fElAttachOn    = fElAttachOn;
+  ((AliTRDdigitizer &) d).fElAttachProp  = fElAttachProp;
+  ((AliTRDdigitizer &) d).fExBOn         = fExBOn;
+  ((AliTRDdigitizer &) d).fLorentzAngle  = fLorentzAngle;
+  ((AliTRDdigitizer &) d).fLorentzFactor = fLorentzFactor;
+
+  fPRF->Copy(*((AliTRDdigitizer &) d).fPRF);
 
 }
 
@@ -290,6 +305,19 @@ Bool_t AliTRDdigitizer::Open(const Char_t *name, Int_t nEvent)
     return kFALSE;
   }
 
+  // Get the pointer to the detector class and check for version 1
+  fTRD = (AliTRD*) gAlice->GetDetector("TRD");
+  if (fTRD->IsVersion() != 1) {
+    printf("AliTRDdigitizer::Open -- ");
+    printf("TRD must be version 1 (slow simulator).\n");
+    exit(1);
+  }
+
+  // Get the geometry
+  fGeo = fTRD->GetGeometry();
+  printf("AliTRDdigitizer::Open -- ");
+  printf("Geometry version %d\n",fGeo->IsVersion());
+
   return kTRUE;
 
 }
@@ -382,10 +410,12 @@ Bool_t AliTRDdigitizer::MakeDigits()
           Int_t sens1 = fTRD->GetSensSector();
           Int_t sens2 = sens1 + fTRD->GetSensSectorRange();
           sens2 -= ((Int_t) (sens2 / kNsect)) * kNsect;
-          if (sens1 < sens2) 
+          if (sens1 < sens2) {
             if ((iSect < sens1) || (iSect >= sens2)) continue;
-          else
+         }
+          else {
             if ((iSect < sens1) && (iSect >= sens2)) continue;
+         }
        }
 
         Int_t nDigits = 0;
index 7a61af33fe73e8623489f275ac5e5d81901fb571..59eb90cb4a95e2edbb0d075c028cd07486143288 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITRDDIGITIZER_h
-#define ALITRDDIGITIZER_h
+#ifndef ALITRDDIGITIZER_H
+#define ALITRDDIGITIZER_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -26,10 +26,11 @@ class AliTRDdigitizer : public TNamed {
 
   AliTRDdigitizer();
   AliTRDdigitizer(const Text_t* name, const Text_t* title);
-  AliTRDdigitizer(AliTRDdigitizer &d);
+  AliTRDdigitizer(const AliTRDdigitizer &d);
   virtual ~AliTRDdigitizer();
+  AliTRDdigitizer &operator=(const AliTRDdigitizer &d);
 
-  virtual void         Copy(AliTRDdigitizer &d);
+  virtual void         Copy(TObject &d);
   virtual void         Init();
   virtual Bool_t       Open(const Char_t *name, Int_t nEvent = 0);
   virtual Bool_t       MakeDigits();
@@ -65,8 +66,6 @@ class AliTRDdigitizer : public TNamed {
   virtual Float_t      GetLorentzAngle()               { return fLorentzAngle;  };
   virtual TF1         *GetPadResponse()                { return fPRF;           };
 
-  inline  AliTRDdigitizer &operator=(AliTRDdigitizer &d);
-
  protected:
 
   TFile               *fInputFile;       //! ALIROOT-filename
@@ -101,16 +100,4 @@ class AliTRDdigitizer : public TNamed {
 
 };
 
-//_____________________________________________________________________________
-AliTRDdigitizer &AliTRDdigitizer::operator=(AliTRDdigitizer &d)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &d) d.Copy(*this);
-  return *this;
-
-}
-
 #endif
index bbe81721d23b295a3de4ca45744d3918927dd7bd..b37b097b5e343632a08e3918daedd4de06790784 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.3  2000/06/07 16:27:01  cblume
 Try to remove compiler warnings on Sun and HP
 
@@ -58,13 +61,13 @@ AliTRDdigitsManager::AliTRDdigitsManager():TObject()
 }
 
 //_____________________________________________________________________________
-AliTRDdigitsManager::AliTRDdigitsManager(AliTRDdigitsManager &m)
+AliTRDdigitsManager::AliTRDdigitsManager(const AliTRDdigitsManager &m)
 {
   //
   // AliTRDdigitsManager copy constructor
   //
 
-  m.Copy(*this);
+  ((AliTRDdigitsManager &) m).Copy(*this);
 
 }
 
@@ -88,13 +91,13 @@ AliTRDdigitsManager::~AliTRDdigitsManager()
 }
 
 //_____________________________________________________________________________
-void AliTRDdigitsManager::Copy(AliTRDdigitsManager &m)
+void AliTRDdigitsManager::Copy(TObject &m)
 {
   //
   // Copy function
   //
 
-  m.fIsRaw = fIsRaw;
+  ((AliTRDdigitsManager &) m).fIsRaw = fIsRaw;
 
   TObject::Copy(m);
 
@@ -276,3 +279,52 @@ Int_t AliTRDdigitsManager::GetTrack(Int_t track
 
 }
 
+//_____________________________________________________________________________
+AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det) 
+{
+  //
+  // Returns the digits array for one detector
+  //
+
+  return (AliTRDdataArrayI *) fDigits->At(det);
+
+}
+
+//_____________________________________________________________________________
+AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i) 
+{
+  //
+  // Returns the dictionary for one detector
+  //
+
+  return (AliTRDdataArrayI *) fDictionary[i]->At(det);
+
+}
+
+//_____________________________________________________________________________
+Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit)
+{
+  // 
+  // Returns the MC-track numbers from the dictionary for a given digit
+  //
+
+  Int_t row  = Digit->GetRow();
+  Int_t col  = Digit->GetCol();
+  Int_t time = Digit->GetTime();
+  Int_t det  = Digit->GetDetector();
+
+  return GetTrack(track,row,col,time,det);
+
+}
+
+//_____________________________________________________________________________
+AliTRDdigitsManager &AliTRDdigitsManager::operator=(const AliTRDdigitsManager &m)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &m) ((AliTRDdigitsManager &) m).Copy(*this);
+  return *this;
+
+}
index 94e7d38839809058848d9188c62f5c73ceee0ba4..3170692562c2b38854cfedec9df75b9e42e3d710 100644 (file)
@@ -23,10 +23,11 @@ class AliTRDdigitsManager : public TObject {
  public:
 
   AliTRDdigitsManager();
-  AliTRDdigitsManager(AliTRDdigitsManager &m);
+  AliTRDdigitsManager(const AliTRDdigitsManager &m);
   virtual ~AliTRDdigitsManager();
+  AliTRDdigitsManager &operator=(const AliTRDdigitsManager &m);
 
-  virtual void                Copy(AliTRDdigitsManager &m);
+  virtual void                Copy(TObject &m);
   virtual Bool_t              MakeBranch();
   virtual Bool_t              ReadDigits();
   virtual Bool_t              WriteDigits();
@@ -44,8 +45,6 @@ class AliTRDdigitsManager : public TObject {
   inline  AliTRDdataArrayI   *GetDictionary(Int_t det, Int_t i);
   inline  Int_t               GetTrack(Int_t track, AliTRDdigit *Digit);
 
-  inline  AliTRDdigitsManager &operator=(AliTRDdigitsManager &m);
-
  protected:
 
   AliTRDsegmentArray *fDigits;             //! Digits data Array
@@ -57,54 +56,4 @@ class AliTRDdigitsManager : public TObject {
 
 };
 
-//_____________________________________________________________________________
-AliTRDdataArrayI *AliTRDdigitsManager::GetDigits(Int_t det) 
-{
-  //
-  // Returns the digits array for one detector
-  //
-
-  return (AliTRDdataArrayI *) fDigits->At(det);
-
-}
-
-//_____________________________________________________________________________
-AliTRDdataArrayI *AliTRDdigitsManager::GetDictionary(Int_t det, Int_t i) 
-{
-  //
-  // Returns the dictionary for one detector
-  //
-
-  return (AliTRDdataArrayI *) fDictionary[i]->At(det);
-
-}
-
-//_____________________________________________________________________________
-Int_t AliTRDdigitsManager::GetTrack(Int_t track, AliTRDdigit *Digit)
-{
-  // 
-  // Returns the MC-track numbers from the dictionary for a given digit
-  //
-
-  Int_t row  = Digit->GetRow();
-  Int_t col  = Digit->GetCol();
-  Int_t time = Digit->GetTime();
-  Int_t det  = Digit->GetDetector();
-
-  return GetTrack(track,row,col,time,det);
-
-}
-
-//_____________________________________________________________________________
-AliTRDdigitsManager &AliTRDdigitsManager::operator=(AliTRDdigitsManager &m)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &m) m.Copy(*this);
-  return *this;
-
-}
-
 #endif
index fb91195c97739c10679ff829d197a84508b0b0cf..1847b28d2e7efa177e06ce6fc5167a6c5d5c9b60 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITRDGEOMETRY_h
-#define ALITRDGEOMETRY_h
+#ifndef ALITRDGEOMETRY_H
+#define ALITRDGEOMETRY_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
index 298a2e57ffa11e888492f9f2ae3950ebee573b6f..cdb85b7311f6b0759939a3883e770c099a3fb23e 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITRDGEOMETRYFULL_h
-#define ALITRDGEOMETRYFULL_h
+#ifndef ALITRDGEOMETRYFULL_H
+#define ALITRDGEOMETRYFULL_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
index c2ecadae48ef807dbfe81fb1d1cc92b1a133c7a4..7fe4cedb6ae800089545eebf44d11c56152e35a2 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITRDGEOMETRYHOLE_h
-#define ALITRDGEOMETRYHOLE_h
+#ifndef ALITRDGEOMETRYHOLE_H
+#define ALITRDGEOMETRYHOLE_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
index 5147d10427775008558c63cd65c267fb5ce71f7b..137841d1c5d17f651acf34b831742f0e2a541410 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.7  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.6  2000/05/08 15:48:30  cblume
 Resolved merge conflict
 
@@ -91,13 +94,13 @@ AliTRDmatrix::AliTRDmatrix(Int_t nRow, Int_t nCol, Int_t nTime
 }
 
 //_____________________________________________________________________________
-AliTRDmatrix::AliTRDmatrix(AliTRDmatrix &m)
+AliTRDmatrix::AliTRDmatrix(const AliTRDmatrix &m)
 {
   //
   // AliTRDmatrix copy constructor
   //
 
-  m.Copy(*this);
+  ((AliTRDmatrix &) m).Copy(*this);
 
 }
 
@@ -115,6 +118,18 @@ AliTRDmatrix::~AliTRDmatrix()
 
 }
 
+//_____________________________________________________________________________
+AliTRDmatrix &AliTRDmatrix::operator=(const AliTRDmatrix &m)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &m) ((AliTRDmatrix &) m).Copy(*this);
+  return *this;
+
+}
+
 //_____________________________________________________________________________
 void AliTRDmatrix::AddSignal(Int_t iRow, Int_t iCol, Int_t iTime, Float_t signal)
 {
@@ -131,21 +146,21 @@ void AliTRDmatrix::AddSignal(Int_t iRow, Int_t iCol, Int_t iTime, Float_t signal
 }
 
 //_____________________________________________________________________________
-void AliTRDmatrix::Copy(AliTRDmatrix &m)
+void AliTRDmatrix::Copy(TObject &m)
 {
   //
   // Copy function
   //
 
-  m.fRow        = fRow;
-  m.fCol        = fCol;
-  m.fTime       = fTime;
-  m.fPixel      = fPixel;
-  m.fSector     = fSector;
-  m.fChamber    = fChamber;
-  m.fPlane      = fPlane;
+  ((AliTRDmatrix &) m).fRow        = fRow;
+  ((AliTRDmatrix &) m).fCol        = fCol;
+  ((AliTRDmatrix &) m).fTime       = fTime;
+  ((AliTRDmatrix &) m).fPixel      = fPixel;
+  ((AliTRDmatrix &) m).fSector     = fSector;
+  ((AliTRDmatrix &) m).fChamber    = fChamber;
+  ((AliTRDmatrix &) m).fPlane      = fPlane;
 
-  m.fPixelArray = new TObjArray(*fPixelArray);
+  ((AliTRDmatrix &) m).fPixelArray = new TObjArray(*fPixelArray);
 
 }
 
index dafe1fcb56e73119b2ebc5e32b2a6eee493cd5a4..5e45ca0de739bc093f1f254e6570e377d02832c5 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITRDMATRIX_h
-#define ALITRDMATRIX_h
+#ifndef ALITRDMATRIX_H
+#define ALITRDMATRIX_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -24,13 +24,14 @@ public:
 
   AliTRDmatrix();
   AliTRDmatrix(Int_t nRow, Int_t nCol, Int_t nTime, Int_t iSec, Int_t iCha, Int_t iPla);
-  AliTRDmatrix(AliTRDmatrix &m);
+  AliTRDmatrix(const AliTRDmatrix &m);
   virtual ~AliTRDmatrix();
+  AliTRDmatrix &operator=(const AliTRDmatrix &m);
 
   virtual void         AddSignal(Int_t iRow, Int_t iCol, Int_t iTime, Float_t signal);
   virtual Bool_t       AddTrack(Int_t iRow, Int_t iCol, Int_t iTime, Int_t track);
 
-  virtual void         Copy(AliTRDmatrix &m);
+  virtual void         Copy(TObject &m);
   virtual void         Draw(Option_t *opt = " ");
   virtual void         DrawRow(Int_t iRow);
   virtual void         DrawCol(Int_t iCol);
@@ -50,8 +51,6 @@ public:
   virtual Int_t        GetChamber() { return fChamber; };
   virtual Int_t        GetPlane()   { return fPlane;   };
 
-  inline  AliTRDmatrix &operator=(AliTRDmatrix &m);
-
 protected:
 
   virtual Int_t        GetIndex(Int_t iRow, Int_t iCol, Int_t iTime);
@@ -70,16 +69,4 @@ protected:
 
 };
 
-//_____________________________________________________________________________
-AliTRDmatrix &AliTRDmatrix::operator=(AliTRDmatrix &m)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &m) m.Copy(*this);
-  return *this;
-
-}
-
 #endif
index 59adab3d189c24f391056fb2dd41c74c8dee9010..8f216a68e8a3d9606710b4b37691deaa3cbda02e 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.3  2000/02/28 19:10:26  cblume
 Include the new TRD classes
 
@@ -60,15 +63,15 @@ AliTRDpixel::~AliTRDpixel()
 }
 
 //_____________________________________________________________________________
-void AliTRDpixel::Copy(AliTRDpixel &p)
+void AliTRDpixel::Copy(TObject &p)
 {
   //
   // Copy function
   //
 
-  p.fSignal = fSignal;
+  ((AliTRDpixel &) p).fSignal = fSignal;
   for (Int_t iTrackPixel = 0; iTrackPixel < kTrackPixel; iTrackPixel++) {
-    p.fTrack[iTrackPixel] = fTrack[iTrackPixel];
+    ((AliTRDpixel &) p).fTrack[iTrackPixel] = fTrack[iTrackPixel];
   }
 
 }
index 43636b325182af64f4a1c6456a336e9dd1a28ab4..ecb32b497229ed5f9c21f568ed5a8315dc88e3dd 100644 (file)
@@ -1,5 +1,5 @@
-#ifndef ALITRDPIXEL_h
-#define ALITRDPIXEL_h
+#ifndef ALITRDPIXEL_H
+#define ALITRDPIXEL_H
 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
  * See cxx source for full Copyright notice                               */
 
@@ -20,7 +20,7 @@ public:
   AliTRDpixel();
   virtual ~AliTRDpixel();
 
-  virtual void    Copy(AliTRDpixel &p);
+  virtual void    Copy(TObject &p);
 
   virtual void    SetSignal(Float_t signal)      { fSignal   = signal; };
   virtual void    SetTrack(Int_t i, Int_t track) { fTrack[i] = track;  };
index 9633603e8d16eae75b9ddb656ac70d782583e49e..5a1742314adf0f7743e8629deb8f85dcff7aeef1 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.2  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.1  2000/02/28 19:02:07  cblume
 Add new TRD classes
 
@@ -78,7 +81,8 @@ void AliTRDrecPoint::AddDigit(Int_t digit)
 
   // Increase the size of the list if necessary
   if (fMulDigit >= fMaxDigit) { 
-    int *tempo = new (int[fMaxDigit*=2]); 
+    fMaxDigit *= 2;
+    int *tempo = new (int[fMaxDigit]); 
     Int_t index; 
     for (index = 0; index < fMulDigit; index++)
       tempo[index] = fDigitsList[index]; 
index 54d99b110570e46c2709befad6fa6e4a8ec098ab..700028a0358b9e0dd94cd05b36ef293c172e383b 100644 (file)
@@ -14,7 +14,7 @@ class AliTRDrecPoint : public AliRecPoint {
   AliTRDrecPoint();
   virtual ~AliTRDrecPoint();
 
-  virtual void    Print(Option_t* ) {};
+  virtual void    Print(Option_t* opt) {};
   virtual void    AddDigit(Int_t digit);
   virtual void    AddDigit(AliDigitNew &digit) {};
 
index 76c6d26ee93fe82555de796b331aa47ae5916c90..4d29214958e3f6add4bc7cd79caa06f2cd27a154 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.4  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.3  2000/06/07 16:27:01  cblume
 Try to remove compiler warnings on Sun and HP
 
@@ -88,13 +91,13 @@ AliTRDsegmentArrayBase::AliTRDsegmentArrayBase(Text_t *classname, Int_t n)
 }
 
 //_____________________________________________________________________________
-AliTRDsegmentArrayBase::AliTRDsegmentArrayBase(AliTRDsegmentArrayBase &a)
+AliTRDsegmentArrayBase::AliTRDsegmentArrayBase(const AliTRDsegmentArrayBase &a)
 {
   //
   // AliTRDsegmentArrayBase copy constructor
   //
   
-  a.Copy(*this);
+  ((AliTRDsegmentArrayBase &) a).Copy(*this);
 
 }
 
@@ -117,7 +120,20 @@ AliTRDsegmentArrayBase::~AliTRDsegmentArrayBase()
 }
 
 //_____________________________________________________________________________
-void AliTRDsegmentArrayBase::Copy(AliTRDsegmentArrayBase &a)
+AliTRDsegmentArrayBase &AliTRDsegmentArrayBase
+                        ::operator=(const AliTRDsegmentArrayBase &a)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &a) ((AliTRDsegmentArrayBase &) a).Copy(*this);
+  return *this;
+
+}
+
+//_____________________________________________________________________________
+void AliTRDsegmentArrayBase::Copy(TObject &a)
 {
   //
   // Copy function
@@ -125,11 +141,11 @@ void AliTRDsegmentArrayBase::Copy(AliTRDsegmentArrayBase &a)
 
   TNamed::Copy(a);
 
-  fSegment->Copy(*a.fSegment);
-  fTreeIndex->Copy(*a.fTreeIndex);
-  fClass->Copy(*a.fClass);
+  fSegment->Copy(*((AliTRDsegmentArrayBase &) a).fSegment);
+  fTreeIndex->Copy(*((AliTRDsegmentArrayBase &) a).fTreeIndex);
+  fClass->Copy(*((AliTRDsegmentArrayBase &) a).fClass);
 
-  a.fNSegment = fNSegment;
+  ((AliTRDsegmentArrayBase &) a).fNSegment = fNSegment;
 
 }
 
index b5d71881b10a4fb0bb443a2af09476a51e243b5c..ef6bf48e0111acd87b5c574cc25b2fd125284edc 100644 (file)
@@ -25,8 +25,9 @@ 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 *operator[](Int_t i); 
@@ -34,7 +35,7 @@ class AliTRDsegmentArrayBase: public TNamed {
           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(); 
@@ -49,8 +50,6 @@ class AliTRDsegmentArrayBase: public TNamed {
           TClass          *GetClass() { return fClass; };
           TTree           *GetTree()  { return fTree;  };   
 
-  inline  AliTRDsegmentArrayBase &operator=(AliTRDsegmentArrayBase &a);
-
  protected:
 
   TObjArray    *fSegment;            //! Pointer to an array of pointers to a segment
@@ -64,17 +63,4 @@ class AliTRDsegmentArrayBase: public TNamed {
 
 };
 
-//_____________________________________________________________________________
-AliTRDsegmentArrayBase &AliTRDsegmentArrayBase
-                        ::operator=(AliTRDsegmentArrayBase &a)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &a) a.Copy(*this);
-  return *this;
-
-}
-
 #endif 
index f2cc20136c7fb5cd9b108f826fd5af410f310a24..ef1c8299d0d224255eaa79d08593651cbdd14d5d 100644 (file)
@@ -15,6 +15,9 @@
 
 /*
 $Log$
+Revision 1.20  2000/06/08 18:32:58  cblume
+Make code compliant to coding conventions
+
 Revision 1.19  2000/06/07 16:27:32  cblume
 Try to remove compiler warnings on Sun and HP
 
@@ -131,24 +134,38 @@ AliTRDv1::AliTRDv1(const char *name, const char *title)
 }
 
 //_____________________________________________________________________________
-AliTRDv1::AliTRDv1(AliTRDv1 &trd)
+AliTRDv1::AliTRDv1(const AliTRDv1 &trd)
 {
   //
   // Copy constructor
   //
 
-  trd.Copy(*this);
+  ((AliTRDv1 &) trd).Copy(*this);
 
 }
 
 //_____________________________________________________________________________
 AliTRDv1::~AliTRDv1()
 {
+  //
+  // AliTRDv1 destructor
+  //
 
   if (fDeltaE) delete fDeltaE;
 
 }
  
+//_____________________________________________________________________________
+AliTRDv1 &AliTRDv1::operator=(const AliTRDv1 &trd)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &trd) ((AliTRDv1 &) trd).Copy(*this);
+  return *this;
+
+}
  
 //_____________________________________________________________________________
 void AliTRDv1::Copy(AliTRDv1 &trd)
index ef324582300fcf175201055c5edf4cd476c331ec..bbd3dfc19ea30ab8df09ff39eda8e99f8ca8eb43 100644 (file)
@@ -23,8 +23,9 @@ class AliTRDv1 : public AliTRD {
 
   AliTRDv1();
   AliTRDv1(const char *name, const char *title);
-  AliTRDv1(AliTRDv1 &trd);
+  AliTRDv1(const AliTRDv1 &trd);
   virtual ~AliTRDv1();
+  AliTRDv1 &operator=(const AliTRDv1 &trd);
 
   virtual void    Copy(AliTRDv1 &trd);
   virtual void    CreateGeometry();
@@ -43,8 +44,6 @@ class AliTRDv1 : public AliTRD {
           Int_t   GetSensSector()      { return fSensSector;      };
           Int_t   GetSensSectorRange() { return fSensSectorRange; };
 
-  inline  AliTRDv1 &operator=(AliTRDv1 &trd);
-
  protected:
 
   Int_t        fIdSens;                 // Sensitive volume identifier
@@ -69,16 +68,4 @@ class AliTRDv1 : public AliTRD {
 
 };
 
-//_____________________________________________________________________________
-AliTRDv1 &AliTRDv1::operator=(AliTRDv1 &trd)
-{
-  //
-  // Assignment operator
-  //
-
-  if (this != &trd) trd.Copy(*this);
-  return *this;
-
-}
-
 #endif