Skip to main content

uproot extension for reading custom classes

Project description

Introduction

Uproot-custom is an extension of Uproot that provides an enhanced way to read custom classes stored in TTree.

[!WARNING] Because of earlier mistakes in version management, the v2.x.x series should still be treated as a development version rather than a stable release.

What uproot-custom can do

Uproot-custom can natively read complicated combinations of nested classes and c-style arrays (e.g. map<int, map<int, map<int, string>>>, vector<TString>[3], etc), and memberwisely stored classes. It also exposes a way for users to implement their own readers for custom classes that are not supported by Uproot or uproot-custom built-in readers.

When to use uproot-custom

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.

How uproot-custom works

Uproot-custom uses a Reader / Factory mechanism to read classes:

flowchart TD
    subgraph py["Python field"]
        direction TB
        AsCustom -- Recursively generate --> fac["Factory (Primitive, STLVector, TString, ...)"]
        fac["Factory (Primitive, STLVector, TString, ...)"] -- Optional --> form(["construct awkward forms"])
        fac --> build_reader(["build corresponding reader"])
        fac --> build_ak(["construct awkward arrays"])
    end

    subgraph reader_field["Reader (Python or C++)"]
        direction TB
        build_reader --> reader["Reader"]
        reader --> read_bin(["read binary data"])
        read_bin --> ret_data(["return data"])
    end

    ret_data --> raw_data[("tuple, list, numpy arrays, ...")]
    raw_data --> build_ak
  • Reader is a class that implements the logic to read data from binary buffers. It can be written in Python (for development and debugging) or C++ (for production performance).
  • Factory is a Python class that creates, combines Readers, and post-processes the data read by Readers.

This mechanism is implemented as AsCustom interpretation. This makes uproot-custom well compatible with Uproot.

[!TIP] Users can implement their own Factory and Reader, register them to uproot-custom. Start with a Python reader for rapid prototyping, then port the logic to C++ for production speed. The default reader backend is C++; during development, explicitly set the backend to Python. An example of implementing a custom Factory / Reader can be found in the example repository.

[!NOTE] Uproot-custom does not provide a full reimplementation of ROOT's TTree I/O system. Users are expected to implement their own Factory / Reader for their custom classes that built-in factories cannot handle.

System Requirements

  • C++17 compatible compiler: Required for building C++ readers and the uproot-custom extension module. The CMake configuration sets CMAKE_CXX_STANDARD 17.
  • Python 3.9+: Uproot-custom supports Python 3.9 through 3.13.

Documentation

View the documentation for more details about customizing your own reader/factory, the architecture of uproot-custom, and build-only dependencies (e.g., pybind11 is needed only at build time and should not be present in the runtime environment).

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uproot_custom-2.3.0.tar.gz (407.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

uproot_custom-2.3.0-cp313-cp313-win_amd64.whl (173.7 kB view details)

Uploaded CPython 3.13Windows x86-64

uproot_custom-2.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (217.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

uproot_custom-2.3.0-cp313-cp313-macosx_11_0_arm64.whl (179.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

uproot_custom-2.3.0-cp312-cp312-win_amd64.whl (173.7 kB view details)

Uploaded CPython 3.12Windows x86-64

uproot_custom-2.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (217.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

uproot_custom-2.3.0-cp312-cp312-macosx_11_0_arm64.whl (179.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

uproot_custom-2.3.0-cp311-cp311-win_amd64.whl (173.6 kB view details)

Uploaded CPython 3.11Windows x86-64

uproot_custom-2.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (217.2 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

uproot_custom-2.3.0-cp311-cp311-macosx_11_0_arm64.whl (177.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

uproot_custom-2.3.0-cp310-cp310-win_amd64.whl (173.0 kB view details)

Uploaded CPython 3.10Windows x86-64

uproot_custom-2.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (215.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

uproot_custom-2.3.0-cp310-cp310-macosx_11_0_arm64.whl (176.6 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

uproot_custom-2.3.0-cp39-cp39-win_amd64.whl (174.1 kB view details)

Uploaded CPython 3.9Windows x86-64

uproot_custom-2.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (216.0 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

uproot_custom-2.3.0-cp39-cp39-macosx_11_0_arm64.whl (176.7 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file uproot_custom-2.3.0.tar.gz.

File metadata

  • Download URL: uproot_custom-2.3.0.tar.gz
  • Upload date:
  • Size: 407.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for uproot_custom-2.3.0.tar.gz
Algorithm Hash digest
SHA256 bb09702c92a8c61416864fd5c16e00fc3d98c1549af8f4e4bcf6a5d744d59279
MD5 8704ac0411521c97a30e6c0e250bde58
BLAKE2b-256 fcc3dd6487f38d4bd6a8c88463bf1ebbb856b2c6268c4f359a85a98e72755d3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0.tar.gz:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d039807396705c524f9b3536cf6a92c5201f5d6c172488dffd0909884c0b462e
MD5 43cf44c3a4d3701320f9617e6bde2c52
BLAKE2b-256 363a259c809cd5c5717ddd014c70b99c313e3207b851e3ce94abeb0be2db4dfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp313-cp313-win_amd64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0283c0be38fbce4fe405c113c29f6f872c60cd89ec03e27a6f37726f610b8756
MD5 42fc43291f43ee688f237000916679cf
BLAKE2b-256 c5d8c85ef9f187d05415a3702b73050606cc8063fc0f76e07da6a15ca86adbf3

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 11e54f9c37e52cd1e7f1743033f56927fac271b9cb330c5842d0ee15e0bef52d
MD5 524ea1ac2adf6927aa6cac248fb469b8
BLAKE2b-256 d9905f32bf87344de042942fdeabb4ab318a0d4608a036fa1316725ceb111751

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e2f17b885980ff6dd9392e465335298ffb61d4cd143a6853c8382d559a0a0363
MD5 b69529f9c4db6d260f9d3ccab139d949
BLAKE2b-256 aff100e466b4abaa65b47db3c3c0d2a0c928dfd06c47035ae329c3210e77e9d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp312-cp312-win_amd64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 50b74955f1b35c5973ea9d414e5d96efe964daf3f1f4bd50e62a86d6c663e38c
MD5 de30c3012fa89bd3bcf48f4393625a8f
BLAKE2b-256 95002698225b1cbe5a11784430802fca312afeb6cddd29b3bf6c1ee8d3357210

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 42dc18df29d7e305695d0c53490df92bf95fde9ddedc2fe6320be1a607ed0490
MD5 2ea833a3be3b5a68588c5de0f98591c9
BLAKE2b-256 91a05baf35b6b794676a10322b88554d29be0d94d13f797ee032b7b376efffc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 c875158e26616b47f7b4def483737d9f998fa7af0e4172ad69c97f0aa4cbb1e8
MD5 526fac57e5aa8ddde4f715aaa1e8562d
BLAKE2b-256 99d11812dd1bc99350e624e39c5f0dbe2d5f82d6b50916773e3c2a755654be4f

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp311-cp311-win_amd64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3e3650e62ad635179646a9df00e727e93046c906e31f90c958a08128daeefe9d
MD5 15c4e8df402454f186378b4ce4435c4d
BLAKE2b-256 fb8d386a1377df09dea30466856ae8633d402bd3877dc83f82246ed4b574393e

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5bab271c591362626ca2f648f5c82dd9f2cb50858c58d0ae0250b8fdfe531784
MD5 346100688b3c0c335ba7cac981ceabe7
BLAKE2b-256 bf20bc56740819bd69f6fe86a6dcf37c5f359264c366eb5376dbf84343f25d40

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 cdfe42d32073d51a125a0773f5395eddb4c05c731070849eee5c7683692e2134
MD5 b464659a4148acd974727de6319ec8d0
BLAKE2b-256 98d614902bc9a5204521a45960e10999e14d22930ef103b41e0227d831041873

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp310-cp310-win_amd64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1020f92adaecc91dd20e696e43c29309e134a5538315ee70e915a1dec55ad8c0
MD5 a72073df3d50de74e2f7176c787c1296
BLAKE2b-256 4fbf89f4c782f4764b5975d2b85ca3bf26aa38854ca1e0daf1485b87e331ddc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1bdd4b7145ab638bf947258ac6ecd4cc5eb889c0267df0175f46f7737b20d209
MD5 ae49bde9cf2836e692e50b720191b9e9
BLAKE2b-256 a24e794a9e509de681b5ff50d2368365ec595dde9fe32e0a14034bdcb8543807

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 109a45339b702c3c1d978be0567f1025bb646db44c6ad1e10baa9dee07294ac2
MD5 ede107b73e68254c9dab4f00149593d9
BLAKE2b-256 72dd29b57b1bb25b39f1f7cf36e727f5866f8b0486515a05bc790ee2d7a7faef

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp39-cp39-win_amd64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c8c59c5826f29abb86fa1ff9e5c55418c92fcb6c40e308d187ec4547a136e1a4
MD5 f02e0869fe04a522c18c6fb34fa1e75d
BLAKE2b-256 0bc908951d658f2cbb4d7550234d0b9379dfb7ba67f810c810b560a587b5435a

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file uproot_custom-2.3.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.3.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d36603d839cf09b0f654f547aebba406d5340007fb2ac2479f44e3b9217f8840
MD5 494ab0f946b091d0bdc86b7769e004c3
BLAKE2b-256 6527c805ca9cc5dcf02faa6ad86771dec8e4c1f300c22996d4984b140f255ac7

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.3.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: python-publish.yml on mrzimu/uproot-custom

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page