Checking integrity of .root files

Hi

I do have some root files in my dir, which I would like to check if they are written properly etc etc…So, except from doing something like

if (!f || f->IsZombie())

is there any other way to sequentially open all .root files in the dir and check also for the “keys” ie

Warning in <TFile::Init>: file TMVA_test_JERPlus.root probably not closed, trying to recover

thanks

Alex

Hi,

You can disable the autorecovery with:gEnv->GetValue("TFile.Recover", 0);and then the test on IsZombie is the best way to do what you need.

Cheers,
Philippe.