uproot-custom
is an extension of uproot
that provides an enhanced way to read custom classes stored in TTree
.
uproot-custom
aims to handle cases that classes are too complex for uproot
to read, such as when their Streamer
methods are overridden or some specific data members are not supported by uproot
.
uproot-custom
uses a reader
/factory
mechanism to read classes:
reader
is a C++ class that implements the logic to read data from binary buffers.factory
is a Python class that creates, combinesreader
s, and post-processes the data read byreader
s.
This machanism is implemented as uproot_custom.AsCustom
interpretation. uproot-custom
wraps uproot.interpretation.identify.interpretation_of
method to intercept the interpretation of specific branches. This makes uproot-custom
well compatible with uproot
.
Tip
Users can implement their own factory
and reader
, register them to uproot-custom
. An example of implementing a custom factory
/reader
can be found in the repository.
Note
uproot-custom
does not provide a full reimplementation of ROOT
's I/O system. Users are expected to implement their own factory
/reader
for their custom classes that built-in factories cannot handle.
View the documentation for more details about customizing your own reader
/factory
, and the architecture of uproot-custom
.