Dear Rooters,
I have question concerning passing objects policy in ROOT.
Lets say that I have class Array that looks like this:
class Array : public TObject{
Int_t fSize;
Int_t fActiveSize;
Int_t *fArray; //fSize
...
}
To speed up my code I would like to use two variables to describe my class - fSize (that is real size of array) and fActiveSize. In such case I dont’ have to reallocate memory to shrink my array - I just reduce ActiveSize. But I would like to be sure that during writing (doesn’t matter how) only “ActiveSize” will be written into tree.
So basically I would like to have “TClonesArray with types”. Is it possible to achieve this in ROOT? If yes then how?