Reading a tree with a particular form

You could try a ROOT generated “analysis skeleton”.