Log likelihood method with poisson distributed bin heights

Is there any way for fitting a function with ROOT using a Poisson distribution for the bin heights?
Besides I want to use log likelihood, but that doesn’t seem to be a problem, I think.
Cheers.

Hello,

when fitting an histogram using option “L”, a Log likelihood method is used with a bin pdf following a Poisson distribution.

For example

TH1 * h1 = new TH1D("h1","Gauss distribution",100,-5,5);
h1->FillRandom("gaus");
h1->Fit("gaus","L"); 

Best Regards

Lorenzo