Diana Software
QGCalibrationWindow.hh
Go to the documentation of this file.
1 #ifndef _QG_CALIBRATION_WINDOW_HH_
2 #define _QG_CALIBRATION_WINDOW_HH_
3 
11 #include "QGWindow.hh"
12 #include <map>
13 #include <string>
14 #include <vector>
15 
17 class QGPlot;
18 class TGComboBox;
19 class TGHorizontalFrame;
20 class TGTextButton;
21 class TGVerticalFrame;
22 
23 class QGCalibrationWindow : public QGWindow {
24 public:
26  QGCalibrationWindow(const TGWindow *p = 0, UInt_t w = 350, UInt_t h = 300);
27 
29  virtual ~QGCalibrationWindow();
30 
32  void AddPeak(Double_t energy);
33 
35  void Clear(Option_t* opt="");
36 
38  QGPlot *GetCurrentPlot() const;
39 
41  void HandleDrawButton();
42 
44  void HandleHistogramDropDownBox(const char *text);
45 
47  void HandleSaveButton();
48 
50  void SetProperty(const std::string& key, const std::string& value);
51 
52 private:
54  void LoadData(const std::string& histogramName);
55 
57  void SaveData();
58 
60  void SetUpHistograms();
61 
63  std::vector<QGCalibrationPeakFrame*> fCalibrationPeakFrames;
64 
66  std::string fCurrentHistogramName;
67 
69  TGTextButton *fDrawButton;
70 
72  TGComboBox *fHistogramDropDownBox;
73 
75  TGHorizontalFrame *fHistogramFrame;
76 
78  std::map<std::string, std::map<QGCalibrationPeakFrame*, Double_t> > fMaxData;
79 
81  std::map<std::string, std::map<QGCalibrationPeakFrame*, Double_t> > fMinData;
82 
84  std::string fOutputFilename;
85 
87  TGTextButton *fSaveButton;
88 
89  ClassDef(QGCalibrationWindow, 0)
90 };
91 
92 #endif
Part of a QGCalibrationWindow for a specific peak.
Used to select amplitude windows for calibration peaks.
std::map< std::string, std::map< QGCalibrationPeakFrame *, Double_t > > fMaxData
Max amplitude data for each histogram and peak.
TGTextButton * fSaveButton
Save button.
QGPlot * GetCurrentPlot() const
Get current plot.
void LoadData(const std::string &histogramName)
Load data for histogram.
void HandleSaveButton()
Handle save button.
void AddPeak(Double_t energy)
Add peak.
void SetUpHistograms()
Set up histogram drop down box.
void Clear(Option_t *opt="")
Clear data.
void HandleHistogramDropDownBox(const char *text)
Handle histogram drop down box.
TGHorizontalFrame * fHistogramFrame
Histogram frame.
std::string fCurrentHistogramName
Current histogram name.
TGTextButton * fDrawButton
Draw button.
TGComboBox * fHistogramDropDownBox
Histogram drop down box.
std::string fOutputFilename
Output filename.
void HandleDrawButton()
Handle draw button.
void SaveData()
Save data for current histogram.
std::map< std::string, std::map< QGCalibrationPeakFrame *, Double_t > > fMinData
Min amplitude data for each histogram and peak.
void SetProperty(const std::string &key, const std::string &value)
Set property (used for opening a session)
QGCalibrationWindow(const TGWindow *p=0, UInt_t w=350, UInt_t h=300)
Constructor.
virtual ~QGCalibrationWindow()
Destructor.
std::vector< QGCalibrationPeakFrame * > fCalibrationPeakFrames
Collection of calibration peak frames.
Base class for GUI plots including histograms, scatter plots, pulses, and graphical cuts.
Definition: QGPlot.hh:21
Base class for GUI windows.
Definition: QGWindow.hh:15