From: kkanaki Date: Tue, 17 May 2011 08:30:09 +0000 (+0000) Subject: - modified the initialization of the cuts structure to remove compilation warnings X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=f5f4f91bf4d75a2064255be532681b494df9ca2a;p=u%2Fmrichter%2FAliRoot.git - modified the initialization of the cuts structure to remove compilation warnings - separate error message for HLT and OFF in case of empty histograms --- diff --git a/HLT/QA/tasks/macros/drawTHnSparse.C b/HLT/QA/tasks/macros/drawTHnSparse.C index e162fc9cebd..47e087d03e8 100644 --- a/HLT/QA/tasks/macros/drawTHnSparse.C +++ b/HLT/QA/tasks/macros/drawTHnSparse.C @@ -120,14 +120,15 @@ void drawTHnSparse(TString inputFile="HLT-OFFLINE-CentralBarrel-comparison.root" if(heventHLT->GetEntries()==0) printf("\nThe HLT event THnSparse contains 0 entries\n"); if(heventOFF->GetEntries()==0) printf("\nThe OFF event THnSparse contains 0 entries\n"); } - - static const int nCutSets=4; - cuts *p = new cuts[nCutSets]; - // eta pt DCAr DCAz TPCclus ITSclus vtxStatus |vtxZ| V0cent - p[0] = {-2, 2, 0, 10, -10, 10, -10, 10, 0, 200, 0, 10, 2, 10, 0, 100}; - p[1] = {-1, 1, 0, 10, -10, 10, -10, 10, 0, 200, 0, 10, 2, 10, 0, 100}; - p[2] = {-1, 1, 0.3, 10, -7, 7, -7, 7, 0, 200, 0, 10, 2, 10, 0, 100}; - p[3] = {-1, 1, 0.3, 10, -7, 7, -7, 7, 0, 200, 1, 10, 2, 10, 0, 100}; + + cuts p[] = { + // eta pt DCAr DCAz TPCclus ITSclus vtxStatus |vtxZ| V0cent + {-1, 1, 0, 10, -10, 10, -10, 10, 0, 200, 0, 10, 2, 10, 0, 100}, + {-1, 1, 0.3, 10, -7, 7, -7, 7, 0, 200, 0, 10, 2, 10, 0, 100}, + {-1, 1, 0.6, 10, -7, 7, -7, 7, 0, 200, 0, 10, 2, 10, 0, 100}, + {-1, 1, 0.9, 10, -7, 7, -7, 7, 0, 200, 0, 10, 2, 10, 0, 100} + }; + const int nCutSets = sizeof(p)/sizeof(cuts); for(int i=0; iGetName()); continue; } - hlt[i] =(TH1D*)pad->FindObject(Form("fTrackHLT_proj_%d",j-1)); - off[i] =(TH1D*)pad->FindObject(Form("fTrackOFF_proj_%d",j-1)); - if(!hlt[i] || !off[i]){ - printf("Empty histogram for i=%d, file %s.\n", i, outputNames[i].Data()); + hlt[i] =(TH1D*)pad->FindObject(Form("fTrackHLT_proj_%d",j-1)); + + if(!hlt[i]){ + printf("Empty HLT histogram for i=%d, file %s.\n", i, outputNames[i].Data()); continue; } - ovHLT->cd(j); + + off[i] =(TH1D*)pad->FindObject(Form("fTrackOFF_proj_%d",j-1)); + if(!off[i]){ + printf("Empty OFF histogram for i=%d, file %s.\n", i, outputNames[i].Data()); + continue; + } + + ovHLT->cd(j); + if(i==0){ TPaveStats *st = (TPaveStats*)hlt[i]->FindObject("stats"); st->SetTextColor(kBlack);