Skip to content

Commit

Permalink
example for macro functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
cipriangal committed Feb 1, 2019
1 parent 0a2bd0c commit 06ededf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion panguin/README.md
Original file line number Diff line number Diff line change
@@ -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).

Expand Down
4 changes: 4 additions & 0 deletions panguin/macros/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions panguin/macros/exampleMacro1.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
void exampleMacro1(){
TF1 *f=new TF1("f1","sin(x)/x",0.,10.);
f->Draw();
}
3 changes: 3 additions & 0 deletions panguin/macros/exampleMacro2.C
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
void exampleMacro2(){
R->Draw("bcm1:ev_num","ev_num>1000");
}

0 comments on commit 06ededf

Please sign in to comment.