Detecting a corrupted file

I have a corrupted root file with 19498 events.
If I loop over the events, the first 4465 are read fine, but from event 4466 onwards when I do inputTree->GetEntry I get the error:

R__unzip: error -5 in inflate (zlib)
Error in <TBasket::ReadBasketBuffers>: fNbytes = 26379, fKeylen = 86, fObjlen = 31424, noutot = 0, nout=0, nin=26293, nbuf=31424
aborting

if I run file0->IsZombie(), the result is false.
Now, my question is, is there some other method that could help detecting the corruption of the file?

Hi,

I think we do not allow to check that upfront but rather allow users to recover as much as it is possible from the files.

Cheers,
D

Ok,

I think it would be good to have this possibility to detect a possible issue at an earlier stage. Most of the time the solution could be just to rerun the job.

The challenge is that checking the file is currently computationally equivalent to reading the whole file …

1 Like

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