This would be a major project, but it's frequently asked for. Users want to be able to do this:
with uproot.update("existing_file.root") as file:
assert file["existing_tree"].num_entries == len(array)
file["existing_tree"].new_branch(array)
such that the "existing_tree" has the same number of entries but a new TBranch.
This will involve overwriting the entire TTree metadata object (or creating one with a new cycle number), but it can reuse all of the TBasket data from the previous TTree, only adding new ones.
This would be a major project, but it's frequently asked for. Users want to be able to do this:
such that the
"existing_tree"has the same number of entries but a new TBranch.This will involve overwriting the entire TTree metadata object (or creating one with a new cycle number), but it can reuse all of the TBasket data from the previous TTree, only adding new ones.