How to read a std::vector values stored in TTree branch?

Hi, I have a TTRee that has a branch comprising std::vectors (doubles). how can I from the the interactive session read the contents of these vectors ?

Here is the TTree structure

root [14] B5->Show(2)
======> EVENT:2
 Dc1Hits         = 5
 Dc2Hits         = 5
 ECEnergy        = 184.864
 HCEnergy        = 0
 Time1           = 5.509
 Time2           = 48.0399
 ECEnergyVector  = (vector<double>*)0x55ac21c20cf0
 HCEnergyVector  = (vector<double>*)0x55ac21d767c0

Is it possible to read the values stored in the ECEnergyVector (for example) ?

Also, a different question when I open the branch using TBrowser, is it expected o plot any histogram corresponding to the branch containing multiple vectors and each vectors has multiple entries) ?
For example for the above case, when opening the branch `ECEnergyVector I get

Does it mean its plotting all the entries in all the vectors ?
Thank You


root [ ] B5->GetEntries()

and if this number is lower than what you see in the plot, yes (unless all vectors have only 1 element or there are many empty vectors! but you get the idea).
To read the vectors and access each element, there are many examples searching this forum, for instance this:

1 Like

Thanks a lot for your detailed reply.