uproot.models.TH.Model_TH3

Defined in uproot.models.TH on line 1418.

Inheritance order:

  1. uproot.model.DispatchByVersion

class uproot.models.TH.Model_TH3

A uproot.model.DispatchByVersion for TH3.

awkward_form

Inherited from uproot.model.DispatchByVersion.

classmethod Model_TH3.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_path for 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 TObject classes 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.Form to use to put objects of type type in an Awkward Array.

strided_interpretation

Inherited from uproot.model.DispatchByVersion.

classmethod Model_TH3.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_path for error messages.

  • header (bool) – If True, assume the outermost object has a header.

  • tobject_header (bool) – If True, assume that TObjects have 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_TH3.class_of_version(version)

Returns the class corresponding to a specified version if 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_TH3.has_version(version)

Returns True if a class corresponding to a specified version currently exists; False otherwise.

new_class

Inherited from uproot.model.DispatchByVersion.

classmethod Model_TH3.new_class(file, version)

Uses file to create a new class for a specified version.

As a side-effect, this new class is added to cls.known_versions (for class_of_version and has_version).

If the file lacks a TStreamerInfo for the class, this function returns a uproot.model.UnknownClassVersion (adding it to uproo4.unknown_classes if it’s not already there).

read

Inherited from uproot.model.DispatchByVersion.

classmethod Model_TH3.read(chunk, cursor, context, file, selffile, parent, concrete=None)
Parameters:

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 read classmethod.

If a uproot.model.VersionedModel does not exist for the specified version, the file’s TStreamerInfo is queried to attempt to create one, and failing that, an uproot.model.UnknownClassVersion is created instead.

postprocess

Inherited from uproot.model.DispatchByVersion.

classmethod Model_TH3.postprocess(self, chunk, cursor, context, file)
Parameters:

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.