Dynamically allocate multi-dimension array

Does ROOT have this function? For one and two dimensions, we can use new from c++, TVector or TMatrix from ROOT. But what about more than 2?


you can (still) use C++:

[code]typedef std::vector<std::vector<std::vector<std::vector<Double_t> > > > My4DimArrayOfDoubles;

My4DimArrayOfDoubles* createMy4DimArrayOfDoubles() {
// here you create the 4dim array - no need for any special functions
My4DimArrayOfDoubles* my4DimArray=new My4DimArrayOfDoubles;

// this is just meant to demonstrate how to use it:
for (int i0=0; i0<10; i0++) {
for (int i1=0; i1<10; i1++) {
for (int i2=0; i2<10; i2++) {
for (int i3=0; i3<10; i3++)
return my4DimArray;