Belle II Software  release-08-01-10
StatisticsTimingHLTDQMModule.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 <framework/core/HistoModule.h>
11 #include <vector>
12 #include <string>
13 
14 class TH1F;
15 
16 namespace Belle2 {
21  namespace SoftwareTrigger {
23 
27  public:
30 
32  void initialize() override;
33 
35  void event() override;
36 
38  void defineHisto() override;
39 
41  void beginRun() override;
42 
43  private:
46 
49 
51  std::map<std::string, TH1F*> m_moduleTimeHistograms;
52 
54  std::map<std::string, TH1F*> m_moduleMemoryHistograms;
55 
58 
61 
64 
67 
70 
72  std::map<unsigned int, TH1F*> m_fullTimePerUnitHistograms;
73 
75  std::map<unsigned int, TH1F*> m_processingTimePerUnitHistograms;
76 
78  std::map<unsigned int, TH1F*> m_fullMemoryPerUnitHistograms;
79 
82 
84  double m_lastFullTimeSum = 0;
85 
87  std::map<unsigned int, double> m_lastFullTimeSumPerUnit;
88 
91 
93  std::map<unsigned int, double> m_lastProcessingTimeSumPerUnit;
94 
96  std::map<std::string, double> m_lastModuleTimeSum;
97 
100 
102  std::string m_param_histogramDirectoryName = "timing_statistics";
103 
105  std::vector<std::string> m_param_overviewModuleList = {"Sum_Wait", "Sum_Initialization", "Sum_Unpackers", "Sum_EventsofDoomBuster", "Sum_Clustering", "Sum_Prefilter_Tracking", "Sum_Posttracking_Reconstruction", "Sum_HLT_Filter_Calculation", "Sum_HLT_DQM_before_filter", "Sum_HLT_Discard", "Sum_Postfilter_Reconstruction", "Sum_HLT_Skim_Calculation", "Sum_ROI_Finder", "Sum_HLT_DQM_filtered", "Sum_ROI_Payload_Assembler", "Sum_HLT_DQM_all_events", "Sum_Close_Event"};
106 
108  std::vector<std::string> m_summaryModuleList = {"Sum_Initialization", "Sum_Unpackers", "Sum_EventsofDoomBuster", "Sum_Clustering", "Sum_Prefilter_Tracking", "Sum_Posttracking_Reconstruction", "Sum_HLT_Filter_Calculation", "Sum_HLT_DQM_before_filter", "Sum_HLT_Discard", "Sum_Postfilter_Reconstruction", "Sum_HLT_Skim_Calculation", "Sum_ROI_Finder", "Sum_HLT_DQM_filtered", "Sum_ROI_Payload_Assembler", "Sum_HLT_DQM_all_events", "Sum_Close_Event"};
109 
111  int m_hlt_unit = 0;
112 
114  const double m_fullTimeMax = 10000;
115 
117  const double m_fullTimeNBins = 250;
118 
120  const double m_processingTimeMax = 10000;
121 
123  const double m_processingTimeNBins = 250;
124 
126  const double m_fullMemoryMax = 4000;
127 
129  const double m_fullMemoryNBins = 100;
130  };
131 
132  }
134 }
HistoModule.h is supposed to be used instead of Module.h for the modules with histogram definitions t...
Definition: HistoModule.h:29
std::map< std::string, TH1F * > m_moduleTimeHistograms
Time distribution of certain modules.
TH1F * m_fullMemoryHistogram
Total memory usage distribution of all events.
const double m_processingTimeNBins
Number of bins for the histograms of processingTime.
std::map< unsigned int, double > m_lastProcessingTimeSumPerUnit
Storage for the last processing time sum per unit.
int m_hlt_unit
Store HLT unit number on initialization.
const double m_processingTimeMax
Maximum for the histograms of processingTime.
std::map< unsigned int, TH1F * > m_processingTimePerUnitHistograms
Processing time distribution of events per unit.
double m_lastProcessingTimeSum
Storage for the last processing time sum.
const double m_fullMemoryMax
Maximum for the histograms of fullMemory.
std::vector< std::string > m_param_overviewModuleList
Parameter: which modules should be shown in the overview list.
TH1F * m_fullTimeMeanPerUnitHistogram
Mean budget time of events per unit.
const double m_fullTimeNBins
Number of bins for the histograms of fullTime.
TH1F * m_processingTimeHistogram
Processing time distribution of all events.
std::map< std::string, double > m_lastModuleTimeSum
Storage for the last time sum of certain modules.
TH1F * m_processingTimeMeanPerUnitHistogram
Mean processing time of events per unit.
bool m_param_create_hlt_unit_histograms
Parameter: Create HLT unit number histograms?
std::map< unsigned int, double > m_lastFullTimeSumPerUnit
Storage for the last full time sum per unit.
double m_lastFullTimeSum
Storage for the last full time sum.
std::map< unsigned int, TH1F * > m_fullTimePerUnitHistograms
Budget time distribution of events per unit.
const double m_fullTimeMax
Maximum for the histograms of fullTime.
std::string m_param_histogramDirectoryName
Parameter: Directory to put the generated histograms.
std::vector< std::string > m_summaryModuleList
Summary modules of the actual processing.
std::map< std::string, TH1F * > m_moduleMemoryHistograms
Memory distribution of certain modules.
const double m_fullMemoryNBins
Number of bins for the histograms of fullMemory.
TH1F * m_fullTimeHistogram
Budget time distribution of all events.
std::map< unsigned int, TH1F * > m_fullMemoryPerUnitHistograms
Total memory distribution of events per unit.
Abstract base class for different kinds of events.