Out of memory using TEventList

Dear Rooters,

I am working on some analysis for now few months using (basically) the same TSelector,
which recently crashed with the message:

Error: Symbol G__exception is not defined in current scope (tmpfile):1: Error: type G__exception not defined FILE:(tmpfile) LINE:1

Reading through the forum I concluded that this was coming from an out of memory,
especially when by adding #include into my header I had the message:

terminate called after throwing an instance of 'std::bad_alloc' what(): St9bad_alloc

I track down the piece of code responsible from this message and it turned out that it
was some TEventList (consistent with the fact that it is essentially the only change I made before the code crash)

I tried to create the TEvenlist(s) inside a TFile and write them regularly to disk. However
this did not change anything and I concluded that the TEventlist was kept in whole in memory (??).

Is there any way to ‘flush’ the TEventlist (like a TTree, without creating one) or compressing the list?

The bug started with ROOT version 5.15/08 and updating to 5.16 did not change anything

Thank you in advance for any help.
Julien

How many entries do you store in the TEventList?
TEventList entries are kept in memory.

Rene

Dear Rene,

This what the Print method outputs:

It is rather big …

Do you think that by embedding the TEventList into a TTree the problem may be
solved? Although I would rather not.

The data I am sorting come from many TTrees written in tens of files. Maybe having
a TEventList from each file will work? But then how I do that?

Regards
Julien

see class TEntryList announced in the 5.16 Release Notes at
root.cern.ch/root/Version516.news.html

A TEntryList is written for each file in a chain. When using a TChain
to process a list of files, the selected entry numbers are loaded when
loading a new file. Also the storage is more efficient than with the TEventList.

Rene

Dear Rene,

Thank you for the help.
I did not find any example yet on TEntrList and I just changing all my TEventList to TEntryList, within my TSelector. It seems Ok.
If I encounter problems I will post a new topic.

Julien