File Output_t0.root has an incorrect header length (206)

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.22/06
Platform: Ubuntu 18
Compiler: cmake

Dear Expert,

I have a geant4 results in root format.
The simulations is finish as normal but don’t know why the output could not open.
It show the message “Error in TFile::Init: file Output_t0.root has an incorrect header length (206) or incorrect end of file length (188)
(TFile *) 0x5574d713a9e0”

I have try to write TFile::Recover and TFile::Write in new TBrowser’s command line but the file still could not open.

I’d appreciate any help on this.


I guess the file is corrupted, maybe @pcanal can help you on this

Dear Lorenzo,

Thank you so much for your reply.
I have tried to upload my root file in here but it exceeds the size (<3 MB)


It looks like the file was not properly written. Most likely a final call to file->Write(); in the writing app (i.e. the Geant4 simulation).

Hi @pcanal

Thank you so much for answer.
Is there any way to recover this corrupted file?

Best regards,

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