]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliTrackFitterRieman.cxx
Coverity fixes.
[u/mrichter/AliRoot.git] / STEER / AliTrackFitterRieman.cxx
index 3406252e1b7d728718ff3badbd03dc1d7a641208..f08a2fee4b18ed7c4de6470d4e632683270b54d5 100644 (file)
@@ -60,6 +60,8 @@ AliTrackFitterRieman::AliTrackFitterRieman():
   //
   // default constructor
   //
+  fCorrY[0] = fCorrY[1] = fCorrY[2] = fCorrY[3] = 0;
+  fCorrZ[0] = fCorrZ[1] = fCorrZ[2] = fCorrZ[3] = 0;
 }
 
 
@@ -78,6 +80,8 @@ AliTrackFitterRieman::AliTrackFitterRieman(AliTrackPointArray *array, Bool_t own
   //
   // Constructor
   //
+  fCorrY[0] = fCorrY[1] = fCorrY[2] = fCorrY[3] = 0;
+  fCorrZ[0] = fCorrZ[1] = fCorrZ[2] = fCorrZ[3] = 0;
   if (AliLog::GetDebugLevel("","AliTrackFitterRieman")) fDebugStream = new TTreeSRedirector("RiemanAlignDebug.root");
 }
 
@@ -96,6 +100,8 @@ AliTrackFitterRieman::AliTrackFitterRieman(const AliTrackFitterRieman &rieman):
   //
   // copy constructor
   //
+  fCorrY[0] = fCorrY[1] = fCorrY[2] = fCorrY[3] = 0;
+  fCorrZ[0] = fCorrZ[1] = fCorrZ[2] = fCorrZ[3] = 0;
   if (AliLog::GetDebugLevel("","AliTrackFitterRieman")) fDebugStream = new TTreeSRedirector("RiemanAlignDebug.root");
 }
 
@@ -167,6 +173,10 @@ Bool_t AliTrackFitterRieman::Fit(const TArrayI *volIds,const TArrayI *volIdsFit,
   //  Float_t debugRatio = 1./(1.+debugLevel);
   Float_t debugRatio = debugLevel? 1.0/debugLevel : 1.0;
 
+  if (!fPoints) {
+    AliError("Track points array not available! Exiting...");
+    return kFALSE;
+  }
   Int_t npoints = fPoints->GetNPoints();
   if ( npoints<fMinNPoints) return kFALSE;
   //