]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/EVE/AliHLTEveMultCorr.cxx
forgot use collision option
[u/mrichter/AliRoot.git] / HLT / EVE / AliHLTEveMultCorr.cxx
index a118229fddf55003365b390cc38dc55efbf898da..16f5ad7d03f719d9e1b3d58403d4e24c3fcce2c2 100644 (file)
@@ -54,7 +54,7 @@ void AliHLTEveMultCorr::ProcessBlock(AliHLTHOMERBlockDesc* block)
     TString msg;
     
     TList *hlist = dynamic_cast<TList*>(block->GetTObject());
-    if(kFALSE)
+    if(!hlist)
     {
       hlist = dynamic_cast<TList*>(fMerger->Process(hlist, block->GetSpecification()));
     }
@@ -243,24 +243,33 @@ void AliHLTEveMultCorr::AddHistogramToCanvas(TH1* hist, TCanvas* canvas, Int_t&
         {
            canvas->cd(cdCount);
            TPad * pad = dynamic_cast<TPad*>(canvas->cd(cdCount));
-           pad->SetLogy();
+           if(pad) pad->SetLogy();
            if(zoom) 
            {
              TH1F *h = dynamic_cast<TH1F*>(hist);
-             h->GetXaxis()->SetRange(0, h->GetMaximumBin() + h->GetMaximumBin()*0.2);
+             if(h) 
+               {
+                 h->GetXaxis()->SetRange(0, (Int_t) (h->GetMaximumBin() + h->GetMaximumBin()*0.2));
+                 h->Draw();
+               }
            }
-            dynamic_cast<TH1F*>(hist)->Draw();
         }
         else if (!strcmp(hist->ClassName(), "TH2F"))
         {
            canvas->cd(cdCount);
+           TH2F *h = dynamic_cast<TH2F*>(hist);
            if(zoom)
            {
-             TH2F *h = dynamic_cast<TH2F*>(hist);
-             h->GetXaxis()->SetRange(0, h->GetMaximumBin() + h->GetMaximumBin()*0.2);
-             h->GetYaxis()->SetRange(0, h->GetMaximumBin() + h->GetMaximumBin()*0.2);
+             if(h)
+               {
+                 h->GetXaxis()->SetRange(0, (Int_t) (h->GetMaximumBin() + h->GetMaximumBin()*0.2));
+                 h->GetYaxis()->SetRange(0, (Int_t) (h->GetMaximumBin() + h->GetMaximumBin()*0.2));
+               }
+           }
+            if(h)
+           {
+             h->Draw("COLZ");
            }
-            dynamic_cast<TH2F*>(hist)->Draw("COLZ");
         }
         else
         {