I have the following problem (macro attached). When trying to add many files (approx. 2000) with my macro I receive the following error message:
SysError in TFile::TFile: file File_156.root can not be opened for reading (Too many open files)
SysError in TFile::TFile: file File_157.root can not be opened for reading (Too many open files)
aso
Is there a better way to solve this problem? Thanks a lot in advance.
The operating has a limit (cutomizable) of the number of files you can open at the same time. To work around the issue, you are going to have to merge fewer files at a time.
Unfortunately, this currently the only solution (If you happen to improve TFileMerger to support this case, we will be happy to incorporate your patch ).