Belle II Software  release-06-00-14
DQMHistAnalysisRootFitExample.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 : DQMHistAnalysisRooFitExample.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 <TCanvas.h>
23 #include <RooWorkspace.h>
24 #include <RooDataHist.h>
25 #include <RooPlot.h>
26 #include <RooFitResult.h>
27 #include <RooAbsPdf.h>
28 
29 namespace Belle2 {
37 
38  // Public functions
39  public:
40 
45  private:
46 
48  void initialize(void) override final;
49 
51  void beginRun(void) override final;
52  void event(void) override final;
53  void endRun(void) override final;
54  void terminate(void) override final;
55 
56  // Data member
58  RooWorkspace* w = nullptr;
60  RooRealVar* x = nullptr;
62  RooDataHist* data = nullptr;
64  RooPlot* plot = nullptr;
66  RooFitResult* r = nullptr;
68  RooAbsPdf* model = nullptr;
69 
70 
72  TCanvas* m_c0 = nullptr;
73 
74 #ifdef _BELLE2_EPICS
75  chid mychid;
76 #endif
77  };
79 } // end namespace Belle2
80 
The base class for the histogram analysis module.
Class definition for the output module of Sequential ROOT I/O.
void terminate(void) override final
This method is called at the end of the event processing.
void initialize(void) override final
Module functions to be called from main process.
RooDataHist * data
The data of histogram for fitting.
void endRun(void) override final
This method is called if the current run ends.
TCanvas * m_c0
The drawing canvas for plotting the fitting result.
RooPlot * plot
The plot of the fitting result.
void beginRun(void) override final
Module functions to be called from event process.
void event(void) override final
This method is the core of the module.
Abstract base class for different kinds of events.