I’m getting some errors while running a script in python:
1.unknown type name ‘from’
2.expected ‘;’ after top level declarator**
from array import array
etc
here is the code:
from array import array
import ROOT
myFile = ROOT.TFile.Open(“simplify.root”, “RECREATE”)
tree = ROOT.TTree(“tree”, “newt”)
Provide a one-element array, so ROOT can read data from this memory.
var = array(‘f’, [ 0 ])
tree.Branch(“branch0”, var, “mass”)
for iEntry in range(1000):
var[0] = 0.3 * iEntry
# Fill the current value of ‘var’ into ‘branch0’
tree.Fill()