Belle II Software development
EclPainter1D.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11//ECL
12#include <ecl/modules/eclDisplay/EclPainter.h>
13
14class TH1F;
15
16namespace Belle2 {
24 class EclPainter1D : public EclPainter {
25 public:
27 enum Type {
31 PHI,
32 THETA
33 };
34
38 EclPainter1D(EclData* data, Type type);
42 virtual ~EclPainter1D();
43
44 private:
48 TH1F* m_hist;
49
54
58 int channelToSegId(int channel);
62 int getMaxX();
66 void initHisto();
70 void setTitles();
71
72 public:
80 virtual void getInformation(int px, int py, MultilineWidget* panel) override;
81
85 Type getType();
86
91 virtual EclPainter* handleClick(int px, int py) override;
92
96 void setXRange(int xmin, int xmax) override;
97
102 void setShaper(int crate, int shaper);
103
108 void setCrate(int crate);
109
113 void Draw() override;
114 };
116}
This class contains data for ECLSimHit's and provides several relevant conversion functions for bette...
Definition: EclData.h:31
Painter for EclData, 1D histograms.
Definition: EclPainter1D.h:24
Type m_type
Display subtypes of this class.
Definition: EclPainter1D.h:46
virtual ~EclPainter1D()
Destructor for EclPainter subclass.
Definition: EclPainter1D.cc:38
TH1F * m_hist
Displayed histogram.
Definition: EclPainter1D.h:48
Type
Subtype of histogram to draw.
Definition: EclPainter1D.h:27
@ SHAPER
Events/energy per ShaperDSP.
Definition: EclPainter1D.h:29
@ CRATE
Events/energy per crate/ECLCollector.
Definition: EclPainter1D.h:30
@ CHANNEL
Events/energy per channel.
Definition: EclPainter1D.h:28
void setXRange(int xmin, int xmax) override
Set XRange for histogram.
int getMaxX()
Returns number of X bins.
Definition: EclPainter1D.cc:62
int m_crate
ID of currently selected crate.
Definition: EclPainter1D.h:53
void setTitles()
Update titles of the histogram.
Definition: EclPainter1D.cc:88
int m_shaper
ID of currently selected shaper.
Definition: EclPainter1D.h:51
virtual EclPainter * handleClick(int px, int py) override
Creates sub-histogram for crates and shapers.
int channelToSegId(int channel)
Convert channel id to X bin number.
Definition: EclPainter1D.cc:43
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.
void setCrate(int crate)
Show data only from specific crate.
void setShaper(int crate, int shaper)
Show data only from specific shaper.
void initHisto()
Initialize histogram.
Definition: EclPainter1D.cc:80
void Draw() override
Redraw the canvas.
Painter for EclData, parent class, created with EclPainterFactory.
Definition: EclPainter.h:29
Widget which contains the dynamic amount of TGLabel objects.
Abstract base class for different kinds of events.