Is there anyway to fill a float or array (or vector) with the values of one (or more) variable(s) from a TTree for all events that pass a cut. TTree::Scan will print the values to the screen in this manner, but I need to access these value late in my code.
The easiest way without looping manually that I am aware of:
// required to make arrays big enough to store elements
Double_t *expr1 = tree->GetV1()
Double_t *expr2 = tree->GetV2()
Hope this helps.