Belle II Software  release-05-01-25
EclPainterCommon.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2015 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Milkail Remnev, Dmitry Matvienko *
7  * *
8  * This software is provided "as is" without any warranty. *
9  ***************************************************************************/
10 
11 #pragma once
12 
13 //ECL
14 #include <ecl/modules/eclDisplay/EclPainter.h>
15 
16 // TODO: Dynamic bin count for ENERGY_SUM
17 
18 class TH1F;
19 
20 namespace Belle2 {
29  class EclPainterCommon : public EclPainter {
30  public:
32  enum Type {
36  };
37 
41  EclPainterCommon(EclData* data, Type type);
45  virtual ~EclPainterCommon();
46 
47  private:
51  TH1F* m_hist;
52 
56  int getMinX();
60  int getMaxX();
64  void initHisto();
68  void setTitles();
69 
70  public:
74  Type getType();
75 
82  virtual void getInformation(int px, int py, MultilineWidget* panel) override;
83 
87  void Draw() override;
88  };
90 }
Belle2::EclPainterCommon::getMinX
int getMinX()
Return m_x_min.
Definition: EclPainterCommon.cc:34
Belle2::EclPainterCommon::ENERGY
@ ENERGY
Energy per channel distribution.
Definition: EclPainterCommon.h:33
Belle2::EclPainterCommon::Draw
void Draw() override
Redraw the canvas.
Definition: EclPainterCommon.cc:76
Belle2::EclPainterCommon::Type
Type
Subtype of histogram to draw.
Definition: EclPainterCommon.h:32
Belle2::EclPainterCommon::m_type
Type m_type
Display subtypes of this class.
Definition: EclPainterCommon.h:49
Belle2::EclPainterCommon::getMaxX
int getMaxX()
Return m_x_max.
Definition: EclPainterCommon.cc:48
Belle2::EclPainterCommon::TIME
@ TIME
Time distribution.
Definition: EclPainterCommon.h:35
Belle2::EclPainterCommon::setTitles
void setTitles()
Update titles of the histogram.
Definition: EclPainterCommon.cc:99
Belle2::EclPainterCommon::~EclPainterCommon
virtual ~EclPainterCommon()
Destructor for EclPainter subclass.
Definition: EclPainterCommon.cc:29
Belle2::EclPainter
Painter for EclData, parent class, created with EclPainterFactory.
Definition: EclPainter.h:31
Belle2::EclPainterCommon::ENERGY_SUM
@ ENERGY_SUM
Energy per event distribution.
Definition: EclPainterCommon.h:34
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::MultilineWidget
Widget which contains the dynamic amount of TGLabel objects.
Definition: MultilineWidget.h:32
Belle2::EclPainterCommon::getType
Type getType()
Return subtype of ECLPainterCommon.
Definition: EclPainterCommon.cc:122
Belle2::EclPainterCommon::m_hist
TH1F * m_hist
Histogram for energy distribution.
Definition: EclPainterCommon.h:51
Belle2::EclPainterCommon::EclPainterCommon
EclPainterCommon(EclData *data, Type type)
Constructor for EclPainter subclass.
Definition: EclPainterCommon.cc:18
Belle2::EclData
This class contains data for ECLSimHit's and provides several relevant conversion functions for bette...
Definition: EclData.h:41
Belle2::EclPainterCommon
Painter for EclData that shows common event characteristics on 1D histograms.
Definition: EclPainterCommon.h:29
Belle2::EclPainterCommon::getInformation
virtual void getInformation(int px, int py, MultilineWidget *panel) override
Sets the information to be displayed in the provided MultilineWidget.
Definition: EclPainterCommon.cc:71
Belle2::EclPainterCommon::initHisto
void initHisto()
Initialize histogram.
Definition: EclPainterCommon.cc:62