![]() |
Diana Software
|
Class for GUI histograms. More...
Public Member Functions | |
| QGHistogram () | |
| Default constructor. More... | |
| QGHistogram (const QGHistogram &) | |
| Copy constructor. More... | |
| virtual | ~QGHistogram () |
| Destructor. More... | |
| void | AutoSetAxisParameters () |
| Automatically set axis parameters. More... | |
| void | AutoSetStyle () |
| Automatically set the histogram style. More... | |
| void | Display () |
| Display histogram. More... | |
| void | DisplayEditWindow () |
| Display edit window for the histogram. More... | |
| void | DrawStyleHistogram () |
| Draw a mini-histogram showing the style of this histogram. More... | |
| void | Duplicate () |
| Duplicate the histogram. More... | |
| void | Erase () |
| Erase histogram. More... | |
| void | Generate (QChain *chain=0) |
| Generate histogram. More... | |
| Double_t | GetBinWidth (Int_t bin=0) const |
| Get bin width. More... | |
| const char * | GetName () const |
| Get name of histogram. More... | |
| Int_t | GetNumberOfBins () const |
| Get number of bins. More... | |
| void | GetParametersFromEditWindow () |
| Get parameters from edit window. More... | |
| TH1D * | GetStyleHistogram () |
| Get style histogram. More... | |
| Double_t | GetXMin () const |
| Get x-min. More... | |
| Double_t | GetXMax () const |
| Get x-max. More... | |
| bool | IsBinWidthSet () |
| Return true if bin width is set. More... | |
| bool | IsXMaxSet () |
| Return true if x-axis maximum is set. More... | |
| bool | IsXMinSet () |
| Return true if x-axis minimum is set. More... | |
| bool | IsNumberOfBinsSet () |
| Return true if number of bins is set. More... | |
| void | MakeStylePlot () |
| Make style plot. More... | |
| void | SetBinWidth (Double_t binWidth) |
| Set bin width. More... | |
| void | SetName (const char *name=0) |
| Set name of histogram. More... | |
| void | SetNumberOfBins (Int_t numberOfBins) |
| Set number of bins. More... | |
| void | SetProperty (const std::string &key, const std::string &value) |
| Set property (used for opening a session) More... | |
| void | SetXMax (Double_t xMax) |
| Set x-max. More... | |
| void | SetXMin (Double_t xMin) |
| Set x-min. More... | |
Public Member Functions inherited from QGPlot | |
| 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 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 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 | SetPlotEditWindow (QGPlotEditWindow *window) |
| Set plot edit window. 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 const std::list< QGHistogram * > & | GetHistograms () |
| Get collection of histograms. More... | |
Static Public Member Functions inherited from QGPlot | |
| 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... | |
Private Attributes | |
| bool | fAutoSetNumberOfBins |
| Flag to automatically set the number of bins. More... | |
| bool | fAutoSetXMax |
| Flag to automatically set the x-axis maximum. More... | |
| bool | fAutoSetXMin |
| Flag to automatically set the x-axis minimum. More... | |
| Double_t | fBinWidth |
| Bin width. More... | |
| std::vector< Double_t > | fDataPoints |
| Collection of points underlying the histogram, useful for instant rebinning. More... | |
| std::string | fDrawOption |
| Draw option. More... | |
| bool | fIsBinWidthSet |
| Whether or not bin width is set. More... | |
| Int_t | fNumberOfUniqueDataPoints |
| Number of unique values among the data points, up to max 100. More... | |
| TH1D * | fStyleHistogram |
| Mini-histogram to show style of this histogram. More... | |
Static Private Attributes | |
| static std::list< QGHistogram * > | fHistograms |
| Collection of pointers to all QGHistograms. More... | |
Additional Inherited Members | |
Protected Attributes inherited from QGPlot | |
| 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 inherited from QGPlot | |
| static std::list< QGPlot * > | fPlots |
| Collection of pointers to all QGPlots. More... | |
Class for GUI histograms.
Definition at line 19 of file QGHistogram.hh.
| QGHistogram::QGHistogram | ( | ) |
Default constructor.
Definition at line 43 of file QGHistogram.cc.
References fHistograms, MakeStylePlot(), SetLineColor(), and SetName().
Referenced by Duplicate().
| QGHistogram::QGHistogram | ( | const QGHistogram & | histogram | ) |
Copy constructor.
Definition at line 57 of file QGHistogram.cc.
References fHistograms, MakeStylePlot(), and SetName().
|
virtual |
Destructor.
Definition at line 70 of file QGHistogram.cc.
References fHistograms, QGPlot::fPlotEditWindow, and fStyleHistogram.
| void QGHistogram::AutoSetAxisParameters | ( | ) |
Automatically set axis parameters.
Definition at line 82 of file QGHistogram.cc.
References fAutoSetNumberOfBins, fAutoSetXMax, fAutoSetXMin, fBinWidth, fDataPoints, fIsBinWidthSet, QGPlot::fPlotEditWindow, GetNumberOfBins(), GetXMax(), GetXMin(), SetNumberOfBins(), SetXMax(), and SetXMin().
Referenced by Display().
|
virtual |
Automatically set the histogram style.
Reimplemented from QGPlot.
Definition at line 136 of file QGHistogram.cc.
References fHistograms, MakeStylePlot(), and SetLineColor().
Referenced by Duplicate(), and QGPlotIconsFrame::HandleHistogramButton().
|
virtual |
Display histogram.
Reimplemented from QGPlot.
Definition at line 156 of file QGHistogram.cc.
References QGCanvasWindow::AddToDrawnPlots(), AutoSetAxisParameters(), QGCanvasWindow::ClearDrawnPlots(), Draw(), QGPlot::fCanvasWindow, fDataPoints, fDrawOption, Fill(), QGPlot::fPlotEditWindow, fStyleHistogram, QGPlot::fSuperimpose, QGCanvasWindow::GetDrawnPlots(), QGPlotFrame::GetEmbeddedCanvas(), QGPlotStyleFrame::GetEmbeddedCanvas(), GetNumberOfBins(), QGCanvasWindow::GetPlotFrame(), QGPlotEditWindow::GetPlotStyleFrame(), GetXMax(), GetXMin(), QGPlot::GetXUnits(), QGPlot::GetXVariable(), and QGCanvasWindow::RemoveFromDrawnPlots().
|
virtual |
Display edit window for the histogram.
Reimplemented from QGPlot.
Definition at line 235 of file QGHistogram.cc.
References DrawStyleHistogram(), QGPlot::fPlotEditWindow, QGPlotStyleFrame::GetEmbeddedCanvas(), QGPlotEditWindow::GetPlotStyleFrame(), and QGPlotEditWindow::SetPlot().
Referenced by Duplicate(), and QGPlotIconsFrame::HandleHistogramButton().
| void QGHistogram::DrawStyleHistogram | ( | ) |
Draw a mini-histogram showing the style of this histogram.
Definition at line 248 of file QGHistogram.cc.
References fDrawOption, fStyleHistogram, and MakeStylePlot().
Referenced by DisplayEditWindow().
|
virtual |
Duplicate the histogram.
Reimplemented from QGPlot.
Definition at line 264 of file QGHistogram.cc.
References AutoSetStyle(), DisplayEditWindow(), and QGHistogram().
|
virtual |
Erase histogram.
Reimplemented from QGPlot.
Definition at line 271 of file QGHistogram.cc.
References QGPlot::fCanvasWindow, QGPlotFrame::GetEmbeddedCanvas(), QGCanvasWindow::GetPlotFrame(), and QGCanvasWindow::RemoveFromDrawnPlots().
|
virtual |
Generate histogram.
Reimplemented from QGPlot.
Definition at line 282 of file QGHistogram.cc.
References QGPlot::fCanvasWindow, QGPlot::fCutsString, fDataPoints, QGPlot::fXVariable, QGCanvasWindow::GetFileHandler(), QGFileHandler::GetQChain(), QGFileHandler::IsFileOpen(), and N.
|
inline |
|
inlinestatic |
Get collection of histograms.
Definition at line 58 of file QGHistogram.hh.
References fHistograms.
Referenced by QGCalibrationWindow::SetUpHistograms().
|
virtual |
Get name of histogram.
Reimplemented from QGPlot.
Definition at line 321 of file QGHistogram.cc.
Referenced by SetName(), and QGHistogramEditWindow::SetPlot().
| Int_t QGHistogram::GetNumberOfBins | ( | ) | const |
Get number of bins.
Definition at line 374 of file QGHistogram.cc.
Referenced by AutoSetAxisParameters(), Display(), SetXMax(), and SetXMin().
|
virtual |
Get parameters from edit window.
Reimplemented from QGPlot.
Definition at line 326 of file QGHistogram.cc.
References fAutoSetNumberOfBins, fAutoSetXMax, fAutoSetXMin, fBinWidth, fIsBinWidthSet, QGPlot::fPlotEditWindow, SetNumberOfBins(), QGPlot::SetSuperimpose(), SetXMax(), SetXMin(), QGPlot::SetXUnits(), and QGPlot::SetXVariable().
|
inline |
| Double_t QGHistogram::GetXMax | ( | ) | const |
Get x-max.
Definition at line 369 of file QGHistogram.cc.
Referenced by AutoSetAxisParameters(), Display(), SetNumberOfBins(), and SetXMin().
| Double_t QGHistogram::GetXMin | ( | ) | const |
Get x-min.
Definition at line 364 of file QGHistogram.cc.
Referenced by AutoSetAxisParameters(), Display(), SetNumberOfBins(), and SetXMax().
|
inline |
Return true if bin width is set.
Definition at line 79 of file QGHistogram.hh.
References fIsBinWidthSet.
|
inline |
Return true if number of bins is set.
Definition at line 88 of file QGHistogram.hh.
References fAutoSetNumberOfBins.
|
inline |
Return true if x-axis maximum is set.
Definition at line 82 of file QGHistogram.hh.
References fAutoSetXMax.
|
inline |
Return true if x-axis minimum is set.
Definition at line 85 of file QGHistogram.hh.
References fAutoSetXMin.
| void QGHistogram::MakeStylePlot | ( | ) |
Make style plot.
Definition at line 379 of file QGHistogram.cc.
References fStyleHistogram.
Referenced by AutoSetStyle(), DrawStyleHistogram(), and QGHistogram().
|
inline |
Set bin width.
Definition at line 94 of file QGHistogram.hh.
References fBinWidth, and fIsBinWidthSet.
Referenced by SetProperty().
|
virtual |
Set name of histogram.
Reimplemented from QGPlot.
Definition at line 395 of file QGHistogram.cc.
References fStyleHistogram, QGPlot::GeneratePlotName(), GetName(), and QGPlot::IsNameInUse().
Referenced by QGHistogram().
| void QGHistogram::SetNumberOfBins | ( | Int_t | numberOfBins | ) |
Set number of bins.
Definition at line 416 of file QGHistogram.cc.
References GetXMax(), and GetXMin().
Referenced by AutoSetAxisParameters(), GetParametersFromEditWindow(), and SetProperty().
|
virtual |
Set property (used for opening a session)
Reimplemented from QGPlot.
Definition at line 421 of file QGHistogram.cc.
References BIN_WIDTH_KEY, fAutoSetNumberOfBins, fAutoSetXMax, fAutoSetXMin, FILL_COLOR_KEY, FILL_STYLE_KEY, LINE_COLOR_KEY, LINE_STYLE_KEY, LINE_WIDTH_KEY, MARKER_COLOR_KEY, MARKER_SIZE_KEY, MARKER_STYLE_KEY, MAX_KEY, MIN_KEY, NUMBER_OF_BINS_KEY, SetBinWidth(), SetLineColor(), SetNumberOfBins(), QGPlot::SetProperty(), SetXMax(), and SetXMin().
| void QGHistogram::SetXMax | ( | Double_t | xMax | ) |
Set x-max.
Definition at line 491 of file QGHistogram.cc.
References GetNumberOfBins(), and GetXMin().
Referenced by AutoSetAxisParameters(), GetParametersFromEditWindow(), and SetProperty().
| void QGHistogram::SetXMin | ( | Double_t | xMin | ) |
Set x-min.
Definition at line 496 of file QGHistogram.cc.
References GetNumberOfBins(), and GetXMax().
Referenced by AutoSetAxisParameters(), GetParametersFromEditWindow(), and SetProperty().
|
private |
Flag to automatically set the number of bins.
Definition at line 113 of file QGHistogram.hh.
Referenced by AutoSetAxisParameters(), GetParametersFromEditWindow(), IsNumberOfBinsSet(), and SetProperty().
|
private |
Flag to automatically set the x-axis maximum.
Definition at line 116 of file QGHistogram.hh.
Referenced by AutoSetAxisParameters(), GetParametersFromEditWindow(), IsXMaxSet(), and SetProperty().
|
private |
Flag to automatically set the x-axis minimum.
Definition at line 119 of file QGHistogram.hh.
Referenced by AutoSetAxisParameters(), GetParametersFromEditWindow(), IsXMinSet(), and SetProperty().
|
private |
Bin width.
Definition at line 122 of file QGHistogram.hh.
Referenced by AutoSetAxisParameters(), GetBinWidth(), GetParametersFromEditWindow(), and SetBinWidth().
|
private |
Collection of points underlying the histogram, useful for instant rebinning.
Definition at line 125 of file QGHistogram.hh.
Referenced by AutoSetAxisParameters(), Display(), and Generate().
|
private |
Draw option.
Definition at line 128 of file QGHistogram.hh.
Referenced by Display(), and DrawStyleHistogram().
|
staticprivate |
Collection of pointers to all QGHistograms.
Definition at line 131 of file QGHistogram.hh.
Referenced by AutoSetStyle(), GetHistograms(), QGHistogram(), and ~QGHistogram().
|
private |
Whether or not bin width is set.
Definition at line 134 of file QGHistogram.hh.
Referenced by AutoSetAxisParameters(), GetParametersFromEditWindow(), IsBinWidthSet(), and SetBinWidth().
|
private |
Number of unique values among the data points, up to max 100.
Definition at line 137 of file QGHistogram.hh.
|
private |
Mini-histogram to show style of this histogram.
Definition at line 140 of file QGHistogram.hh.
Referenced by Display(), DrawStyleHistogram(), GetStyleHistogram(), MakeStylePlot(), SetName(), and ~QGHistogram().