TTreeReader for subranches

Hello,

I am trying to access the values of a variable from a tree using a TTreeReader. The tree (TTree) contains a branch (TTbranchElement) which contains a subranch (TNonSplitBrowsable) which contains a leaf (TNonSplitBrowsable) with the variable.

How to use the TTreeReaderValue to access this variable?

Thanks in advance!

Hi,

The non-split-browsables are TBrower’s visualization of non-split data. That’s not directly connected to how TTreeReader accesses that data.

You might be able to access the data simply using a TTreeReaderValue (or whatever) passing “m_mc_event_number” as the branch name.

If that fails then you’ll have to figure out what the class of the branch “m_event_type” is called and specify a TTreeReaderValue.

This assumes that m_mv_event_number and m_event_type are not collections; else you’ can to use a TTreeReaderArray.

Let me know if any of that works for you!

(And in general it’s always nice to split these branches, if you control the layout of that tree.)

Cheers, Axel.