Belle II Software  release-06-00-14
DQMHistAnalysisEpicsExample.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 : DQMHistAnalysisEpicsExample.h
10 // Description : An example module for DQM histogram analysis
11 //-
12 
13 #pragma once
14 
15 #ifdef _BELLE2_EPICS
16 // EPICS
17 #include "cadef.h"
18 #endif
19 
20 #include <dqm/analysis/modules/DQMHistAnalysis.h>
21 
22 #include <TF1.h>
23 #include <TCanvas.h>
24 #include <TLine.h>
25 
26 namespace Belle2 {
34 
35  // Public functions
36  public:
37 
41 
43  void initialize() override final;
44 
46  void beginRun() override final;
47  void event() override final;
48  void endRun() override final;
49  void terminate() override final;
50 
51  // Data members
52  private:
54  std::string m_histoname;
56  std::string m_function;
58  Int_t m_parameters;
60  std::string m_pvPrefix;
61 
63  TF1* m_f1 = nullptr;
65  TCanvas* m_c1 = nullptr;
67  TLine* m_line = nullptr;
69  TLine* m_line_lo = nullptr;
71  TLine* m_line_hi = nullptr;
72 
73 #ifdef _BELLE2_EPICS
74  chid mychid[10];// hard limit max 10 parameters
75 #endif
76  };
78 } // end namespace Belle2
79 
Class definition for the output module of Sequential ROOT I/O.
void initialize() override final
Module functions to be called from main process.
TLine * m_line_hi
The line for the higher bound.
void terminate() override final
This method is called at the end of the event processing.
Int_t m_parameters
The fit function parameters for EPICS.
void event() override final
This method is the core of the module.
TLine * m_line_lo
The line for the lower bound.
void endRun() override final
This method is called if the current run ends.
std::string m_histoname
The name of the histogram.
void beginRun() override final
Module functions to be called from event process.
TLine * m_line
The line for the fitting result.
std::string m_function
The definition of the fit function.
The base class for the histogram analysis module.
Abstract base class for different kinds of events.