Belle II Software development
|
Painter for EclData, 1D histograms. More...
#include <EclPainter1D.h>
Public Types | |
enum | Type { CHANNEL , SHAPER , CRATE , PHI , THETA } |
Subtype of histogram to draw. More... | |
Public Member Functions | |
EclPainter1D (EclData *data, Type type) | |
Constructor for EclPainter subclass. | |
virtual | ~EclPainter1D () |
Destructor for EclPainter subclass. | |
virtual void | getInformation (int px, int py, MultilineWidget *panel) override |
Sets the information to be displayed in the provided MultilineWidget. | |
Type | getType () |
Return subtype of ECLPainter1D. | |
virtual EclPainter * | handleClick (int px, int py) override |
Creates sub-histogram for crates and shapers. | |
void | setXRange (int xmin, int xmax) override |
Set XRange for histogram. | |
void | setShaper (int crate, int shaper) |
Show data only from specific shaper. | |
void | setCrate (int crate) |
Show data only from specific crate. | |
void | Draw () override |
Redraw the canvas. | |
void | setData (EclData *data) |
Set EclData to display in painter. | |
EclData * | getData () |
Return currently displayed EclData. | |
const EclData * | getData () const |
Return currently displayed EclData. | |
void | setMapper (ECL::ECLChannelMapper *mapper) |
Set ECLChannelMapper for CellID <-> (crate, shaper, chid) conversion. | |
ECL::ECLChannelMapper * | getMapper () |
Return currently set ECLChannelMapper. | |
void | setDisplayedSubsystem (EclData::EclSubsystem sys) |
Change between the displayed ECL subsystem (barrel, forward and backward endcaps). | |
EclData::EclSubsystem | getDisplayedSubsystem () |
Get currently displayed ECL subsystem. | |
TString | getSubsystemTitle (EclData::EclSubsystem subsys) |
Return title of ECL subsystem to use in painter. | |
Protected Member Functions | |
void | getNewRootObjectName (char *buf, int size) |
Make unique name for next root object. | |
Private Member Functions | |
int | channelToSegId (int channel) |
Convert channel id to X bin number. | |
int | getMaxX () |
Returns number of X bins. | |
void | initHisto () |
Initialize histogram. | |
void | setTitles () |
Update titles of the histogram. | |
void | cloneFrom (const EclPainter &other) |
Clone attributes from other EclPainter. | |
Private Attributes | |
Type | m_type |
Display subtypes of this class. | |
TH1F * | m_hist |
Displayed histogram. | |
int | m_shaper |
ID of currently selected shaper. | |
int | m_crate |
ID of currently selected crate. | |
EclData * | m_ecl_data |
Data to draw. | |
ECL::ECLChannelMapper * | m_mapper |
mapper for CellID <-> (crate, shaper, chid) conversion. | |
EclData::EclSubsystem | displayed_subsys |
Identifier of displayed ECL subsystem. | |
Static Private Attributes | |
static int | m_obj_counter = 0 |
Counter to make unique names for new root objects. | |
Painter for EclData, 1D histograms.
Definition at line 24 of file EclPainter1D.h.
enum Type |
Subtype of histogram to draw.
Enumerator | |
---|---|
CHANNEL | Events/energy per channel. |
SHAPER | Events/energy per ShaperDSP. |
CRATE | Events/energy per crate/ECLCollector. |
Definition at line 27 of file EclPainter1D.h.
EclPainter1D | ( | EclData * | data, |
EclPainter1D::Type | type | ||
) |
Constructor for EclPainter subclass.
Definition at line 24 of file EclPainter1D.cc.
|
virtual |
Destructor for EclPainter subclass.
Definition at line 38 of file EclPainter1D.cc.
|
private |
Convert channel id to X bin number.
Definition at line 43 of file EclPainter1D.cc.
|
privateinherited |
Clone attributes from other EclPainter.
Definition at line 93 of file EclPainter.cc.
|
overridevirtual |
Redraw the canvas.
Implements EclPainter.
Definition at line 215 of file EclPainter1D.cc.
|
inlineinherited |
|
inlineinherited |
|
inherited |
Get currently displayed ECL subsystem.
Definition at line 51 of file EclPainter.cc.
|
overridevirtual |
Sets the information to be displayed in the provided MultilineWidget.
px | X coordinate of mouse cursor. |
py | Y coordinate of mouse cursor. |
panel | MultilineWidget to display the information |
Reimplemented from EclPainter.
Definition at line 124 of file EclPainter1D.cc.
|
inherited |
Return currently set ECLChannelMapper.
Definition at line 41 of file EclPainter.cc.
|
private |
Returns number of X bins.
Definition at line 62 of file EclPainter1D.cc.
|
protectedinherited |
Make unique name for next root object.
Definition at line 88 of file EclPainter.cc.
|
inherited |
Return title of ECL subsystem to use in painter.
Definition at line 56 of file EclPainter.cc.
EclPainter1D::Type getType | ( | ) |
Return subtype of ECLPainter1D.
Definition at line 163 of file EclPainter1D.cc.
|
overridevirtual |
Creates sub-histogram for crates and shapers.
This function is called upon click in EclFrame.
Reimplemented from EclPainter.
Definition at line 168 of file EclPainter1D.cc.
|
private |
Initialize histogram.
Definition at line 80 of file EclPainter1D.cc.
void setCrate | ( | int | crate | ) |
Show data only from specific crate.
Show data for all crates if param 'crate' < 0.
Definition at line 210 of file EclPainter1D.cc.
|
inlineinherited |
Set EclData to display in painter.
Definition at line 44 of file EclPainter.h.
|
inherited |
Change between the displayed ECL subsystem (barrel, forward and backward endcaps).
Definition at line 46 of file EclPainter.cc.
|
inherited |
Set ECLChannelMapper for CellID <-> (crate, shaper, chid) conversion.
Definition at line 36 of file EclPainter.cc.
void setShaper | ( | int | crate, |
int | shaper | ||
) |
Show data only from specific shaper.
Show data for all shapers if on of the arguments is negative.
Definition at line 204 of file EclPainter1D.cc.
|
private |
Update titles of the histogram.
Definition at line 88 of file EclPainter1D.cc.
|
overridevirtual |
Set XRange for histogram.
Reimplemented from EclPainter.
Definition at line 199 of file EclPainter1D.cc.
|
privateinherited |
Identifier of displayed ECL subsystem.
Definition at line 116 of file EclPainter.h.
|
private |
ID of currently selected crate.
Definition at line 53 of file EclPainter1D.h.
|
privateinherited |
Data to draw.
Definition at line 111 of file EclPainter.h.
|
private |
Displayed histogram.
Definition at line 48 of file EclPainter1D.h.
|
privateinherited |
mapper for CellID <-> (crate, shaper, chid) conversion.
Definition at line 113 of file EclPainter.h.
|
staticprivateinherited |
Counter to make unique names for new root objects.
Definition at line 109 of file EclPainter.h.
|
private |
ID of currently selected shaper.
Definition at line 51 of file EclPainter1D.h.
|
private |
Display subtypes of this class.
Definition at line 46 of file EclPainter1D.h.