Streamer() problem

Hi.

I’m storing custom class in TClonesArray with automatically generated Streamer() by rootcint.
The error i’m getting is as the below.

Error in TBufferFile::CheckByteCount: object of class vector read too many bytes: 1464005188 instead of 390263364
Warning in TBufferFile::CheckByteCount: vector::Streamer() not in sync with data on file ionTrack_dataNum101.event.5.root, fix Streamer()

It seems that it happens because there’re too many entries in the vector in the class, but I need that much for the analysis.
In this case, how can I fix Streamer() method as the warning message said?

Thank you for you help in advance.
Genie

Hello,
It will be much easier to help you if you could provide example data and code to reproduce the problem.

Hi,

Normally this error is caused by a different version stored in the file compared to the one you are having in memory and you did not update the class version number in ClassDef.
You can try to increase the version number.

Lorenzo

How can you increase the version number? I encounter the same problem…

   ClassDef(TAxis,10)  //Axis class
Version number ---ˆˆ