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
56
61
62 void setStatusOfCanvas(int status, TCanvas* canvas, bool plotLeg = true, int histoType = kOffline);
63 static TString getHistoNameFromCanvas(TString cName, TString view = "",
64 TString cPrefix = "c_", TString hPrefix = "");
65
66 protected:
67 TPaveText* m_legProblem = nullptr;
68 TPaveText* m_legNormal = nullptr;
69 TPaveText* m_legLowStat = nullptr;
70 TPaveText* m_legEmpty = nullptr;
71 TPaveText* m_legWarning = nullptr;
72
73 TPaveText* m_legOnlineProblem = nullptr;
74 TPaveText* m_legOnlineWarning = nullptr;
75 TPaveText* m_legOnlineNormal = nullptr;
76
77 TPaveText* m_legGroupIDsProblem = nullptr;
78 TPaveText* m_legGroupIDsWarning = nullptr;
79 TPaveText* m_legGroupIDsNormal = nullptr;
80
81 static std::pair<std::vector<TText*>, std::vector<TText*>>
83 void drawText();
84
85 std::vector<TText*> m_laddersText;
86 std::vector<TText*> m_sensorsText;
87
88 TLine* m_lx = nullptr;
89 TLine* m_ly = nullptr;
90 TArrow* m_arrowx = nullptr;
91 TArrow* m_arrowy = nullptr;
92
93 int m_colzMinimum = 0;
94 int m_colzMaximum = -1111;
95 bool m_setColzRange = false;
96
97 float m_valueMinimum = -1;
98 float m_valueMaximum = -1;
99
102 good = 0,
104 error = 2,
105 noStat = 3,
107 };
108
109 void updateCanvases(SVDSummaryPlots* histo, TCanvas* canvas, TCanvas* canvasRPhi, svdStatus status, bool isU,
110 int histoType = kOffline);
111 void updateErrCanvases(SVDSummaryPlots* histo, TCanvas* canvas, TCanvas* canvasRPhi, bool isU);
112
113 };
114
115} // end namespace Belle2
116
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
DQMHistAnalysisSVDModule(const DQMHistAnalysisSVDModule &)=delete
Copy constructor, deleted since the class owns bare pointers.
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
DQMHistAnalysisSVDModule & operator=(const DQMHistAnalysisSVDModule &)=delete
Assignment operator, deleted since the class owns bare pointers.
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.