Belle II Software development
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 <framework/datastore/StoreArray.h>
12#include <framework/datastore/StoreObjPtr.h>
13#include <svd/dataobjects/SVDShaperDigit.h>
14#include <cdc/dataobjects/CDCHit.h>
15#include <ecl/dataobjects/ECLDigit.h>
16#include <mdst/dataobjects/TRGSummary.h>
17#include <vector>
18#include <string>
19
20class TH1F;
21class TH2F;
22
23namespace Belle2 {
28 namespace SoftwareTrigger {
31 public:
34
36 void initialize() override;
37
39 void event() override;
40
42 void defineHisto() override;
43
45 void beginRun() override;
46
47 private:
50
53
55 std::map<std::string, TH1F*> m_moduleTimeHistograms;
56
58 std::map<std::string, TH1F*> m_moduleMemoryHistograms;
59
62
65
68
71
74
76 std::map<unsigned int, TH1F*> m_fullTimePerUnitHistograms;
77
79 std::map<unsigned int, TH1F*> m_processingTimePerUnitHistograms;
80
82 std::map<unsigned int, TH1F*> m_fullMemoryPerUnitHistograms;
83
86
89
92
95
98
101
104
107
110
113
115 std::map<unsigned int, double> m_lastFullTimeSumPerUnit;
116
119
121 std::map<unsigned int, double> m_lastProcessingTimeSumPerUnit;
122
124 std::map<std::string, double> m_lastModuleTimeSum;
125
128
130 std::string m_param_histogramDirectoryName = "timing_statistics";
131
133 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"};
134
136 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"};
137
139 int m_hlt_unit = 0;
140
142 const double m_fullTimeMax = 10000;
143
145 const double m_fullTimeNBins = 250;
146
148 const double m_processingTimeMax = 10000;
149
151 const double m_processingTimeNBins = 250;
152
154 const double m_fullMemoryMax = 4000;
155
157 const double m_fullMemoryNBins = 100;
158
160 const double m_nSVDShaperDigitsMax = 20000;
161
163 const double m_nSVDShaperDigitsNBins = 100;
164
166 const double m_nCDCHitsMax = 10000;
167
169 const double m_nCDCHitsNBins = 100;
170
172 const double m_nECLDigitsMax = 10000;
173
175 const double m_nECLDigitsNBins = 100;
176
179
182
185
188 };
189
190 }
192}
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.
const double m_nSVDShaperDigitsNBins
Number of bins for the histograms of nSVDShaperDigits.
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_nECLDigitsMax
Maximum for the histograms of nECLDigits.
TH2F * m_procTimeVsnCDCHitsNotPassiveVeto
Processing time vs nCDCHits distribution of events not passing passive injection veto.
TH2F * m_procTimeVsnSVDShaperDigitsPassiveVeto
Processing time vs nSVDShaperDigits distribution of events passing passive injection veto.
TH1F * m_processingTimeNotPassiveVeto
Processing time distribution of events not passing passive injection veto.
TH2F * m_procTimeVsnCDCHitsPassiveVeto
Processing time vs nCDCHits distribution of events passing passive injection veto.
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.
TH2F * m_procTimeVsnECLDigitsNotPassiveVeto
Processing time vs nECLDigits distribution of events not passing passive injection veto.
const double m_fullTimeNBins
Number of bins for the histograms of fullTime.
TH2F * m_procTimeVsnSVDShaperDigitsNotPassiveVeto
Processing time vs nSVDShaperDigits distribution of events not passing passive injection veto.
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.
const double m_nSVDShaperDigitsMax
Maximum for the histograms of nSVDShaperDigits.
double m_lastFullTimeSum
Storage for the last full time sum.
const double m_nCDCHitsNBins
Number of bins for the histograms of nCDCHits.
std::map< unsigned int, TH1F * > m_fullTimePerUnitHistograms
Budget time distribution of events per unit.
TH1F * m_processingTimePassiveVeto
Processing time distribution of events passing passive injection veto.
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.
const double m_nCDCHitsMax
Maximum for the histograms of nCDCHits.
std::map< std::string, TH1F * > m_moduleMemoryHistograms
Memory distribution of certain modules.
const double m_fullMemoryNBins
Number of bins for the histograms of fullMemory.
const double m_nECLDigitsNBins
Number of bins for the histograms of nECLDigits.
TH2F * m_procTimeVsnECLDigitsPassiveVeto
Processing time vs nECLDigits distribution of events passing passive injection veto.
TH1F * m_fullTimeHistogram
Budget time distribution of all events.
std::map< unsigned int, TH1F * > m_fullMemoryPerUnitHistograms
Total memory distribution of events per unit.
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
Type-safe access to single objects in the data store.
Definition: StoreObjPtr.h:96
Abstract base class for different kinds of events.