Coverity fixes (Alex)
authorhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Aug 2011 09:22:37 +0000 (09:22 +0000)
committerhristov <hristov@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 8 Aug 2011 09:22:37 +0000 (09:22 +0000)
PWG1/TRD/AliTRDresolution.cxx
TRD/AliTRDseedV1.cxx

index 7908498..d72a0e1 100644 (file)
@@ -399,7 +399,7 @@ TH1* AliTRDresolution::PlotTracklet(const AliTRDtrackV1 *track)
     AliWarning("No output container defined.");
     return NULL;
   }
-  return NULL;
+//  return NULL;
   Double_t val[kNdim+1];
   AliTRDseedV1 *fTracklet(NULL);
   for(Int_t il(0); il<AliTRDgeometry::kNlayer; il++){
@@ -428,7 +428,7 @@ TH1* AliTRDresolution::PlotTracklet(const AliTRDtrackV1 *track)
       val[kZrez] = TMath::ATan((fTracklet->GetYref(1) - exb)/(1+fTracklet->GetYref(1)*exb));
     }
     val[kNdim] = fTracklet->GetdQdl();
-    H->Fill(val);
+    if(DebugLevel()>=1) H->Fill(val);
 
 //     // compute covariance matrix
 //     fTracklet->GetCovAt(x, cov);
@@ -439,7 +439,7 @@ TH1* AliTRDresolution::PlotTracklet(const AliTRDtrackV1 *track)
 //     ((TH3S*)arr->At(1))->Fill(sgm[fSegmentLevel], dyz[0], dyz[1]);
 //     ((TH3S*)arr->At(3))->Fill(tht, dyz[1], rc);
 
-    if(DebugLevel()>=1){
+    if(DebugLevel()>=2){
       Bool_t rc(fTracklet->IsRowCross());
       UChar_t err(fTracklet->GetErrorMsg());
       Double_t x(fTracklet->GetX()),
@@ -1096,7 +1096,6 @@ Bool_t AliTRDresolution::MakeProjectionCluster()
 Bool_t AliTRDresolution::MakeProjectionTracklet()
 {
 // Analyse tracklet
-  return kTRUE;
   Int_t cidx = kTracklet;
   if(fProj && fProj->At(cidx)) return kTRUE;
   if(!fContainer){
@@ -1105,10 +1104,9 @@ Bool_t AliTRDresolution::MakeProjectionTracklet()
   }
   THnSparse *H(NULL);
   if(!(H = (THnSparse*)fContainer->At(cidx))){
-    AliError(Form("Missing/Wrong data @ %d.", cidx));
+//    AliError(Form("Missing/Wrong data @ %d.", cidx));
     return kFALSE;
   }
-
   return kTRUE;
 }
 
@@ -1459,7 +1457,7 @@ TObjArray* AliTRDresolution::BuildMonitorContainerTrack(const char* name)
   if(!(h = (TH3S*)gROOT->FindObject(hname))){
     h = new TH3S(hname, htitle, 
                  kNpt, binsPt, kNdpt, binsDPt, kNspc, binsSpc);
-    ax = h->GetZaxis();
+    //ax = h->GetZaxis();
     //for(Int_t ib(1); ib<=ax->GetNbins(); ib++) ax->SetBinLabel(ib, fgParticle[ib-1]);
   } else h->Reset();
   arr->AddAt(h, 8);
index 11e00b0..2eb5789 100644 (file)
@@ -1234,7 +1234,7 @@ Bool_t  AliTRDseedV1::AttachClusters(AliTRDtrackingChamber *const chamber, Bool_
   }
   AliDebug(4, Form("Sorted row candidates:\n"
       "  row[%2d] Ncl[%2d] <dz>[cm]=%+8.2f row[%2d] Ncl[%2d] <dz>[cm]=%+8.2f"
-      , idxRow[0], ncl[idxRow[0]], zresRow[0], idxRow[1], ncl[idxRow[1]], zresRow[1]));
+      , idxRow[0], ncl[idxRow[0]], zresRow[0], idxRow[1], idxRow[1]<0?0:ncl[idxRow[1]], zresRow[1]));
 
   // initialize debug streamer
   TTreeSRedirector *pstreamer(NULL);