Hello,
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:
get_var.push_back(iev.var_value)
subtree.Fill()
subtree.Write()
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?
Cheers!