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