Diana Software
Public Member Functions | Private Member Functions | Private Attributes | List of all members
QGCalibrationWindow Class Reference

Used to select amplitude windows for calibration peaks. More...

Inheritance diagram for QGCalibrationWindow:
QGWindow

Public Member Functions

 QGCalibrationWindow (const TGWindow *p=0, UInt_t w=350, UInt_t h=300)
 Constructor. More...
 
virtual ~QGCalibrationWindow ()
 Destructor. More...
 
void AddPeak (Double_t energy)
 Add peak. More...
 
void Clear (Option_t *opt="")
 Clear data. More...
 
QGPlotGetCurrentPlot () const
 Get current plot. More...
 
void HandleDrawButton ()
 Handle draw button. More...
 
void HandleHistogramDropDownBox (const char *text)
 Handle histogram drop down box. More...
 
void HandleSaveButton ()
 Handle save button. More...
 
void SetProperty (const std::string &key, const std::string &value)
 Set property (used for opening a session) More...
 
- Public Member Functions inherited from QGWindow
 QGWindow (const TGWindow *p=0, UInt_t w=100, UInt_t h=100)
 Constructor. More...
 
virtual ~QGWindow ()
 Destructor. More...
 
virtual void SetWindowName (const char *name=0)
 Set name of window. More...
 

Private Member Functions

void LoadData (const std::string &histogramName)
 Load data for histogram. More...
 
void SaveData ()
 Save data for current histogram. More...
 
void SetUpHistograms ()
 Set up histogram drop down box. More...
 

Private Attributes

std::vector< QGCalibrationPeakFrame * > fCalibrationPeakFrames
 Collection of calibration peak frames. More...
 
std::string fCurrentHistogramName
 Current histogram name. More...
 
TGTextButton * fDrawButton
 Draw button. More...
 
TGComboBox * fHistogramDropDownBox
 Histogram drop down box. More...
 
TGHorizontalFrame * fHistogramFrame
 Histogram frame. More...
 
std::map< std::string, std::map< QGCalibrationPeakFrame *, Double_t > > fMaxData
 Max amplitude data for each histogram and peak. More...
 
std::map< std::string, std::map< QGCalibrationPeakFrame *, Double_t > > fMinData
 Min amplitude data for each histogram and peak. More...
 
std::string fOutputFilename
 Output filename. More...
 
TGTextButton * fSaveButton
 Save button. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from QGWindow
static QGWindowGetWindowByName (const std::string &name)
 Get pointer to window with a given name. More...
 
static const std::list< QGWindow * > & GetWindows ()
 Get collection of windows. More...
 
static bool IsNameInUse (std::string name)
 Check whether string is the name of any window. More...
 
static std::string GenerateWindowName (std::string baseName)
 Generate a name for the window. More...
 
static void UpdateWindowDropDownBoxes ()
 Update window drop down boxes. More...
 
- Protected Attributes inherited from QGWindow
UInt_t fWidth
 Width of window. More...
 
UInt_t fHeight
 Height of window. More...
 
- Static Protected Attributes inherited from QGWindow
static std::list< QGWindow * > fWindows
 Collection of pointers to all open QGWindows. More...
 

Detailed Description

Used to select amplitude windows for calibration peaks.

Author
Adam Bryant & Laura Kogler

Definition at line 23 of file QGCalibrationWindow.hh.

Constructor & Destructor Documentation

◆ QGCalibrationWindow()

QGCalibrationWindow::QGCalibrationWindow ( const TGWindow *  p = 0,
UInt_t  w = 350,
UInt_t  h = 300 
)

◆ ~QGCalibrationWindow()

QGCalibrationWindow::~QGCalibrationWindow ( )
virtual

Destructor.

Definition at line 76 of file QGCalibrationWindow.cc.

Member Function Documentation

◆ AddPeak()

void QGCalibrationWindow::AddPeak ( Double_t  energy)

◆ Clear()

void QGCalibrationWindow::Clear ( Option_t *  opt = "")

Clear data.

Definition at line 95 of file QGCalibrationWindow.cc.

References fCalibrationPeakFrames.

Referenced by HandleHistogramDropDownBox().

◆ GetCurrentPlot()

QGPlot * QGCalibrationWindow::GetCurrentPlot ( ) const

Get current plot.

Definition at line 103 of file QGCalibrationWindow.cc.

References fHistogramDropDownBox, and QGPlot::GetPlotByName().

Referenced by HandleDrawButton().

◆ HandleDrawButton()

