![]() |
Diana Software
|
Base class for GUI plots including histograms, scatter plots, pulses, and graphical cuts. More...
Public Member Functions | |
| QGPlot () | |
| Default constructor. More... | |
| QGPlot (const QGPlot &) | |
| Copy constructor. More... | |
| virtual | ~QGPlot () |
| Destructor. More... | |
| virtual void | AddCut (const std::string &cut) |
| Add cut. More... | |
| virtual void | AutoSetStyle () |
| Automatically set the plot style, should be overridden by derived classes. More... | |
| virtual void | Display () |
| Display plot, should be overridden by derived classes. More... | |
| virtual void | DisplayEditWindow () |
| Display edit window for the plot, should be overridden by derived classes. More... | |
| virtual void | Duplicate () |
| Duplicate the plot, should be overridden by derived classes. More... | |
| virtual void | Erase () |
| Erase plot, should be overridden by derived classes. More... | |
| virtual void | Generate (QChain *chain=0) |
| Generate plot from chain of data files, should be overridden by derived classes. More... | |
| virtual std::string | GeneratePlotName (const std::string &baseName) const |
| Generate a name for the plot. More... | |
| virtual TCanvas * | GetCanvas () |
| Get pointer to the associated canvas. More... | |
| virtual QGCanvasWindow * | GetCanvasWindow () const |
| Get pointer to the canvas window to which the plot is associated. More... | |
| virtual void | GetCanvasWindowFromEditWindow () |
| Get canvas window from edit window. More... | |
| virtual const std::vector< std::string > & | GetCuts () const |
| Get cuts applied to make the plot. More... | |
| virtual void | GetCutsFromEditWindow () |
| Get cuts from edit window. More... | |
| virtual QGPlotEditWindow * | GetEditWindow () |
| Get pointer to edit window. More... | |
| virtual const char * | GetName () const |
| Get plot name, should be overridden by derived classes. More... | |
| virtual void | GetParametersFromEditWindow () |
| Get parameters from edit window, should be overridden by derived classes. More... | |
| virtual const std::string & | GetXUnits () const |
| Get x-axis units. More... | |
| virtual const std::string & | GetXVariable () const |
| Get x-axis variable. More... | |
| virtual const std::string & | GetYUnits () const |
| Get y-axis units. More... | |
| virtual const std::string & | GetYVariable () const |
| Get y-axis variable. More... | |
| virtual bool | IsNameInUse (const std::string &name) const |
| Check whether string is the name of any plot. More... | |
| virtual bool | IsSuperimposeSet () const |
| Return true if plot is set to be superimposed. More... | |
| virtual void | MakeCutsString () |
| Make cuts string. More... | |
| virtual bool | NeedsRegeneration () const |
| Check whether plot needs to be regenerated. More... | |
| virtual void | Plot () |
| Plot this in the associated canvas window, generating it if necessary. More... | |
| virtual void | SetCanvasWindow (QGCanvasWindow *window) |
| Set the canvas window to which the plot is associated. More... | |
| virtual void | SetCuts (const std::vector< std::string > &cuts) |
| Set cuts to apply in generating the plot. More... | |
| virtual void | SetName (const char *name=0) |
| Set plot name. More... | |
| virtual void | SetPlotEditWindow (QGPlotEditWindow *window) |
| Set plot edit window. More... | |
| virtual void | SetProperty (const std::string &key, const std::string &value) |
| Set property (used for opening a session) More... | |
| virtual void | SetRegenerate (bool flag=true) |
| Set whether the plot needs to be regenerated. More... | |
| virtual void | SetSuperimpose (bool flag=false) |
| Set whether the plot should be superimposed. More... | |
| virtual void | SetXVariable (const std::string &x) |
| Set X-axis variable. More... | |
| virtual void | SetXUnits (const std::string &units) |
| Set X-axis units. More... | |
| virtual void | SetYVariable (const std::string &y) |
| Set Y-axis variable. More... | |
| virtual void | SetYUnits (const std::string &units) |
| Set Y-axis units. More... | |
Static Public Member Functions | |
| static QGPlot * | GetPlotByName (const std::string &name) |
| Get plot by name. More... | |
| static const std::list< QGPlot * > & | GetPlots () |
| Get collection of plots. More... | |
| static void | ShowPlotsList () |
| Show plots list. More... | |
Protected Attributes | |
| QGCanvasWindow * | fCanvasWindow |
| Canvas window to which plot is associated. More... | |
| std::vector< std::string > | fCuts |
| Cuts applied to make the plot. More... | |
| std::string | fCutsString |
| Cuts in a single string. More... | |
| bool | fNeedsRegeneration |
| Indicates whether plot needs to be regenerated because settings have changed. More... | |
| QGPlotEditWindow * | fPlotEditWindow |
| Pointer to plot edit window. More... | |
| bool | fSuperimpose |
| Indicates whether plot should be superimposed on existing plot. More... | |
| std::string | fXVariable |
| X-axis variable. More... | |
| std::string | fXUnits |
| X-axis units. More... | |
| std::string | fYVariable |
| Y-axis variable. More... | |
| std::string | fYUnits |
| Y-axis units. More... | |
Static Protected Attributes | |
| static std::list< QGPlot * > | fPlots |
| Collection of pointers to all QGPlots. More... | |
Base class for GUI plots including histograms, scatter plots, pulses, and graphical cuts.
| QGPlot::QGPlot | ( | ) |
Default constructor.
Definition at line 28 of file QGPlot.cc.
References fPlots, and SetRegenerate().
| QGPlot::QGPlot | ( | const QGPlot & | plot | ) |
Copy constructor.
Definition at line 35 of file QGPlot.cc.
References QGCanvasWindow::AddPlot(), fCanvasWindow, and fPlots.
|
virtual |
Destructor.
Definition at line 46 of file QGPlot.cc.
References fCanvasWindow, fPlots, QGPlotListWindow::Instance(), QGPlotListWindow::IsVisible(), QGPlotListWindow::Refresh(), QGPlotListWindow::RemoveEntry(), and QGCanvasWindow::RemovePlot().
|
virtual |
Add cut.
Definition at line 60 of file QGPlot.cc.
References fCuts, MakeCutsString(), and SetRegenerate().
Referenced by SetProperty().
|
virtual |
Automatically set the plot style, should be overridden by derived classes.
Reimplemented in QGScatterPlot, QGPulse, and QGHistogram.
|
virtual |
Display plot, should be overridden by derived classes.
Reimplemented in QGScatterPlot, QGPulse, QGHistogram, and QGGraphicalCut.
Definition at line 72 of file QGPlot.cc.
Referenced by Plot().
|
virtual |
Display edit window for the plot, should be overridden by derived classes.
Reimplemented in QGScatterPlot, QGPulse, and QGHistogram.
Definition at line 77 of file QGPlot.cc.
Referenced by QGPlotListEntryFrame::HandleEditButton().
|
virtual |
Duplicate the plot, should be overridden by derived classes.
Reimplemented in QGScatterPlot, QGPulse, and QGHistogram.
Definition at line 82 of file QGPlot.cc.
Referenced by QGPlotEditButtonsFrame::HandleDuplicateButton().
|
virtual |
Erase plot, should be overridden by derived classes.
Reimplemented in QGScatterPlot, QGPulse, QGHistogram, and QGGraphicalCut.
Definition at line 88 of file QGPlot.cc.
Referenced by QGPlotListEntryFrame::DeletePlot(), QGPlotEditButtonsFrame::HandleDeleteButton(), QGPlotEditButtonsFrame::HandleEraseButton(), and SetCanvasWindow().
|
virtual |
Generate plot from chain of data files, should be overridden by derived classes.
Reimplemented in QGScatterPlot, QGPulse, and QGHistogram.
Definition at line 93 of file QGPlot.cc.
Referenced by Plot().
|
virtual |
Generate a name for the plot.
Definition at line 98 of file QGPlot.cc.
References IsNameInUse().
Referenced by QGGraphicalCut::SetName(), QGHistogram::SetName(), QGPulse::SetName(), and QGScatterPlot::SetName().
|
virtual |
Get pointer to the associated canvas.
Definition at line 111 of file QGPlot.cc.
References fCanvasWindow, QGPlotFrame::GetEmbeddedCanvas(), and QGCanvasWindow::GetPlotFrame().
Referenced by QGGraphicalCut::Create(), and QGGraphicalCut::HandleCanvasEvent().
|
inlinevirtual |
Get pointer to the canvas window to which the plot is associated.
Definition at line 60 of file QGPlot.hh.
References fCanvasWindow.
Referenced by QGHistogramEditWindow::FillVariablesDropDownBoxes(), QGPulseEditWindow::FillVariablesDropDownBoxes(), QGScatterPlotEditWindow::FillVariablesDropDownBoxes(), QGPlotEditButtonsFrame::FillWindowDropDownBox(), QGCalibrationPeakFrame::HandleSetButton(), and QGGraphicalCut::ViewPulses().
|
virtual |
Get canvas window from edit window.
Definition at line 116 of file QGPlot.cc.
References fCanvasWindow, fPlotEditWindow, QGPlotEditWindow::GetButtonsFrame(), QGPlotEditButtonsFrame::GetCanvasWindowName(), QGWindow::GetWindowByName(), and SetCanvasWindow().
Referenced by Plot().
|
inlinevirtual |
|
virtual |
Get cuts from edit window.
Definition at line 137 of file QGPlot.cc.
References fPlotEditWindow, QGCutsFrame::GetCuts(), QGPlotEditWindow::GetCutsFrame(), and SetCuts().
Referenced by Plot().
|
inlinevirtual |
Get pointer to edit window.
Definition at line 72 of file QGPlot.hh.
References fPlotEditWindow.
Referenced by QGPlotIconsFrame::HandlePulsesButton(), and QGGraphicalCut::ViewPulses().
|
virtual |
Get plot name, should be overridden by derived classes.
Reimplemented in QGHistogram, QGGraphicalCut, and QGGraph.
Definition at line 144 of file QGPlot.cc.
Referenced by QGPlotEditButtonsFrame::HandleNameButton(), QGPlotEditButtonsFrame::HandleNameEntryBox(), and QGPlotListEntryFrame::SetPlot().
|
virtual |
Get parameters from edit window, should be overridden by derived classes.
Reimplemented in QGScatterPlot, QGPulse, and QGHistogram.
Definition at line 150 of file QGPlot.cc.
Referenced by Plot().
|
static |
Get plot by name.
Definition at line 155 of file QGPlot.cc.
References fPlots.
Referenced by QGCalibrationWindow::GetCurrentPlot().
|
inlinestatic |
Get collection of plots.
Definition at line 84 of file QGPlot.hh.
References fPlots.
Referenced by QGPlotListWindow::GeneratePlotList(), QGCutsEditorWindow::Save(), QGCanvasSetupFrame::SetDisplay(), and QGWindow::UpdateWindowDropDownBoxes().
|
inlinevirtual |
Get x-axis units.
Definition at line 87 of file QGPlot.hh.
References fXUnits.
Referenced by QGHistogram::Display(), QGPulse::Display(), and QGScatterPlot::Display().
|
inlinevirtual |
Get x-axis variable.
Definition at line 90 of file QGPlot.hh.
References fXVariable.
Referenced by QGHistogram::Display(), QGScatterPlot::Display(), QGPlotIconsFrame::HandleCopyLimitsButton(), and QGPlotIconsFrame::HandleGraphicalCutButton().
|
inlinevirtual |
Get y-axis units.
Definition at line 93 of file QGPlot.hh.
References fYUnits.
Referenced by QGPulse::Display(), and QGScatterPlot::Display().
|
inlinevirtual |
Get y-axis variable.
Definition at line 96 of file QGPlot.hh.
References fYVariable.
Referenced by QGScatterPlot::Display(), QGPlotIconsFrame::HandleCopyLimitsButton(), and QGPlotIconsFrame::HandleGraphicalCutButton().
|
virtual |
Check whether string is the name of any plot.
Definition at line 168 of file QGPlot.cc.
References fPlots.
Referenced by GeneratePlotName(), QGGraphicalCut::SetName(), QGHistogram::SetName(), QGPulse::SetName(), and QGScatterPlot::SetName().
|
inlinevirtual |
Return true if plot is set to be superimposed.
Definition at line 102 of file QGPlot.hh.
References fSuperimpose.
|
virtual |
|
inlinevirtual |
Check whether plot needs to be regenerated.
Definition at line 108 of file QGPlot.hh.
References fNeedsRegeneration.
Referenced by Plot().
|
virtual |
Plot this in the associated canvas window, generating it if necessary.
Definition at line 195 of file QGPlot.cc.
References QGFileHandler::CheckForModifiedFiles(), Display(), fCanvasWindow, Generate(), GetCanvasWindowFromEditWindow(), GetCutsFromEditWindow(), QGPlotFrame::GetEmbeddedCanvas(), QGCanvasWindow::GetFileHandler(), GetParametersFromEditWindow(), QGCanvasWindow::GetPlotFrame(), NeedsRegeneration(), QGCanvasWindow::SetPlotsToRegenerate(), SetRegenerate(), and QGCanvasWindow::UpdateVariablesDropDownBoxes().
Referenced by QGCalibrationWindow::HandleDrawButton(), QGPlotEditButtonsFrame::HandleDrawButton(), QGPlotListEntryFrame::HandleDrawButton(), QGPulseParametersFrame::HandleNextButton(), QGPulseParametersFrame::HandlePreviousButton(), QGPulseParametersFrame::HandlePulseNumberBox(), QGPlotIconsFrame::HandlePulsesButton(), and QGGraphicalCut::ViewPulses().
|
virtual |
Set the canvas window to which the plot is associated.
Definition at line 216 of file QGPlot.cc.
References QGCanvasWindow::AddPlot(), Erase(), fCanvasWindow, QGCanvasWindow::RemovePlot(), and SetRegenerate().
Referenced by GetCanvasWindowFromEditWindow(), QGPlotIconsFrame::HandleGraphicalCutButton(), QGPlotIconsFrame::HandleHistogramButton(), QGPlotIconsFrame::HandlePulsesButton(), QGPlotIconsFrame::HandleScatterPlotButton(), and QGGraphicalCut::ViewPulses().
|
virtual |
Set cuts to apply in generating the plot.
Definition at line 231 of file QGPlot.cc.
References fCuts, MakeCutsString(), and SetRegenerate().
Referenced by GetCutsFromEditWindow().
|
virtual |
Set plot name.
Reimplemented in QGScatterPlot, QGPulse, QGHistogram, and QGGraphicalCut.
Definition at line 240 of file QGPlot.cc.
Referenced by QGPlotEditButtonsFrame::HandleNameEntryBox(), and SetProperty().
|
inlinevirtual |
Set plot edit window.
Definition at line 123 of file QGPlot.hh.
References fPlotEditWindow.
Referenced by QGHistogramEditWindow::~QGHistogramEditWindow(), QGPulseEditWindow::~QGPulseEditWindow(), and QGScatterPlotEditWindow::~QGScatterPlotEditWindow().
|
virtual |
Set property (used for opening a session)
Reimplemented in QGScatterPlot, QGPulse, QGHistogram, and QGGraphicalCut.
Definition at line 245 of file QGPlot.cc.
References AddCut(), CUT_KEY, NAME_KEY, SetName(), SetSuperimpose(), SetXUnits(), SetXVariable(), SetYUnits(), SetYVariable(), SUPERIMPOSE_KEY, X_UNITS_KEY, X_VARIABLE_KEY, Y_UNITS_KEY, and Y_VARIABLE_KEY.
Referenced by QGGraphicalCut::SetProperty(), QGHistogram::SetProperty(), QGPulse::SetProperty(), and QGScatterPlot::SetProperty().
|
inlinevirtual |
Set whether the plot needs to be regenerated.
Definition at line 129 of file QGPlot.hh.
References fNeedsRegeneration.
Referenced by AddCut(), Plot(), QGPlot(), SetCanvasWindow(), SetCuts(), SetXVariable(), and SetYVariable().
|
inlinevirtual |
Set whether the plot should be superimposed.
Definition at line 132 of file QGPlot.hh.
References fSuperimpose.
Referenced by QGHistogram::GetParametersFromEditWindow(), QGPulse::GetParametersFromEditWindow(), QGScatterPlot::GetParametersFromEditWindow(), and SetProperty().
|
inlinevirtual |
Set X-axis units.
Definition at line 138 of file QGPlot.hh.
References fXUnits.
Referenced by QGHistogram::GetParametersFromEditWindow(), QGScatterPlot::GetParametersFromEditWindow(), QGPulse::GetPulseFromChain(), and SetProperty().
|
virtual |
Set X-axis variable.
Definition at line 270 of file QGPlot.cc.
References fXVariable, and SetRegenerate().
Referenced by QGHistogram::GetParametersFromEditWindow(), QGScatterPlot::GetParametersFromEditWindow(), QGPlotIconsFrame::HandleGraphicalCutButton(), and SetProperty().
|
inlinevirtual |
Set Y-axis units.
Definition at line 144 of file QGPlot.hh.
References fYUnits.
Referenced by QGScatterPlot::GetParametersFromEditWindow(), QGPulse::GetPulseFromChain(), and SetProperty().
|
virtual |
Set Y-axis variable.
Definition at line 278 of file QGPlot.cc.
References fYVariable, and SetRegenerate().
Referenced by QGScatterPlot::GetParametersFromEditWindow(), QGPlotIconsFrame::HandleGraphicalCutButton(), and SetProperty().
|
static |
Show plots list.
Definition at line 286 of file QGPlot.cc.
References QGPlotListWindow::Instance().
Referenced by QGCanvasWindowButtonsFrame::HandlePlotsListButton().
|
protected |
Canvas window to which plot is associated.
Definition at line 151 of file QGPlot.hh.
Referenced by QGHistogram::Display(), QGPulse::Display(), QGScatterPlot::Display(), QGGraphicalCut::Erase(), QGHistogram::Erase(), QGPulse::Erase(), QGScatterPlot::Erase(), QGPulse::FillEventData(), QGHistogram::Generate(), QGPulse::Generate(), QGScatterPlot::Generate(), GetCanvas(), GetCanvasWindow(), GetCanvasWindowFromEditWindow(), QGPulse::GetPulseFromChain(), QGPulse::Order(), Plot(), QGPlot(), SetCanvasWindow(), and ~QGPlot().
|
protected |
|
protected |
Cuts in a single string.
Definition at line 157 of file QGPlot.hh.
Referenced by QGHistogram::Generate(), QGPulse::Generate(), QGScatterPlot::Generate(), and MakeCutsString().
|
protected |
Indicates whether plot needs to be regenerated because settings have changed.
Definition at line 160 of file QGPlot.hh.
Referenced by NeedsRegeneration(), and SetRegenerate().
|
protected |
Pointer to plot edit window.
Definition at line 163 of file QGPlot.hh.
Referenced by QGHistogram::AutoSetAxisParameters(), QGHistogram::Display(), QGHistogram::DisplayEditWindow(), QGPulse::DisplayEditWindow(), QGScatterPlot::DisplayEditWindow(), GetCanvasWindowFromEditWindow(), GetCutsFromEditWindow(), GetEditWindow(), QGHistogram::GetParametersFromEditWindow(), QGPulse::GetParametersFromEditWindow(), QGScatterPlot::GetParametersFromEditWindow(), SetPlotEditWindow(), QGPulse::UpdatePulseEditWindow(), QGHistogram::~QGHistogram(), QGPulse::~QGPulse(), and QGScatterPlot::~QGScatterPlot().
|
staticprotected |
Collection of pointers to all QGPlots.
Definition at line 166 of file QGPlot.hh.
Referenced by GetPlotByName(), GetPlots(), IsNameInUse(), QGPlot(), and ~QGPlot().
|
protected |
Indicates whether plot should be superimposed on existing plot.
Definition at line 169 of file QGPlot.hh.
Referenced by QGHistogram::Display(), QGPulse::Display(), QGScatterPlot::Display(), IsSuperimposeSet(), and SetSuperimpose().
|
protected |
|
protected |
X-axis variable.
Definition at line 172 of file QGPlot.hh.
Referenced by QGHistogram::Generate(), QGScatterPlot::Generate(), GetXVariable(), and SetXVariable().
|
protected |
|
protected |
Y-axis variable.
Definition at line 178 of file QGPlot.hh.
Referenced by QGScatterPlot::Generate(), GetYVariable(), and SetYVariable().