TTree Draw with nested std::vector

Dear Rooters,

I have the following question, working in Root 5.22.
I am trying to fill and read back a std::vector< std::vector >

The filling and manual reading back (analog to the hvector.C tutorial) works without a problem, but as I would like to perform selections on the tree, I would like to make selections on elements of the inner vector, i.e. for each vector->at(i) I would like to say something like vector->at(i).at(0) > 10 (or similar) within the tree->Draw() command.

Is this possible and if so, how?

Any ideas appreciated.

Cheers,

Erik

Hi,

Use tree->Draw("myvector[][0]");i.e. the ‘[]’ indicates that TTree::Draw should loop over the indices of this dimension.

Cheers,
Philippe.

Hi Philippe,

works like a charm!

Thanks,

Erik