Belle II Software development
DQMHistAnalysisSVD.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// File : DQMHistAnalysisSVDModule.h
10// Description : base module for DQM histogram analysis of SVD
11//-
12
13#pragma once
14
15#include <dqm/core/DQMHistAnalysis.h>
16#include <vxd/dataobjects/VxdID.h>
17#include <svd/dataobjects/SVDSummaryPlots.h>
18
19#include <TFile.h>
20#include <TText.h>
21#include <TPaveText.h>
22#include <TCanvas.h>
23#include <TH2F.h>
24#include <TText.h>
25#include <TLine.h>
26#include <TArrow.h>
27#include <TString.h>
28
29namespace Belle2 {
35
37
38 // Public functions
39 public:
40 enum {kOffline, kOnline, kGroupIDs};
41
45 explicit DQMHistAnalysisSVDModule(bool panelTop = false, bool online = false, bool groupIDs = false);
46
50 ~ DQMHistAnalysisSVDModule() override;
51
52 void setStatusOfCanvas(int status, TCanvas* canvas, bool plotLeg = true, int histoType = kOffline);
53 static TString getHistoNameFromCanvas(TString cName, TString view = "",
54 TString cPrefix = "c_", TString hPrefix = "");
55
56 protected:
57 TPaveText* m_legProblem = nullptr;
58 TPaveText* m_legNormal = nullptr;
59 TPaveText* m_legLowStat = nullptr;
60 TPaveText* m_legEmpty = nullptr;
61 TPaveText* m_legWarning = nullptr;
62
63 TPaveText* m_legOnlineProblem = nullptr;
64 TPaveText* m_legOnlineWarning = nullptr;
65 TPaveText* m_legOnlineNormal = nullptr;
66
67 TPaveText* m_legGroupIDsProblem = nullptr;
68 TPaveText* m_legGroupIDsWarning = nullptr;
69 TPaveText* m_legGroupIDsNormal = nullptr;
70
71 static std::pair<std::vector<TText*>, std::vector<TText*>>
73 void drawText();
74
75 std::vector<TText*> m_laddersText;
76 std::vector<TText*> m_sensorsText;
77
78 TLine* m_lx = nullptr;
79 TLine* m_ly = nullptr;
80 TArrow* m_arrowx = nullptr;
81 TArrow* m_arrowy = nullptr;
82
83 int m_colzMinimum = 0;
84 int m_colzMaximum = -1111;
85 bool m_setColzRange = false;
86
87 float m_valueMinimum = -1;
88 float m_valueMaximum = -1;
89
91 enum svdStatus {
92 good = 0,
93 warning = 1,
94 error = 2,
95 noStat = 3,
97 };
98
99 void updateCanvases(SVDSummaryPlots* histo, TCanvas* canvas, TCanvas* canvasRPhi, svdStatus status, bool isU,
100 int histoType = kOffline);
101 void updateErrCanvases(SVDSummaryPlots* histo, TCanvas* canvas, TCanvas* canvasRPhi, bool isU);
102
103 };
104
105} // end namespace Belle2
106
DQMHistAnalysisModule()
Constructor / Destructor.
int m_colzMaximum
Maximum of the histogram.
TPaveText * m_legOnlineNormal
onlineOccupancy plot legend, normal
static std::pair< std::vector< TText * >, std::vector< TText * > > textModuleNumbers()
create vectors of TText to write on the canvas
float m_valueMaximum
Maxiimum value of parameter.
static TString getHistoNameFromCanvas(TString cName, TString view="", TString cPrefix="c_", TString hPrefix="")
get histogram name from Canvas name
TPaveText * m_legEmpty
plot legend, empty
TPaveText * m_legGroupIDsProblem
Group IDs Occupancy plot legend, problem.
int m_colzMinimum
Minimum of the histogram.
void updateCanvases(SVDSummaryPlots *histo, TCanvas *canvas, TCanvas *canvasRPhi, svdStatus status, bool isU, int histoType=kOffline)
update canvases
TPaveText * m_legLowStat
plot legend, low stats
TPaveText * m_legWarning
plot legend, warning
TArrow * m_arrowx
x-axis direction
TPaveText * m_legGroupIDsWarning
Group IDs Occupancy plot legend, warning.
std::vector< TText * > m_sensorsText
list of sensors to write on the cancas
void drawText()
draw text on the RPhi view
float m_valueMinimum
Minimum value of parameter.
TPaveText * m_legNormal
plot legend, normal
TArrow * m_arrowy
y-axis direction
std::vector< TText * > m_laddersText
list of ladders to write on the canvas
TPaveText * m_legProblem
plot legend, problem
TPaveText * m_legOnlineProblem
onlineOccupancy plot legend, problem
TPaveText * m_legOnlineWarning
onlineOccupancy plot legend, warning
DQMHistAnalysisSVDModule(bool panelTop=false, bool online=false, bool groupIDs=false)
Constructor.
void setStatusOfCanvas(int status, TCanvas *canvas, bool plotLeg=true, int histoType=kOffline)
set status of Canvas
void updateErrCanvases(SVDSummaryPlots *histo, TCanvas *canvas, TCanvas *canvasRPhi, bool isU)
update error canvases
bool m_setColzRange
set the range of the histogram in colz
TPaveText * m_legGroupIDsNormal
Group IDs Occupancy plot legend, normal.
class to summarize SVD quantities per sensor and side
Abstract base class for different kinds of events.