TTree::Scan/Draw an element of a std::vector over entries

Dear experts

I tried to Scan (and Draw) a certain element of a std::vector in a Tree, but failed to use std::at(), like

tree->Scan("x0.at(pos)")

where pos is another value saved in the tree (int). Is there any way to reach the certain element of std::vectors?

Does accessing with [] work?

tree->Draw("x0[pos]")

It works! Thank you :slight_smile:

1 Like