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