Write Ntuple in PyROOT

I am trying to write a basic ntuple, with floats and arrays of floats, using pyroot. I am having difficulty, especially with assigning the adress of a branch. Can someone post a short, working example of how to perform this? Thankyou.

Hi,

either http://wlav.web.cern.ch/wlav/pyroot/tpytree.html (section A.2.2) or staff.py in $ROOTSYS/tutorials/pyroot should do.

Cheers,
Wim

rootpy makes handling TTrees easier:

https://github.com/rootpy/rootpy

For examples see:
https://github.com/rootpy/rootpy/blob/master/examples/tree/tree.py
https://github.com/rootpy/rootpy/blob/master/examples/tree/treemodel_simple.py
https://github.com/rootpy/rootpy/blob/master/examples/tree/treemodel.py