[ROOT] checksum problem with clases with strings

From: Angela Wyatt (acw@hep.ucl.ac.uk)
Date: Wed Feb 12 2003 - 20:15:01 MET


Hi,

I have a class which contains strings as the members and I write it into a 
root file during the execution of some compiled code.  Later I want to 
print it out, so I made a .so containing the class which I load in, then 
I open my file. When I open it I get a checksum warning. I don't get this problem 
if I use a TString. Is there something extra I need to do?? I get some message about 
converting basic_string's to strings so maybe this is where I'm going wrong. 

Thanks very much for any help,

 Angela 

--------------------------------
I have attached some test code.

I do:

> gmake
> Validation
> root

root [0] .L analibs.so
root [1] TFile f("test.root");

WARNING, the StreamerInfo of class SClass read from file test.root
        has the same version (=1) as the active class
        but a different checksum.
        You should update the version to ClassDef(SClass,2).
        Do not try to write objects with the current class definition,
        the files will not be readable.


root [2] SClass* test = (SClass*) f->Get("SClass");
Cannot convert TMyName from 
type:basic_string<char,char_traits<char>,allocator<char> > to type:string, skip element











This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET