JG ROOT Tools libraries
version 5.0 - august 2014
|
#include <RGHistoPlotModeSelect.hh>
Public Member Functions | |
RGHistoPlotModeSelect (TGWindow *p=NULL, const Int_t mode=0, UInt_t opt=0) | |
virtual | ~RGHistoPlotModeSelect () |
virtual void | InitModes () |
virtual void | ChangeDimension (const Int_t dim) |
virtual Int_t | GetDimension () const |
virtual void | SetState (const Bool_t b=kTRUE) |
virtual Int_t | GetPlotMode () const |
virtual string | GetPlotOption () const |
virtual Int_t | DrawHisto (TH1 *hptr, const string &add_opts, TPad *padptr, const Int_t copy, const Double_t norm=1.) const |
virtual Int_t | DrawHisto (TH1 *hptr, const string &add_opts="", TPad *padptr=NULL) const |
virtual Int_t | DrawHistoCopy (TH1 *hptr, const string &add_opts="", TPad *padptr=NULL) const |
virtual Int_t | DrawHistoNormalized (TH1 *hptr, const Double_t norm, const string &add_opts="", TPad *padptr=NULL) const |
virtual void | SelectMode (const Int_t mode, const Bool_t emit=kTRUE) |
virtual void | ModeSelected (Int_t m) |
ClassDef (RGHistoPlotModeSelect, 0) | |
Static Public Member Functions | |
static string | GetPlotOption (const Int_t dim, const Int_t mode) |
static Int_t | DrawHisto (TH1 *hptr, const Int_t mode, const string &add_opts, TPad *padptr, const Int_t copy=1, const Double_t norm=1.) |
Protected Member Functions | |
virtual void | Construct () |
Protected Attributes | |
UInt_t | options |
Options;. | |
Int_t | histo_dim |
Histogram dimension. | |
Int_t | mode_num |
Number of plot modes. | |
string * | mode_list |
Array of plot mode names. | |
Int_t * | mode_val |
Array of plot mode values. | |
Int_t | plot_mode |
Initial plot mode. | |
TGComboBox * | w_mode_select |
Selection widget. | |
Private Member Functions | |
GObject (RGHistoPlotModeSelect) | |
RGHistoPlotModeSelect (const RGHistoPlotModeSelect &original) | |
class RGHistoPlotModeSelect
Widget for plot mode selection of an histogram (1D, 2D or 3D).
Options:
The following options can be used for 2D histograms (note that 1D histograms are plotted in 2D views, and 3D histograms in 3D views):
RGHistoPlotModeSelect::RGHistoPlotModeSelect | ( | TGWindow * | p = NULL , |
const Int_t | mode = 0 , |
||
UInt_t | opt = 0 |
||
) |
Constructor.
p | parent widget |
mode | initial mode |
opt | options |
References Construct(), histo_dim, mode_list, mode_num, mode_val, options, plot_mode, and w_mode_select.
|
private |
Copy constructor, not implemented.
original | object to copy |
|
virtual |
|
private |
Macro from GCpp library that defines the following functions:
|
protectedvirtual |
Construction of the widget and sub-widgets.
References ChangeDimension(), options, plot_mode, and w_mode_select.
Referenced by RGHistoPlotModeSelect().
|
virtual |
Initialization of plot modes.
References histo_dim, RDico::hpms_mode_1d_curve, RDico::hpms_mode_1d_curve_marker, RDico::hpms_mode_1d_histo, RDico::hpms_mode_1d_histo_marker, RDico::hpms_mode_1d_line, RDico::hpms_mode_1d_line_marker, RDico::hpms_mode_1d_marker, RDico::hpms_mode_2d_color, RDico::hpms_mode_2d_color_z, RDico::hpms_mode_2d_contour, RDico::hpms_mode_2d_lego, RDico::hpms_mode_2d_lego_col, RDico::hpms_mode_2d_scatter, RDico::hpms_mode_2d_surf_col, RDico::hpms_mode_2d_surf_col_mesh, RDico::hpms_mode_2d_surf_mesh, RDico::hpms_mode_2d_surf_shade, RDico::hpms_mode_2d_surf_shade_mesh, RDico::hpms_mode_3d_box, RDico::hpms_mode_3d_scatter, mode_list, mode_num, mode_val, options, plot_mode, and rDico.
Referenced by ChangeDimension(), and RGHistoPlotAttrSelect::InitModes().
|
virtual |
Set the dimension of histogram whose attributes are being edited.
dim | dimension (1, 2 or 3) |
References histo_dim, InitModes(), mode_list, mode_num, mode_val, plot_mode, and w_mode_select.
Referenced by RGHistoPlotAttrSelect::ChangeDimension(), and Construct().
|
inlinevirtual |
Get histogram dimension corresponding to selected modes.
References histo_dim.
Referenced by RGHistoPlotAttrSelect::MapSubwindows(), and RGHistoPlotAttrSelect::ModeSelectionUpdate().
|
virtual |
Set the widget state (active/inactive)
b | state |
References w_mode_select.
Referenced by RGHistoPlotAttrSelect::SetState().
|
inlinevirtual |
Get selected plot mode.
References w_mode_select.
Referenced by RGHistoPlotAttrSelect::ChangeDimension(), RGHistoPlotAttrSelect::Construct(), RGHistoPlotAttrSelect::GetPlotMode(), RGHistoPlotAttrSelect::InitModes(), and RGHistoPlotAttrSelect::SetState().
|
inlinevirtual |
Get ROOT option string for selected mode.
References histo_dim, and w_mode_select.
Referenced by DrawHisto(), and RGHistoPlotAttrSelect::GetPlotOption().
|
static |
Get the ROOT plotting options corresponding to the argument plot mode number.
dim | histogram dimension |
mode | plot mode |
|
static |
Draw an histogram with the argument plot mode. If histogram dimension does not fit with options, nothing is done. The additionnal options are added to the effective options (like "SAME" or "A", ...). If the pad is not specified, the histogram is plotted in the pad defined by gPad, if it is set.
hptr | histogram pointer |
mode | plotting mode |
add_opts | additional options |
padptr | pad pointer |
copy | flag defining if a copy of the histogram should be plotted (0: no copy, 1: copy, 2: copy and normalize) |
norm | histogram normalization |
References GetPlotOption().
Referenced by RGHistoPlotAttrSelect::DrawHisto(), DrawHisto(), DrawHistoCopy(), and DrawHistoNormalized().
|
inlinevirtual |
Draw an histogram with selected mode. If histogram dimension does not fit with options, nothing is done. The additionnal options are added to the effective options (like "SAME" or "A", ...). If the pad is not specified, the histogram is plotted in the pad defined by gPad, if it is set.
hptr | histogram pointer |
add_opts | additional options |
padptr | pad pointer |
copy | flag defining if a copy of the histogram should be plotted |
norm | histogram normalization |
References DrawHisto(), and plot_mode.
|
inlinevirtual |
Draw an histogram with selected mode. If histogram dimension does not fit with options, nothing is done. The additionnal options are added to the effective options (like "SAME" or "A", ...). If the pad is not specified, the histogram is plotted in the pad defined by gPad, if it is set.
hptr | histogram pointer |
add_opts | additional options |
padptr | pad pointer |
References DrawHisto(), and plot_mode.
|
inlinevirtual |
Same as DrawHisto function, except that a copy of the histogram is plotted.
hptr | histogram pointer |
add_opts | additional options |
padptr | pad pointer |
References DrawHisto(), and plot_mode.
Referenced by RGHistoPlotAttrSelect::DrawHistoCopy().
|
inlinevirtual |
Same as DrawHisto function, except that a renormalised copy of the histogram is plotted.
hptr | histogram pointer |
norm | normalization value |
add_opts | additional options |
padptr | pad pointer |
References DrawHisto(), and plot_mode.
Referenced by RGHistoPlotAttrSelect::DrawHistoNormalized().
|
virtual |
Set the plot mode.
mode | selected plot mode |
emit | flag if signal must be emitted |
References mode_num, mode_val, ModeSelected(), and w_mode_select.
Referenced by RGHistoPlotAttrSelect::SetPlotMode().
|
inlinevirtual |
RGHistoPlotModeSelect::ClassDef | ( | RGHistoPlotModeSelect | , |
0 | |||
) |
For ROOT dictionary.