diff options
author | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-05 18:28:23 -0400 |
---|---|---|
committer | Anthony LaTorre <tlatorre9@gmail.com> | 2011-08-05 18:28:23 -0400 |
commit | 643f3df7b8538d5c52ea782ec3c22406cadc7c6e (patch) | |
tree | c93b44285888c2500fd0d85d58ca688db2ebe9b7 /io/root.py | |
parent | 97467c888720451e97dcd0881d90f61641f43b47 (diff) | |
parent | d7f835b3325611ad25209c9a25256b46d4944827 (diff) | |
download | chroma-643f3df7b8538d5c52ea782ec3c22406cadc7c6e.tar.gz chroma-643f3df7b8538d5c52ea782ec3c22406cadc7c6e.tar.bz2 chroma-643f3df7b8538d5c52ea782ec3c22406cadc7c6e.zip |
merge heads
Diffstat (limited to 'io/root.py')
-rw-r--r-- | io/root.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/io/root.py b/io/root.py new file mode 100644 index 0000000..d970d1d --- /dev/null +++ b/io/root.py @@ -0,0 +1,18 @@ +import ROOT +import os.path + +ROOT.gROOT.ProcessLine('.L '+os.path.join(os.path.dirname(__file__), 'root.C+g')) + +from ROOT import Event + +fill_event = ROOT.fill_event + +def make_tree(name, desc=''): + '''Create a ROOT tree for holding event information. + + Returns tuple of Event object for filling and TTree. + ''' + tree = ROOT.TTree(name, desc) + ev = ROOT.Event() + tree.Branch('ev', ev) + return ev, tree |