Update in gain cdb macro: sjena
[u/mrichter/AliRoot.git] / PMD / AliPMDRecPoint.cxx
index 73623a2..6d07bd9 100644 (file)
@@ -13,9 +13,7 @@
  * provided "as is" without express or implied warranty.                  *
  **************************************************************************/
 
-/*
-$Log$
-*/
+/* $Id$ */
 
 //_________________________________________________________________________
 // Class for PMD reconstructed space points 
@@ -48,7 +46,7 @@ void AliPMDRecPoint::AddDigit(AliDigitNew & digit)
   
   
   if ( fMulDigit >= fMaxDigit ) { // increase the size of the list 
-    int * tempo = new ( int[fMaxDigit*=2] ) ; 
+    int * tempo = new int[fMaxDigit*=2]; 
     
     Int_t index ; 
     
@@ -65,34 +63,35 @@ void AliPMDRecPoint::AddDigit(AliDigitNew & digit)
 }
 
 //____________________________________________________________________________
-void AliPMDRecPoint::Copy(AliPMDRecPoint& recp) const
+void AliPMDRecPoint::Copy(TObject & recp) const
 {
   //
   // Copy *this onto pts
   //
   // Copy all first
+
   if(this != &recp) {
     ((TObject*) this)->Copy((TObject&)recp);
-    recp.fAmp = fAmp;
-    recp.fGeom = fGeom;
-    recp.fIndexInList = fIndexInList;
-    recp.fLocPos = fLocPos;
-    recp.fLocPosM = new TMatrix(*fLocPosM);
-    recp.fMaxDigit = fMaxDigit;
-    recp.fMulDigit = fMulDigit;
-    recp.fMaxTrack = fMaxTrack;
-    recp.fMulTrack = fMulTrack;
+    ((AliPMDRecPoint&)recp).fAmp = fAmp;
+    ((AliPMDRecPoint&)recp).fGeom = fGeom;
+    ((AliPMDRecPoint&)recp).fIndexInList = fIndexInList;
+    ((AliPMDRecPoint&)recp).fLocPos = fLocPos;
+    ((AliPMDRecPoint&)recp).fLocPosM = new TMatrix(*fLocPosM);
+    ((AliPMDRecPoint&)recp).fMaxDigit = fMaxDigit;
+    ((AliPMDRecPoint&)recp).fMulDigit = fMulDigit;
+    ((AliPMDRecPoint&)recp).fMaxTrack = fMaxTrack;
+    ((AliPMDRecPoint&)recp).fMulTrack = fMulTrack;
     
     // Duplicate pointed objects
-    recp.fDigitsList = new Int_t[fMulDigit];
-    memcpy(recp.fDigitsList,fDigitsList,fMulDigit*sizeof(Int_t));
-    recp.fTracksList = new Int_t[fMulTrack];
-    memcpy(recp.fTracksList,fTracksList,fMulTrack*sizeof(Int_t));
+    ((AliPMDRecPoint&)recp).fDigitsList = new Int_t[fMulDigit];
+    memcpy(((AliPMDRecPoint&)recp).fDigitsList,fDigitsList,fMulDigit*sizeof(Int_t));
+    ((AliPMDRecPoint&)recp).fTracksList = new Int_t[fMulTrack];
+    memcpy(((AliPMDRecPoint&)recp).fTracksList,fTracksList,fMulTrack*sizeof(Int_t));
   }
 }
 
 //____________________________________________________________________________
-void AliPMDRecPoint::GetCovarianceMatrix(TMatrix & mat)
+void AliPMDRecPoint::GetCovarianceMatrix(TMatrix & mat) const
 {
   // returns the covariant matrix for the local position