Belle II Software  release-06-00-14
DQMHistAnalysisHLTModule.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 #pragma once
9 
10 #include <dqm/analysis/modules/DQMHistAnalysis.h>
11 
12 #include <TCanvas.h>
13 
14 #include <map>
15 #include <string>
16 
17 #ifdef _BELLE2_EPICS
18 #include "cadef.h"
19 #endif
20 
21 namespace Belle2 {
30  public:
32  void initialize() final;
33  void beginRun() final;
34  void event() final;
35  void terminate() final;
36 
37  private:
39  std::string m_pvPrefix = "B2_nsm:get:ECL_LUM_MON:lum_det_run";
41  std::string m_bhabhaName = "accept_bhabha";
43  std::map<std::string, std::string> m_columnMapping;
45  std::vector<std::string> m_l1Histograms;
47  std::vector<std::string> m_retentionPerUnit;
49  std::pair<TCanvas*, TH1F*> m_hEfficiency = {nullptr, nullptr};
51  std::pair<TCanvas*, TH1F*> m_hEfficiencyTotal = {nullptr, nullptr};
53  std::pair<TCanvas*, TH1F*> m_hCrossSection = {nullptr, nullptr};
55  std::pair<TCanvas*, TH1F*> m_hRatios = {nullptr, nullptr};
57  std::map<std::string, std::pair<TCanvas*, TH1F*>> m_hl1Ratios;
59  std::map<std::string, std::pair<TCanvas*, TH1F*>> m_hRetentionPerUnit;
61  std::pair<TCanvas*, TH1F*> m_hMeanTime = {nullptr, nullptr};
63  std::pair<TCanvas*, TH1D*> m_hErrorFlagFraction = {nullptr, nullptr};
65  std::pair<TCanvas*, TH1D*> m_hFilteredFractionPerUnit = {nullptr, nullptr};
67  std::pair<TCanvas*, TH1F*> m_hMeanBudgetTimePerUnit = {nullptr, nullptr};
69  std::pair<TCanvas*, TH1F*> m_hMeanProcessingTimePerUnit = {nullptr, nullptr};
71  std::pair<TCanvas*, TH1F*> m_hMeanMemory = {nullptr, nullptr};
72 
73 #ifdef _BELLE2_EPICS
75  chid m_epicschid;
76 #endif
77  };
79 }
Class for HLT-related histogram analysis.
std::string m_bhabhaName
name of the bhabha trigger
std::pair< TCanvas *, TH1F * > m_hCrossSection
Histogram with final cross sections.
std::map< std::string, std::pair< TCanvas *, TH1F * > > m_hRetentionPerUnit
Histogram with retention rate per unit of some hlt filter lines.
void initialize() final
Initialize the Module.
void beginRun() final
Called when entering a new run.
std::map< std::string, std::pair< TCanvas *, TH1F * > > m_hl1Ratios
Histogram with hlt&l1 ratios to l1 numbers.
std::vector< std::string > m_retentionPerUnit
Which HLT filter lines to use for calculation retention rate per unit.
std::string m_pvPrefix
prefix for EPICS PVs
void event() final
This method is the core of the module.
std::pair< TCanvas *, TH1D * > m_hFilteredFractionPerUnit
Histogram with fraction of events filtered per unit.
std::vector< std::string > m_l1Histograms
Which l1 triggers to show.
std::pair< TCanvas *, TH1F * > m_hMeanBudgetTimePerUnit
Histogram with mean budget time per unit per process.
std::pair< TCanvas *, TH1F * > m_hMeanProcessingTimePerUnit
Histogram with mean processing time per unit per process.
std::pair< TCanvas *, TH1F * > m_hMeanMemory
Histogram with mean memory change per process.
std::pair< TCanvas *, TH1D * > m_hErrorFlagFraction
Histogram with fraction of events with error flags.
std::pair< TCanvas *, TH1F * > m_hRatios
Histogram with final ratios to bhabha.
std::pair< TCanvas *, TH1F * > m_hEfficiency
Histogram with final efficiencies to HLT.
std::pair< TCanvas *, TH1F * > m_hEfficiencyTotal
Histogram with final efficiencies to all events.
std::map< std::string, std::string > m_columnMapping
Which columns to use.
std::pair< TCanvas *, TH1F * > m_hMeanTime
Histogram with mean processing time per process.
void terminate() final
This method is called at the end of the event processing.
The base class for the histogram analysis module.
Abstract base class for different kinds of events.