]>
Commit | Line | Data |
---|---|---|
d6a65834 | 1 | |
2 | void plotQAflow(const char* filename="") | |
3 | { | |
4 | TFile f(filename,"read"); | |
5 | TObjArray* flowQA = dynamic_cast<TObjArray*>(f.Get("flowQA")); | |
6 | TObjArray* before = dynamic_cast<TObjArray*>(flowQA->At(0)); | |
7 | TObjArray* after = dynamic_cast<TObjArray*>(flowQA->At(1)); | |
8 | for (Int_t i=0; i<before->GetEntries(); i++) | |
9 | { | |
10 | TH1* hbefore = dynamic_cast<TH1*>(before->At(i)); | |
11 | TH1* hafter = dynamic_cast<TH1*>(after->At(i)); | |
12 | TCanvas* canvas = new TCanvas(hbefore->GetName(), hbefore->GetTitle()); | |
13 | TLegend* legend = new TLegend(0.8,0.8,1.0,1.0); | |
14 | hbefore->Draw(); | |
15 | legend->AddEntry(hbefore,"before cuts","l"); | |
16 | hafter->SetLineColor(2); | |
17 | legend->AddEntry(hafter,"after cuts","l"); | |
18 | hafter->Draw("same"); | |
19 | legend->Draw(); | |
20 | } | |
21 | } |