rest-for-physics / rest-for-physics/framework
Make Analysis Tree a TTree instead of a derived class
@lobis is already working on this.
Since Sep 20, 2023.
- Dominant language
- C++
- Stars
- 19
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
(Apologies if this was present already in another issue, I could not find it).
Currently the TRestAnalysisTree class is derived from TTree. This has some implications, for example you cannot read the data from the tree if you have not loaded the REST dictionaries.
The analysis tree by design contains simple branches (numbers, basic containers such as vector of numbers, etc.). If this class was not derived from TTree and and was a plain TTree instead (with the information currently stored as members of the derived class stored instead in the tree branches), the compatibility would be significantly increased.
I think I raised this concern offline in some ocasion after trying (unsuccessfully) to open REST files with uproot (https://github.com/scikit-hep/uproot5/issues/936) but after speaking with @cmargalejo and @KonradAltenmueller I noticed some of their analysis processes also had to explicitly load the REST dictionaries just because of this, otherwise they could have been REST-agnostic: analyze REST data with plain ROOT macros, which would make sharing data easier.
Glancing at the code there doesn't seem to be any problem with this refactoring other than the work involved, so please if anyone has some concerns let me know before I attempt to make this change.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.