Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.