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 {
37
38 // Public functions
39 public:
40
44 DQMHistAnalysisSVDModule(bool panelTop = false, bool online = false);
45
49 ~ DQMHistAnalysisSVDModule();
50
51 void setStatusOfCanvas(int status, TCanvas* canvas, bool plotLeg = true, bool online = false);
52 TString getHistoNameFromCanvas(TString cName, TString view = "",
53 TString cPrefix = "c_", TString hPrefix = "");
55 protected:
56 TPaveText* m_legProblem = nullptr;
57 TPaveText* m_legNormal = nullptr;
58 TPaveText* m_legLowStat = nullptr;
59 TPaveText* m_legEmpty = nullptr;
60 TPaveText* m_legWarning = nullptr;
62 TPaveText* m_legOnlineProblem = nullptr;
63 TPaveText* m_legOnlineWarning = nullptr;
64 TPaveText* m_legOnlineNormal = nullptr;
66 std::pair<std::vector<TText*>, std::vector<TText*>> textModuleNumbers();
67 void drawText();
69 std::vector<TText*> m_laddersText;
70 std::vector<TText*> m_sensorsText;
72 TLine* m_lx = nullptr;
73 TLine* m_ly = nullptr;
74 TArrow* m_arrowx = nullptr;
75 TArrow* m_arrowy = nullptr;
77 int m_colzMinimum = 0;
78 int m_colzMaximum = -1111;
79 bool m_setColzRange = false;
81 float m_valueMinimum = -1;
82 float m_valueMaximum = -1;
85 enum svdStatus {
86 good = 0,
87 warning = 1,
88 error = 2,
89 noStat = 3,
90 lowStat = 4
91 };
92
93 void updateCanvases(SVDSummaryPlots* histo, TCanvas* canvas, TCanvas* canvasRPhi, svdStatus status, bool isU,
94 bool online = false);
95 void updateErrCanvases(SVDSummaryPlots* histo, TCanvas* canvas, TCanvas* canvasRPhi, bool isU);
97 };
99} // end namespace Belle2
100
The base class for the histogram analysis module.
Class definition for common method.
int m_colzMaximum
Maximum of the histogram.
TPaveText * m_legOnlineNormal
onlineOccupancy plot legend, normal
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
TString getHistoNameFromCanvas(TString cName, TString view="", TString cPrefix="c_", TString hPrefix="")
get histogram name from Canvas name
TPaveText * m_legEmpty
plot legend, empty
int m_colzMinimum
Minimum of the histogram.
TPaveText * m_legLowStat
plot legend, low stats
TPaveText * m_legWarning
plot legend, warning
void setStatusOfCanvas(int status, TCanvas *canvas, bool plotLeg=true, bool online=false)
set status of Canvas
TArrow * m_arrowx
x-axis direction
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
void updateErrCanvases(SVDSummaryPlots *histo, TCanvas *canvas, TCanvas *canvasRPhi, bool isU)
update error canvases
void updateCanvases(SVDSummaryPlots *histo, TCanvas *canvas, TCanvas *canvasRPhi, svdStatus status, bool isU, bool online=false)
update canvases
bool m_setColzRange
set the range of the histogram in colz
class to summarize SVD quantities per sensor and side
Abstract base class for different kinds of events.