fix coverity defects
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 20 Dec 2010 10:11:48 +0000 (10:11 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 20 Dec 2010 10:11:48 +0000 (10:11 +0000)
PWG1/TRD/AliTRDonlineTrackletFilter.cxx
PWG1/TRD/AliTRDresolution.cxx

index ec228ca..9a02680 100644 (file)
@@ -205,13 +205,13 @@ Bool_t AliTRDonlineTrackletFilter::LoadEvent()
 
   // tracklets from simulation
   char treename[30];
-  sprintf(treename, "Event%d/tracklets", fEvent);
+  snprintf(treename, 30, "Event%d/tracklets", fEvent);
 
   fTrackletTreeSim = (TTree*) fTrackletFile->Get(treename);
 
   // tracklets from raw
   char treenameRaw[30];
-  sprintf(treenameRaw, "Event%d/tracklets-raw", fEvent);
+  snprintf(treenameRaw, 30, "Event%d/tracklets-raw", fEvent);
   fTrackletTreeRaw = (TTree*) fTrackletFile->Get(treenameRaw);
 
   return kTRUE;
index 00ede13..b5b62ff 100644 (file)
@@ -1950,7 +1950,9 @@ void AliTRDresolution::MakeSummary()
   p=cOut->cd(6); 
   p->SetRightMargin(0.06);p->SetTopMargin(0.06);
   xy[0]=-.5; xy[1]=-0.5; xy[2]=fgkNresYsegm[fSegmentLevel]-.5; xy[3]=2.5;
-  GetGraphArray(xy, kMCtracklet, 1, 1);
+  if(!GetGraphArray(xy, kMCtracklet, 1, 1)){
+    AliWarning("Failed retrieve tracklet resolution plot.");
+  }
 
   cOut->SaveAs(Form("%s.gif", cOut->GetName()));
   delete cOut;