Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take an existing TTree and add a new TBranch #862

Open
jpivarski opened this issue Mar 16, 2023 · 0 comments · May be fixed by #1155
Open

Take an existing TTree and add a new TBranch #862

jpivarski opened this issue Mar 16, 2023 · 0 comments · May be fixed by #1155
Labels
feature New feature or request

Comments

@jpivarski
Copy link
Member

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.

@jpivarski jpivarski added the feature New feature or request label Mar 16, 2023
@jpivarski jpivarski linked a pull request Mar 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant