macro to save the plots
[u/mrichter/AliRoot.git] / PWG0 / eventStats / show.C
... / ...
CommitLineData
1void show(const char* fileName = "event_stat.root")
2{
3 if (TString(fileName).BeginsWith("alien://"))
4 TGrid::Connect("alien://");
5
6 TFile::Open(fileName);
7
8 c = new TCanvas;
9 hist = (TH1*) gFile->Get("physics_selection/fHistStatistics");
10 hist->SetStats(0);
11 hist->Draw("TEXT");
12 c->SetLeftMargin(0.25);
13 c->SetBottomMargin(0.2);
14 c->SaveAs("stat.png");
15
16 c = new TCanvas;
17 c->SetLeftMargin(0.25);
18 hist = (TH1*) gFile->Get("physics_selection/fHistBunchCrossing");
19 hist->SetStats(0);
20 hist->Draw("TEXT");
21 c->SaveAs("bc.png");
22}