]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
macro to save the plots
authorjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Dec 2009 13:20:28 +0000 (13:20 +0000)
committerjgrosseo <jgrosseo@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 17 Dec 2009 13:20:28 +0000 (13:20 +0000)
PWG0/eventStats/show.C [new file with mode: 0644]

diff --git a/PWG0/eventStats/show.C b/PWG0/eventStats/show.C
new file mode 100644 (file)
index 0000000..2321f03
--- /dev/null
@@ -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");
+}