Skip to content

Reading Allpix² files - uproot.interpretation.objects.CannotBeAwkward: arbitrary pointer #590

Answered by jpivarski
prakhub asked this question in Q&A
Discussion options

You must be logged in to vote

If the object you want to read has pointers within it, then it does not fit in Awkward Array's type system. C++ objects are arbitrary graphs, but objects in Awkward Arrays must be trees.

You may be able to read this with library="np", since that turns the data into Python objects (slowly). Python objects are also arbitrary graphs.

You can do it with PyROOT as well by giving ROOT the shared library describing the C++ classes that it should fill (libAllpixObjects.so). This is because PyROOT objects are just proxies pointing to C++ data. That makes the PyROOT solution a little different from Uproot's library="np": since Uproot's objects are pure Python, they should be pickleable and I expect…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@prakhub
Comment options

Answer selected by prakhub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants