JG ROOT Tools libraries
version 5.0 - august 2014
|
#include <RGHistoPlotAttrSelect.hh>
Public Member Functions | |
RGHistoPlotAttrSelect (TGWindow *p=NULL, const Int_t mode=0, TAttLine l=TAttLine(1, 1, 1), TAttFill f=TAttFill(1, 0), TAttMarker m=TAttMarker(1, 20, 1.), UInt_t opt=0) | |
virtual | ~RGHistoPlotAttrSelect () |
virtual void | MapSubwindows () |
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 | SetState (const Bool_t b=kTRUE) |
virtual RGLineAttrSelect * | GetLineAttrSelectWidget () const |
virtual RGFillAttrSelect * | GetFillAttrSelectWidget () const |
virtual RGMarkerAttrSelect * | GetMarkerAttrSelectWidget () const |
virtual void | ChangeDimension (const Int_t dim) |
virtual void | SetLineAttr (const TAttLine &att, const Bool_t emit=kTRUE) |
virtual void | SetFillAttr (const TAttFill &att, const Bool_t emit=kTRUE) |
virtual void | SetMarkerAttr (const TAttMarker &att, const Bool_t emit=kTRUE) |
virtual void | SetPlotMode (const Int_t mode, const Bool_t emit=kTRUE) |
virtual void | SetAngles (const Double_t theta, const Double_t phi, const Bool_t emit=kTRUE) |
virtual TAttLine | GetLineAttr () const |
virtual TAttFill | GetFillAttr () const |
virtual TAttMarker | GetMarkerAttr () const |
virtual Double_t | GetTheta () const |
virtual Double_t | GetPhi () const |
virtual Int_t | GetPlotMode () const |
virtual string | GetPlotOption () const |
virtual void | SetAttributes (const TH1 *h, const Bool_t emit=kTRUE) |
virtual void | AttrToHisto (TH1 *h) const |
virtual void | ModeSelectionUpdate (Int_t sel) |
virtual void | AnglesValueChanged () |
virtual void | LineChanged () |
virtual void | FillChanged () |
virtual void | MarkerChanged () |
virtual void | ModeSelected (Int_t m) |
virtual void | AnglesChanged () |
ClassDef (RGHistoPlotAttrSelect, 0) | |
Static Public Member Functions | |
static string | GetPlotOption (const Int_t dim, const Int_t mode) |
Protected Member Functions | |
virtual void | InitModes () |
virtual void | Construct () |
virtual void | ConstructDefault () |
virtual void | ConstructGroups () |
Protected Attributes | |
UInt_t | options |
Options. | |
Int_t | plot_mode |
Initial plot mode. | |
TAttLine | att_line |
Initial line attributes. | |
TAttFill | att_fill |
Initial fill attributes. | |
TAttMarker | att_marker |
Initial marker attributes. | |
Double_t | angle_theta |
3D view angle | |
Double_t | angle_phi |
3D view angle | |
bool | inhibit_slot |
Flag to inhibit slots (TGNumberEntry) | |
RGLineAttrSelect * | w_line_select |
Selection. | |
RGFillAttrSelect * | w_fill_select |
Selection. | |
RGMarkerAttrSelect * | w_marker_select |
Selection. | |
TGCompositeFrame * | w_mode_frame |
Mode frame. | |
RGHistoPlotModeSelect * | w_mode_select |
Selection widget. | |
TGHorizontalFrame * | w_angles_frame |
Angles frame. | |
TGNumberEntry * | w_theta_entry |
Theta angle widget. | |
TGNumberEntry * | w_phi_entry |
Phi angle widget. | |
Private Member Functions | |
GObject (RGHistoPlotAttrSelect) | |
RGHistoPlotAttrSelect (const RGHistoPlotAttrSelect &original) | |
class RGHistoPlotAttrSelect
Widget for histogram plot attributes selection.
Options:
See versions of the widgets for 1D and 2D (with 3D angles) histograms, in the compact version:
1D:
2D:
The same widgets in the group version:
1D:
2D:
RGHistoPlotAttrSelect::RGHistoPlotAttrSelect | ( | TGWindow * | p = NULL , |
const Int_t | mode = 0 , |
||
TAttLine | l = TAttLine(1,1,1) , |
||
TAttFill | f = TAttFill(1,0) , |
||
TAttMarker | m = TAttMarker(1,20,1.) , |
||
UInt_t | opt = 0 |
||
) |
Constructor.
p | parent widget |
mode | initial mode |
l | initial line attributes |
f | initial fill attributes |
m | initial marker attributes |
opt | options |
References att_fill, att_line, att_marker, Construct(), options, plot_mode, w_angles_frame, w_fill_select, w_line_select, w_marker_select, w_mode_frame, w_mode_select, w_phi_entry, and w_theta_entry.
|
private |
Copy constructor, not implemented.
original | object to copy |
|
virtual |
Destructor.
|
private |
Macro from GCpp library that defines the following functions:
|
protectedvirtual |
Initialization of plot modes.
References RGHistoPlotModeSelect::GetPlotMode(), RGHistoPlotModeSelect::InitModes(), plot_mode, and w_mode_select.
Referenced by Construct().
|
protectedvirtual |
Construction of the widget and sub-widgets.
References ConstructDefault(), ConstructGroups(), RGHistoPlotModeSelect::GetPlotMode(), inhibit_slot, InitModes(), ModeSelectionUpdate(), options, plot_mode, w_fill_select, w_line_select, w_marker_select, w_mode_select, w_phi_entry, and w_theta_entry.
Referenced by RGHistoPlotAttrSelect().
|
protectedvirtual |
Construction of the widget and sub-widgets with default configuration.
References att_fill, att_line, att_marker, RDico::hpas_fill_txt, RDico::hpas_line_txt, RDico::hpas_marker_txt, RDico::hpas_mode_txt, RDico::hpas_phi_txt, RDico::hpas_theta_txt, options, plot_mode, rDico, w_angles_frame, w_fill_select, w_line_select, w_marker_select, w_mode_frame, w_mode_select, w_phi_entry, and w_theta_entry.
Referenced by Construct().
|
protectedvirtual |
Construction of the widget and sub-widgets with group configuration.
References att_fill, att_line, att_marker, RDico::hpas_fill_txt, RDico::hpas_line_txt, RDico::hpas_marker_txt, RDico::hpas_mode_txt, RDico::hpas_phi_txt, RDico::hpas_theta_txt, options, plot_mode, rDico, w_angles_frame, w_fill_select, w_line_select, w_marker_select, w_mode_frame, w_mode_select, w_phi_entry, and w_theta_entry.
Referenced by Construct().
|
virtual |
Map the widgets fro display: this function is overloaded since angles widgets may not be displayed.
References RGHistoPlotModeSelect::GetDimension(), options, w_angles_frame, w_mode_frame, and w_mode_select.
Referenced by RGHistoTools::RemapToolsFrame().
|
inlinevirtual |
Draw an histogram with selected options. 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 AttrToHisto(), RGHistoPlotModeSelect::DrawHisto(), and w_mode_select.
Referenced by RGHistoTools::PlotHisto().
|
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 AttrToHisto(), RGHistoPlotModeSelect::DrawHistoCopy(), and w_mode_select.
|
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 AttrToHisto(), RGHistoPlotModeSelect::DrawHistoNormalized(), and w_mode_select.
|
virtual |
Set the widget state (active/inactive)
b | state |
References RGHistoPlotModeSelect::GetPlotMode(), ModeSelectionUpdate(), RGFillAttrSelect::SetState(), RGMarkerAttrSelect::SetState(), RGLineAttrSelect::SetState(), RGHistoPlotModeSelect::SetState(), w_fill_select, w_line_select, w_marker_select, and w_mode_select.
Referenced by RGHistoTools::RemapToolsFrame().
|
inlinevirtual |
Get line attributes selection widget pointer..
References w_line_select.
|
inlinevirtual |
Get fill attributes selection widget pointer..
References w_fill_select.
|
inlinevirtual |
Get marker attributes selection widget pointer..
References w_marker_select.
|
virtual |
Set the dimension of histogram whose attributes are being edited.
dim | dimension (1, 2 or 3) |
References RGHistoPlotModeSelect::ChangeDimension(), RGHistoPlotModeSelect::GetPlotMode(), plot_mode, and w_mode_select.
|
virtual |
Set line attributes.
att | attributes |
emit | flag if signal must be emitted |
References LineChanged(), RGLineAttrSelect::SetLineColor(), RGLineAttrSelect::SetLineStyle(), RGLineAttrSelect::SetLineWidth(), and w_line_select.
Referenced by SetAttributes().
|
virtual |
Set fill attributes.
att | attributes |
emit | flag if signal must be emitted |
References FillChanged(), RGFillAttrSelect::SetFillColor(), RGFillAttrSelect::SetFillStyle(), and w_fill_select.
Referenced by SetAttributes().
|
virtual |
Set marker attributes.
att | attributes |
emit | flag if signal must be emitted |
References MarkerChanged(), RGMarkerAttrSelect::SetMarkerColor(), RGMarkerAttrSelect::SetMarkerSize(), RGMarkerAttrSelect::SetMarkerStyle(), and w_marker_select.
Referenced by SetAttributes().
|
virtual |
Set plot mode.
mode | new plot mode |
emit | flag if signal must be emitted |
References ModeSelectionUpdate(), RGHistoPlotModeSelect::SelectMode(), and w_mode_select.
|
virtual |
Set angles for 3D view.
theta | theta angle |
phi | phi angle |
emit | flag if signal must be emitted |
References AnglesChanged(), inhibit_slot, w_phi_entry, and w_theta_entry.
Referenced by RGHistoTools::RemapToolsFrame().
|
inlinevirtual |
Get selected line attributes.
References RGLineAttrSelect::GetLineAttr(), and w_line_select.
Referenced by AttrToHisto().
|
inlinevirtual |
Get selected fill attributes.
References RGFillAttrSelect::GetFillAttr(), and w_fill_select.
Referenced by AttrToHisto().
|
inlinevirtual |
Get selected marker attributes.
References RGMarkerAttrSelect::GetMarkerAttr(), and w_marker_select.
Referenced by AttrToHisto().
|
inlinevirtual |
Get selected theta 3D angle.
References w_theta_entry.
|
inlinevirtual |
Get selected phi 3D angle.
References w_phi_entry.
|
inlinevirtual |
Get selected plot mode.
References RGHistoPlotModeSelect::GetPlotMode(), and w_mode_select.
|
inlinevirtual |
Get ROOT option string for selected mode.
References RGHistoPlotModeSelect::GetPlotOption(), and w_mode_select.
Referenced by RGHistoTools::PlotModeChanged().
|
static |
Get the ROOT plotting options corresponding to the argument plot mode number.
dim | histogram dimension |
mode | plot mode |
References RGHistoPlotModeSelect::GetPlotOption().
|
virtual |
Set edited attributes from an histogram.
h | histogram pointer |
emit | flag if signal must be emitted |
References SetFillAttr(), SetLineAttr(), and SetMarkerAttr().
Referenced by RGHistoTools::HistoSelected().
|
virtual |
Set histogram attributes from currently selected ones.
h | histogram pointer |
References GetFillAttr(), GetLineAttr(), and GetMarkerAttr().
Referenced by DrawHisto(), DrawHistoCopy(), DrawHistoNormalized(), and RGHistoTools::HistoAttChanged().
|
virtual |
Function called when plot mode has been changed.
sel | selected mode |
References RGHistoPlotModeSelect::GetDimension(), plot_mode, w_mode_select, w_phi_entry, and w_theta_entry.
Referenced by Construct(), SetPlotMode(), and SetState().
|
virtual |
Function called when an angle of 3D view is changed.
References AnglesChanged(), and inhibit_slot.
|
inlinevirtual |
Signal sent when line attributes are changed.
Referenced by SetLineAttr().
|
inlinevirtual |
Signal sent when fill attributes are changed.
Referenced by SetFillAttr().
|
inlinevirtual |
Signal sent when marker attributes are changed.
Referenced by SetMarkerAttr().
|
inlinevirtual |
Signal sent when plot mode is changed.
|
inlinevirtual |
Signal sent when 3D view angles are changed.
Referenced by AnglesValueChanged(), and SetAngles().
RGHistoPlotAttrSelect::ClassDef | ( | RGHistoPlotAttrSelect | , |
0 | |||
) |
For ROOT dictionary.