uproot.models.TLeaf.Model_TLeafF
Defined in uproot.models.TLeaf on line 431.
Inheritance order: |
|---|
- class uproot.models.TLeaf.Model_TLeafF
A uproot.model.DispatchByVersion for
TLeafF(numpy.float32).
awkward_form
Inherited from uproot.model.DispatchByVersion.
- classmethod Model_TLeafF.awkward_form(file, context)
- Parameters:
cls (subclass of uproot.model.DispatchByVersion) – This class.
file (uproot.ReadOnlyFile) – File to use to generate uproot.Model classes from its streamers and
file_pathfor error messages.context (dict) – Context for the Form-generation; defaults are
{"index_format": "i64", "header": False, "tobject_header": True, "breadcrumbs": ()}. See below for context argument descriptions.index_format (str) – Format to use for indexes of the
awkward.forms.Form; may be"i32","u32", or"i64".header (bool) – If True, include headers in the Form’s
"uproot"parameters.tobject_header (bool) – If True, include headers for
TObjectclasses in the Form’s"uproot"parameters.breadcrumbs (tuple of class objects) – Used to check for recursion. Types that contain themselves cannot be Awkward Arrays because the depth of instances is unknown.
The
awkward.forms.Formto use to put objects of type type in an Awkward Array.
strided_interpretation
Inherited from uproot.model.DispatchByVersion.
- classmethod Model_TLeafF.strided_interpretation(file, header=False, tobject_header=True, breadcrumbs=(), original=None)
- Parameters:
cls (subclass of uproot.model.DispatchByVersion) – This class.
file (uproot.ReadOnlyFile) – File to use to generate uproot.Model classes from its streamers and
file_pathfor error messages.header (bool) – If True, assume the outermost object has a header.
tobject_header (bool) – If True, assume that
TObjectshave headers.original (None, uproot.Model, or uproot.containers.Container) – The original, non-strided model or container.
breadcrumbs (tuple of class objects) – Used to check for recursion. Types that contain themselves cannot be strided because the depth of instances is unknown.
Returns a list of (str,
numpy.dtype) pairs to build a uproot.AsStridedObjects interpretation.
class_of_version
Inherited from uproot.model.DispatchByVersion.
- classmethod Model_TLeafF.class_of_version(version)
Returns the class corresponding to a specified
versionif it exists.If not, this classmethod returns None. No attempt is made to create a missing class.
has_version
Inherited from uproot.model.DispatchByVersion.
- classmethod Model_TLeafF.has_version(version)
Returns True if a class corresponding to a specified
versioncurrently exists; False otherwise.
new_class
Inherited from uproot.model.DispatchByVersion.
- classmethod Model_TLeafF.new_class(file, version)
Uses
fileto create a new class for a specifiedversion.As a side-effect, this new class is added to
cls.known_versions(for class_of_version and has_version).If the
filelacks aTStreamerInfofor the class, this function returns a uproot.model.UnknownClassVersion (adding it touproo4.unknown_classesif it’s not already there).
read
Inherited from uproot.model.DispatchByVersion.
- classmethod Model_TLeafF.read(chunk, cursor, context, file, selffile, parent, concrete=None)
- Parameters:
cls (subclass of uproot.model.DispatchByVersion) – This class.
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) – An open file object, capable of generating new uproot.Model classes from its streamers.
selffile (uproot.reading.CommonFileMethods) – A possibly uproot.reading.DetachedFile associated with this object.
parent (None or calling object) – The previous
readin the recursive descent.concrete (None or uproot.Model instance) – If None, this model corresponds to the concrete (instantiated) class in C++. Otherwise, this model represents a superclass part of the object, and
concretepoints to the concrete instance.
Reads the instance version number from the byte stream, backs up the uproot.Cursor to the starting position, and invokes the appropriate uproot.model.VersionedModel’s
readclassmethod.If a uproot.model.VersionedModel does not exist for the specified version, the
file’sTStreamerInfois queried to attempt to create one, and failing that, an uproot.model.UnknownClassVersion is created instead.
postprocess
Inherited from uproot.model.DispatchByVersion.
- classmethod Model_TLeafF.postprocess(self, chunk, cursor, context, file)
- Parameters:
cls (subclass of uproot.model.DispatchByVersion) – This class.
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) – An open file object, capable of generating new uproot.Model classes from its streamers.
Called for any additional processing after the object has been fully read.
The return value from this method is the object that actually represents the ROOT data, which might be a different instance or even a different type from this class. The default in uproot.Model is to return
self.Note that for versioned models, postprocess is called first, then postprocess is called on its output, allowing a uproot.model.DispatchByVersion to refine all data of its type, regardless of version.