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 a suite of consecutive data records (TKey instances) with a well defined format.
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.