-
Notifications
You must be signed in to change notification settings - Fork 11
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 Analysis Tree a TTree instead of a derived class #478
Comments
What happens if we want some of the methods that have been implemented in |
I guess we could maintain the class Doing this we would lose access to the stored members from the |
Perhaps we could just implement a Anyhow I think the philosophy should be that we build a |
My point is that the files created by REST should be as compatible as possible, without limiting ourselves. The event tree cannot be easily made compatible by outsiders to rest because of its complex structure so it makes sense to require dictionaries (however it can be technically read by third-party programs such as uproot because it's a plain TTree). The Analysis Tree could be 100% compatible for external programs by just making this change. I don't think we should explicitly need to export the tree into a compatible format when we can make it compatible ourselves. I think the functionality implemented in the derived class (TRestAnalysisTree) can be implemented using dynamic casting and the I propose something like this:
REST users will always interact with a I think this should cover all functionality while maintaning backwards compatility reasonably well, what do you think? |
We could always share data by exporting a |
In principle sounds good. Just afraid of too much freedom produces divergences. |
This is of course a matter of opinion but the point could also be made that this would not contribute to the degradation of the framework but instead reduce the scope of the framework which would in turn mean resources can be focused on improving in-scope functionalities. |
(Apologies if this was present already in another issue, I could not find it).
Currently the
TRestAnalysisTree
class is derived fromTTree
. 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 plainTTree
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 (scikit-hep/uproot5#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.
The text was updated successfully, but these errors were encountered: