RootSpectrumPlayer class to handle root spectra using the interface of BasePeak. More...
#include <RootSpectrumPlayer.h>
Public Member Functions | |
virtual void | AddPeak (BasePeak *peak) |
Add a peak to the current collection (at the end) More... | |
virtual TH1 * | Background (const TH1 *histo, Option_t *opt="") |
Compute the background for that histogram. More... | |
virtual TH1 * | Background (Option_t *opt="") |
Compute the background for the histogram in the current pad. More... | |
ClassDef (RootSpectrumPlayer, 1) | |
Adaptator to TSpectrum like facilities. More... | |
ClassDef (BaseSpectrumPlayer, 1) | |
virtual Int_t | CollectPeaks (Option_t *opt="") |
Collect the peaks from the current pad. More... | |
Bool_t | Connect (TCanvas *c=0x0) |
Connect the Canvas to this to collect events. More... | |
Bool_t | Disconnect (TCanvas *c=0x0) |
Connect the Canvas to this to collect events. More... | |
virtual void | DoBackground (TH1 *histo, Option_t *opt="") |
Apply background substraction for that histogram. More... | |
virtual void | DoBackground (Option_t *opt="") |
Apply background substraction for current histogram in pad. More... | |
virtual Int_t | FindPeaks (TH1 *histo, Option_t *opt="") |
Find peaks. More... | |
virtual Int_t | FindPeaks (Option_t *opt="") |
Find peaks from the histo in the current pad and store them in the current collection. More... | |
virtual void | FitAll (const char *nameFunc="DTGaus", Option_t *optFit="RN", Option_t *optBkg="Step") |
Fit all peaks using the spectrum in the current pad. More... | |
virtual const TF1 * | GetDefaultPeakWidth () const |
Get formula that gives the with as a function of energy. More... | |
virtual TParameter< Double_t > | GetDoubleParameter (TString Name) |
virtual TParameter< Int_t > | GetIntParameter (TString Name) |
To get the parameters. More... | |
virtual PeakCreator * | GetPeakCreator () |
virtual TSeqCollection * | GetPeakList () const |
Return the current collection of peaks. More... | |
void | HandleMovement (Int_t eventType, Int_t eventX, Int_t eventY, TObject *) |
Handle Movement. More... | |
virtual void | PopupFitMenu () |
Popup AddLink menu. More... | |
virtual void | Print (Option_t *opt="") const |
print current peak list More... | |
virtual Bool_t | RenamePeak (const Char_t *baseName="Peak", Bool_t force=false) |
Sort all peaks and rename them. More... | |
RootSpectrumPlayer () | |
void | SetDefaultPeakFWHM (const char *="PCG_FWHM") |
to change the definition of the formula for the width More... | |
virtual void | SetHelpsPrintActive (bool on) |
virtual void | SetMaxPeaks (int n) |
To change some Parameters values. More... | |
virtual void | SetNbIter (int nbiter) |
virtual Bool_t | SetParameter (const char *name, Double_t value) |
To change the parameters for that algorithm. More... | |
virtual Bool_t | SetParameter (const char *name, Int_t value) |
virtual Bool_t | SetParameter (const char *name, const TObject *value) |
virtual void | SetPeakList (TSeqCollection *col=0x0) |
set collection More... | |
virtual void | SetSigma (double sigma) |
virtual void | SetThreshold (double threshold) |
virtual void | ShowPeakList () const |
Show the list of peaks on the current pad. More... | |
virtual void | SortPeakList (const Char_t *parName="Position", Bool_t sortDes=false) |
sort peak list More... | |
virtual | ~RootSpectrumPlayer () |
Protected Member Functions | |
Int_t | GetLastX () |
set/get fLastX/fLastY More... | |
Int_t | GetLastY () |
Bool_t | IsInRange (TH1 *h, BasePeak *peak) |
check if peak is in range of drawn spectrum More... | |
void | SetLastXY (Int_t lastX, Int_t lastY) |
Protected Attributes | |
TContextMenu * | fContextMenu |
context menu in canvas More... | |
PeakCreator * | fCreator |
default PeakCreator More... | |
LogMessage | fLog |
log message More... | |
RootSpectrumPlayer class to handle root spectra using the interface of BasePeak.
The spectrum has to be displayed before instanced the class. Use 'p' key to put peaks onto the histo. The position of the mouse gives the position of the peak.
A method FindPeaks() based on TSpectrum Search method is also available.
The background method is also based ond TSpectrum class.
Definition at line 27 of file RootSpectrumPlayer.h.