Saving TH1 histograms in root file with embeded texgt

Dear Rooters,

This might be kind of a stupid and awkward question, but is there a way to save text on a histogram (eg a TPaveText object) without generating a TCanvas and a TFrame? I was wondering if there is something equivalent to the ListOfFunctions where one can embed a fit to a histogram object and later retrieve it with all its parameters.
The most basic question is: If i want to put free floating text on my histogram and save the entire thing on my NTuple in a way that i can retrive the different objects later (not just a print) can this be done just using the TH1D class or I have to save the TCanvas?

My second question (since I started a topic here) is if FFTW is include in the standard LXPLUS root version. It seems not and again I am a bit confused since i though it became a standard part of root 6.

Thanks in advance for the help and sorry for my ordinance on this.

Cheers

Vagelis

ROOT Version: 6.24.00 backwards compatible up to 5.34.36
Platform: Windows 10, but compatible with unix (using ifdefs)
Compiler: CINT and/or CLING
Cross platform compatibility and backwards compatibility is an issue here…

Hi @luminociter ,
I don’t think there is a way, but let’s see if @couet has a suggestion.

Cheers,
Enrico

Yes the way to do it will be to use the list of functions.

root [0] auto h = new TH1F("h","h",10,0,1);
root [1] auto l = h->GetListOfFunctions()
(TList *) @0x7ffee638d840
root [2] l->ls()
OBJ: TList	TList	Doubly linked list : 0
root [3] auto T = new TText(.5,.5,"Some Text added on the histogram")
(TText *) @0x7ffee638d840
root [4] l->Add((TObject*)T);
root [5] l->ls()
OBJ: TList	TList	Doubly linked list : 0
 Text  X=0.500000 Y=0.500000 Text=Some Text added on the histogram
root [6] h->Draw()

Here I added a TText but you can any TObject (a TPaveText if you want). It will be part of the histogram and drawn when you draw the histogram.

Thanks a lot, that works perfectly!