root-project / root

The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
https://root.cern
Other
2.53k stars 1.24k forks source link

A "3D" vector - vector<vector<vector<>>> - mistreated by TTree Scan and TBrowser #12680

Open lwpiotr opened 1 year ago

lwpiotr commented 1 year ago

Describe the bug

1) The TTree::Scan() can't properly display a vector<vector<vector<>>>. It always shows a single element of value 0. 2) The TBrowser shows such vectors as having 0 elements. 3) 1D and 2D vectors work OK.

Expected behaviour

1) TTree::Scan() showing all the elements of the 3D vector like for 2D and 1D vector 2) TBrowser being able to show all the values and proper number of elements of the 3D vector, like for 2D and 1D vectors

To Reproduce

Please run the attached macro or store a 3D vector in a TTree. ttree_vector_bug.zip

Setup

self-compiled ROOT 6.28.00, Fedora 37

Additional context

This bug is quite important for 2 reasons: 1) For users trying to access the TTree with TBrowser the vector seems empty and they think they have the wrong data files 2) There is no easy way to check the vector contents with Scan() quickly not working, which makes debugging experiment much harder.

lwpiotr commented 1 year ago

Hello. Any news on the issue?