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

Make clone_tree() return the tree rather than write it #13

Open
masonproffitt opened this issue Jul 11, 2020 · 2 comments
Open

Make clone_tree() return the tree rather than write it #13

masonproffitt opened this issue Jul 11, 2020 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@masonproffitt
Copy link
Owner

No description provided.

@masonproffitt masonproffitt added the enhancement New feature or request label Jul 11, 2020
@masonproffitt masonproffitt added this to the v0.2 milestone Aug 20, 2020
@masonproffitt
Copy link
Owner Author

The original idea behind this was to attempt to recreate the return value of TTree::CloneTree(). Considering how uproot deals with writing files, I don't think it actually makes sense to retain this. The tree object used for writing is completely different from the object of a tree that has been read from a file. In order to preserve the symmetry of the interface of the new tree, you'd have to close the new file and then read it in. I think that's too much extra work to stuff into clone_tree() since the return value will likely often be ignored.

@masonproffitt masonproffitt removed this from the v0.2 milestone Aug 27, 2020
@masonproffitt masonproffitt reopened this Oct 6, 2020
@masonproffitt masonproffitt changed the title Provide way to return the new tree Make clone_tree() return the tree rather than write it Oct 6, 2020
@masonproffitt
Copy link
Owner Author

New strategy: dump all the responsibility of writing tree-like data into write_tree(). This frees clone_tree() to just return some representation of the tree that doesn't have to be stored in a file (yet). This accomplishes the original goal of trying to more closely align with the behavior of ROOT's TTree::CloneTree(). The most logical return value types are dict or Table (in awkward0, otherwise RecordArray in awkward1).

@masonproffitt masonproffitt added this to the v0.3 milestone Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant