Saving "one time' information

Hi. I have a c++ code that reads a binary data file, analyses the data event by event, and puts the output in a .root file. However, it also extracts “one-time” results – like, total time, dead times, etc. How do I save these in TTree’s infrastructure? I could of course produce a branch for each such variable, however that would be terribly inefficient: 10mln repetitions of the dead time value. Is there some “closing” header where I could save all this type of “final” numbers into?

Hi,

see TTree::GetUserInfo() root.cern.ch/root/html/TTree#TTree:GetUserInfo You should wrap these numbers into a class deriving from TObject and stuff that object into the user info list of your tree.

Cheers, Axel.

Boy oh boy…I suppose I could just make a histogram and set its bin contents to the numbers in question, and then include it in the root file.

Hi,

nice idea :slight_smile: Yes, that would work!

Cheers, Axel.