Arrays in ROOT

Hi,

I am having problems with simple arrays in ROOT. I have an array in C++ which is an integer array defined as
Int_t myarray[24];
Then I want to write this to a root file, it seems I have to make a ROOT object of it. How do I proceed?

And I would also like to convert the Int_t array to a Double_t array at some point.

Thank you
Maiken

[quote]And I would also like to convert the Int_t array to a Double_t array at some point. [/quote]Only the I/O of C++ classes support schema evolution. So you will need to wrap your array in a class and generate the dictionary for it. The simpliest way is to write the file:[code]//File: myclass.h
class myclass {
Int_t fArray[24];
public:
myclass() {};
~myclass() {}
// Some accessors, for example (or any other variation):
void Set(Int_t n, Int_t val) { fArray[n] = val; }
void Get(Int_t n) { if (n<24) return fArray[n]; }
ClassDef(myclass,1);
};

#ifdef MAKECINT
#pragma link C++ class myclass+;
#endif // MAKECINT
[/code]

and load it via ACLiC:

Cheers,
Philippe.