Re: [ROOT] Associated functions in TH1F...

From: Rene Brun (Rene.Brun@cern.ch)
Date: Thu Jan 23 2003 - 14:58:26 MET


Hi Yuriy,

You can add any type of TObject to the histogram list of functions.
Do:
hist->GetListOfFunctions()->Add(myobject)
or
hist->GetListOfFunctions()->Add(myobject,option);
eg,
hist->GetListOfFunctions()->Add(myfunction,"lsame");

Note that all objects that you add the list of functions are automatically
made persistent when you write the histogram to a file.

Rene

Shitov Yuriy wrote:
> 
> Hi, ROOTers,
> 
> As I see now  where is no way to add associated function to TH1F
> histogram except their own Fit() method.
> It works in many cases,  but sometimes one need simply to add to the
> histogram function(s), which was(were) defined somethere else
> or fitted by some other way. So, I propose to add methods, which allow
> to manipulate manually associated function in TH1F histogram.
> At least, I would like to see TH1F::AddFunction implementation...
> 
> Best wishes,
> Yuriy.



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:08 MET