# read C++ ntuple using Jython/Java from jhplot.io import * from jhplot.io.PEventFile import * import time f=EFile('main02.nbu') start = time.clock() print f.getVersion() for i in range(1,f.size()): ev = f.read() if (ev.getId()%10==0): print "Read event", ev.getId() g=ev.getGroup(0) print "Read event", ev.getId(), "particles=",g.getEntryCount() #for k in range(g.getEntryCount()): # e=g.getEntry(k) # print e.getName(),"ID=",e.getIda(0),"Status=",e.getIda(1),"Charge=",e.getIda(2),\ # " px=",e.getDa(0)," py=",e.getDa(1)," pz=",e.getDa(2)," e=",e.getDa(3)," m=",e.getDa(4) f.close() print ' time (s)=',time.clock()-start