TTree Query method

Hi
I want to use the TTree Query method i.e.

[color=red]TSQLResult* Query(const char *varexp, const char *selection, Option_t *option, Long64_t nentries, Long64_t firstentry) [/color]

But can not find any example on how to use it i.e. the syntax of varexp and selection parameters.

Can I specifiy values as in SQL query i.e. VAR1 < VAL1 AND VAR2 == “test” etc ?

On the similiar note; it is better to use the Query method for selecting the contents of tree based on conditions Or it is better to use Tree Selector Or MakeClass() method instead.

Thanks a lot for the reply,

Asif

varexp and selection arguments are the same as the ones described in TTree::Draw.
You better use TTree::Draw directly or a TSelector function
(skeleton code generated by TTree::MakeSelector).
Another alternative is to use TTree::MakeProxy.

Rene