Array bounds capacity of non built-in types in Root

Dear Root Experts,

It seems that in

ROOT 5.24/00 (tags/v5-24-00@29258, Jul 01 2009, 12:22:53 on linuxx8664gcc)

the maximum dimension I can have for an arrays of non built-in types is five:

root [0] TH1D *histograms[2][2][2][2][2][2] Limitation: Pointer to array exceeded array bounds capacity. (tmpfile):1: *** Interpreter error recovered *** *** Interpreter error recovered *** root [1]

My question is about the future releases: Is it clear now what this maximum dimension will be in the future Root releases? Will it remain 5, will it increase or (hopefully not) decrease?

Or perhaps there is a way to circumvent the ‘default’ maximum dimension for arrays of non built-in types in current Root release?

Thanks,
Ante

Hi Ante,

for CINT, the maximum array dimension is 4; if you have found a case where 5 dimensions work then you’re lucky - but 4 is what we support.

There are no plans to remove or extend this limitation; it is hard wired in several of CINT’s internal data structures. The work-arounds I can come up with are:

  • use pointers and hide the array-ness from CINT,
  • hide the types from CINT,
  • show pointers for CINT but arrays to the compiler using #ifdef CINT
  • create a class that wraps arrays after every 4th dimension
  • use nested std::vectors (and a dictionary for them).

Cheers, Axel.

Hi Axel,

Thanks for your quick reply and hints for the work-arounds, I will try to make use of them!

For clarity sake:

I have based that statement only on the following limited example:

root [0] TH1D *histograms5D[2][2][2][2][2] root [1] TProfile *profiles5D[2][2][2][2][2] root [2] TH1D *histograms6D[2][2][2][2][2][2] Limitation: Pointer to array exceeded array bounds capacity. (tmpfile):1: *** Interpreter error recovered *** root [3] TProfile *profiles6D[2][2][2][2][2][2] Limitation: Pointer to array exceeded array bounds capacity. (tmpfile):1: *** Interpreter error recovered *** root [4]

Cheers,
Ante[/code][/quote]

Know this is an old thread, but has this limitation changed in version 6?