This module provides an interface between Uproot and PyROOT.

PyROOT is a complete set of ROOT bindings generated automatically from ROOT’s reflected C++ code. Uproot is a pure Python reimplementation of ROOT I/O, with incomplete coverage of ROOT’s suite of classes, but without an install-time dependence on ROOT.

The only point of contact between Uproot and PyROOT is that they both recognize the same serialized form of ROOT objects, so conversions in this module proceed by serializing and deserializing the objects through a TMessage. This makes it possible to

  • convert any PyROOT object into its Uproot uproot.Model if Uproot can read it (which is possible for most classes)

  • convert any Uproot uproot.Model into the corresponding PyROOT object if Uproot can write it (which is considerably more constrained; mostly just histograms).

This module also makes it possible for PyROOT objects to be added to ROOT files that Uproot is writing (regardless of whether Uproot could read such objects).