How can I "dump" / get the content of objects of "experiment specific" / "custom" classes (from a TTree) #949
Labels
bug (unverified)
The problem described would be a bug, but needs to be triaged
Projects
Discussed in #948
Originally posted by JacekHoleczek August 24, 2023
I need to "move" (to here) my original StackOverflow topic: How can I "dump" / get the content of objects of "experiment specific" / "custom" classes (from a TTree)
Apparently, they do not allow any discussions there (they simply deleted my follow-up).
Many thanks for your reply on the StackOverflow.
The standard ROOT provides the
TFile::MakeProject
method, which can generate "source code" for classes present in the file (only "data members" are "recovered" from the "streamer info", of course).I understand
uproot
does not provide such functionality (i.e., I cannot get "automatically generated" Python classes).To start, I'd now like to play with a small "
header
" tree with just a single branch:The
root_directory.file.show_streamers('Header')
returns:So, there are just some
double
, someint
, onebool
, and onestd::string
ordinary variables (no arrays at all).When I try to retrieve just the first entry:
I get (note: it now thinks
_POTInfo
and_SpillInfo
are arrays):It seems I'm missing something again (adding "
library='ak'
", "library='np'
", or "library='pd'
" does not help).There's nothing exotic about this class definition, so Uproot should be able to read it. I've labeled it "bug (unverified)" as a reminder to try to reproduce it and fix whatever the problem is.
The text was updated successfully, but these errors were encountered: