uproot.models.RNTuple.Model_ROOT_3a3a_RNTuple
Defined in uproot.models.RNTuple on line 69.
Inheritance order: |
---|
|
- class uproot.models.RNTuple.Model_ROOT_3a3a_RNTuple
A versionless uproot.Model for
ROOT::RNTuple
.
all_fields
- Model_ROOT_3a3a_RNTuple.all_fields
The full list of fields in the RNTuple.
The fields are sorted in the same way they appear in the file, so the field at index n corresponds to the field with
field_id==n
.
header
- Model_ROOT_3a3a_RNTuple.header
The header of the RNTuple.
This provides low level access to all the metadata contained in the header.
field_records
- Model_ROOT_3a3a_RNTuple.field_records
The complete list of field records in the RNTuple.
This includes the fields from the header and from schema extensions in the footer.
field_names
- Model_ROOT_3a3a_RNTuple.field_names
The list of names of the fields in the RNTuple.
column_records
- Model_ROOT_3a3a_RNTuple.column_records
The complete list of column records in the RNTuple.
This includes the columns from the header and from schema extensions in the footer.
alias_column_records
- Model_ROOT_3a3a_RNTuple.alias_column_records
The list of alias column records in the RNTuple.
cluster_summaries
- Model_ROOT_3a3a_RNTuple.cluster_summaries
The list of cluster summaries in the RNTuple.
page_link_list
- Model_ROOT_3a3a_RNTuple.page_link_list
The list of page links in the RNTuple.
read_locator
- Model_ROOT_3a3a_RNTuple.read_locator(loc, uncomp_size, context)
- Parameters:
loc (uproot.models.RNTuple.MetaData) – The locator of the page.
uncomp_size (int) – The size in bytes of the uncompressed data.
context (dict) – Auxiliary data used in deserialization.
Returns a tuple of the decompressed chunk and the updated cursor.
page_list_envelopes
- Model_ROOT_3a3a_RNTuple.page_list_envelopes
The list of page list envelopes in the RNTuple.
base_col_form
- Model_ROOT_3a3a_RNTuple.base_col_form(cr, col_id, parameters=None, cardinality=False)
- Parameters:
cr (uproot.models.RNTuple.MetaData) – The column record.
col_id (int) – The column id.
parameters (dict) – The parameters to pass to the
NumpyForm
.cardinality (bool) – Whether the column is a cardinality column.
Returns an Awkward Form describing the column if applicable, or a form key otherwise.
col_form
- Model_ROOT_3a3a_RNTuple.col_form(field_id)
- Parameters:
field_id (int) – The field id.
Returns an Awkward Form describing the column if applicable, or a form key otherwise.
field_form
- Model_ROOT_3a3a_RNTuple.field_form(this_id, keys)
- Parameters:
this_id (int) – The field id.
keys (list) – The list of keys to search for.
Returns an Awkward Form describing the field.
read_pagedesc
- Model_ROOT_3a3a_RNTuple.read_pagedesc(destination, desc, dtype_str, dtype, nbits, split)
- Parameters:
destination (numpy.ndarray) – The array to fill.
desc (uproot.models.RNTuple.MetaData) – The page description.
dtype_str (str) – The data type as a string.
dtype (numpy.dtype) – The data type.
nbits (int) – The number of bits.
split (bool) – Whether the data is split.
Fills the destination array with the data from the page.
read_col_pages
- Model_ROOT_3a3a_RNTuple.read_col_pages(ncol, cluster_range, dtype_byte, pad_missing_element=False)
- Parameters:
ncol (int) – The column id.
cluster_range (range) – The range of cluster indices.
dtype_byte (int) – The data type.
pad_missing_element (bool) – Whether to pad the missing elements.
Returns a numpy array with the data from the column.
read_col_page
- Model_ROOT_3a3a_RNTuple.read_col_page(ncol, cluster_i)
- Parameters:
ncol (int) – The column id.
cluster_i (int) – The cluster index.
Returns a numpy array with the data from the column.
name
Inherited from uproot.behaviors.RNTuple.RNTuple.
- Model_ROOT_3a3a_RNTuple.name
Name of the
RNTuple
.
object_path
Inherited from uproot.behaviors.RNTuple.RNTuple.
- Model_ROOT_3a3a_RNTuple.object_path
Object path of the
RNTuple
.
cache_key
Inherited from uproot.behaviors.RNTuple.RNTuple.
- Model_ROOT_3a3a_RNTuple.cache_key
String that uniquely specifies this
RNTuple
in its path, to use as part of object and array cache keys.
ntuple
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.ntuple
The uproot.models.RNTuple.RNTuple that this uproot.models.RNTuple.HasFields is part of.
num_entries
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.num_entries
The number of entries in the
RNTuple
.
fields
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.fields
The list of uproot.models.RNTuple.RField directly under this uproot.models.RNTuple.RNTuple or uproot.models.RNTuple.RField (i.e. not recursive).
path
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.path
The full path of the field in the uproot.models.RNTuple.RNTuple. When it is the
RNTuple
itself, this is"."
.
to_akform
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.to_akform(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns the an Awkward Form with the structure of the data in the
RNTuple
orRField
.
arrays
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.arrays(expressions=None, cut=None, *, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, aliases=None, language=uproot.language.python.PythonLanguage(), entry_start=None, entry_stop=None, decompression_executor=None, array_cache='inherit', library='ak', ak_add_doc=False, how=None, interpretation_executor=None, filter_branch=uproot._util.unset)
- Parameters:
expressions (None, str, or list of str) – Names of
RFields
or aliases to convert to arrays or mathematical expressions of them. Uses thelanguage
to evaluate. If None, allRFields
selected by the filters are included. (Not implemented yet.)cut (None or str) – If not None, this expression filters all of the
expressions
. (Not implemented yet.)filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_branch (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. If the function returns False or None, theRField
is excluded; if the function returns True, it is included.aliases (None or dict of str → str) – Mathematical expressions that can be used in
expressions
or other aliases. Uses thelanguage
engine to evaluate. (Not implemented yet.)language (uproot.language.Language) – Language used to interpret the
expressions
andaliases
. (Not implemented yet.)entry_start (None or int) – The first entry to include. If None, start at zero. If negative, count from the end, like a Python slice.
entry_stop (None or int) – The first entry to exclude (i.e. one greater than the last entry to include). If None, stop at num_entries. If negative, count from the end, like a Python slice.
decompression_executor (None or Executor with a
submit
method) – The executor that is used to decompressRPages
; if None, the file’s decompression_executor is used. (Not implemented yet.)array_cache ("inherit", None, MutableMapping, or memory size) – Cache of arrays; if “inherit”, use the file’s cache; if None, do not use a cache; if a memory size, create a new cache of this size. (Not implemented yet.)
library (str or uproot.interpretation.library.Library) – The library that is used to represent arrays. Options are
"np"
for NumPy,"ak"
for Awkward Array, and"pd"
for Pandas. (Not implemented yet.)ak_add_doc (bool | dict) – If True and
library="ak"
, add the RFieldname
to the Awkward__doc__
parameter of the array. if dict = {key:value} andlibrary="ak"
, add the RFieldvalue
to the Awkwardkey
parameter of the array.how (None, str, or container type) – Library-dependent instructions for grouping. The only recognized container types are
tuple
,list
, anddict
. Note that the container type itself must be passed ashow
, not an instance of that type (i.e.how=tuple
, nothow=()
).interpretation_executor (None) – This argument is not used and is only included for now for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
filter_branch – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns a group of arrays from the
RNTuple
.For example:
>>> my_ntuple.arrays() <Array [{my_vector: [1, 2]}, {...}] type='2 * {my_vector: var * int64}'>
See also uproot.behaviors.RNTuple.HasFields.array to read a single
RField
as an array.See also iterate to iterate over the array in contiguous ranges of entries.
iterate
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.iterate(expressions=None, cut=None, *, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, aliases=None, language=uproot.language.python.PythonLanguage(), entry_start=None, entry_stop=None, step_size='100 MB', decompression_executor=None, library='ak', ak_add_doc=False, how=None, report=False, interpretation_executor=None, filter_branch=uproot._util.unset)
- Parameters:
expressions (None, str, or list of str) – Names of
RFields
or aliases to convert to arrays or mathematical expressions of them. Uses thelanguage
to evaluate. If None, allRFields
selected by the filters are included. (Not implemented yet.)cut (None or str) – If not None, this expression filters all of the
expressions
. (Not implemented yet.)filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectEFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool, or None) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. If the function returns False or None, theRField
is excluded; if the function returns True, it is included.aliases (None or dict of str → str) – Mathematical expressions that can be used in
expressions
or other aliases. Uses thelanguage
engine to evaluate. (Not implemented yet.)language (uproot.language.Language) – Language used to interpret the
expressions
andaliases
. (Not implemented yet.)entry_start (None or int) – The first entry to include. If None, start at zero. If negative, count from the end, like a Python slice.
entry_stop (None or int) – The first entry to exclude (i.e. one greater than the last entry to include). If None, stop at num_entries. If negative, count from the end, like a Python slice.
step_size (int or str) – If an integer, the maximum number of entries to include in each iteration step; if a string, the maximum memory size to include. The string must be a number followed by a memory unit, such as “100 MB”.
decompression_executor (None or Executor with a
submit
method) – The executor that is used to decompressRPages
; if None, the file’s decompression_executor is used. (Not implemented yet.)library (str or uproot.interpretation.library.Library) – The library that is used to represent arrays. Options are
"np"
for NumPy,"ak"
for Awkward Array, and"pd"
for Pandas. (Not implemented yet.)ak_add_doc (bool | dict) – If True and
library="ak"
, add the RFieldname
to the Awkward__doc__
parameter of the array. if dict = {key:value} andlibrary="ak"
, add the RFieldvalue
to the Awkwardkey
parameter of the array. (Not implemented yet.)how (None, str, or container type) – Library-dependent instructions for grouping. The only recognized container types are
tuple
,list
, anddict
. Note that the container type itself must be passed ashow
, not an instance of that type (i.e.how=tuple
, nothow=()
).report (bool) – If True, this generator yields (arrays, uproot.behaviors.TBranch.Report) pairs; if False, it only yields arrays. The report has data about the
TFile
,RNTuple
, and global and local entry ranges. (Not implemented yet.)interpretation_executor (None) – This argument is not used and is only included for now for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Iterates through contiguous chunks of entries from the
RNTuple
.For example:
>>> for array in rntuple.iterate(filter_name=["x", "y"], step_size=100): ... # each of the following have 100 entries ... array["x"], array["y"]
See also arrays to read everything in a single step, without iteration.
See also uproot.iterate to iterate over many files.
keys
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.keys(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, full_paths=True, ignore_duplicates=False, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, descend into any nested subfields. If False, only return the names of the top fields.
full_paths (bool) – If True, include the full path to each subfield with periods (
.
); otherwise, use the descendant’s name as the output name.ignore_duplicates (bool) – If True, return a set of the keys; otherwise, return the full list of keys.
filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns the names of the subfields as a list of strings.
values
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.values(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, descend into any nested subfields. If False, only return the names of the top fields.
filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns the subfields as a list of uproot.behaviors.RField.RField.
(Note: with
recursive=False
, this is the same as uproot.behaviors.TBranch.HasFields.fields.)
items
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.items(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, full_paths=True, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, descend into any nested subfields. If False, only return the names of the top fields.
full_paths (bool) – If True, include the full path to each subfield with periods (
.
); otherwise, use the descendant’s name as the output name.filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns (name, field) pairs of the subfields as a list of 2-tuples of (str, uproot.behaviors.RField.RField).
typenames
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.typenames(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, full_paths=True, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, descend into any nested subfields. If False, only return the names of the top fields.
full_paths (bool) – If True, include the full path to each subfield with periods (
.
); otherwise, use the descendant’s name as the output name.filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns (name, typename) pairs of the subfields as a dict of str → str.
iterkeys
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.iterkeys(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, full_paths=True, ignore_duplicates=False, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, descend into any nested subfields. If False, only return the names of the top fields.
full_paths (bool) – If True, include the full path to each subfield with periods (
.
); otherwise, use the descendant’s name as the output name.ignore_duplicates (bool) – If True, return a set of the keys; otherwise, return the full list of keys.
filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns the names of the subfields as an iterator over strings.
itervalues
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.itervalues(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, descend into any nested subfields. If False, only return the names of the top fields.
filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns the subfields as an iterator over uproot.behaviors.RField.RField.
(Note: with
recursive=False
, this is the same as uproot.behaviors.RField.HasFields.fields.)
iteritems
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.iteritems(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, full_paths=True, ignore_duplicates=False, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, descend into any nested subfields. If False, only return the names of the top fields.
full_paths (bool) – If True, include the full path to each subfield with periods (
.
); otherwise, use the descendant’s name as the output name.ignore_duplicates (bool) – If True, return a set of the keys; otherwise, return the full list of keys.
filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns (name, field) pairs of the subfields as an iterator over 2-tuples of (str, uproot.behaviors.RField.RField).
itertypenames
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.itertypenames(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, full_paths=True, filter_branch=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to select ``RFields``s by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, descend into any nested subfields. If False, only return the names of the top fields.
full_paths (bool) – If True, include the full path to each subfield with periods (
.
); otherwise, use the descendant’s name as the output name.filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns (name, typename) pairs of the subfields as an iterator over 2-tuples of (str, str).
num_entries_for
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.num_entries_for(memory_size, expressions=None, cut=None, *, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, aliases=None, language=uproot.language.python.PythonLanguage(), entry_start=None, entry_stop=None, filter_branch=uproot._util.unset)
- Parameters:
memory_size (int or str) – An integer is interpreted as a number of bytes and a string must be a number followed by a unit, such as “100 MB”.
expressions (None, str, or list of str) – Names of
RFields
or aliases to convert to arrays or mathematical expressions of them. Uses thelanguage
to evaluate. If None, allRFields
selected by the filters are included. (Not implemented yet.)cut (None or str) – If not None, this expression filters all of the
expressions
. (Not implemented yet.)filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RField.RField → bool, or None) – A filter to select
RFields
using the full uproot.models.RField.RField object. TheRField
is included if the function returns True, excluded if it returns False.aliases (None or dict of str → str) – Mathematical expressions that can be used in
expressions
or other aliases. Uses thelanguage
engine to evaluate.language (uproot.language.Language) – Language used to interpret the
expressions
andaliases
.entry_start (None or int) – The first entry to include. If None, start at zero. If negative, count from the end, like a Python slice.
entry_stop (None or int) – The first entry to exclude (i.e. one greater than the last entry to include). If None, stop at num_entries. If negative, count from the end, like a Python slice.
filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Returns an approximate step size as a number of entries to read a given
memory_size
in each step.This method does not actually read the
RField
data or compute any expressions to arrive at its estimate. It only uses metadata from the already-loadedRNTuple
; it only needslanguage
to parse the expressions, not to evaluate them.This is the algorithm that iterate uses to convert a
step_size
expressed in memory units into a number of entries.
show
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.show(*, filter_name=<function no_filter>, filter_typename=<function no_filter>, filter_field=<function no_filter>, recursive=True, name_width=20, typename_width=24, path_width=30, stream=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, full_paths=uproot._util.unset, filter_branch=uproot._util.unset, interpretation_width=uproot._util.unset)
- Parameters:
filter_name (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by name.filter_typename (None, glob string, regex string in
"/pattern/i"
syntax, function of str → bool, or iterable of the above) – A filter to selectRFields
by type.filter_field (None or function of uproot.models.RNTuple.RField → bool, or None) – A filter to select
RFields
using the full uproot.models.RNTuple.RField object. TheRField
is included if the function returns True, excluded if it returns False.recursive (bool) – If True, recursively descend into subfields.
name_width (int) – Number of characters to reserve for the
TBranch
names.typename_width (int) – Number of characters to reserve for the C++ typenames.
interpretation_width (None) – Number of characters to reserve for the uproot.interpretation.Interpretation displays.
stream (object with a
write(str)
method) – Stream to write the output to.full_paths (None) – This argument is not used and is only included for now for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
filter_branch (None or function of uproot.models.RNTuple.RField → bool) – An alias for
filter_field
included for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.interpretation_width – This argument is not used and is only included for now for compatibility with software that was used for uproot.TBranch. This argument should not be used and will be removed in a future version.
Interactively display the
RFields
.For example,
>>> my_ntuple.show() name | typename | path ---------------------+--------------------------+------------------------------- my_int | std::int64_t | my_int my_vec | std::vector<std::int6... | my_vec _0 | std::int64_t | my_vec._0
source
Inherited from uproot.behaviors.RNTuple.HasFields.
- Model_ROOT_3a3a_RNTuple.source
Returns the associated source of data for this container, if it exists
Returns: uproot.source.chunk.Source or None
classname
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.classname
The C++ (decoded) classname of the modeled class.
See uproot.classname_decode, uproot.classname_encode, and uproot.model.classname_version.
encoded_classname
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.encoded_classname
The Python (encoded) classname of the modeled class. May or may not include version.
See uproot.classname_decode, uproot.classname_encode, and uproot.model.classname_version.
class_version
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.class_version
The version number of the modeled class (int) if any; None otherwise.
See uproot.classname_decode, uproot.classname_encode, and uproot.model.classname_version.
cursor
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.cursor
A cursor pointing to the start of this instance in the byte stream (before read_numbytes_version).
file
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.file
A uproot.ReadOnlyFile, which may be open and readable, or a uproot.reading.DetachedFile, which only contains information about the original file (not an open file handle).
close
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.close()
Closes the file from which this object is derived, if such a file is still attached (i.e. not uproot.reading.DetachedFile).
closed
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.closed
True if the associated file is known to be closed; False if it is known to be open. If the associated file is detached (uproot.reading.DetachedFile), then the value is None.
parent
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.parent
The object that was deserialized before this one in recursive descent, usually the containing object (or the container’s container).
concrete
Inherited from uproot.Model.
members
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.members
A dict of C++ member data directly associated with this class (i.e. not its superclasses). For all members, see all_members.
all_members
Inherited from uproot.Model.
has_member
Inherited from uproot.Model.
member
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.member(name, all=True, none_if_missing=False)
- Parameters:
name (str) – The name of the member datum to retrieve.
all (bool) – If True, recursively search all superclasses in bases. Otherwise, search the direct class only.
none_if_missing (bool) – If a member datum doesn’t exist in the search path,
none_if_missing=True
has this function return None, butnone_if_missing=False
would have it raise an exception. Note that None is a possible value for some member data.
Returns a C++ member datum by name.
bases
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.bases
List of uproot.Model objects representing superclass data for this object in the order given in C++ (opposite method resolution order).
If this object has no superclasses,
bases
is empty.If it has one superclass, which itself might have superclasses,
bases
has length 1.Only if this object multiply inherits from more than one superclass at the same level does
bases
have length greater than 1.
Since multiple inheritance is usually avoided,
bases
rarely has length greater than 1. A linear chain of superclasses deriving from super-superclasses is represented bybases
containing an object whosebases
contains objects.
base
Inherited from uproot.Model.
is_instance
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.is_instance(*cls)
Returns True if this object matches a given type in the C++ class hierarchy.
The
cls
arguments may be Python classes or C++ classname strings to match.
num_bytes
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.num_bytes
Number of bytes expected in the (uncompressed) serialization of this instance.
This value may be None (unknown before reading) or an integer.
If the value is an integer and the object exists (no exceptions in read), then the expected number of bytes agreed with the actual number of bytes, and this numer is reliable.
If this object is re-serialized, it won’t necessarily occupy the same number of bytes.
instance_version
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.instance_version
Version of this instance as read from the byte stream.
If this model is versioned (uproot.model.VersionedModel), the
instance_version
ought to be equal to the class_version.If this model is versionless, the
instance_version
contains new information about the actual version deserialized.
is_memberwise
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.is_memberwise
True if the object was serialized in ROOT’s memberwise format; False otherwise.
awkward_form
Inherited from uproot.Model.
- classmethod Model_ROOT_3a3a_RNTuple.awkward_form(file, context)
- Parameters:
cls (subclass of uproot.Model) – 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 the remaining arguments below.
index_format (str) – Format to use for indexes of the
awkward.forms.Form
; may be"i32"
,"u32"
, or"i64"
.header (bool) – If True, include header fields of each C++ class.
tobject_header (bool) – If True, include header fields of each
TObject
base class.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.
- classmethod Model_ROOT_3a3a_RNTuple.strided_interpretation(file, header=False, tobject_header=True, breadcrumbs=(), original=None)
- Parameters:
cls (subclass of uproot.Model) – 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.
tojson
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.tojson()
Serializes this object in its ROOT JSON form (as Python lists and dicts, which can be passed to
json.dump
orjson.dumps
).
empty
Inherited from uproot.Model.
- classmethod Model_ROOT_3a3a_RNTuple.empty()
Creates a model instance (of subclass
cls
) with no data; all required attributes are None or empty.
read
Inherited from uproot.Model.
- classmethod Model_ROOT_3a3a_RNTuple.read(chunk, cursor, context, file, selffile, parent, concrete=None)
- Parameters:
cls (subclass of uproot.Model) – Class to instantiate.
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
read
in 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
concrete
points to the concrete instance.
Creates a model instance by reading data from a file.
read_numbytes_version
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.read_numbytes_version(chunk, cursor, context)
- 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.
Reads the number of bytes and instance version from the byte stream, which is usually 6 bytes (4 + 2). Bits with special meanings are appropriately masked out.
Some types don’t have a 6-byte header or handle it differently; in those cases, this method should be overridden.
read_members
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.read_members(chunk, cursor, context, file)
- 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) – An open file object, capable of generating new uproot.Model classes from its streamers.
Reads the member data for this class. The abstract class uproot.Model has an empty
read_members
method; this must be overridden by subclasses.
check_numbytes
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.check_numbytes(chunk, cursor, context)
- 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.
Reads nothing; checks the expected number of bytes against the actual movement of the
cursor
at the end of the object, possibly raising a uproot.DeserializationError exception.If num_bytes is None, this method does nothing.
It is possible that a subclass would override this method, but not likely.
postprocess
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.postprocess(chunk, cursor, context, file)
- 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) – 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.
hook_before_read
Inherited from uproot.Model.
hook_before_read_members
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.hook_before_read_members(**kwargs)
Called in read, after read_numbytes_version and before read_members.
hook_after_read_members
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.hook_after_read_members(**kwargs)
Called in read, after read_members and before check_numbytes.
hook_before_postprocess
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.hook_before_postprocess(**kwargs)
Called in read, after check_numbytes and before postprocess.
to_writable
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.to_writable()
- Parameters:
obj (uproot.Model instance of the same C++ class) – The object to convert to this class version.
Returns a writable version of this object or raises a NotImplementedError if no writable version exists.
serialize
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.serialize(name=None)
Serialize a object (from num_bytes and version onward) for writing into an output ROOT file.
If a
name
is given, override the object’s current name.This method has not been implemented on all classes (raises NotImplementedError).
to_pyroot
Inherited from uproot.Model.
- Model_ROOT_3a3a_RNTuple.to_pyroot(name=None)
- Parameters:
name (str or None) – A name for the new PyROOT object.
Converts this uproot.Model into a PyROOT object if it is writable. A minority of Uproot models are writable, mostly just histograms. Writability is necessary for conversion to PyROOT because it is serialized through a ROOT TMessage.