I am using the Query function on TTree but unlike Scan or Draw Query does
not appear to return arrays unless one asks for the specific index. Example:
Int_t count=res->GetFieldCount() ;
count will be 1 instead of 3. Is this a bug or on purpose? Can one get
the whole array in a single query as with Scan or Draw?
The version of ROOT I’m using is 5.10/00.
TTree::Query only looks at the first element of the array. To see the other elements you need to unroll them by hand
By the way, I was wondering why you would like to use this (slower) interface.
Ok, I see.
The reason I use Query is that I want to extract numbers from a tree in a compiled executable but using query formulas and cuts defined as strings at run time.
Is there a more efficient way of doing this than using Query?