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