I don’t know to what extent the format of root files change between versions of root, but this might explain why I am occasionally having problems reading files - particularly when it is a file I created a while ago! Is there a quick way to determine which version of root was used to create a file and therefore use the right version of root to read it?
Is there a way to do this from the shell without invoking root? (I think you get “R__unzip: error in header” if I use an old version of root to open a newer version file.)
You need to write a small program
-opening the file
-reading the first 8 bytes of the file
The bytes 1->4 contain the chars "root"
The bytes 5->8 are an integer with the ROOT version number
used to write this file.
For more info see the documentation of class TFile.
This may happen when you open a big file (> 2GB) in update mode and save the header again.
I have protected this case such that the version number will only be in this case 1000000+ROOT version number.
Thanks for reporting this case.