RE: [ROOT] TChain

From: Philippe Canal (pcanal@fnal.gov)
Date: Fri Oct 05 2001 - 20:11:51 MEST


Hi,

This could happen if you have changed your class without increasing the
class version number (in the ClassDef(MyClass,x) ) and are not using
the new automatic streamers (you do not specify which version of ROOT
you are using).   This could also happens if you are using an interpreted
version of MyClass.

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Giuseppe Lo Re
Sent: Friday, October 05, 2001 11:28 AM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] TChain


Hello,
I use TChain following my ROOT users guide:

TChain chain("mytree");
chain.Add("filename1.root");
chain.Add("filename2.root");
...
...

MyClass *obj = new MyClass();
chain.SetBranchAddress("obj",&obj);

Int_t nentries = chain->GetEntries();

for(Int_t i=0; i<entries; i++) {
   chain.GetEvent(i);
}

}

What I obtain is:

Error in <TBuffer::CheckByteCount>: object of class MyClass read too
many bytes

What is the matter?

Thanks for any help,
	Giusepe Lo Re



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:02 MET