I would like to store some quantities in a ROOT file in addition to my tree.
I guess it’s a dumb thing but I don’t know how to store just a simple variable like a double in a root file.
One solution I used was to create a tree and to fill it once but that’s not satisfactory.
I thought of the User Info of the TTree class but that is for storing class and not simple variable.
Does someone have a better solution.
Note that if you need to store your numbers in the same file as your ROOt Tree, it is may be better to save your information in the Tree User info list, eg
[code] mytree->GetUserInfo()->Add(TObject *) ; //eg your TVectorD object
This appears to keep xlo in memory (as I would expect because it’s neither a Tree or histogram) where I can do things with it, but I am having the issue of it being overwritten by another TTree object when I invoke the object’s TTree::Draw() fucntion.
[quote], but I am having the issue of it being overwritten by another TTree object when I invoke the object’s TTree::Draw() fucntion.
See my recent post for details: viewtopic.php?f=3&t=22658[/quote]This must be related to other things you do with the object and/or other objects. Let’s continue that discussion on the link your provided.