Dear all
I am using ROOT 6.10/04 on CentOS 7 and I discovered recently
that TTree->Draw() and TTree->Scan() commands
do not show correctly elements of 6-dimensional array.
In TTree I have
*............................................................................*
*Br 30 :Ratio : signal_cor[10][2][4][64][48][2]/F *
*Entries : 1 : Total Size= 1966688 bytes File Size = 898799 *
*Baskets : 1 : Basket Size= 32000 bytes Compression= 2.19 *
If I do simple Scan() I see elements of the array,
but actually only first half is printed
root [2] h3000->Scan("signal_cor")
***********************************
* Row * Instance * signal_co *
***********************************
* 0 * 0 * 0.1497807 *
* 0 * 1 * 0 *
* 0 * 2 * 0.4020577 *
* 0 * 3 * 0 *
* 0 * 4 * 0.1978682 *
* 0 * 5 * 0 *
* 0 * 6 * 0.3655157 *
<skip>
* 0 * 245752 * 0 *
* 0 * 245753 * 0 *
* 0 * 245754 * 0 *
* 0 * 245755 * 0 *
* 0 * 245756 * 0 *
* 0 * 245757 * 0 *
* 0 * 245758 * 0 *
* 0 * 245759 * 0 *
***********************************
(Long64_t) 245760
If I try to access first two elements, changing last index
I see the same value, as if 6th index doesn’t exist:
root [3] h3000->Scan("signal_cor[0][0][0][0][0][0]:signal_cor[0][0][0][0][0][1]")
************************************
* Row * signal_co * signal_co *
************************************
* 0 * 0.1497807 * 0.1497807 *
************************************
and in order to access second element in array I need to change 5th index instead:
root [4] h3000->Scan("signal_cor[0][0][0][0][0]:signal_cor[0][0][0][0][1]:signal_cor[0][0][0][0][2]:signal_cor[0][0][0][0][3]")
************************************************************
* Row * signal_co * signal_co * signal_co * signal_co *
************************************************************
* 0 * 0.1497807 * 0 * 0.4020577 * 0 *
************************************************************
Is it known limitation of ROOT or it’s actually a bug ?
And why ROOT silently gives wrong value instead of giving some error message,
like error message about array index outside limits:
root [5] h3000->Scan("signal_cor[10][0][0][0][0][0]")
Error in <TTreeFormula::TTreeFormula>: Index 10 for dimension #1 in signal_cor[10][0][0][0][0][0] is too high (max is 9)
With best regards
Alexander