Belle II Software  release-05-01-25
EclPainter.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Mikhail Remnev, Dmitry Matvienko *
7  * *
8  * This software is provided "as is" without any warranty. *
9  ***************************************************************************/
10 
11 #pragma once
12 
13 #include <ecl/modules/eclDisplay/EclData.h>
14 
15 class TString;
16 
17 namespace Belle2 {
22  class MultilineWidget;
23 
24  namespace ECL {
25  class ECLChannelMapper;
26  }
27 
31  class EclPainter {
32  public:
37  explicit EclPainter(EclData* data);
39  EclPainter(const EclPainter& other) { cloneFrom(other); }
40  virtual ~EclPainter();
41 
43  EclPainter& operator=(const EclPainter& other) { cloneFrom(other); return *this; }
44 
46  void setData(EclData* data) { m_ecl_data = data; }
48  EclData* getData() { return m_ecl_data; }
50  const EclData* getData() const { return m_ecl_data; }
51 
55  void setMapper(ECL::ECLChannelMapper* mapper);
60 
70 
75 
82  virtual void getInformation(int px, int py, MultilineWidget* panel);
83 
90  virtual EclPainter* handleClick(int px, int py);
91 
95  virtual void setXRange(int x1, int x2);
96 
100  virtual void Draw() = 0;
101 
102  protected:
106  void getNewRootObjectName(char* buf, int size);
107 
108  private:
110  static int m_obj_counter;
115 
118 
122  void cloneFrom(const EclPainter& other);
123  };
125 }
Belle2::EclPainter::displayed_subsys
EclData::EclSubsystem displayed_subsys
Identifier of displayed ECL subsystem.
Definition: EclPainter.h:117
Belle2::EclPainter::cloneFrom
void cloneFrom(const EclPainter &other)
Clone attributes from other EclPainter.
Definition: EclPainter.cc:94
Belle2::EclPainter::operator=
EclPainter & operator=(const EclPainter &other)
Assignment operator.
Definition: EclPainter.h:43
Belle2::EclPainter::EclPainter
EclPainter(const EclPainter &other)
Copy constructor.
Definition: EclPainter.h:39
Belle2::EclPainter::setData
void setData(EclData *data)
Set EclData to display in painter.
Definition: EclPainter.h:46
Belle2::EclPainter::setDisplayedSubsystem
void setDisplayedSubsystem(EclData::EclSubsystem sys)
Change between the displayed ECL subsystem (barrel, forward and backward endcaps).
Definition: EclPainter.cc:47
Belle2::EclPainter::getData
EclData * getData()
Return currently displayed EclData.
Definition: EclPainter.h:48
Belle2::EclPainter::getDisplayedSubsystem
EclData::EclSubsystem getDisplayedSubsystem()
Get currently displayed ECL subsystem.
Definition: EclPainter.cc:52
Belle2::EclPainter::getData
const EclData * getData() const
Return currently displayed EclData.
Definition: EclPainter.h:50
Belle2::EclPainter::getInformation
virtual void getInformation(int px, int py, MultilineWidget *panel)
Sets the information to be displayed in the provided MultilineWidget.
Definition: EclPainter.cc:73
Belle2::EclPainter::EclPainter
EclPainter(EclData *data)
Default constructor.
Definition: EclPainter.cc:25
Belle2::EclPainter
Painter for EclData, parent class, created with EclPainterFactory.
Definition: EclPainter.h:31
Belle2::EclData::EclSubsystem
EclSubsystem
Subsystems of ECL: ALL all subsystems BARR barrel only FORW forward endcap only BACKW backward endcap...
Definition: EclData.h:108
Belle2::ECL::ECLChannelMapper
This class provides access to ECL channel map that is either a) Loaded from the database (see ecl/dbo...
Definition: ECLChannelMapper.h:36
Belle2::EclPainter::setMapper
void setMapper(ECL::ECLChannelMapper *mapper)
Set ECLChannelMapper for CellID <-> (crate, shaper, chid) conversion.
Definition: EclPainter.cc:37
Belle2::EclPainter::Draw
virtual void Draw()=0
Redraw the canvas.
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::EclPainter::getNewRootObjectName
void getNewRootObjectName(char *buf, int size)
Make unique name for next root object.
Definition: EclPainter.cc:89
Belle2::MultilineWidget
Widget which contains the dynamic amount of TGLabel objects.
Definition: MultilineWidget.h:32
Belle2::EclPainter::setXRange
virtual void setXRange(int x1, int x2)
Set XRange for histogram in EclPainter.
Definition: EclPainter.cc:85
Belle2::EclPainter::handleClick
virtual EclPainter * handleClick(int px, int py)
Some EclPainters can shift to another view upon click.
Definition: EclPainter.cc:80
Belle2::EclPainter::m_mapper
ECL::ECLChannelMapper * m_mapper
mapper for CellID <-> (crate, shaper, chid) conversion.
Definition: EclPainter.h:114
Belle2::EclPainter::getSubsystemTitle
TString getSubsystemTitle(EclData::EclSubsystem subsys)
Return title of ECL subsystem to use in painter.
Definition: EclPainter.cc:57
Belle2::EclPainter::getMapper
ECL::ECLChannelMapper * getMapper()
Return currently set ECLChannelMapper.
Definition: EclPainter.cc:42
Belle2::EclData
This class contains data for ECLSimHit's and provides several relevant conversion functions for bette...
Definition: EclData.h:41
Belle2::EclPainter::m_obj_counter
static int m_obj_counter
Counter to make unique names for new root objects.
Definition: EclPainter.h:110
Belle2::EclPainter::m_ecl_data
EclData * m_ecl_data
Data to draw.
Definition: EclPainter.h:112