"meta" information in Tree::Draw()

Hi,

I would llike to save a large (100-1000 elements x 10) two-dimensional array with a tree so as to be accessed by TTree::Draw(). This is easy enough but in my case the array does not change from event to event. It is thus “meta” information and really needs only to be saved once. That’s easy enough. However, I’d still like to be able to Draw() the behaviour of event variables vs. specific array elements. That is my tree has an event variable:

int n=100;
float v[n];

and my meta information is:

p[n][10];

And I’d want to Draw(“v[]:p[][0]”), Draw(“v[]:p[][1]”), … etc.

Is something like this already possible without adding p[ ][ ] as an event variable?

mike

Hi,

You can attach your ‘meta’ information to the TTree via TTree::GetUserInfo()
(i.e mytree->GetUserInfo()->Add(myMetaData); ).

You can then access you object from TTree::Draw via the syntax “This->GetUserInfo()->At(0)” (Or FindObject(“thenameofmyobject”)).

Cheers,
Philippe.