Belle II Software development
DQMHistAnalysisPeak.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 : DQMHistAnalysisPeak.h
10// Description : Simple Peak Analysis (Mean/Media/Width) for simple peaked distributions with delta histogramming
11//-
12
13#pragma once
14
15#include <dqm/core/DQMHistAnalysis.h>
16#include <TGraph.h>
17#include <TLine.h>
18
19namespace Belle2 {
27
28 // Public functions
29 public:
30
35
36 private:
37
41 void initialize() override final;
42
46 void terminate() override final;
47
51 void beginRun() override final;
52
56 void event() override final;
57
58 // Data members
59 private:
61 std::string m_histoName;
63 std::string m_histoDirectory;
65 std::string m_pvPrefix;
67 std::string m_monPrefix;
69 std::string m_monObjectName;
71 int m_minEntries = 1000;
73 bool m_plot = true;
75 float m_zoom = 3.0;
77 bool m_mean = true;
79 bool m_median = true;
81 bool m_rms = true;
83 bool m_plotLimits = true;
84
86 TCanvas* m_canvas = nullptr;
88 TLine* m_lineMean = nullptr;
90 TLine* m_lineMedian = nullptr;
91
94
96 TGraph* m_g_alarmlo{};
98 TGraph* m_g_warnlo{};
100 TGraph* m_g_good{};
102 TGraph* m_g_warnhi{};
104 TGraph* m_g_alarmhi{};
105
107 double m_lowarnlevel = NAN;
109 double m_hiwarnlevel = NAN;
111 double m_loerrorlevel = NAN;
113 double m_hierrorlevel = NAN;
114
116 bool m_valid_alarmlo = false;
118 bool m_valid_warnlo = false;
120 bool m_valid_good = false;
122 bool m_valid_warnhi = false;
124 bool m_valid_alarmhi = false;
125
126 };
128} // end namespace Belle2
129
The base class for the histogram analysis module.
DQM Histogram Analysis for simple peaking distributions.
TLine * m_lineMedian
The line for the median result.
bool m_valid_alarmlo
flag for valid limit/graph
bool m_valid_warnlo
flag for valid limit/graph
int m_minEntries
Update entry interval.
void initialize() override final
Initializer.
TGraph * m_g_warnlo
Graph for Limit plot.
std::string m_histoName
The name of the histogram.
bool m_median
Flag: extract median.
bool m_valid_warnhi
flag for valid limit/graph
TLine * m_lineMean
The line for the mean result.
std::string m_pvPrefix
The prefix of PV.
bool m_plotLimits
Flag for plotting limits from PV.
TCanvas * m_canvas
The drawing canvas.
MonitoringObject * m_monObj
Monitoring Object.
TGraph * m_g_alarmhi
Graph for Limit plot.
TGraph * m_g_alarmlo
Graph for Limit plot.
void terminate() override final
Terminate.
bool m_plot
Flag: plot into canvas.
std::string m_monPrefix
The prefix for MonitoringObj.
void event() override final
This method is called for each event.
bool m_valid_alarmhi
flag for valid limit/graph
TGraph * m_g_warnhi
Graph for Limit plot.
std::string m_monObjectName
The Name for MonitoringObj.
float m_zoom
Zoom on peak with range +- zoom*rms ; 0 disable.
void beginRun() override final
Called when entering a new run.
bool m_valid_good
flag for valid limit/graph
std::string m_histoDirectory
The name of the histogram dir.
TGraph * m_g_good
Graph for Limit plot.
MonitoringObject is a basic object to hold data for the run-dependency monitoring Run summary TCanvas...
Abstract base class for different kinds of events.