TChain and closing files


ROOT Version: 6.28.08
Platform: EL9
Compiler: GCC 13


When processing ntuples I use TChain to support arbitrary number of input files. Files are loaded directly from dcache using xrootd.

Recently the user of my code was notified by the sys admins that he keeps many files open but not actively reading them. I want to clarify what is the TChain file closing policy? Is only one file open at the same time?

Hello @tadej,
I think @pcanal or @vpadulan will be able to answer your question.

Dear @tadej ,

Yes, when the current TTree in the current file has been iterated over, the TChain will move to the next TTree in the next file, closing the previous one.

Cheers,
Vincenzo

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.