Determine size of std::vector stored in TTree

Hi,

When I store an std::vector in a TTree, Scan() outputs an instance for each item of the vector.

Now, is there a way to determine the size of such a stored vector, without retrieving the full vector as an object? I found that Draw(“vec.size”) or Draw(“vec->size()”) doesn’t work.

Best,
Peter

Hi Peter,

your post kind of escaped my attention. Sorry for the late answer.
The strategy to achieve what you want is documented here:
root.cern.ch/root/html/TTree.html#TTree:Draw@2

Cheers,
Danilo