I’m trying to get a tree out of o root file, but it doesn’t work at all. I tried to do this with the interpreter and it works fine, but when i try to do it visual c++ 6 it acts weirdly. Here is what i done and what happens:
TTree *tree =(TTree *)(gDirectory->Get(“h51”));
This should work out fine i hoped but when i print it (tree->Print()) this is the result:
Error in TBuffer::CheckByteCount: object of class TNamed read too few bytes: 2
6 instead of 2103413
Warning in TBuffer::CheckByteCount: TNamed::Streamer() not in sync with data o
n file, fix Streamer()
OBJ: TNamed h51 Atl
Now it’s a TNamed object, how could this happen?