Belle II Software development
DQMHistComparitor.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 : DQMHistComparitor.h
10// Description :
11//-
12
13#pragma once
14
15// EPICS
16#ifdef _BELLE2_EPICS
17#include "cadef.h"
18// #include "dbDefs.h"
19// #include "epicsString.h"
20// #include "cantProceed.h"
21#endif
22
23#include <dqm/core/DQMHistAnalysis.h>
24#include <TH1.h>
25#include <TCanvas.h>
26#include <TFile.h>
27#include <TString.h>
28
29namespace Belle2 {
37
41 typedef struct {
42#ifdef _BELLE2_EPICS
43 chid mychid;
44#endif
48 TString histo1;
50 TString histo2;
52 TCanvas* canvas;
54 float warning;
56 float error;
59 } CMPNODE;
60
61 // Public functions
62 public:
63
68
73
77 void initialize() override final;
78
82 void beginRun() override final;
83
87 void event() override final;
88
92 void endRun() override final;
93
97 void terminate() override final;
98
99 // Data members
100 private:
102 std::vector< std::vector<std::string>> m_histlist;
104 std::vector<CMPNODE*> m_pnode;
108 TFile* m_refFile = nullptr;
110 bool m_color = true;
111
117 TH1* GetHisto(TString histoname);
118
119 };
121} // end namespace Belle2
122
The base class for the histogram analysis module.
Class definition for the reference histogram display.
std::string m_refFileName
Reference Histogram Root file name.
bool m_color
Whether to use the color code for warnings and errors.
void initialize() override final
Initializer.
void terminate() override final
This method is called at the end of the event processing.
void event() override final
This method is called for each event.
TH1 * GetHisto(TString histoname)
Get histogram by its name.
void endRun() override final
This method is called if the current run ends.
std::vector< std::vector< std::string > > m_histlist
Parameter list for histograms.
void beginRun() override final
Called when entering a new run.
std::vector< CMPNODE * > m_pnode
Struct for extracted parameters + EPICS PV.
TFile * m_refFile
The pointer to the reference file.
Abstract base class for different kinds of events.
STL namespace.
The struct for reference histogram comparison.
TCanvas * canvas
The canvas to display both original and reference histograms.
float error
The error level for the histogram difference.
TString histo2
The name of the reference histogram.
TString histo1
The name of the histogram to be compared.
int min_entries
The minimum entries for histogram comparison.
float warning
The warning level for the histogram difference.