TTree::GetUserInfo()

Hi,

I’ve written some filtered events to a TTree, and I would like to store the number of unfiltered events as metadata. If I could store a primitive (int) directly that would be perfect, but the only solution I’ve seen is something like:

float*nEvents = new float(250);
TVectorT<float> *v = new TVector<float> (1, nEvents);
mytree->GetUserInfo->Add(v);

Unfortunately release 5.18.00d, which my experiment’s software uses, apparently does not have TVectorT<>. Is there another obvious TObject candidate to store in my TList from TTree::GetUserInfo(), or better way that I’m missing?

Thanks!
Eric

[quote=“efeng”]Hi,

I’ve written some filtered events to a TTree, and I would like to store the number of unfiltered events as metadata. If I could store a primitive (int) directly that would be perfect, but the only solution I’ve seen is something like:

float*nEvents = new float(250);
TVectorT<float> *v = new TVector<float> (1, nEvents);
mytree->GetUserInfo->Add(v);

Unfortunately release 5.18.00d, which my experiment’s software uses, apparently does not have TVectorT<>. Is there another obvious TObject candidate to store in my TList from TTree::GetUserInfo(), or better way that I’m missing?

Thanks!
Eric[/quote]

Sorry, I see that I just forgot the header. My apologies for the noise.