About TEntryList and TEntryListFile

Hi Rooters,

I hope things are going well with the expected 5.18 :wink:

After reading whatever documentation I can find about TEntryList, I was wondering about the impact of adding such a list winthin a TTree.

In the User Guide, section ā€œUsing an Event Listā€ (which should be renamed ā€œusing an entry listā€, no ?), it is said this ā€œlimit all subsequent TTree methods to the entries in the listā€.

Well, does it includes calls to GetEntries() and GetEntry() ? Are they filtered according to the list ? Or should I go through ā€œGetEntryNumber()ā€ for each entry ?

It would be worth to be explained in the doc.

Also, about TEntryListFromFile, I feel not fully at ease after reading the reference guide. Actually, it is no said if this list comes from a file, as suggested by the name, and how such file(s) has been generated. Probably I misunderstand the use case. What would greatly help would be some sort of tutorial, how-to or example.

If this topic should have been posted in ā€œsupportā€ forum, let me know. I was unsure where to post.

Thanks.

Hi,

Thanks for your comments, Iā€™ll try to improve the docs a bit.

No, only GetEntryNumber() is affected if you set the entry list. And all the Draw, Scan and the like. Iā€™ll make a note about that in the docs.

Event lists are still around for backward compatibility, but we do plan to get rid of them eventually.

TEntryListFromFile really is for the lists that come from a file :slight_smile: The use case is the following: imagine you process a lot of (big) trees and you create TEntryLists for those trees and save them to files (one list per file). Then you make a chain out of some of those trees and you want to use the entry lists you created. With TEntryListFromFile you can load those lists from their files one by one, as you need them in your loop, and not keep them all in memory at the same time. So it assumes that you already have your entry lists somehow generated, and provides the mechanism to load them in memory only when needed. Iā€™ll try to make a tutorial about it.

Cheers,
Anna

You save them together with their trees (I guess-hope not) ?
If not, how do you save them ? Each one in its own file, with a simple call to Write() ?

Thanks :slight_smile:

Yes, each one in its own file with the Write() command.

Ok. Thanks.