-
Notifications
You must be signed in to change notification settings - Fork 76
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
Reading DAOD_PHYSLITE prototype #123
Comments
#124 is chipping away at the assortment of issues this has raised. Try checking that out and seeing how far you get with it; post any other issues here. If it works, I'll merge it as-is. (They've all been little things, except AsGrouped, which I had thought was already implemented, but apparently not.) If the PR doesn't get merged for a while, be sure to ping me because I'm likely to forget! Thanks! |
Thanks for the quick fix! #124 seems to solve the issues on my second bullet point for reading the split branches from the MET association map. The errors are gone and as far as i can see uproot now correctly reads the data from these branches. About the first bullet point with the double-jagged element links - i'm not sure if it is possible to split these (such that i would have instead of |
Right, I should look into why the ElementLink stranger send to be missing. Is that an ATLAS thing or a ROOT thing? My first guess at a custom interpretation would be AsObjects(AsVector(AsVector(AsDtype([("persIndex", "u8"), ("persKey", "u8")])))) but that leaves undetermined whether one or both of those vectors have headers. (Need to guess or look at the raw bytes with |
That is an ATLAS thing - i'm no expert on athena internals, but i guess the stuff is defined somewhere here https://gitlab.cern.ch/atlas/athena/-/tree/21.2/Control/AthLinks |
So, a1f4c37 fixes the problem with ElementLinks being "unknown." If you'd believe it, it was because the name of the class sometimes has spaces before the closing (The lookup for >>> import uproot4
>>> f = uproot4.open("issue-123a.root")
>>> t = f["CollectionTree"]
>>> arrays = t["AnalysisElectronsAuxDyn.trackParticleLinks"].array(library="np")
>>> arrays[8]
<STLVector [[<ElementLink<DataVector<xAOD::TrackParticle_v1>> (version 1) at 0x7f4eeeaf5cd0>, ...], ...]>
>>> arrays[8][0][0]
<ElementLink<DataVector<xAOD::TrackParticle_v1>> (version 1) at 0x7f4eeeaf5cd0>
>>> arrays[8][0][0].all_members
{'m_persKey': 776133387, 'm_persIndex': 0}
>>> arrays[8][0][0].member("m_persKey")
776133387
>>> arrays[8][0][0].member("m_persIndex")
0 |
Thanks a lot! I think with these fixes i should be able to read everything that's needed - i'll continue annoying you when i find further issues. |
Just for the record: We also have some branches where it seems they are affected by #38. E. g. >>> import uproot4
>>>
>>> f = uproot4.open("DAOD_PHYSLITE.art.pool.root")
>>> f["MetaData"]["EventFormat"].array()
[...]
xAOD::EventFormat_v1 version 9 as uproot4.dynamic.Model_xAOD_3a3a_EventFormat_5f_v1_v1 (46284 bytes)
Members for xAOD::EventFormat_v1: m_branchNames, m_classNames, m_parentNames, m_branchHashes
attempting to get bytes 83840:84064
outside expected range 0:83941 for this Chunk
in file DAOD_PHYSLITE.art.pool.root
in object /MetaData;2 Uproot seems to get the members correctly, there should be 3 strings and then one integer hash. Seems they are also stored "member wise". The |
Thanks for the note; memberwise splitting is going to be important. (I think you're the 7th to report it.) The |
It might make sense to discuss this here. I'm trying to read as much as possible from the current prototype for the DAOD_PHYSLITE format at ATLAS using uproot. The following uses these example root files: DAOD_PHYSLITE.art.pool.root and DAOD_PHYSLITE.art_split99.pool.root. I'm using uproot4
0.0.27
. The things i currently can't read are the following:vector<vector<...>
and on the other hand a custom type (ElementLink<DataVector<something>>
). Uproot can read these, but i get some "Unknown" objects out:In principle the data part of these ElementLinks are just an index and a hash to identify the collection linked to. This can be seen for the branches that are just
vector<ElementLink<...>>
(single jagged). ROOT seems to be able to split these for the single-jagged case:Would there be a reasonable way to also read the multi-jagged links when i know that they should contain these
uint32
numbers (m_persIndex
andm_persKey
)? So far i couldn't get ROOT to split them ...*METAssoc*.*
). In principle the branches are mostlyvector<vector<float>
, but i get the following error when trying to read them:The error also occurs when i run
.show()
- both on the branch and on the whole tree.The text was updated successfully, but these errors were encountered: