fix coverity
authorabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Mar 2012 07:11:41 +0000 (07:11 +0000)
committerabercuci <abercuci@f7af4fe6-9843-0410-8265-dc069ae4e863>
Fri, 30 Mar 2012 07:11:41 +0000 (07:11 +0000)
EVE/EveDet/AliEveTRDTrackList.cxx
EVE/EveDet/AliEveTRDTrackListEditor.cxx

index 81b280b..b43e239 100644 (file)
@@ -526,10 +526,9 @@ Bool_t AliEveTRDTrackList::ApplyProcessMacros(const TList* selIterator, const TL
           AliWarning(Form("Macro \"%s\" returns %d values. Limit set to 10.", procName[i].Data(), nResults));
           nResults=10;
         }
-        TBranch *b(treeSingle->GetBranch(procName[i].Data()));
-        if(!b) {
+        if(!treeSingle->GetBranch(procName[i].Data())) {
           AliInfo(Form("Building branch[%s]", procName[i].Data()));
-          b = treeSingle->Branch(procName[i].Data(), singleTrackOut[i], Form("%s[%d]/D", procName[i].Data(), nResults));
+          treeSingle->Branch(procName[i].Data(), singleTrackOut[i], Form("%s[%d]/D", procName[i].Data(), nResults));
           // Add to "data-from-list"
           for(Int_t ir(0); ir<nResults; ir++) fDataFromMacroList->Add(new TObjString(Form("%s[%d]", procName[i].Data(), ir)));
         }
index 71680ab..c830fca 100644 (file)
@@ -431,7 +431,7 @@ void AliEveTRDTrackListEditor::DrawHistos()
                  kMBIconExclamation, kMBOk);
     return;
   }
-  TTree *ts(NULL), *tc(NULL);
+  TTree *ts(NULL);//, *tc(NULL);
   if (!(ts=(TTree*)file->Get("sTrack"))) {
     AliError(Form("Cannot find tree \"sTrack\" in file \"/tmp/TRD.TrackListMacroData_%s.root\"",
                                   gSystem->Getenv("USER")));
@@ -440,14 +440,14 @@ void AliEveTRDTrackListEditor::DrawHistos()
                  kMBIconExclamation, kMBOk);
     return;
   }
-  if (!(tc=(TTree*)file->Get("cTrack"))) {
-    AliError(Form("Cannot find tree \"cTrack\" in file \"/tmp/TRD.TrackListMacroData_%s.root\"",
-                                  gSystem->Getenv("USER")));
-    new TGMsgBox(gClient->GetRoot(), GetMainFrame(), "Error - Draw histograms",
-                 Form("Cannot find tree \"cTrack\" in file \"/tmp/TRD.TrackListMacroData_%s.root\"", gSystem->Getenv("USER")),
-                 kMBIconExclamation, kMBOk);
-    return;
-  }
+//   if (!(tc=(TTree*)file->Get("cTrack"))) {
+//     AliError(Form("Cannot find tree \"cTrack\" in file \"/tmp/TRD.TrackListMacroData_%s.root\"",
+//                                   gSystem->Getenv("USER")));
+//     new TGMsgBox(gClient->GetRoot(), GetMainFrame(), "Error - Draw histograms",
+//                  Form("Cannot find tree \"cTrack\" in file \"/tmp/TRD.TrackListMacroData_%s.root\"", gSystem->Getenv("USER")),
+//                  kMBIconExclamation, kMBOk);
+//     return;
+//   }
 
   // Close any potential tab left from previous plottings
   TGTab *tab(gEve->GetBrowser()->GetTab(1)); TGTabElement *tt(NULL);
@@ -458,7 +458,7 @@ void AliEveTRDTrackListEditor::DrawHistos()
   }
   // Check, if a histo macro shall be drawn
   canvas=0;
-  TH1* myHist(NULL); TBranch *b(NULL);
+  TH1* myHist(NULL);
   for (Int_t j = 0; j < fM->fDataFromMacroList->GetEntries(); j++) {
     if (fCheckButtons[j]->TGButton::GetState() != kButtonDown) continue;
     TString s(fCheckButtons[j]->GetTitle()); Int_t idx(s.Index('['));
@@ -475,7 +475,7 @@ void AliEveTRDTrackListEditor::DrawHistos()
       }
     } else {
       TString ss=s(0, idx);
-      if (!(b = ts->GetBranch(ss.Data()))) {
+      if (!ts->GetBranch(ss.Data())) {
         AliError(Form("No data for macro \"%s\" found !", ss.Data()));
         new TGMsgBox(gClient->GetRoot(), GetMainFrame(), "Error - Draw tree",
                     Form("No data for macro \"%s\" found !",