uproot.deserialization.read_object_any
Defined in uproot.deserialization on line 187.
- uproot.deserialization.read_object_any(chunk, cursor, context, file, selffile, parent, as_class=None)
- Parameters:
chunk (uproot.source.chunk.Chunk) – Buffer of contiguous data from the file uproot.source.chunk.Source.
cursor (uproot.Cursor) – Current position in that
chunk
.context (dict) – Auxiliary data used in deserialization.
file (uproot.ReadOnlyFile) – File to use to generate uproot.Model classes as needed from its streamers and
file_path
for error messages.selffile (uproot.reading.CommonFileMethods) – A possibly uproot.reading.DetachedFile associated with the
parent
.parent (None or calling object) – The previous
read
in the recursive descent.as_class (None or uproot.Model) – If None, use the class indicated in the byte stream; otherwise, use this class.
Generic read function, which may deliver an instance of any class and may reference previously read objects.
This function is the reason why uproot.Cursor has a refs; that dictionary holds previously read objects that might need to be accessed later.
The uproot.Cursor has an origin to account for the fact that seek positions for keys in the reference dict are relative to the start of the uproot.source.chunk.Chunk, rather than the start of the file (as it would have to be for decompressed chunks).