Skip to content

ElementLink branch EventInfoAuxDyn.hardScatterVertexLink in PHYSLITE can't be read #1177

@nikoladze

Description

@nikoladze

There is one remaining issue from #951 - that is a particular ElementLink branch in PHYSLITE files that is not in a vector can't be read at the moment, although the way the data looks like it should be in scope what is supported by uproot:

>>> import uproot
>>> uproot.__version__
5.3.2.dev10+g21735bf.d20240319

The issue occurs in the EventInfoAuxDyn.hardScatterVertexLink branch (it has a subbranch with the same name)

>>> import uproot
>>> from skhep_testdata import data_path
>>> filename = data_path("uproot-issue-951.root")
>>> tree = uproot.open({filename: "CollectionTree"})
>>> tree["EventInfoAuxDyn.hardScatterVertexLink/EventInfoAuxDyn.hardScatterVertexLink"].interpretation
<UnknownInterpretation 'none of the rules matched'>

Reading it then fails with UnknownInterpretation. The data looks not too strange

>>> tree["EventInfoAuxDyn.hardScatterVertexLink/EventInfoAuxDyn.hardScatterVertexLink"].debug(0, skip_bytes=10, dtype=">i4")
--+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+-
 55 209  69 151   0   0   0   0
  7 ---   E --- --- --- --- ---
      936461719               0

We can see the key and index fields - matching what we have in all the other ElementLinks that inherit from ElementLinkBase:

>>> [(el.name, el.typename) for el in tree._file.streamer_named("ElementLinkBase").elements]
[('m_persKey', 'unsigned int'), ('m_persIndex', 'unsigned int')]

Unfortunately there seems to be no streamer for ElementLink with HardScatterVertices as template argument, maybe that's the issue? Now seeing that i also checked with ROOT and it indeed also doesn't show a type for this branch with TTree::Print:

>>> import ROOT
>>> root_file = ROOT.TFile.Open(filename)
>>> root_tree = root_file.Get("CollectionTree")
>>> root_tree.Print("*EventInfoAuxDyn.hardScatter*")
******************************************************************************
*Tree    :CollectionTree: CollectionTree                                         *
*Entries :       50 : Total =         5672587 bytes  File  Size =    1097771 *
*        :          : Tree compression factor =   4.80                       *
******************************************************************************
*Branch  :EventInfoAuxDyn.hardScatterVertexLink                              *
*Entries :       50 : BranchElement (see below)                              *
*............................................................................*
*Br    0 :EventInfoAuxDyn.hardScatterVertexLink : BASE                       *
*Entries :       50 : Total  Size=       1839 bytes  File Size  =        280 *
*Baskets :        1 : Basket Size=       8000 bytes  Compression=   4.36     *
*............................................................................*

Only shows "BASE"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug (unverified)The problem described would be a bug, but needs to be triaged

    Type

    No type

    Projects

    Status

    Deserialization

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions