Closed tamasgal closed 9 months ago
I decided to increase only the patch version. Let us hide this behind the scenes for now. I need to use this mechanism but I need to think about the future implementation before I feel confident to make it fully public.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
4d11965
) 87.02% compared to head (42349bd
) 86.34%. Report is 8 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Currently, when calling
_getindex(f::ROOTFile, s)
a streamer is picked up and when the corresponding type is defined, the streamer is then called with the file object, tkey and refs. The point is that objects can also sit at top-level. In_getindex
the type has to be defined in the namespace ofUnROOT
. That's still something I am not fully happy with but it works so far.If there is no type defined (called
tkey.fClassName
, in the namespace ofUnROOT
), the functionparsetobject
is called which essentially tries to instantiate the full data as a last resort. This approach completely goes another path and theLazy*
mechanics are also bypassed.As of now, passing
customstructs=Dict{String, Type}(...)
to theROOTFile
allows to hook into the streamer logic at the lateauto_T_JaggT
stage which is only reached for objects in aROOTDirectory
, viagetindex(d::ROOTDirectory, s)
.This PR adds the ability to use a custom streamer directly inside the
parsetobject
function, using the samecustomstructs
dictionary.We really(!) need to refactor these stuff at some point; we can unify a couple of things already, but this is a lot of work.