Fitting and integrating

Hi Dears ROOTers
My data comes as one column with its frequencies and I have some inquiries that respect to fitting please.
I want to remove the pedestal .Tha data begin from about 150 channel and I want this point comes in zero and there is a peak some time appears in this point and I want also to remove it.
Other things dears, I want to subtract the background, integrate all spectra after subtracting, find peaks, fit the peaks, elicit “Mean and Sigma and Hight” of each peak, integrate each peak (to cmpare it with all integral).
Is there any code or macro to do those things?
I will be grateful to you dears for helping

The attached file contain the data of Na22 for 2.50 minutes after converting the source file (that comes from MCA CAEN) from hexadecimal to decimal system.
Na22 data.txt (1.65 MB)


For fitting peaks you can look at the TSpectrum class and the tutorial peaks.C


thanks dear