23 #ifndef Gw_PeakCreator
24 #define Gw_PeakCreator
48 static TList gPeakCreatorList;
50 static TF1 *gDefaultFWHM;
53 TGraph *fEfficiencyGraph;
57 Float_t fRefAreaError;
61 void SetRefArea(Float_t a, Float_t ea){fRefArea = a; fRefAreaError = ea;}
65 void SetEfficiencyGraph(TGraph *gr, Float_t EffRelError = 0.1){fEfficiencyGraph = gr;fEffRelError = EffRelError;}
68 void SetEfficiencyFunc(TF1 *f, Float_t EffRelError = 0.1){fEfficiencyFunc = f;fEffRelError = EffRelError;}
80 TF1 *fDefaultPeakFWHM;
93 bool fIsHelpsPrintActive;
106 {fLastX = lastX; fLastY = lastY;}
121 static TVirtualPad *
PadforAction(TVirtualPad *pad = 0x0);
147 void Collect(Bool_t do_collect =
true);
149 {
return fIsCollecting; }
153 {
return fDefaultPeak1D;}
160 {
return fDefaultPeakFWHM; }
162 {
return fDefaultPeakFWHM; }
199 { TObject::Delete(opt); }
202 virtual void Clear(Option_t* =
"");
205 void HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject* select);
void SetDefaultPeakFWHM(const char *fname="PCG_FWHM")
BasePeak * DefaultPeak()
access to the peak used to create other peaks (through the Clone method)
virtual void Delete(Option_t *opt="")
It creates a peak at position x,y for the spectrum.
const TF1 * GetConstDefaultPeakFWHM()
to get the current global FWHM definition
virtual EDrawAs GetDrawAs() const
to know the current display mode
void SetEfficiencyGraph(TGraph *gr, Float_t EffRelError=0.1)
virtual void AddCreatorToList()
void SetEfficiencyFunc(TF1 *f, Float_t EffRelError=0.1)
TF1 * GetDefaultPeakFWHM()
void SetRefArea(Float_t a, Float_t ea)
Base class for a Log message.
static PeakCreator * AddPeakCreator(TVirtualPad *pad=0x0)
add a peak creator to the given pad. Current pad if argument is 0x0
static void HandleRefresh(TCanvas *canvas=0x0)
Handle modification of the range of the pad.
void HandleMovement(Int_t eventType, Int_t eventX, Int_t eventY, TObject *select)
Handle Movement.
header file for GwLogMessage.cpp
virtual void SetHelpsPrintActive(bool on)
virtual Int_t GetLastY() const
const TCanvas * GetCanvas() const
static const TF1 * GetConstGlobalPeakFWHM()
static TVirtualPad * PadforAction(TVirtualPad *pad=0x0)
Get Pad.
void SetGateMode(Bool_t ngate=true)
if true, peak are collected on key board actions (type h for help)
void Collect(Bool_t do_collect=true)
if true, peak are collected on key board actions (type h for help)
TF1 * GetEfficicencyFunc()
virtual void SetLastXY(Int_t lastX, Int_t lastY)
header file for a general 1D peak
virtual void Clear(Option_t *="")
Clear: delete all peaks in canvas/pad depending on PadManager.
virtual Int_t GetLastX() const
set/get fLastX/fLastY
A BasePeak is defined by a height, intensity and a dimension of the peak.
static PeakCreator * IsPeakCreator(TVirtualPad *pad=0x0)
Check whether or not a PeakCreator is in this canvas.
TGraph * GetEfficicencyGraph()
virtual void Disconnect()
virtual bool IsHelpsPrintActive()
A graphical interface for placing schematic peak onto a 1D histogram with a given position...
static TF1 * GetGlobalPeakFWHM()
virtual void AddPointToPolyline(Double_t x, Double_t y, TVirtualPad *pad=0x0)
It adds a point to the polyline at position x,y in the current pad.
virtual BasePeak * CreatePeak(const TH1 *h, Double_t x, Option_t *opt="")
It creates a peak at position x for the 1D spectra.