Commit 0a563bf9 authored by Erik Asbjørn Mikkelsen Jensen's avatar Erik Asbjørn Mikkelsen Jensen
Browse files

updated to work with ROOT v6.22

parent 5f290776
......@@ -3,13 +3,16 @@ old
.idea
__pycache__
# graphics output
qec-all.pdf
qec-no-estimates.pdf
# ROOT output
*.root
# exectuable output
dataprinter
expand-nuchart-QBxn-QBxp-QBa
expand-nuchart-QEC
# ROOT output
nuchart.root
\ No newline at end of file
# graphics output
*.pdf
# data file output
*.dat
......@@ -5,7 +5,7 @@ CXXFLAGS = -Wall $$(root-config --cflags)
LDLIBS = $$(root-config --glibs)
DATATABLES = ame16/mass16.txt ame16/rct1-16.txt ame16/rct2-16.txt nubase16/nubase2016.txt
EXAMPLE_FIGURES = qec.pdf
EXAMPLE_FIGURES = qec-all.pdf qec-no-estimates.pdf
EXAMPLE_DATAFILES = qec.dat qbn.dat
EXECUTABLES = dataprinter expand-nuchart-QEC expand-nuchart-QBxn-QBxp-QBa
......@@ -22,7 +22,7 @@ nuchart.root: treemaker.py expand-nuchart-QEC expand-nuchart-QBxn-QBxp-QBa
./expand-nuchart-QEC
./expand-nuchart-QBxn-QBxp-QBa
qec.pdf: graph-example-qec.py
qec-all.pdf qec-no-estimates.pdf: graph-example-qec.py
python3 $<
graph-example-qec.py: qec.dat
......
import re
from datagetter import *
from ROOT import TFile, TTree, gROOT, AddressOf
from ROOT import TFile, TTree, gROOT, addressof
# OPEN DATA FILES AND NAVIGATE TO FIRST LINES OF INTEREST IN EACH FILE
file1 = open("ame16/mass16.txt", "r")
......@@ -47,18 +47,18 @@ iso = Isotope()
# CREATION OF ALL BRANCHES IN THE ROOT TREE
t.Branch('element', AddressOf(iso, 'element'), 'element/C')
t.Branch('element', addressof(iso, 'element'), 'element/C')
for string in varbls:
t.Branch(string, AddressOf(iso, string), string + '/i')
t.Branch(string, addressof(iso, string), string + '/i')
for string in varbls_est:
t.Branch(string, AddressOf(iso, string), string + '/D:' + string + '_est/O')
t.Branch(string, addressof(iso, string), string + '/D:' + string + '_est/O')
for string in varbls_est_calc:
t.Branch(string, AddressOf(iso, string), string + '/D:' + string + '_est/O:' + string + '_calc')
t.Branch('half_life', AddressOf(iso, 'half_life'), 'half_life/D:half_life_est/O:half_life_gORs:half_life_stbl')
t.Branch('half_life_err', AddressOf(iso, 'half_life_err'), 'half_life_err/D:half_life_err_est/O:half_life_err_gORs')
t.Branch('spin', AddressOf(iso, 'spin'), 'spin/D:spin_uncertain/O')
t.Branch('parity', AddressOf(iso, 'parity'), 'parity/I:parity_est/O:parity_uncertain')
t.Branch('comment', AddressOf(iso, 'comment'), 'comment/C')
t.Branch(string, addressof(iso, string), string + '/D:' + string + '_est/O:' + string + '_calc')
t.Branch('half_life', addressof(iso, 'half_life'), 'half_life/D:half_life_est/O:half_life_gORs:half_life_stbl')
t.Branch('half_life_err', addressof(iso, 'half_life_err'), 'half_life_err/D:half_life_err_est/O:half_life_err_gORs')
t.Branch('spin', addressof(iso, 'spin'), 'spin/D:spin_uncertain/O')
t.Branch('parity', addressof(iso, 'parity'), 'parity/I:parity_est/O:parity_uncertain')
t.Branch('comment', addressof(iso, 'comment'), 'comment/C')
# CREATION OF MANY GENERIC (PLUS SOME NONE-GENERIC) CODE LINES TO BE EXECUTED BY 'exec(code_strings[i])' BELOW
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment