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.

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, so that users can read their custom classes seamlessly.

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 --> fac["Factory (Primitive, STLVector, TString, ...)"]
        fac["Factory (Primitive, STLVector, TString, ...)"] -- Optional --> form(["construct awkward forms"])
        fac --> build_reader(["build corresponding C++ reader"])
        fac --> build_ak(["construct awkward arrays"])
    end

    user_fac["User's Factory"] -. Register .-> fac

    subgraph cpp["C++ field"]
        direction TB
        build_reader --> reader["C++ 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 C++ class that implements the logic to read data from binary buffers.
  • factory is a Python class that creates, combines readers, and post-processes the data read by readers.

This machanism is implemented basing on uproot_custom.AsCustom interpretation. This makes uproot-custom well compatible with Uproot.

[!TIP] Users can implement their own factory and reader, register them to uproot-custom. 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 I/O system. Users are expected to implement their own factory/reader for their custom classes that built-in factories cannot handle.

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.2.0.tar.gz (278.1 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.2.0-cp313-cp313-win_amd64.whl (151.8 kB view details)

Uploaded CPython 3.13Windows x86-64

uproot_custom-2.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (185.5 kB view details)

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

uproot_custom-2.2.0-cp313-cp313-macosx_11_0_arm64.whl (152.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

uproot_custom-2.2.0-cp312-cp312-win_amd64.whl (151.8 kB view details)

Uploaded CPython 3.12Windows x86-64

uproot_custom-2.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (185.6 kB view details)

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

uproot_custom-2.2.0-cp312-cp312-macosx_11_0_arm64.whl (152.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

uproot_custom-2.2.0-cp311-cp311-win_amd64.whl (150.9 kB view details)

Uploaded CPython 3.11Windows x86-64

uproot_custom-2.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (185.1 kB view details)

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

uproot_custom-2.2.0-cp311-cp311-macosx_11_0_arm64.whl (151.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

uproot_custom-2.2.0-cp310-cp310-win_amd64.whl (150.5 kB view details)

Uploaded CPython 3.10Windows x86-64

uproot_custom-2.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (183.6 kB view details)

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

uproot_custom-2.2.0-cp310-cp310-macosx_11_0_arm64.whl (150.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

uproot_custom-2.2.0-cp39-cp39-win_amd64.whl (150.3 kB view details)

Uploaded CPython 3.9Windows x86-64

uproot_custom-2.2.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (183.8 kB view details)

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

uproot_custom-2.2.0-cp39-cp39-macosx_11_0_arm64.whl (150.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: uproot_custom-2.2.0.tar.gz
  • Upload date:
  • Size: 278.1 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.2.0.tar.gz
Algorithm Hash digest
SHA256 b88863f61b7712779b195065776a56c9bed1d53d38a012886ec1a0afe9ea63ec
MD5 7682499f3cc10d32762eb49c6ddce1b0
BLAKE2b-256 c6987598e3821eb41b17bc12dcd08e4767591360f897d15d02e3c6681f51413c

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 859b2b811a88afd22a080be76fd8d33d2992e9d7b23cde8b8ef11ac5c4374933
MD5 7973415e84e1184079281a3f0c8c96fb
BLAKE2b-256 01cccaf132fd7b9e910a65105c47183f89847a201449d73e692790250876b03a

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8e273d4042ca6f8e5de726f46653eed180285d11582e579a9ef2788ddb6230be
MD5 e8d67579409061d77ae97d35b43e2a8c
BLAKE2b-256 33ade3a8d81b33421309693aa2145b2aab6ecf94bc8d5e7e95a8f4a693b800b8

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10a8863b654f5233b051c5f7d37508e35e1439d7a6fd3454c309ca9e60bde5fe
MD5 5d309c2e71163f19f5e078f4b87a66f4
BLAKE2b-256 cb2332346ae282373dfe42eab18e2c60c272ffd199c94e04bd69e881db710f2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d7b2ee1a3868b9de3d04d1c59b09096482c7cf430abdc68cf6bdf5234f0d2c80
MD5 315246c7eaee3df3e0a876b04abf0a95
BLAKE2b-256 611b741f6f83570ecd11f083e1e3da8f3c4fb5aa84c1cbfb9866a22ca94ad8db

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bd1d9d3e2ca7603894f7d292a6fa16acdb182e3802994d82c5569fbc7d4510be
MD5 a77af2dfdec612f2b9f64f34b98d0cd6
BLAKE2b-256 67c3bc13ec6ba6ea9c441229b41ef45cf9e8a5a306c2ba033674dbda485bf3ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 85896565c31af5016b7f09fe850a827ba3973660a59dfbd39888375742ee6aa3
MD5 e5db115c327c8b6f340fb63f0f8800a0
BLAKE2b-256 21355adad2cfdd3ac8077a6f7936f262c5b3f50eab6bed8d37173401cf0030c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 449d5704b94b408bcc7218cac0747ebfd7306363ad8cbc07b33ce60e78d48277
MD5 801350901998db8bc151bfd20915b082
BLAKE2b-256 5ba61d2da0f24e47010b0211eec01ea8b07b974fd7eb505f05eb44346b9171f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 29500130e444700cd2e52018febc3aa90a1c32fd9e02d13cc7116fc62cf29c40
MD5 f19a0c075cf064eed17ef453c438a610
BLAKE2b-256 a4e0c451ca57e5d43185af2b5d2c92c4528c8fc4ecc72e6363f4b1deb66b6639

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 91c9a858ffc66271d883c9b3b42391e0734230734f051df226001bf032d0f4a4
MD5 fa9bec8e807c53deceedbd023ff552c8
BLAKE2b-256 130bc84f2e0ca8a40bd1ba65a387ed6b92274dc6573c8d8bb71135ac8cb4e6c4

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9f2344e225e466ab1b9205e76da0ac3e90a518f2b9af850a5b543053c8b61e99
MD5 75d388ce8c201f868a31cefc2be9193f
BLAKE2b-256 712eeb261d7049c3107da0f9fd9b0a6d1ed2e9b127a683461f02d1e875530dd2

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6b4183b86081d9076fd97115a6824fb08fddaa3acf2b1c3290e57c7c978b8ea9
MD5 fe5c18bf31e6efd49015be54fd003429
BLAKE2b-256 96c892642fd101152114185c514667bd1c481ba695dcce62f32f472c9a4c0eb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e3c8099602ddd9535e153fe6c690db8d465dceef0bb7ee5eaf06c4237e37ec7
MD5 be8ae513f1194176c725d46f1bb898d8
BLAKE2b-256 3fa332fb002a377252d3a7c5da0f852312c36b33400fa50a87e1c6a756d7d3ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 9861fad193f1c73d80ffacd90c3382cf34358bcf7d752809bdded6a734944657
MD5 853c324870a06717593a0a13be7787d3
BLAKE2b-256 467f2e0e0364b5124c4ec5fd530f13a80e74e2a143153d879cd9267c6bd27fe1

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 217ae8c930bc0f63b45fd810ad1304f3859ec9b377161f4986083b052b500e37
MD5 51a0284ad4749b95f64c43834b7d3e2c
BLAKE2b-256 c2ba8f23e8bfbf5c9e7f0d8ca65e4137722c27b19eee810294db1961a1db7c1c

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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.2.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for uproot_custom-2.2.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 44ffd4d5c48351737c9544132f7a4e69f699ac68215d0436315fbab425f99ceb
MD5 1c5650adbfd0a45b82952798fd71161e
BLAKE2b-256 5af0778f9cc30b9a9eccbdb6bae457e0c8324aa97a1ad491c96f6efb08ccb0f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for uproot_custom-2.2.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