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.