-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[TNDArrayT] Backward incompatibility: Error reading from ROOT Files created with earlier versions - Streamer bug #10382
Description
Describe the bug
It is currently impossible to read TNDArrayT objects from ROOT Files created with earlier ROOT Versions than v6.26. This affects primarily THn Objects which have this class as a data member. The problem is caused by this commit: afb9521 where a datamemember of TNDArrayT was changed, but the Streamer generation information were not updated appropriately.
The following error messages are displayed if one attepts to read a TNDArrayT from an earlier ROOT version:
Warning in <TStreamerInfo::BuildOld>: Cannot convert TNDArray::fSizes from type: Long64_t* to type: vector<Long64_t>, skip element Warning in <TStreamerInfo::Compile>: Counter fNdimPlusOne should not be skipped from class TNDArray Warning in <TStreamerInfo::BuildOld>: Cannot convert TNDArrayT<double>::fData from type: double* to type: vector<double>, skip element Warning in <TStreamerInfo::Compile>: Counter fNumData should not be skipped from class TNDArrayT<double> Error in <TBufferFile::CheckByteCount>: object of class TNDArray read too few bytes: 17 instead of 57 Error in <TBufferFile::CheckByteCount>: object of class TNDArrayT<double> read too few bytes: 68 instead of 200866628 Warning in <TStreamerInfo::BuildOld>: Cannot convert TNDArrayT<float>::fData from type: float* to type: vector<float>, skip element Warning in <TStreamerInfo::Compile>: Counter fNumData should not be skipped from class TNDArrayT<float> Error in <TBufferFile::CheckByteCount>: object of class TNDArray read too many bytes: 2057 instead of 57 Warning in <TBufferFile::CheckByteCount>: TNDArray::Streamer() not in sync with data on file XXX, fix Streamer() Error in <TBufferFile::CheckByteCount>: object of class TNDArrayT<float> read too few bytes: 1088 instead of 100433348 Error in <TBufferFile::CheckByteCount>: object of class TNDArray read too few bytes: 17 instead of 57 Error in <TBufferFile::CheckByteCount>: object of class TNDArrayT<double> read too few bytes: 68 instead of 200866628 Error in <TBufferFile::CheckByteCount>: object of class TNDArray read too many bytes: 100369 instead of 57 Warning in <TBufferFile::CheckByteCount>: TNDArray::Streamer() not in sync with data on file XXX, fix Streamer() Error in <TBufferFile::CheckByteCount>: object of class TNDArrayT<float> read too few bytes: 50244 instead of 100433348
Expected behavior
Expected behavior is that the object is read properly and the Streamer takes care of all required conversions from the old to the new data format.
To Reproduce
- Create a ROOT-File containing a THn with an earlier ROOT version. e.g. v6.24.06
- Try to read the object from the created ROOT-File with ROOT version v6.26.00.