From: snelling Date: Tue, 9 Nov 2010 00:00:27 +0000 (+0000) Subject: quick acces to QA histograms X-Git-Url: http://git.uio.no/git/?a=commitdiff_plain;h=d6a65834769c641cbf8aa0877fbbf18f4cb958da;p=u%2Fmrichter%2FAliRoot.git quick acces to QA histograms --- diff --git a/PWG2/FLOW/macros/plotQAflow.C b/PWG2/FLOW/macros/plotQAflow.C new file mode 100644 index 00000000000..42a20c07e13 --- /dev/null +++ b/PWG2/FLOW/macros/plotQAflow.C @@ -0,0 +1,21 @@ + +void plotQAflow(const char* filename="") +{ + TFile f(filename,"read"); + TObjArray* flowQA = dynamic_cast(f.Get("flowQA")); + TObjArray* before = dynamic_cast(flowQA->At(0)); + TObjArray* after = dynamic_cast(flowQA->At(1)); + for (Int_t i=0; iGetEntries(); i++) + { + TH1* hbefore = dynamic_cast(before->At(i)); + TH1* hafter = dynamic_cast(after->At(i)); + TCanvas* canvas = new TCanvas(hbefore->GetName(), hbefore->GetTitle()); + TLegend* legend = new TLegend(0.8,0.8,1.0,1.0); + hbefore->Draw(); + legend->AddEntry(hbefore,"before cuts","l"); + hafter->SetLineColor(2); + legend->AddEntry(hafter,"after cuts","l"); + hafter->Draw("same"); + legend->Draw(); + } +}