Here is my code to fill a tree in pyroot
get_var = ROOT.vector(‘float’)(0)
subtree = ROOT.TTree(“subtree”,“subtree”)
subtree.Branch(“var”, “std::vector< float >”, get_var)
for iev in chain:
This works but I want to separate the values in events, meaning I can read the subtree with TChain and loop over events, what should I change here in this case?