Usage of TEntryList


i want to select specific events and store them in a TEntryList. But i am not sure, if i used it correct.

I have a TChain including several files/trees. I am using the TSelector class ProcessCut() routine to select specific events. I added the TEntryList via the normal constructor to my fOutput list.
The entry will be written by the Enter() function of TEntryList in the ProcessFill() routine.

This seemed to work and the list has been created and contains the entries in an ascending order.
When i want to use this list now, i am using my chain as usual and use SetEntryListFile() to apply the list on my chain.
The problem is now, that i have more events when looking at histograms for example than in the entrylist.
Furthermore, when looking into the entry list, it seems that it doesn’t contains the global entry numbers instead of these inside each tree.

My question is, if i made a mistake when creating the list or using it afterwards? How do i get the global numbers inside the chain?

Best Regards,
Dennis Wendland

Could you send the shortest possible scripts showing how you fill teh list and how you read it?



i think, i solved the problem. I had to create a list for each tree in the chain and set the tree name for it.

If someone else has this problem, i want to explain, how i got it to work.
In my TSelector i create a global TEntryList fEntryList, which will contain all the lists for each tree afterwards, and a temporary TEntryList fCurrentEntryList, which will be used, when running over the current tree.
The global list will be set to write in my standard output file:


In Notify(), which is run for each tree, i use


to set the current tree in the list.
In ProcessFill() i can fill the list now for each entry i want:


At the beginning of Notify() and in Terminate() i attach this list to my global entry list:


The entry list will be written in the output root file then