11 #include "TGTextEntry.h"
12 #include "TRootEmbeddedCanvas.h"
18 using std::stringstream;
21 TGHorizontalFrame(p, w, h)
23 SetCleanup(kDeepCleanup);
29 AddFrame(
fPeakEnergyBox,
new TGLayoutHints(kLHintsCenterY, 5, 0, 0, 0));
40 AddFrame(
fSetButton,
new TGLayoutHints(kLHintsCenterY, 5, 0, 0, 0));
41 fSetButton->Connect(
"Clicked()",
"QGCalibrationPeakFrame",
this,
"HandleSetButton()");
70 QGPlot *plot = calibrationWindow->GetCurrentPlot();
74 const std::list<QGPlot*>& drawnPlots = canvasWindow->
GetDrawnPlots();
75 if (find(drawnPlots.begin(), drawnPlots.end(), plot) != drawnPlots.end()) {
89 return text.IsFloat();
95 return text.IsFloat();
100 stringstream energyStream;
101 energyStream << energy <<
" keV" << flush;
108 stringstream maxStream;
109 maxStream.precision(16);
110 maxStream <<
max << flush;
116 stringstream minStream;
117 minStream.precision(16);
118 minStream <<
min << flush;
double min(const Diana::QVector &v)
Part of a QGCalibrationWindow for a specific peak.
void HandleSetButton()
Handle set button.
void SetMaxAmplitude(Double_t max)
Set max amplitude.
Double_t GetMinAmplitude() const
Get min amplitude.
TGTextEntry * fMinAmplitudeBox
Min amplitude box.
Bool_t IsMinAmplitudeSet() const
Return true if min amplitude is set.
void SetEnergy(Double_t energy)
Set energy.
virtual ~QGCalibrationPeakFrame()
Destructor.
void SetMinAmplitude(Double_t min)
Set min amplitude.
TGTextEntry * fMaxAmplitudeBox
Max amplitude box.
Double_t GetMaxAmplitude() const
Get max amplitude.
QGCalibrationPeakFrame(TGWindow *p=0, UInt_t w=10, UInt_t h=10)
Constructor.
Double_t fEnergy
Energy of the peak.
TGTextEntry * fPeakEnergyBox
Box for peak energy.
Bool_t IsMaxAmplitudeSet() const
Return true if max amplitude is set.
void Clear(Option_t *opt="")
Clear data.
TGTextButton * fSetButton
Set button.
Used to select amplitude windows for calibration peaks.
Window containing a ROOT canvas.
QGPlotFrame * GetPlotFrame()
Get pointer to the plot frame.
std::list< QGPlot * > & GetDrawnPlots()
Get collection of drawn plots.
TRootEmbeddedCanvas * GetEmbeddedCanvas()
Get pointer to canvas.
Base class for GUI plots including histograms, scatter plots, pulses, and graphical cuts.
virtual QGCanvasWindow * GetCanvasWindow() const
Get pointer to the canvas window to which the plot is associated.