One of my colleagues generated a root file built with CERN 5.22 with TObject-derived objects in it. I can open and read the objects by another program linked against CERN 5.22, but when I try to read this file with the same program linked against CERN 5.34 it fails:[quote]Warning in TFile::Init: no StreamerInfo found in x:/eo/multilayer_fixed.sim therefore preventing schema evolution when reading this file.[/quote] - though its only a warning, I can not read any of the object.
I noticed that he has as single implementation file with all of his classes, each w/its own ClassImp() macros in it. Likewise, his single .h file has all class definitions each with its own ClassDef() macros.
Is this a problem (multiple ClassDef’s in a single file) ? He has written streamers for each class and uses the “-” in the linkdef file for making his dictionary.
I am sort of at a loss as to why there are no StreamerInfo objects in the TFile.
Humm this is strange, if the file is properly readable in bare v5.22 but not in v5.34, we may have a case of unintentional backward incompatibility. If you provide me with the ‘broken’ file I will take a look.
Here’s a file that opens fine w/ 5.22 but not 5.34. If it is possible to see something in the file w/out having the class source files that would be great. Otherwise, I will have to work to get excise the relevant sources… Thanks
example.root (1.51 KB)
The file does indeed have no StreamerInfo (however v5.22 does not complain … because it did not yet have the error message implemented).
[quote]He has written streamers for each class and uses the “-” in the linkdef file for making his dictionary.[/quote]Well, this means that even if the StreamerInfo were present they are likely to not be representative of the onfile layout of the class. Since he has customized the Streaming operation, the StreamerInfo are not used and thus are not stored in the ROOT file. When using custom Streamer in most cases you must have those same custom Streamer when reading back (the exception is when the custom streamer revert back to use the StreamerInfo for the streaming itself).
I am still at a loss here. If I have the class implementation loaded in memory (including the custom streamers) when I read the file, the object is valid in 5.22 but is garbage in 5.34 Does this make sense to you? It is possible that there is a problem in the custom streamer he wrote. If you think it would help, I can extract the relevant parts of the implementation file(s) and make that available… Thank you
Yes, it is very plausible there is a problem with his custom streamer. What you described should of course have worked . Yes it would help (I would be able to try debugging it) if I had a small reproducer.