Skip to content

[hist] Fix I/O for older version of TNDArray objects#11409

Merged
lmoneta merged 2 commits intoroot-project:masterfrom
lmoneta:fix_hist_thnsparse_io
Sep 23, 2022
Merged

[hist] Fix I/O for older version of TNDArray objects#11409
lmoneta merged 2 commits intoroot-project:masterfrom
lmoneta:fix_hist_thnsparse_io

Conversation

@lmoneta
Copy link
Copy Markdown
Member

@lmoneta lmoneta commented Sep 22, 2022

This PR fixes #10382

@lmoneta lmoneta self-assigned this Sep 22, 2022
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14
How to customize builds

@lmoneta lmoneta requested a review from pcanal September 22, 2022 08:32
@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-ubuntu18.04/nortcxxmod.
Running on sft-ubuntu-1804-2.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-performance-centos8-multicore/cxx17.
Running on olbdw-01.cern.ch:/data/sftnight/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-debian10-i386/soversion.
Running on pcepsft10.dyndns.cern.ch:/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

Build failed on windows10/cxx14.
Running on null:C:\build\workspace\root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

Build failed on ROOT-ubuntu2004/python3.
Running on root-ubuntu-2004-1.cern.ch:/home/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@phsft-bot
Copy link
Copy Markdown

@lmoneta lmoneta changed the title [hist] Apply patch for Peter Hristov to fix I/O for older version of TNDArray objects [hist] Fix I/O for older version of TNDArray objects Sep 22, 2022
@phsft-bot
Copy link
Copy Markdown

Build failed on mac1015/cxx17.
Running on macitois22.dyndns.cern.ch:/Users/sftnight/build/workspace/root-pullrequests-build
See console output.

Failing tests:

@lmoneta
Copy link
Copy Markdown
Member Author

lmoneta commented Sep 22, 2022

Applying the patch causes a crash when cloning a THnD. Here is a simple code reproducing this:

int bins[] = {10}; double xmin[] = {0}; double xmax[] = {10}; 
auto h = new THnD("h","h",1,bins,xmin,xmax);
h->Sumw2();
h->Clone();

@pcanal , any idea what could be the problem ?

@lmoneta
Copy link
Copy Markdown
Member Author

lmoneta commented Sep 22, 2022

I think in the I/O rule define in the Linkdef.h should be version and not versions, otherwise the rule is applied to all versions, including the current one.
The next patch should fix this

It should be used 'version` and not `versions`. Also improve the rule to use `vector.reserve` for being more efficient when reading old files.
@phsft-bot
Copy link
Copy Markdown

Starting build on ROOT-debian10-i386/soversion, ROOT-performance-centos8-multicore/cxx17, ROOT-ubuntu18.04/nortcxxmod, ROOT-ubuntu2004/python3, mac1015/cxx17, mac11/cxx14, windows10/cxx14
How to customize builds

@lmoneta lmoneta merged commit 8dd63b9 into root-project:master Sep 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TNDArrayT] Backward incompatibility: Error reading from ROOT Files created with earlier versions - Streamer bug

3 participants