Error message in CINT when reading back a class


I tried to look around the forum and roottalk but have not seen mention of this error message.

I have a error message when I try to read an object for the first time from a file :

root [0]
Attaching file test.root as _file0…
root [1] vert.Print()
Error: Incorrect referencing of $vert FILE:(tmpfile) LINE:1
*** Interpreter error recovered ***
root [2] vert.Print()

order :0

but the second time I call vert it works fine… so hopefully that is not critical I guess… but what does this message means ?

The class of vert contains STL vectors but this object seems to stream fine in writing and reading.

Thank you,


Send the shortest possible RUNNING script reproducing your problem.


I tested with different version of ROOT, the problem did not happen with the latest versions 4.04 and 5.01.
I had this problem on 4.01/02 and 4.00/08.
As I said earlier this is not a critiical problem since after the problem appeared once everything works fine and if I try to get the object directly using gFile->Get it works fine too. It is at most a bit annoying.
So I’m mostly curious to know what does make this message appear so you could ignore this message.
Our official ROOT version is still 4.00/08 but I guess I will be fine using the latest version rereading our older ntuple or simply read correctly the object using Get.

I put a tar file of my class and a script to test it, just in case.

Launch testfile.C to create the file test.root, exit root and lauch openfile.C.
This should fail for version 4.01/02 and 4.00/08 but if I uncomment the commented line
//TVectorDVCS * pf = (TVectorDVCS *) f->Get(“v1”);
it works OK.
vecteur.tar.gz (4.52 KB)

Your program works correctly. However note that instead of

TFile *f = TFile::Open("test.root"); TVectorDVCS * pf = (TVectorDVCS *) f->Get("v1"); v1.Print();
you should do:

TFile *f = TFile::Open("test.root"); TVectorDVCS * pf = (TVectorDVCS *) f->Get("v1"); pf->Print();