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() override;
44 EclPainter1D(const EclPainter1D&) = delete;
45
48
49 private:
53 TH1F* m_hist;
54
59
63 int channelToSegId(int channel);
67 int getMaxX();
71 void initHisto();
75 void setTitles();
76
77 public:
85 virtual void getInformation(int px, int py, MultilineWidget* panel) override;
86
90 Type getType();
91
96 virtual EclPainter* handleClick(int px, int py) override;
97
101 void setXRange(int xmin, int xmax) override;
102
107 void setShaper(int crate, int shaper);
108
113 void setCrate(int crate);
114
118 void Draw() override;
119 };
120
121}
This class contains data for ECLSimHit's and provides several relevant conversion functions for bette...
Definition EclData.h:31
Type m_type
Display subtypes of this class.
TH1F * m_hist
Displayed histogram.
Type
Subtype of histogram to draw.
@ SHAPER
Events/energy per ShaperDSP.
@ CRATE
Events/energy per crate/ECLCollector.
@ CHANNEL
Events/energy per channel.
void setXRange(int xmin, int xmax) override
Set XRange for histogram.
EclPainter1D(EclData *data, Type type)
Constructor for EclPainter subclass.
EclPainter1D & operator=(const EclPainter1D &)=delete
Operator = (disabled).
int getMaxX()
Returns number of X bins.
int m_crate
ID of currently selected crate.
void setTitles()
Update titles of the histogram.
int m_shaper
ID of currently selected shaper.
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.
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.
EclPainter1D(const EclPainter1D &)=delete
Copy constructor (disabled).
void setCrate(int crate)
Show data only from specific crate.
void setShaper(int crate, int shaper)
Show data only from specific shaper.
virtual ~EclPainter1D() override
Destructor for EclPainter subclass.
void initHisto()
Initialize histogram.
void Draw() override
Redraw the canvas.
EclPainter(EclData *data)
Default constructor.
Definition EclPainter.cc:24
Widget which contains the dynamic amount of TGLabel objects.
Abstract base class for different kinds of events.