How can I "dump" / get the content of objects of "experiment specific" / "custom" classes (from a TTree) #948
Unanswered
JacekHoleczek
asked this question in
Q&A
Replies: 1 comment
-
I decided to try another branch that belongs to another small "
The
For the "
When I try to retrieve just the first entry: root_directory['config']['SEL/SEL._rootStep'].array(entry_stop=1, library='np') I get:
Using |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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), or does it?To start, I'd now like to play with the small "
header
" tree that has only a single branch.The
root_directory['header'].show()
returns: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).However, when I look at the
TFile::MakeProject
method output, I can see two arrays:When I try to retrieve just the first entry:
I get (note: it now thinks
_POTInfo
and_SpillInfo
are arrays and their lengths are fine, too):It seems I'm missing something again (adding
library='ak'
,library='np'
, orlibrary='pd'
does not help).Beta Was this translation helpful? Give feedback.
All reactions