Skip to content

Problem with reading (awkward) TClonesArray of TLorentzVectors #462

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

You must be logged in to vote

Sorry that I didn't get back to this earlier, but maybe try library="np"? Since this is not strictly numerical data, that NumPy array would have dtype="O" and it would effectively be a Python list. Iteration over it would run at Python speeds, but slow access is better than no access.

The error message is saying that it can't convert the data into an Awkward Array. Your array contains a TObjArray, which is a dynamically typed list: it can contain any TObject; you don't know what types are in it until you read it. Awkward Arrays have to be statically typed so that we can split up the data into columnar buffers, which requires knowing which fields all nested records contain. Maybe I need to…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@denehoffman
Comment options

@jpivarski
Comment options

@jpivarski
Comment options

@jpivarski
Comment options

@denehoffman
Comment options

Answer selected by denehoffman
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