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 <framework/database/DBObjPtr.h>
14#include <framework/dbobjects/BunchStructure.h>
15#include <framework/dbobjects/HardwareClockSettings.h>
16#include <svd/dataobjects/SVDShaperDigit.h>
17#include <cdc/dataobjects/CDCHit.h>
18#include <ecl/dataobjects/ECLDigit.h>
19#include <mdst/dataobjects/TRGSummary.h>
20#include <mdst/dataobjects/SoftwareTriggerResult.h>
21#include <mdst/dataobjects/EventLevelTriggerTimeInfo.h>
22#include <vector>
23#include <string>
24
25class TH1F;
26class TH2F;
27
28namespace Belle2 {
33 namespace SoftwareTrigger {
36 public:
39
41 void initialize() override;
42
44 void event() override;
45
47 void defineHisto() override;
48
50 void beginRun() override;
51
52 private:
55
58
60 std::map<std::string, TH1F*> m_moduleTimeHistograms;
61
63 std::map<std::string, TH1F*> m_moduleMemoryHistograms;
64
67
70
73
76
79
81 std::map<unsigned int, TH1F*> m_fullTimePerUnitHistograms;
82
84 std::map<unsigned int, TH1F*> m_processingTimePerUnitHistograms;
85
87 std::map<unsigned int, TH1F*> m_fullMemoryPerUnitHistograms;
88
91
94
97
100
103
106
109
112
115
118
121
124
127
129 std::map<unsigned int, double> m_lastFullTimeSumPerUnit;
130
133
135 std::map<unsigned int, double> m_lastProcessingTimeSumPerUnit;
136
138 std::map<std::string, double> m_lastModuleTimeSum;
139
142
144 std::string m_param_histogramDirectoryName = "timing_statistics";
145
147 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"};
148
150 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"};
151
153 int m_hlt_unit = 0;
154
156 const double m_fullTimeMax = 10000;
157
159 const double m_fullTimeNBins = 250;
160
162 const double m_processingTimeMax = 10000;
163
165 const double m_processingTimeNBins = 250;
166
168 const double m_fullMemoryMax = 4000;
169
171 const double m_fullMemoryNBins = 100;
172
174 const double m_nSVDShaperDigitsMax = 20000;
175
177 const double m_nSVDShaperDigitsNBins = 100;
178
180 const double m_nCDCHitsMax = 10000;
181
183 const double m_nCDCHitsNBins = 100;
184
186 const double m_nECLDigitsMax = 10000;
187
189 const double m_nECLDigitsNBins = 100;
190
193
196
199
202
205
208
211
214
215
216 };
217
218 }
220}
Class for accessing objects in the database.
Definition DBObjPtr.h:21
HistoModule()
Constructor.
Definition HistoModule.h:32
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.
StoreObjPtr< EventLevelTriggerTimeInfo > m_TTDInfo
Store array object for injection time info.
TH1F * m_processingTimeNotPassiveVetoTimingCut
Processing time distribution of events not passing passive injection veto and retained after HLTprefi...
std::map< unsigned int, double > m_lastProcessingTimeSumPerUnit
Storage for the last processing time sum per unit.
const double m_processingTimeMax
Maximum for the histograms of processingTime.
std::map< unsigned int, TH1F * > m_processingTimePerUnitHistograms
Processing time distribution of events per unit.
DBObjPtr< HardwareClockSettings > m_clockSettings
Define object for HardwareClockSettings class.
double m_lastProcessingTimeSum
Storage for the last processing time sum.
const double m_nECLDigitsMax
Maximum for the histograms of nECLDigits.
StoreObjPtr< SoftwareTriggerResult > m_triggerResult
TRG result.
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.
TH1F * m_processingTimeNotPassiveVetoCDCECLCut
Processing time distribution of events not passing passive injection veto and retained after HLTprefi...
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.
DBObjPtr< BunchStructure > m_bunchStructure
Define object for BunchStructure class.
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.
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.
TH2F * m_TimeSinceLastInjectionVsTimeInBeamCycle
Histogram to monitor injection strip.
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.