I want to identify corrupt TFiles before running a macro.
The way I know is to load them in root, and sometimes I get a warning:
Warning in <TFile::Init>: file file.root probably not closed, trying to recover
Is there an easy way to check this when generating the file, so I can tag the file?
Also, is there a way to check it afterwards?, some variable when loading the root file?
I tried with TFile.IsZombie() but doesn’t work in all cases…
Thanks in advance for you help!