I have a tree with events. I’d like to select the events which fullfill a given condition. It is more convenient for me to give this condition as a string (à la TCut). Then, the events that fullfil the condition have to be processed further, so I tried to use a TEventList to retrieve them.
The call "NTuple->SetEventList(list): does not change the number of entries in the Tree, it simply connects a TEventList to the Tree such that the next call eg to TTree::Draw will use the TEventlist in input.
If you want to know the number of entries in the TEventList, simply call list->GetN
Note that you can play with several liss with the same tree.
[quote]By using GetEntry from the TEventList or from the TTree ?[/quote]Yes either TEventList::GetEntry directly or indirectly via TTree::GetEntryNumber.
The main advantage to setting the event list in the TTree is that the automatic tools (TTree::Draw, TTree::Process will ‘use’ it).