void QGCalibrationWindow::HandleDrawButton ( )

Handle draw button.

Definition at line 113 of file QGCalibrationWindow.cc.

References GetCurrentPlot(), and QGPlot::Plot().

◆ HandleHistogramDropDownBox()

void QGCalibrationWindow::HandleHistogramDropDownBox ( const char *  text)

Handle histogram drop down box.

Definition at line 121 of file QGCalibrationWindow.cc.

References Clear(), fCurrentHistogramName, LoadData(), and SaveData().

◆ HandleSaveButton()

void QGCalibrationWindow::HandleSaveButton ( )

Handle save button.

Definition at line 129 of file QGCalibrationWindow.cc.

References channel, fMaxData, fMinData, fOutputFilename, and SaveData().

◆ LoadData()

void QGCalibrationWindow::LoadData ( const std::string &  histogramName)
private

Load data for histogram.

Definition at line 207 of file QGCalibrationWindow.cc.

References fMaxData, and fMinData.

Referenced by HandleHistogramDropDownBox().

◆ SaveData()

void QGCalibrationWindow::SaveData ( )
private

Save data for current histogram.

Definition at line 223 of file QGCalibrationWindow.cc.

References fCalibrationPeakFrames, fCurrentHistogramName, fMaxData, and fMinData.

Referenced by HandleHistogramDropDownBox(), and HandleSaveButton().

◆ SetProperty()

void QGCalibrationWindow::SetProperty ( const std::string &  key,
const std::string &  value 
)

Set property (used for opening a session)

Definition at line 242 of file QGCalibrationWindow.cc.

References AddPeak(), CALIBRATION_OUTPUT_FILENAME_KEY, fOutputFilename, and PEAK_KEY.

◆ SetUpHistograms()

void QGCalibrationWindow::SetUpHistograms ( )
private

Set up histogram drop down box.

Definition at line 255 of file QGCalibrationWindow.cc.

References fHistogramDropDownBox, and QGHistogram::GetHistograms().

Referenced by QGCalibrationWindow().

Member Data Documentation

◆ fCalibrationPeakFrames

std::vector<QGCalibrationPeakFrame*> QGCalibrationWindow::fCalibrationPeakFrames
private

Collection of calibration peak frames.

Definition at line 63 of file QGCalibrationWindow.hh.

Referenced by AddPeak(), Clear(), and SaveData().

◆ fCurrentHistogramName

std::string QGCalibrationWindow::fCurrentHistogramName
private

Current histogram name.

Definition at line 66 of file QGCalibrationWindow.hh.

Referenced by HandleHistogramDropDownBox(), and SaveData().

◆ fDrawButton

TGTextButton* QGCalibrationWindow::fDrawButton
private

Draw button.

Definition at line 69 of file QGCalibrationWindow.hh.

Referenced by QGCalibrationWindow().

◆ fHistogramDropDownBox

TGComboBox* QGCalibrationWindow::fHistogramDropDownBox
private

Histogram drop down box.

Definition at line 72 of file QGCalibrationWindow.hh.

Referenced by GetCurrentPlot(), QGCalibrationWindow(), and SetUpHistograms().

◆ fHistogramFrame

TGHorizontalFrame* QGCalibrationWindow::fHistogramFrame
private

Histogram frame.

Definition at line 75 of file QGCalibrationWindow.hh.

Referenced by QGCalibrationWindow().

◆ fMaxData

std::map<std::string, std::map<QGCalibrationPeakFrame*, Double_t> > QGCalibrationWindow::fMaxData
private

Max amplitude data for each histogram and peak.

Definition at line 78 of file QGCalibrationWindow.hh.

Referenced by HandleSaveButton(), LoadData(), and SaveData().

◆ fMinData

std::map<std::string, std::map<QGCalibrationPeakFrame*, Double_t> > QGCalibrationWindow::fMinData
private

Min amplitude data for each histogram and peak.

Definition at line 81 of file QGCalibrationWindow.hh.

Referenced by HandleSaveButton(), LoadData(), and SaveData().

◆ fOutputFilename

std::string QGCalibrationWindow::fOutputFilename
private

Output filename.

Definition at line 84 of file QGCalibrationWindow.hh.

Referenced by HandleSaveButton(), and SetProperty().

◆ fSaveButton

TGTextButton* QGCalibrationWindow::fSaveButton
private

Save button.

Definition at line 87 of file QGCalibrationWindow.hh.

Referenced by AddPeak(), and QGCalibrationWindow().


The documentation for this class was generated from the following files: