From: jgrosseo Date: Thu, 17 Dec 2009 13:20:28 +0000 (+0000) Subject: macro to save the plots X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=d7168ce96ef97323f50d142d424666777912e215;ds=inline macro to save the plots --- diff --git a/PWG0/eventStats/show.C b/PWG0/eventStats/show.C new file mode 100644 index 00000000000..2321f0370aa --- /dev/null +++ b/PWG0/eventStats/show.C @@ -0,0 +1,22 @@ +void show(const char* fileName = "event_stat.root") +{ + if (TString(fileName).BeginsWith("alien://")) + TGrid::Connect("alien://"); + + TFile::Open(fileName); + + c = new TCanvas; + hist = (TH1*) gFile->Get("physics_selection/fHistStatistics"); + hist->SetStats(0); + hist->Draw("TEXT"); + c->SetLeftMargin(0.25); + c->SetBottomMargin(0.2); + c->SaveAs("stat.png"); + + c = new TCanvas; + c->SetLeftMargin(0.25); + hist = (TH1*) gFile->Get("physics_selection/fHistBunchCrossing"); + hist->SetStats(0); + hist->Draw("TEXT"); + c->SaveAs("bc.png"); +}