How to get the area of peaks in histogram using TSpectrum

Hi All,
I am a newbie on root. I am trying to find the area of the peaks in the histogram (energy-spectrum).
I Know how to calculate using the function TF1 where I have to set initial parameters and write the user-defined functions.
Is there any other approach using TSpectrum fit to find the area of all the peaks in the histogram?

Any suggestions would be appreciated.

Have a nice day!

ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided


Did you try to search the forum?

Yes but I didn’t find similar problem

Then maybe @moneta can help you