Verion incompatibilities when reading file?

Dear ROOTers,

I have a .root file created with a ROOT 5.22/00a version (linux on clued0). It contains several TNtupleD (and a small histogram). It is read with no problem with that setup and with 5.24 (on a colleague’s laptop). When I try to read it with my ROOT 5.26/00c (Ubuntu Linux), it opens succesfully, but then:

and 100s more messages of this type.

Actually, we have several such files. A possible hint is that happens for our large files (39M and
up) but not for the smaller files (13M and down). So I don’t have (yet?) a small example to send with this.

Any ideas what’s going on?

Better yet, any ideas how to work around this issue?

Preferably without regenerating all the files with the latest ROOT version, which isn’t trivial due to computing environments.

Thanks,
Amnon Harel

BTW1: the length and md5sum of the files are the same, so it’s not a problem in copying the file.

BTW2: as may be expected from the error messages, after the Errors, the TNtupleD has the right number of branches, but they are blank. E.g.

Hi Amnon,

Can you send me (give me access to) this broken file so that I can try to reproduce the problem?

Thanks,
Philippe.

[quote]Better yet, any ideas how to work around this issue? [/quote]… I have no clue yet what the problem might be …

Hi Philippe,

It’s a big to upload to my usual public website. And copying just one tree produces a tree that causes no problems :question:
So I copied it to
/afs/cern.ch/user/a/aharel/public/long.root
in the hope you can access that.
The md5sum OK for this copy too.

BTW: Same problem from an SLC5 machine with ROOT version 5.26/00b

Thanks,
Amnon

Hi,

This file was not properly closed and is missing all the meta information needed to read it with a newer version of ROOT. You can work around the problem by either copying the file (for example using hadd) with the same version of ROOT that was used to write it (this will work because there is somehow enough information to know where the data is on the file). Alternatively to read this file in a newer version of ROOT you would need to first open another file correctly written with the orginal/old version of ROOT so that the meta data is preloaded (i.e the ‘StreamerInfo for version 11’)

Cheers,
Philippe.

Hi Philippe,

works like a charm!

Saved me a lot of headaches (I didn’t make these files).
So many thanks.

BTW: it would’ve been nice if ROOT gave a warning when using such a file, even if it manages to recover from such missing information (happens in hadd, but not when Projecting from the tree). I realize this situation may be too rare to be worth the effort, or even impossible in the latest versions.

thanks again,
Amnon

Hi,

A warning has been added in the trunk (revision 37421).

Cheers,
Philippe.