Open sbinet opened 3 years ago
support for DAOD_PHYSLITE
is blocked by ATLAS not putting all the required streamers in the file (and relying on ROOT dictionaries being loaded on-the-fly):
starting from 551dabd7
, root-ls
fails with:
$> root-ls -t https://github.com/CoffeaTeam/coffea/raw/6d548538653e7003281a572f8eec5d68ca57b19f/tests/samples/DAOD_PHYSLITE_21.2.108.0.art.pool.root
=== [https://github.com/CoffeaTeam/coffea/raw/6d548538653e7003281a572f8eec5d68ca57b19f/tests/samples/DAOD_PHYSLITE_21.2.108.0.art.pool.root] ===
version: 60806
TTree MetaData MetaData (entries=1)
FileMetaDataAux. "FileMetaDataAux." TBranchElement
FileMetaDataAux.xAOD::AuxInfoBase "FileMetaDataAux.xAOD::AuxInfoBase" TBranchElement
[...]
TTree ##Links ##Links (entries=565)
db_string "db_string/C" TBranch
TTree ##Links ##Links (entries=565)
db_string "db_string/C" TBranch
panic: rdict: could not build element "m_subEvents" type for "PileUpEventInfo_p5": rdict: could not create type for "vector<PileUpEventInfo_p5::SubEvent>": rdict: could not find streamer info for "PileUpEventInfo_p5::SubEvent" (version=-1): riofs: no streamer for "PileUpEventInfo_p5::SubEvent"
not much we can do about it.
(FYI, uproot
fails in a similar fashion:
>>> import uproot
>>> f = uproot.open("/data/xaod/r04.AOD.pool.root")
>>> t =f["CollectionTree"]
>>> t.arrays("EventInfo_p4")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/uproot/behaviors/TBranch.py", line 1125, in arrays
_ranges_or_baskets_to_arrays(
File "/usr/local/lib/python3.8/dist-packages/uproot/behaviors/TBranch.py", line 3502, in _ranges_or_baskets_to_arrays
uproot.source.futures.delayed_raise(*obj)
File "/usr/local/lib/python3.8/dist-packages/uproot/source/futures.py", line 36, in delayed_raise
raise exception_value.with_traceback(traceback)
File "/usr/local/lib/python3.8/dist-packages/uproot/behaviors/TBranch.py", line 3446, in basket_to_array
basket_arrays[basket.basket_num] = interpretation.basket_array(
File "/usr/local/lib/python3.8/dist-packages/uproot/interpretation/objects.py", line 140, in basket_array
form = self.awkward_form(branch.file, index_format="i64")
File "/usr/local/lib/python3.8/dist-packages/uproot/interpretation/objects.py", line 116, in awkward_form
return self._model.awkward_form(
File "/usr/local/lib/python3.8/dist-packages/uproot/model.py", line 1136, in awkward_form
return versioned_cls.awkward_form(
File "<dynamic>", line 49, in awkward_form
File "<dynamic>", line 63, in awkward_form
File "/usr/local/lib/python3.8/dist-packages/uproot/containers.py", line 780, in awkward_form
uproot._util.awkward_form(
File "/usr/local/lib/python3.8/dist-packages/uproot/_util.py", line 544, in awkward_form
return model.awkward_form(
File "/usr/local/lib/python3.8/dist-packages/uproot/model.py", line 660, in awkward_form
raise uproot.interpretation.objects.CannotBeAwkward(
uproot.interpretation.objects.CannotBeAwkward: TriggerInfo_p2::StreamTag_p2
I haven't had time to test it myself, but supposedly uproot
is working with the open-data DAOD_PHYSLITE
files:
I don't know if that's because the streamers were added, or if uproot
implemented a workaround of some kind (e.g. just skip anything with a missing streamer, as if it wasn't in the file). Regardless, the jira issue you linked has recently shown some signs of life, so this may be worth another look at some point.
hello stranger,
(thanks for your interest in groot
)
the JIRA issue is pointing at work done by Scott to speed-up my old diff-root
PyROOT script.
if uproot
now works, I guess that's thanks to another strand of work (either on the uproot
side or on the ATLAS side).
Yes, I see. Sorry for the noise, I was just curious if this situation had improved at all due to e.g. some improvement on the ATLAS side.
Digging a bit more, it looks like uproot
is creating a class based on uproot.model.UnknownClass
for types that are missing a streamer. So it probably works, but only sort-of... things don't crash, and I can still access primitive types from the Aux container (if I really must), but the UnknownClass
types do not seem to be useful for much. That's unfortunate, I had hoped that maybe uproot
was working because the missing streamers had been added to the PHYSLITE
derivations (in which case, groot
support for the PHYSLITE
may be easier), but sadly it seems this is not the case.
Just making a note that there's (finally) some activity on the ATLAS side to address the issues with missing streamers.
currently (
v0.28.5
) trying to runroot-ls
on aDAOD_PHYSLITE
file leads to: