14from ROOT
import TFile, TNtuple, TROOT
20print(
'opening file %s ...' % ifn)
21infile = open( ifn,
'r' )
22lines = infile.readlines()
24labels = lines[1].split()
26print(
'writing file %s ...' % ofn)
27outfile =
TFile( ofn,
'RECREATE',
'ROOT file with an NTuple' )
28ntuple =
TNtuple(
'ntuple', title,
':'.join( labels ) )
32 row = map( float, words )
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
A simple TTree restricted to a list of float variables only.
static const TString & GetTutorialDir()
Get the tutorials directory in the installation. Static utility function.