]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - TRD/AliTRDseed.cxx
More Coverity stuff ..
[u/mrichter/AliRoot.git] / TRD / AliTRDseed.cxx
index 6a77664081e268f8f3d1e31026c5350604859af9..1d609c82d7b951daa9a69018daad00190a672849 100644 (file)
@@ -27,7 +27,6 @@
 #include "AliMathBase.h"
 
 #include "AliTRDseed.h"
-#include "AliTRDcalibDB.h"
 #include "AliTRDcluster.h"
 #include "AliTRDtracker.h"
 #include "AliTRDtrackerV1.h"
@@ -64,7 +63,7 @@ AliTRDseed::AliTRDseed()
     fY[i]        = 0;   // y position
     fZ[i]        = 0;   // z position
     fIndexes[i]  = 0;   // Indexes
-    fClusters[i] = 0x0; // Clusters
+    fClusters[i] = NULL; // Clusters
     fUsable[i]   = 0;   // Indication  - usable cluster
   }
 
@@ -126,6 +125,21 @@ AliTRDseed::AliTRDseed(const AliTRDseed &s)
 
 }
 
+//_____________________________________________________________________________
+AliTRDseed &AliTRDseed::operator=(const AliTRDseed &s)
+{
+  //
+  // Assignment operator
+  //
+
+  if (this != &s) {
+    ((AliTRDseed &) s).Copy(*this);
+  }
+
+  return *this;
+
+}
+
 //_____________________________________________________________________________
 void AliTRDseed::Copy(TObject &o) const
 {
@@ -185,7 +199,7 @@ void AliTRDseed::Reset()
     fY[i]        = 0;  // Y position
     fZ[i]        = 0;  // Z position
     fIndexes[i]  = 0;  // Indexes
-    fClusters[i] = 0x0;  // Clusters
+    fClusters[i] = NULL;  // Clusters
     fUsable[i]   = kFALSE;    
   }
 
@@ -447,8 +461,8 @@ void AliTRDseed::Update()
     fUsable[i] = kFALSE;
     if (!fClusters[i]) continue;
     if (!fClusters[i]->IsInChamber()) continue;
-    if (TMath::Abs(fZ[i] - allowedz[i]) > 2){fClusters[i] = 0x0; continue;}
-    if (TMath::Abs(yres[i] - mean) > 4.0 * sigma){fClusters[i] = 0x0;  continue;}
+    if (TMath::Abs(fZ[i] - allowedz[i]) > 2){fClusters[i] = NULL; continue;}
+    if (TMath::Abs(yres[i] - mean) > 4.0 * sigma){fClusters[i] = NULL;  continue;}
     fUsable[i] = kTRUE;
     fN2++;
     fMPads += fClusters[i]->GetNPads();