Belle II Software  release-08-01-10
EclPainter Class Referenceabstract

Painter for EclData, parent class, created with EclPainterFactory. More...

#include <EclPainter.h>

Inheritance diagram for EclPainter:
Collaboration diagram for EclPainter:

Public Member Functions

 EclPainter (EclData *data)
 Default constructor. More...
 
 EclPainter (const EclPainter &other)
 Copy constructor.
 
EclPainteroperator= (const EclPainter &other)
 Assignment operator.
 
void setData (EclData *data)
 Set EclData to display in painter. More...
 
EclDatagetData ()
 Return currently displayed EclData.
 
const EclDatagetData () const
 Return currently displayed EclData.
 
void setMapper (ECL::ECLChannelMapper *mapper)
 Set ECLChannelMapper for CellID <-> (crate, shaper, chid) conversion.
 
ECL::ECLChannelMappergetMapper ()
 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.
 
virtual void getInformation (int px, int py, MultilineWidget *panel)
 Sets the information to be displayed in the provided MultilineWidget. More...
 
virtual EclPainterhandleClick (int px, int py)
 Some EclPainters can shift to another view upon click. More...
 
virtual void setXRange (int x1, int x2)
 Set XRange for histogram in EclPainter.
 
virtual void Draw ()=0
 Redraw the canvas.
 

Protected Member Functions

void getNewRootObjectName (char *buf, int size)
 Make unique name for next root object.
 

Private Member Functions

void cloneFrom (const EclPainter &other)
 Clone attributes from other EclPainter.
 

Private Attributes

EclDatam_ecl_data
 Data to draw.
 
ECL::ECLChannelMapperm_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.
 

Detailed Description

Painter for EclData, parent class, created with EclPainterFactory.

Definition at line 29 of file EclPainter.h.

Constructor & Destructor Documentation

◆ EclPainter()

EclPainter ( EclData data)
explicit

Default constructor.

Parameters
dataData to display.

Definition at line 24 of file EclPainter.cc.

24  :
25  m_mapper(0)
26 {
27  setData(data);
28  displayed_subsys = EclData::ALL;
29 }
ECL::ECLChannelMapper * m_mapper
mapper for CellID <-> (crate, shaper, chid) conversion.
Definition: EclPainter.h:113
void setData(EclData *data)
Set EclData to display in painter.
Definition: EclPainter.h:44
EclData::EclSubsystem displayed_subsys
Identifier of displayed ECL subsystem.
Definition: EclPainter.h:116

Member Function Documentation

◆ getInformation()

void getInformation ( int  px,
int  py,
MultilineWidget panel 
)
virtual

Sets the information to be displayed in the provided MultilineWidget.

Parameters
pxX coordinate of mouse cursor.
pyY coordinate of mouse cursor.
panelMultilineWidget to display the information

Reimplemented in EclPainterPolar, EclPainterCommon, EclPainter2D, and EclPainter1D.

Definition at line 72 of file EclPainter.cc.

◆ handleClick()

EclPainter * handleClick ( int  px,
int  py 
)
virtual

Some EclPainters can shift to another view upon click.

(For example, clicking on crate reveals histogram of shapers in that crate)

Returns
EclPainter with new perspective/range.

Reimplemented in EclPainter1D.

Definition at line 79 of file EclPainter.cc.

◆ setData()

void setData ( EclData data)
inline

Set EclData to display in painter.


Definition at line 44 of file EclPainter.h.

44 { m_ecl_data = data; }
EclData * m_ecl_data
Data to draw.
Definition: EclPainter.h:111

The documentation for this class was generated from the following files: