From 06ededfeebd5b2bf2aa33a72648b9b1a544de32c Mon Sep 17 00:00:00 2001 From: Ciprian Gal Date: Fri, 1 Feb 2019 06:56:44 -0500 Subject: [PATCH] example for macro functionality --- panguin/README.md | 2 +- panguin/macros/default.cfg | 4 ++++ panguin/macros/exampleMacro1.C | 4 ++++ panguin/macros/exampleMacro2.C | 3 +++ 4 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 panguin/macros/exampleMacro1.C create mode 100644 panguin/macros/exampleMacro2.C diff --git a/panguin/README.md b/panguin/README.md index 8200e46f5..8b195a71c 100644 --- a/panguin/README.md +++ b/panguin/README.md @@ -1,6 +1,6 @@ # PANGUIN -Simple program that reads a configuration file and plots from a file. Searches for trees and branch names to find the correct tree. +Simple program that reads a configuration file and plots from a file. Searches for trees and branch names to find the correct tree. Plots the result of a macro (n.b. your macro should only make one plot). If you have your QW_ROOTFILES env set it will search for a file with the correct run number in that folder assuming the format prexXXX_####.root, where XXX is the configuraiton (for now we have CH, INJ, ALL). diff --git a/panguin/macros/default.cfg b/panguin/macros/default.cfg index 254e46940..93d64fbd0 100644 --- a/panguin/macros/default.cfg +++ b/panguin/macros/default.cfg @@ -35,3 +35,7 @@ newpage 1 2 asym_bcm1 ok_cut asym_bcm2 ok_cut +newpage 1 3 + title Use some macros + macro exampleMacro1.C + macro exampleMacro2.C diff --git a/panguin/macros/exampleMacro1.C b/panguin/macros/exampleMacro1.C new file mode 100644 index 000000000..fd8293205 --- /dev/null +++ b/panguin/macros/exampleMacro1.C @@ -0,0 +1,4 @@ +void exampleMacro1(){ + TF1 *f=new TF1("f1","sin(x)/x",0.,10.); + f->Draw(); +} diff --git a/panguin/macros/exampleMacro2.C b/panguin/macros/exampleMacro2.C new file mode 100644 index 000000000..6eba9d33e --- /dev/null +++ b/panguin/macros/exampleMacro2.C @@ -0,0 +1,3 @@ +void exampleMacro2(){ + R->Draw("bcm1:ev_num","ev_num>1000"); +}