GammaWare  Head Version for release 0.9
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
RootSpectrumPlayer.h
Go to the documentation of this file.
1 
2 
3 #ifndef Gw_RootSpectrumPlayer
4 #define Gw_RootSpectrumPlayer
5 
6 #ifndef Gw_BaseSpectrumPlayer
7 #include "BaseSpectrumPlayer.h"
8 #endif
9 
10 class TSpectrum;
11 class TSpectrumFit;
12 
13 namespace Gw {
14 
28 {
29 public:
31  virtual ~RootSpectrumPlayer();
32 
34  virtual Int_t FindPeaks(TH1 *histo, Option_t* opt = "");
35 
37  virtual Int_t FindPeaks(Option_t* opt = "") { return BaseSpectrumPlayer::FindPeaks(opt); }
38 
40  virtual TH1 *Background(const TH1 *histo, Option_t* opt = "");
41 
43  virtual TH1 *Background(Option_t* opt = "") { return BaseSpectrumPlayer::Background(opt); }
44 
46  virtual Bool_t SetParameter(const char* name, Double_t value);
47  virtual Bool_t SetParameter(const char* name, Int_t value);
48  virtual Bool_t SetParameter(const char* name, const TObject *value) { return BaseSpectrumPlayer::SetParameter(name, value); }
49 
51  virtual void SetMaxPeaks(int n) {SetParameter("maxpeak",n);}
52  virtual void SetNbIter(int nbiter) {SetParameter("nbiter",nbiter);}
53 
54  virtual void SetSigma(double sigma) {SetParameter("sigma",sigma);}
55  virtual void SetThreshold(double threshold) {SetParameter("threshold",threshold);}
56 
58  virtual TParameter<Int_t> GetIntParameter(TString Name);
59  virtual TParameter<Double_t> GetDoubleParameter(TString Name);
60 
62  virtual void Print(Option_t* opt = "") const;
63 
64 private:
65  TParameter<Int_t> fMaxPeak; // max peak allowed
66  TParameter<Double_t> fSigma; // sigma for search
67  TParameter<Double_t> fThreshold; // threshold for search
68  TParameter<Int_t> fNbIter; // nb of iteration for background
69 
70  TSpectrum *fEngine1D; // TSpectrum pointer
71 
72 public:
74 };
75 
76 } // end namespace
77 #endif
virtual void SetMaxPeaks(int n)
To change some Parameters values.
RootSpectrumPlayer class to handle root spectra using the interface of BasePeak.
virtual Bool_t SetParameter(const char *name, Double_t value)
To change the parameters for that algorithm.
BaseSpectrumPlayer to work on spectra.
virtual void SetNbIter(int nbiter)
UInt_t value[MaxValue]
Definition: ReadDaqAlone.C:29
TH1F * histo[MaxValue]
Definition: ReadDaqAlone.C:31
virtual TParameter< Double_t > GetDoubleParameter(TString Name)
header file for BaseSpectrumPlayer.cpp
virtual Int_t FindPeaks(Option_t *opt="")
Find peaks from the histo in the current pad and store them in the current collection.
virtual Int_t FindPeaks(TH1 *histo, Option_t *opt="")
Find peaks.
virtual Bool_t SetParameter(const char *name, const TObject *value)
virtual void Print(Option_t *opt="") const
print current peak list
virtual TH1 * Background(Option_t *opt="")
Compute the background for the histogram in the current pad.
virtual Int_t FindPeaks(Option_t *opt="")
Find peaks from the histo in the current pad and store them in the current collection.
virtual TParameter< Int_t > GetIntParameter(TString Name)
To get the parameters.
virtual TH1 * Background(const TH1 *histo, Option_t *opt="")
Compute the background for that histogram.
virtual void SetSigma(double sigma)
virtual void SetThreshold(double threshold)
virtual TH1 * Background(const TH1 *, Option_t *)
Compute the background for that histogram.
virtual Bool_t SetParameter(const char *, Double_t)
To change the parameters for that algorithm.
ClassDef(RootSpectrumPlayer, 1)
Adaptator to TSpectrum like facilities.