CMS 3D CMS Logo

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