CMS 3D CMS Logo

HLXMonitor.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HLXMonitor
4 // Class: HLXMonitor
5 //
13 //
14 // Original Author: Adam Hunt - Princeton University
15 // email: ahunt@princeton.edu
16 // Created: Thu Jul 19 02:29:59 EDT 2007
17 //
18 //
19 
20 #ifndef _HLXMONITOR_H_
21 #define _HLXMONITOR_H_
22 
23 // system include fileshlx_dqm_sourceclient-live.cfg
24 #include <cstdlib>
25 #include <iomanip>
26 #include <iostream>
27 #include <memory>
28 #include <string>
29 #include <sys/time.h>
30 
31 // user include files
32 #include "FWCore/Framework/interface/Frameworkfwd.h" // Not included in example
33 
34 #include "FWCore/Framework/interface/Event.h" // Not included in example
35 #include "FWCore/Framework/interface/MakerMacros.h" // Not included in example
36 
38 
42 
44 
45 #include "RecoLuminosity/TCPReceiver/interface/LumiStructures.hh"
47 
48 class HLXMonitor : public DQMEDAnalyzer {
49 public:
52  explicit HLXMonitor(const edm::ParameterSet &);
53  ~HLXMonitor() override;
54 
55 private:
56  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
57  void analyze(const edm::Event &, const edm::EventSetup &) override;
58 
59  void connectHLXTCP();
60 
63 
64  void FillHistograms(const LUMI_SECTION &);
65  void FillHistoHFCompare(const LUMI_SECTION &);
66  void FillReportSummary();
67  void FillEventInfo(const LUMI_SECTION &, const edm::Event &e);
68 
69  void ResetAll();
70 
71  void EndRun();
72 
73  double getUTCtime(timeval *a, timeval *b = nullptr);
74 
75  // ----------member data ---------------------------
76  TCPReceiver HLXTCP;
77 
85 
93 
101 
102  // Luminosity Monitoring
112 
113  // Sanity Check for Occupancy
117 
118  // Signal and Background Levels
123 
128 
129  // History plots - fill once per LS
146 
159 
166 
167  // EventInfo Clone
177 
197 
198  // Report Summary
201 
202  unsigned int numActiveTowersSet1;
203  unsigned int numActiveTowersSet2;
204 
205  unsigned int counter;
206  unsigned char *rData;
207  short int SectionComplete;
208 
209  // Parameters
211  double XMIN, XMAX;
212  unsigned int NBINS;
216  std::string Style; // BX, History, Distribution
218  unsigned int NUM_HLX;
219  unsigned int NUM_BUNCHES;
220  unsigned int MAX_LS;
221  unsigned int AquireMode;
222  unsigned int TriggerBX;
223  unsigned int MinLSBeforeSave;
224 
227 
228  unsigned int reconnTime;
231 
232  unsigned int set1BelowIndex;
233  unsigned int set1BetweenIndex;
234  unsigned int set1AboveIndex;
235  unsigned int set2BelowIndex;
236  unsigned int set2BetweenIndex;
237  unsigned int set2AboveIndex;
238 
240 
244 
245  unsigned int runNumLength;
246  unsigned int secNumLength;
247 
252 
254 
256  unsigned int runNumber_;
257  unsigned int expectedNibbles_;
258  unsigned int totalNibbles_[36];
259 
260  unsigned int HLXHFMap[36];
261 
262  unsigned int previousSection;
263  unsigned int lumiSectionCount;
264  int lsBinOld;
272 
273  // EventInfo Parameters
275  timeval runStartTime_;
278  int pEvent_;
279 
280  // Lumi section info
282 };
283 
284 #endif
MonitorElement * errSummaryEtaPhi_
Subdetector-specific error summary (float)
Definition: HLXMonitor.h:195
double sectionInstantSumEt
Definition: HLXMonitor.h:265
MonitorElement * HistAvgOccBetweenSet1HFP
Definition: HLXMonitor.h:134
MonitorElement * HFCompareOccAboveSet1
Definition: HLXMonitor.h:89
MonitorElement * Set2Between[36]
Definition: HLXMonitor.h:82
MonitorElement * processLatency_
The UTC time of the last event.
Definition: HLXMonitor.h:185
MonitorElement * HistInstantLumiOccSet1
Definition: HLXMonitor.h:151
std::string OutputDir
Definition: HLXMonitor.h:215
MonitorElement * HFCompareOccAboveSet2
Definition: HLXMonitor.h:92
MonitorElement * RecentIntegratedLumiOccSet2
Definition: HLXMonitor.h:165
MonitorElement * MaxInstLumiBX4
Definition: HLXMonitor.h:122
unsigned int totalNibbles_[36]
Definition: HLXMonitor.h:258
MonitorElement * processTimeStamp_
The UTC time of the first event processed.
Definition: HLXMonitor.h:184
void FillReportSummary()
Definition: HLXMonitor.cc:1443
void SetupHists(DQMStore::IBooker &)
Definition: HLXMonitor.cc:147
MonitorElement * dqmPatch_
CMSSW version run for this job.
Definition: HLXMonitor.h:193
unsigned int HLXHFMap[36]
Definition: HLXMonitor.h:260
MonitorElement * HistAvgLumiOccSet2
Definition: HLXMonitor.h:149
unsigned int secNumLength
Definition: HLXMonitor.h:246
MonitorElement * HistAvgOccBelowSet2HFM
Definition: HLXMonitor.h:139
void EndRun()
Definition: HLXMonitor.cc:906
MonitorElement * RecentIntegratedLumiEtSum
Definition: HLXMonitor.h:163
double XMAX
Definition: HLXMonitor.h:211
MonitorElement * LumiIntegratedEtSum
Definition: HLXMonitor.h:109
MonitorElement * SumAllOccSet1
Definition: HLXMonitor.h:114
MonitorElement * LumiInstantOccSet2
Definition: HLXMonitor.h:108
MonitorElement * AvgOccBetweenSet2
Definition: HLXMonitor.h:99
int prescaleEvt_
Definition: HLXMonitor.h:226
MonitorElement * AvgOccBelowSet1
Definition: HLXMonitor.h:95
MonitorElement * HistAvgEtSumHFM
Definition: HLXMonitor.h:131
MonitorElement * AvgOccAboveSet2
Definition: HLXMonitor.h:100
unsigned int counter
Definition: HLXMonitor.h:205
MonitorElement * HistAvgEtSumHFP
Definition: HLXMonitor.h:130
MonitorElement * HistAvgOccAboveSet1HFP
Definition: HLXMonitor.h:136
MonitorElement * LumiInstantEtSum
Definition: HLXMonitor.h:106
HCAL_HLX::LUMI_SECTION LUMI_SECTION
Definition: HLXMonitor.h:50
std::string OccYAxisTitle
Definition: HLXMonitor.h:249
MonitorElement * LumiAvgOccSet2
Definition: HLXMonitor.h:105
MonitorElement * cmsswVer_
Current working directory of the job.
Definition: HLXMonitor.h:192
MonitorElement * HistInstantLumiOccSet2Error
Definition: HLXMonitor.h:155
unsigned int NUM_HLX
Definition: HLXMonitor.h:218
MonitorElement * errSummarySegment_[10]
Subdetector-specific etaPhi summary (float)
Definition: HLXMonitor.h:196
MonitorElement * processEventRate_
Time elapsed since the last event.
Definition: HLXMonitor.h:186
unsigned int runNumber_
Definition: HLXMonitor.h:256
int lsBinOld
Definition: HLXMonitor.h:264
MonitorElement * MissingDQMDataCheck
Definition: HLXMonitor.h:116
MonitorElement * HistInstantLumiOccSet2
Definition: HLXMonitor.h:152
MonitorElement * LumiInstantOccSet1
Definition: HLXMonitor.h:107
MonitorElement * HistAvgOccAboveSet1HFM
Definition: HLXMonitor.h:137
float evtRateWindow_
Definition: HLXMonitor.h:276
timeval runStartTime_
Definition: HLXMonitor.h:275
unsigned char * rData
Definition: HLXMonitor.h:206
std::string OutputFilePrefix
Definition: HLXMonitor.h:214
MonitorElement * LumiIntegratedOccSet1
Definition: HLXMonitor.h:110
double sectionInstantErrSumEt
Definition: HLXMonitor.h:266
double sectionInstantErrSumOcc2
Definition: HLXMonitor.h:270
unsigned int set2AboveIndex
Definition: HLXMonitor.h:237
MonitorElement * Set1Below[36]
Definition: HLXMonitor.h:78
int evtRateCount_
Definition: HLXMonitor.h:277
double XMIN
Definition: HLXMonitor.h:211
short int SectionComplete
Definition: HLXMonitor.h:207
std::string EtYAxisTitle
Definition: HLXMonitor.h:251
std::string eventInfoFolderHLX_
Definition: HLXMonitor.h:241
MonitorElement * HistInstantLumiEtSumError
Definition: HLXMonitor.h:153
std::string DistribIP2
Definition: HLXMonitor.h:230
MonitorElement * eventId_
UTC time of the run start.
Definition: HLXMonitor.h:174
int listenPort
Definition: HLXMonitor.h:210
MonitorElement * processId_
Number of collector updates (TBD)
Definition: HLXMonitor.h:182
MonitorElement * MaxInstLumiBX1
Definition: HLXMonitor.h:119
MonitorElement * reportSummaryMap_
Definition: HLXMonitor.h:200
unsigned int MAX_LS
Definition: HLXMonitor.h:220
MonitorElement * HistAvgOccBelowSet1HFP
Definition: HLXMonitor.h:132
MonitorElement * HFCompareEtSum
Definition: HLXMonitor.h:86
double getUTCtime(timeval *a, timeval *b=0)
Definition: HLXMonitor.cc:1565
MonitorElement * runStartTimeStamp_
Definition: HLXMonitor.h:173
MonitorElement * Set1Between[36]
Definition: HLXMonitor.h:79
unsigned int set2BetweenIndex
Definition: HLXMonitor.h:236
double sectionInstantSumOcc1
Definition: HLXMonitor.h:267
timeval lastUpdateTime_
Definition: HLXMonitor.h:274
unsigned int set2BelowIndex
Definition: HLXMonitor.h:235
double sectionInstantSumOcc2
Definition: HLXMonitor.h:269
MonitorElement * HistIntegratedLumiOccSet1
Definition: HLXMonitor.h:157
MonitorElement * RecentInstantLumiOccSet1
Definition: HLXMonitor.h:161
MonitorElement * HistIntegratedLumiOccSet2
Definition: HLXMonitor.h:158
MonitorElement * BXvsTimeAvgEtSumHFM
Definition: HLXMonitor.h:145
MonitorElement * HistAvgOccBetweenSet2HFM
Definition: HLXMonitor.h:141
void connectHLXTCP()
Definition: HLXMonitor.cc:115
MonitorElement * AvgOccAboveSet1
Definition: HLXMonitor.h:97
MonitorElement * HistInstantLumiOccSet1Error
Definition: HLXMonitor.h:154
HCAL_HLX::LUMI_SECTION lumiSection
Definition: HLXMonitor.h:253
MonitorElement * hostName_
of event processed so far
Definition: HLXMonitor.h:189
MonitorElement * HFCompareOccBelowSet1
Definition: HLXMonitor.h:87
unsigned int numActiveTowersSet2
Definition: HLXMonitor.h:203
unsigned int NBINS
Definition: HLXMonitor.h:212
MonitorElement * ETSum[36]
Definition: HLXMonitor.h:84
bool ResetAtNewRun
Definition: HLXMonitor.h:239
MonitorElement * Set2Below[36]
Definition: HLXMonitor.h:81
MonitorElement * MaxInstLumiBXNum2
Definition: HLXMonitor.h:125
MonitorElement * MaxInstLumiBX2
Definition: HLXMonitor.h:120
MonitorElement * SumAllOccSet2
Definition: HLXMonitor.h:115
std::string Style
Definition: HLXMonitor.h:216
std::string monitorName_
Definition: HLXMonitor.h:225
MonitorElement * AvgEtSum
Definition: HLXMonitor.h:94
MonitorElement * nUpdates_
These MEs are either static or updated upon each analyze() call.
Definition: HLXMonitor.h:181
void analyze(const edm::Event &, const edm::EventSetup &) override
Definition: HLXMonitor.cc:854
MonitorElement * HistAvgOccAboveSet2HFM
Definition: HLXMonitor.h:143
bool Accumulate
Definition: HLXMonitor.h:213
MonitorElement * LumiAvgEtSum
Definition: HLXMonitor.h:103
MonitorElement * eventTimeStamp_
Definition: HLXMonitor.h:176
MonitorElement * BXvsTimeAvgEtSumHFP
Definition: HLXMonitor.h:144
MonitorElement * HistAvgOccBetweenSet1HFM
Definition: HLXMonitor.h:135
MonitorElement * RecentIntegratedLumiOccSet1
Definition: HLXMonitor.h:164
unsigned int TriggerBX
Definition: HLXMonitor.h:222
MonitorElement * MaxInstLumiBXNum4
Definition: HLXMonitor.h:127
unsigned int NUM_BUNCHES
Definition: HLXMonitor.h:219
MonitorElement * HistAvgLumiOccSet1
Definition: HLXMonitor.h:148
MonitorElement * HistAvgOccAboveSet2HFP
Definition: HLXMonitor.h:142
unsigned int MinLSBeforeSave
Definition: HLXMonitor.h:223
MonitorElement * HistAvgOccBelowSet1HFM
Definition: HLXMonitor.h:133
MonitorElement * RecentInstantLumiOccSet2
Definition: HLXMonitor.h:162
MonitorElement * Set2Above[36]
Definition: HLXMonitor.h:83
MonitorElement * HistAvgLumiEtSum
Definition: HLXMonitor.h:147
MonitorElement * HistIntegratedLumiEtSum
Definition: HLXMonitor.h:156
TCPReceiver HLXTCP
Definition: HLXMonitor.h:76
MonitorElement * HistAvgOccBelowSet2HFP
Definition: HLXMonitor.h:138
MonitorElement * processEvents_
Definition: HLXMonitor.h:188
double sectionInstantNorm
Definition: HLXMonitor.h:271
MonitorElement * MaxInstLumiBXNum3
Definition: HLXMonitor.h:126
MonitorElement * MaxInstLumiBX3
Definition: HLXMonitor.h:121
double sectionInstantErrSumOcc1
Definition: HLXMonitor.h:268
unsigned int previousSection
Definition: HLXMonitor.h:262
std::string subSystemName_
Definition: HLXMonitor.h:243
bool currentRunEnded_
Definition: HLXMonitor.h:255
double b
Definition: hdecay.h:120
MonitorElement * processName_
Hostname of the local machine.
Definition: HLXMonitor.h:190
void FillEventInfo(const LUMI_SECTION &, const edm::Event &e)
Definition: HLXMonitor.cc:1408
unsigned int runNumLength
Definition: HLXMonitor.h:245
timeval lastAvgTime_
Definition: HLXMonitor.h:274
MonitorElement * Set1Above[36]
Definition: HLXMonitor.h:80
int SavePeriod
Definition: HLXMonitor.h:217
MonitorElement * processStartTimeStamp_
The PID associated with this job.
Definition: HLXMonitor.h:183
~HLXMonitor() override
Definition: HLXMonitor.cc:109
unsigned int expectedNibbles_
Definition: HLXMonitor.h:257
MonitorElement * MaxInstLumiBXNum1
Definition: HLXMonitor.h:124
MonitorElement * AvgOccBelowSet2
Definition: HLXMonitor.h:98
MonitorElement * errSummary_
DQM patch version for this job.
Definition: HLXMonitor.h:194
unsigned int numActiveTowersSet1
Definition: HLXMonitor.h:202
HLXMonitor(const edm::ParameterSet &)
Definition: HLXMonitor.cc:17
double num4NibblePerLS_
Definition: HLXMonitor.h:281
double a
Definition: hdecay.h:121
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: HLXMonitor.cc:142
std::string OccXAxisTitle
Definition: HLXMonitor.h:248
MonitorElement * HistInstantLumiEtSum
Definition: HLXMonitor.h:150
MonitorElement * runId_
Definition: HLXMonitor.h:172
unsigned int AquireMode
Definition: HLXMonitor.h:221
MonitorElement * HFCompareOccBetweenSet2
Definition: HLXMonitor.h:91
unsigned int set1BelowIndex
Definition: HLXMonitor.h:232
HCAL_HLX::TCPReceiver TCPReceiver
Definition: HLXMonitor.h:51
unsigned int lumiSectionCount
Definition: HLXMonitor.h:263
std::string eventInfoFolder_
Definition: HLXMonitor.h:242
MonitorElement * LumiIntegratedOccSet2
Definition: HLXMonitor.h:111
MonitorElement * HFCompareOccBelowSet2
Definition: HLXMonitor.h:90
MonitorElement * HFCompareOccBetweenSet1
Definition: HLXMonitor.h:88
void FillHistograms(const LUMI_SECTION &)
Definition: HLXMonitor.cc:931
void ResetAll()
Definition: HLXMonitor.cc:1468
timeval currentTime_
Definition: HLXMonitor.h:274
MonitorElement * LumiAvgOccSet1
Definition: HLXMonitor.h:104
std::string DistribIP1
Definition: HLXMonitor.h:229
MonitorElement * workingDir_
DQM "name" of the job (eg, Hcal or DT)
Definition: HLXMonitor.h:191
MonitorElement * AvgOccBetweenSet1
Definition: HLXMonitor.h:96
MonitorElement * RecentInstantLumiEtSum
Definition: HLXMonitor.h:160
MonitorElement * reportSummary_
Definition: HLXMonitor.h:199
MonitorElement * HistAvgOccBetweenSet2HFP
Definition: HLXMonitor.h:140
unsigned int set1AboveIndex
Definition: HLXMonitor.h:234
std::string EtXAxisTitle
Definition: HLXMonitor.h:250
MonitorElement * lumisecId_
Definition: HLXMonitor.h:175
unsigned int reconnTime
Definition: HLXMonitor.h:228
void SetupEventInfo(DQMStore::IBooker &)
Definition: HLXMonitor.cc:776
Definition: Run.h:45
unsigned int set1BetweenIndex
Definition: HLXMonitor.h:233
void FillHistoHFCompare(const LUMI_SECTION &)
Definition: HLXMonitor.cc:1362