CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EBSummaryClient.cc
Go to the documentation of this file.
1 /*
2  * \file EBSummaryClient.cc
3  *
4  * $Date: 2010/08/11 15:01:44 $
5  * $Revision: 1.219 $
6  * \author G. Della Ricca
7  *
8 */
9 
10 #include <memory>
11 #include <iostream>
12 #include <fstream>
13 #include <iomanip>
14 
16 
18 
19 #ifdef WITH_ECAL_COND_DB
22 #endif
23 
26 
38 
40 
42 
43  // cloneME switch
44  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
45 
46  // verbose switch
47  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
48 
49  // debug switch
50  debug_ = ps.getUntrackedParameter<bool>("debug", false);
51 
52  // prefixME path
53  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
54 
55  // enableCleanup_ switch
56  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
57 
58  // vector of selected Super Modules (Defaults to all 36).
59  superModules_.reserve(36);
60  for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
61  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
62 
63  laserWavelengths_.reserve(4);
64  for ( unsigned int i = 1; i <= 4; i++ ) laserWavelengths_.push_back(i);
65  laserWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("laserWavelengths", laserWavelengths_);
66 
67  MGPAGains_.reserve(3);
68  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
69  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
70 
71  MGPAGainsPN_.reserve(2);
72  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
73  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
74 
75  // summary maps
76  meIntegrity_ = 0;
77  meIntegrityPN_ = 0;
78  meOccupancy_ = 0;
79  meOccupancyPN_ = 0;
80  meStatusFlags_ = 0;
85 
86  meLaserL1_ = 0;
87  meLaserL1PN_ = 0;
88  meLaserL1Ampl_ = 0;
89  meLaserL1Timing_ = 0;
91 
92  meLaserL2_ = 0;
93  meLaserL2PN_ = 0;
94  meLaserL2Ampl_ = 0;
95  meLaserL2Timing_ = 0;
97 
98  meLaserL3_ = 0;
99  meLaserL3PN_ = 0;
100  meLaserL3Ampl_ = 0;
101  meLaserL3Timing_ = 0;
103 
104  meLaserL4_ = 0;
105  meLaserL4PN_ = 0;
106  meLaserL4Ampl_ = 0;
107  meLaserL4Timing_ = 0;
109 
110  mePedestalG01_ = 0;
111  mePedestalG06_ = 0;
112  mePedestalG12_ = 0;
113  mePedestalPNG01_ = 0;
114  mePedestalPNG16_ = 0;
115  meTestPulseG01_ = 0;
116  meTestPulseG06_ = 0;
117  meTestPulseG12_ = 0;
118  meTestPulsePNG01_ = 0;
119  meTestPulsePNG16_ = 0;
123  meGlobalSummary_ = 0;
124 
125  meRecHitEnergy_ = 0;
126  meTiming_ = 0;
127  meTimingMean1D_ = 0;
128  meTimingRMS1D_ = 0;
129  meTimingMean_ = 0;
130  meTimingRMS_ = 0;
131  meTriggerTowerEt_ = 0;
135 
136  // summary errors
137  meIntegrityErr_ = 0;
138  meOccupancy1D_ = 0;
139  meStatusFlagsErr_ = 0;
141  meLaserL1Err_ = 0;
142  meLaserL1PNErr_ = 0;
143  meLaserL2Err_ = 0;
144  meLaserL2PNErr_ = 0;
145  meLaserL3Err_ = 0;
146  meLaserL3PNErr_ = 0;
147  meLaserL4Err_ = 0;
148  meLaserL4PNErr_ = 0;
149 
150  // additional histograms from tasks
151  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
152 
153  int ism = superModules_[i];
154 
155  hpot01_[ism-1] = 0;
156  httt01_[ism-1] = 0;
157  htmt01_[ism-1] = 0;
158 
159  }
160 
161  synchErrorThreshold_ = 0.0;
162 
163 }
164 
166 
167 }
168 
170 
172 
173  if ( debug_ ) std::cout << "EBSummaryClient: beginJob" << std::endl;
174 
175  ievt_ = 0;
176  jevt_ = 0;
177 
178 }
179 
181 
182  if ( debug_ ) std::cout << "EBSummaryClient: beginRun" << std::endl;
183 
184  jevt_ = 0;
185 
186  this->setup();
187 
188 }
189 
191 
192  if ( debug_ ) std::cout << "EBSummaryClient: endJob, ievt = " << ievt_ << std::endl;
193 
194  this->cleanup();
195 
196 }
197 
199 
200  if ( debug_ ) std::cout << "EBSummaryClient: endRun, jevt = " << jevt_ << std::endl;
201 
202  this->cleanup();
203 
204 }
205 
207 
208  char histo[200];
209 
210  dqmStore_->setCurrentFolder( prefixME_ + "/EBSummaryClient" );
211 
213  sprintf(histo, "EBIT integrity quality summary");
214  meIntegrity_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
215  meIntegrity_->setAxisTitle("jphi", 1);
216  meIntegrity_->setAxisTitle("jeta", 2);
217 
219  sprintf(histo, "EBIT integrity quality errors summary");
220  meIntegrityErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
221  for (int i = 0; i < 36; i++) {
222  meIntegrityErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
223  }
224 
226  sprintf(histo, "EBIT PN integrity quality summary");
227  meIntegrityPN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
228  meIntegrityPN_->setAxisTitle("jchannel", 1);
229  meIntegrityPN_->setAxisTitle("jpseudo-strip", 2);
230 
232  sprintf(histo, "EBOT digi occupancy summary");
233  meOccupancy_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
234  meOccupancy_->setAxisTitle("jphi", 1);
235  meOccupancy_->setAxisTitle("jeta", 2);
236 
238  sprintf(histo, "EBOT digi occupancy summary 1D");
239  meOccupancy1D_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
240  for (int i = 0; i < 36; i++) {
241  meOccupancy1D_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
242  }
243 
245  sprintf(histo, "EBOT PN digi occupancy summary");
246  meOccupancyPN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
247  meOccupancyPN_->setAxisTitle("jchannel", 1);
248  meOccupancyPN_->setAxisTitle("jpseudo-strip", 2);
249 
251  sprintf(histo, "EBSFT front-end status summary");
252  meStatusFlags_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
253  meStatusFlags_->setAxisTitle("jphi'", 1);
254  meStatusFlags_->setAxisTitle("jeta'", 2);
255 
257  sprintf(histo, "EBSFT front-end status errors summary");
258  meStatusFlagsErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
259  for (int i = 0; i < 36; i++) {
260  meStatusFlagsErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
261  }
262 
264  sprintf(histo, "EBPOT pedestal quality summary G12");
265  mePedestalOnline_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
266  mePedestalOnline_->setAxisTitle("jphi", 1);
267  mePedestalOnline_->setAxisTitle("jeta", 2);
268 
270  sprintf(histo, "EBPOT pedestal quality errors summary G12");
271  mePedestalOnlineErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
272  for (int i = 0; i < 36; i++) {
273  mePedestalOnlineErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
274  }
275 
277  sprintf(histo, "EBPOT pedestal G12 RMS map");
278  mePedestalOnlineRMSMap_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
281 
283  sprintf(histo, "EBPOT pedestal G12 mean");
284  mePedestalOnlineMean_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 150., 250.);
285  for (int i = 0; i < 36; i++) {
286  mePedestalOnlineMean_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
287  }
288 
290  sprintf(histo, "EBPOT pedestal G12 rms");
291  mePedestalOnlineRMS_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10.);
292  for (int i = 0; i < 36; i++) {
293  mePedestalOnlineRMS_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
294  }
295 
296  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
297 
299  sprintf(histo, "EBLT laser quality summary L1");
300  meLaserL1_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
301  meLaserL1_->setAxisTitle("jphi", 1);
302  meLaserL1_->setAxisTitle("jeta", 2);
303 
305  sprintf(histo, "EBLT laser quality errors summary L1");
306  meLaserL1Err_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
307  for (int i = 0; i < 36; i++) {
308  meLaserL1Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
309  }
310 
312  sprintf(histo, "EBLT PN laser quality summary L1");
313  meLaserL1PN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
314  meLaserL1PN_->setAxisTitle("jchannel", 1);
315  meLaserL1PN_->setAxisTitle("jpseudo-strip", 2);
316 
318  sprintf(histo, "EBLT PN laser quality errors summary L1");
319  meLaserL1PNErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
320  for (int i = 0; i < 36; i++) {
321  meLaserL1PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
322  }
323 
325  sprintf(histo, "EBLT laser L1 amplitude summary");
326  meLaserL1Ampl_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096., "s");
327  for (int i = 0; i < 36; i++) {
328  meLaserL1Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
329  }
330 
332  sprintf(histo, "EBLT laser L1 timing summary");
333  meLaserL1Timing_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10., "s");
334  for (int i = 0; i < 36; i++) {
335  meLaserL1Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
336  }
337 
339  sprintf(histo, "EBLT laser L1 amplitude over PN summary");
340  meLaserL1AmplOverPN_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
341  for (int i = 0; i < 36; i++) {
342  meLaserL1AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
343  }
344 
345  }
346 
347  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
348 
350  sprintf(histo, "EBLT laser quality summary L2");
351  meLaserL2_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
352  meLaserL2_->setAxisTitle("jphi", 1);
353  meLaserL2_->setAxisTitle("jeta", 2);
354 
356  sprintf(histo, "EBLT laser quality errors summary L2");
357  meLaserL2Err_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
358  for (int i = 0; i < 36; i++) {
359  meLaserL2Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
360  }
361 
363  sprintf(histo, "EBLT PN laser quality summary L2");
364  meLaserL2PN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
365  meLaserL2PN_->setAxisTitle("jchannel", 1);
366  meLaserL2PN_->setAxisTitle("jpseudo-strip", 2);
367 
369  sprintf(histo, "EBLT PN laser quality errors summary L2");
370  meLaserL2PNErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
371  for (int i = 0; i < 36; i++) {
372  meLaserL2PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
373  }
374 
376  sprintf(histo, "EBLT laser L2 amplitude summary");
377  meLaserL2Ampl_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096., "s");
378  for (int i = 0; i < 36; i++) {
379  meLaserL2Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
380  }
381 
383  sprintf(histo, "EBLT laser L2 timing summary");
384  meLaserL2Timing_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10., "s");
385  for (int i = 0; i < 36; i++) {
386  meLaserL2Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
387  }
388 
390  sprintf(histo, "EBLT laser L2 amplitude over PN summary");
391  meLaserL2AmplOverPN_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
392  for (int i = 0; i < 36; i++) {
393  meLaserL2AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
394  }
395 
396  }
397 
398  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
399 
401  sprintf(histo, "EBLT laser quality summary L3");
402  meLaserL3_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
403  meLaserL3_->setAxisTitle("jphi", 1);
404  meLaserL3_->setAxisTitle("jeta", 2);
405 
407  sprintf(histo, "EBLT laser quality errors summary L3");
408  meLaserL3Err_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
409  for (int i = 0; i < 36; i++) {
410  meLaserL3Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
411  }
412 
414  sprintf(histo, "EBLT PN laser quality summary L3");
415  meLaserL3PN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
416  meLaserL3PN_->setAxisTitle("jchannel", 1);
417  meLaserL3PN_->setAxisTitle("jpseudo-strip", 2);
418 
420  sprintf(histo, "EBLT PN laser quality errors summary L3");
421  meLaserL3PNErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
422  for (int i = 0; i < 36; i++) {
423  meLaserL3PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
424  }
425 
427  sprintf(histo, "EBLT laser L3 amplitude summary");
428  meLaserL3Ampl_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096., "s");
429  for (int i = 0; i < 36; i++) {
430  meLaserL3Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
431  }
432 
434  sprintf(histo, "EBLT laser L3 timing summary");
435  meLaserL3Timing_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10., "s");
436  for (int i = 0; i < 36; i++) {
437  meLaserL3Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
438  }
439 
441  sprintf(histo, "EBLT laser L3 amplitude over PN summary");
442  meLaserL3AmplOverPN_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
443  for (int i = 0; i < 36; i++) {
444  meLaserL3AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
445  }
446 
447  }
448 
449  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
450 
452  sprintf(histo, "EBLT laser quality summary L4");
453  meLaserL4_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
454  meLaserL4_->setAxisTitle("jphi", 1);
455  meLaserL4_->setAxisTitle("jeta", 2);
456 
458  sprintf(histo, "EBLT laser quality errors summary L4");
459  meLaserL4Err_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
460  for (int i = 0; i < 36; i++) {
461  meLaserL4Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
462  }
463 
465  sprintf(histo, "EBLT PN laser quality summary L4");
466  meLaserL4PN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
467  meLaserL4PN_->setAxisTitle("jchannel", 1);
468  meLaserL4PN_->setAxisTitle("jpseudo-strip", 2);
469 
471  sprintf(histo, "EBLT PN laser quality errors summary L4");
472  meLaserL4PNErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
473  for (int i = 0; i < 36; i++) {
474  meLaserL4PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
475  }
476 
478  sprintf(histo, "EBLT laser L4 amplitude summary");
479  meLaserL4Ampl_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096., "s");
480  for (int i = 0; i < 36; i++) {
481  meLaserL4Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
482  }
483 
485  sprintf(histo, "EBLT laser L4 timing summary");
486  meLaserL4Timing_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10., "s");
487  for (int i = 0; i < 36; i++) {
488  meLaserL4Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
489  }
490 
492  sprintf(histo, "EBLT laser L4 amplitude over PN summary");
493  meLaserL4AmplOverPN_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
494  for (int i = 0; i < 36; i++) {
495  meLaserL4AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
496  }
497 
498  }
499 
500  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
501 
503  sprintf(histo, "EBPT pedestal quality G01 summary");
504  mePedestalG01_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
505  mePedestalG01_->setAxisTitle("jphi", 1);
506  mePedestalG01_->setAxisTitle("jeta", 2);
507 
508  }
509 
510  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
511 
513  sprintf(histo, "EBPT pedestal quality G06 summary");
514  mePedestalG06_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
515  mePedestalG06_->setAxisTitle("jphi", 1);
516  mePedestalG06_->setAxisTitle("jeta", 2);
517 
518  }
519 
520  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
521 
523  sprintf(histo, "EBPT pedestal quality G12 summary");
524  mePedestalG12_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
525  mePedestalG12_->setAxisTitle("jphi", 1);
526  mePedestalG12_->setAxisTitle("jeta", 2);
527 
528  }
529 
530  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
531 
533  sprintf(histo, "EBPT PN pedestal quality G01 summary");
534  mePedestalPNG01_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10, 10.);
535  mePedestalPNG01_->setAxisTitle("jchannel", 1);
536  mePedestalPNG01_->setAxisTitle("jpseudo-strip", 2);
537 
538  }
539 
540  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
541 
543  sprintf(histo, "EBPT PN pedestal quality G16 summary");
544  mePedestalPNG16_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10, 10.);
545  mePedestalPNG16_->setAxisTitle("jchannel", 1);
546  mePedestalPNG16_->setAxisTitle("jpseudo-strip", 2);
547 
548  }
549 
550  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
551 
553  sprintf(histo, "EBTPT test pulse quality G01 summary");
554  meTestPulseG01_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
555  meTestPulseG01_->setAxisTitle("jphi", 1);
556  meTestPulseG01_->setAxisTitle("jeta", 2);
557 
558  }
559 
560  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
561 
563  sprintf(histo, "EBTPT test pulse quality G06 summary");
564  meTestPulseG06_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
565  meTestPulseG06_->setAxisTitle("jphi", 1);
566  meTestPulseG06_->setAxisTitle("jeta", 2);
567 
568  }
569 
570  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
571 
573  sprintf(histo, "EBTPT test pulse quality G12 summary");
574  meTestPulseG12_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
575  meTestPulseG12_->setAxisTitle("jphi", 1);
576  meTestPulseG12_->setAxisTitle("jeta", 2);
577 
578  }
579 
580  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
581 
583  sprintf(histo, "EBTPT PN test pulse quality G01 summary");
584  meTestPulsePNG01_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
585  meTestPulsePNG01_->setAxisTitle("jchannel", 1);
586  meTestPulsePNG01_->setAxisTitle("jpseudo-strip", 2);
587 
588  }
589 
590  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
591 
593  sprintf(histo, "EBTPT PN test pulse quality G16 summary");
594  meTestPulsePNG16_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
595  meTestPulsePNG16_->setAxisTitle("jchannel", 1);
596  meTestPulsePNG16_->setAxisTitle("jpseudo-strip", 2);
597 
598  }
599 
600  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
601 
603  sprintf(histo, "EBTPT test pulse amplitude G01 summary");
604  meTestPulseAmplG01_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
605  for (int i = 0; i < 36; i++) {
606  meTestPulseAmplG01_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
607  }
608 
609  }
610 
611  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
612 
614  sprintf(histo, "EBTPT test pulse amplitude G06 summary");
615  meTestPulseAmplG06_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
616  for (int i = 0; i < 36; i++) {
617  meTestPulseAmplG06_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
618  }
619 
620  }
621 
622  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
623 
625  sprintf(histo, "EBTPT test pulse amplitude G12 summary");
626  meTestPulseAmplG12_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
627  for (int i = 0; i < 36; i++) {
628  meTestPulseAmplG12_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
629  }
630 
631  }
632 
634  sprintf(histo, "EBOT energy summary");
635  meRecHitEnergy_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
636  meRecHitEnergy_->setAxisTitle("jphi", 1);
637  meRecHitEnergy_->setAxisTitle("jeta", 2);
638 
640  sprintf(histo, "EBTMT timing quality summary");
641  meTiming_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
642  meTiming_->setAxisTitle("jphi", 1);
643  meTiming_->setAxisTitle("jeta", 2);
644 
646  sprintf(histo, "EBTMT timing mean 1D summary");
647  meTimingMean1D_ = dqmStore_->book1D(histo, histo, 100, -50., 50.);
648  meTimingMean1D_->setAxisTitle("mean (ns)", 1);
649 
651  sprintf(histo, "EBTMT timing rms 1D summary");
652  meTimingRMS1D_ = dqmStore_->book1D(histo, histo, 100, 0.0, 150.0);
653  meTimingRMS1D_->setAxisTitle("rms (ns)", 1);
654 
656  sprintf(histo, "EBTMT timing mean");
657  meTimingMean_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, -50., 50.);
658  for (int i = 0; i < 36; i++) {
659  meTimingMean_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
660  }
661  meTimingMean_->setAxisTitle("mean (ns)", 2);
662 
664  sprintf(histo, "EBTMT timing rms");
665  meTimingRMS_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 150.);
666  for (int i = 0; i < 36; i++) {
667  meTimingRMS_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
668  }
669  meTimingRMS_->setAxisTitle("rms (ns)", 2);
670 
672  sprintf(histo, "EBTTT Et trigger tower summary");
673  meTriggerTowerEt_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
674  meTriggerTowerEt_->setAxisTitle("jphi'", 1);
675  meTriggerTowerEt_->setAxisTitle("jeta'", 2);
676 
678  sprintf(histo, "EBTTT emulator error quality summary");
679  meTriggerTowerEmulError_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
682 
684  sprintf(histo, "EBTTT Trigger Primitives Timing summary");
685  meTriggerTowerTiming_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
686  meTriggerTowerTiming_->setAxisTitle("jphi'", 1);
687  meTriggerTowerTiming_->setAxisTitle("jeta'", 2);
688  meTriggerTowerTiming_->setAxisTitle("TP data matching emulator", 3);
689 
691  sprintf(histo, "EBTTT Trigger Primitives Non Single Timing summary");
692  meTriggerTowerNonSingleTiming_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
696 
698  sprintf(histo, "EB global summary");
699  meGlobalSummary_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
700  meGlobalSummary_->setAxisTitle("jphi", 1);
701  meGlobalSummary_->setAxisTitle("jeta", 2);
702 
703 }
704 
706 
707  if ( ! enableCleanup_ ) return;
708 
709  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
710 
711  int ism = superModules_[i];
712 
713  if ( cloneME_ ) {
714  if ( hpot01_[ism-1] ) delete hpot01_[ism-1];
715  if ( httt01_[ism-1] ) delete httt01_[ism-1];
716  }
717 
718  hpot01_[ism-1] = 0;
719  httt01_[ism-1] = 0;
720 
721  }
722 
723  dqmStore_->setCurrentFolder( prefixME_ + "/EBSummaryClient" );
724 
726  meIntegrity_ = 0;
727 
729  meIntegrityErr_ = 0;
730 
732  meIntegrityPN_ = 0;
733 
735  meOccupancy_ = 0;
736 
738  meOccupancy1D_ = 0;
739 
741  meOccupancyPN_ = 0;
742 
744  meStatusFlags_ = 0;
745 
747  meStatusFlagsErr_ = 0;
748 
750  mePedestalOnline_ = 0;
751 
754 
757 
760 
763 
765  meLaserL1_ = 0;
766 
768  meLaserL1Err_ = 0;
769 
771  meLaserL1Ampl_ = 0;
772 
774  meLaserL1Timing_ = 0;
775 
778 
780  meLaserL1PN_ = 0;
781 
783  meLaserL1PNErr_ = 0;
784 
786  meLaserL2_ = 0;
787 
789  meLaserL2Err_ = 0;
790 
792  meLaserL2Ampl_ = 0;
793 
795  meLaserL2Timing_ = 0;
796 
799 
801  meLaserL2PN_ = 0;
802 
804  meLaserL2PNErr_ = 0;
805 
807  meLaserL3_ = 0;
808 
810  meLaserL3Err_ = 0;
811 
813  meLaserL3Ampl_ = 0;
814 
816  meLaserL3Timing_ = 0;
817 
820 
822  meLaserL3PN_ = 0;
823 
825  meLaserL3PNErr_ = 0;
826 
828  meLaserL4_ = 0;
829 
831  meLaserL4Err_ = 0;
832 
834  meLaserL4Ampl_ = 0;
835 
837  meLaserL4Timing_ = 0;
838 
841 
843  meLaserL4PN_ = 0;
844 
846  meLaserL4PNErr_ = 0;
847 
849  mePedestalG01_ = 0;
850 
852  mePedestalG06_ = 0;
853 
855  mePedestalG12_ = 0;
856 
858  meTestPulseG01_ = 0;
859 
861  meTestPulseG06_ = 0;
862 
864  meTestPulseG12_ = 0;
865 
867  meTestPulseG01_ = 0;
868 
871 
874 
877 
879  meRecHitEnergy_ = 0;
880 
882  meTiming_ = 0;
883 
885  meTimingMean1D_ = 0;
886 
888  meTimingRMS1D_ = 0;
889 
891  meTimingMean_ = 0;
892 
894  meTimingRMS_ = 0;
895 
897  meTriggerTowerEt_ = 0;
898 
901 
904 
907 
909  meGlobalSummary_ = 0;
910 
911 }
912 
913 #ifdef WITH_ECAL_COND_DB
914 bool EBSummaryClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
915 
916  status = true;
917 
918  return true;
919 
920 }
921 #endif
922 
924 
925  ievt_++;
926  jevt_++;
927  if ( ievt_ % 10 == 0 ) {
928  if ( debug_ ) std::cout << "EBSummaryClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
929  }
930 
931  for ( int iex = 1; iex <= 170; iex++ ) {
932  for ( int ipx = 1; ipx <= 360; ipx++ ) {
933 
934  if ( meIntegrity_ ) meIntegrity_->setBinContent( ipx, iex, 6. );
935  if ( meOccupancy_ ) meOccupancy_->setBinContent( ipx, iex, 0. );
936  if ( meStatusFlags_ ) meStatusFlags_->setBinContent( ipx, iex, 6. );
937  if ( mePedestalOnline_ ) mePedestalOnline_->setBinContent( ipx, iex, 6. );
939  if ( meLaserL1_ ) meLaserL1_->setBinContent( ipx, iex, 6. );
940  if ( meLaserL2_ ) meLaserL2_->setBinContent( ipx, iex, 6. );
941  if ( meLaserL3_ ) meLaserL3_->setBinContent( ipx, iex, 6. );
942  if ( meLaserL4_ ) meLaserL4_->setBinContent( ipx, iex, 6. );
943  if ( mePedestalG01_ ) mePedestalG01_->setBinContent( ipx, iex, 6. );
944  if ( mePedestalG06_ ) mePedestalG06_->setBinContent( ipx, iex, 6. );
945  if ( mePedestalG12_ ) mePedestalG12_->setBinContent( ipx, iex, 6. );
946  if ( meTestPulseG01_ ) meTestPulseG01_->setBinContent( ipx, iex, 6. );
947  if ( meTestPulseG06_ ) meTestPulseG06_->setBinContent( ipx, iex, 6. );
948  if ( meTestPulseG12_ ) meTestPulseG12_->setBinContent( ipx, iex, 6. );
949 
950  if ( meRecHitEnergy_ ) meRecHitEnergy_->setBinContent( ipx, iex, 0. );
951  if ( meTiming_ ) meTiming_->setBinContent( ipx, iex, 6. );
952 
953  if ( meGlobalSummary_ ) meGlobalSummary_->setBinContent( ipx, iex, 6. );
954 
955  }
956  }
957 
958  for ( int iex = 1; iex <= 20; iex++ ) {
959  for ( int ipx = 1; ipx <= 90; ipx++ ) {
960 
961  if ( meIntegrityPN_ ) meIntegrityPN_->setBinContent( ipx, iex, 6. );
962  if ( meOccupancyPN_ ) meOccupancyPN_->setBinContent( ipx, iex, 0. );
963  if ( meLaserL1PN_ ) meLaserL1PN_->setBinContent( ipx, iex, 6. );
964  if ( meLaserL2PN_ ) meLaserL2PN_->setBinContent( ipx, iex, 6. );
965  if ( meLaserL3PN_ ) meLaserL3PN_->setBinContent( ipx, iex, 6. );
966  if ( meLaserL4PN_ ) meLaserL4PN_->setBinContent( ipx, iex, 6. );
967  if ( mePedestalPNG01_ ) mePedestalPNG01_->setBinContent( ipx, iex, 6. );
968  if ( mePedestalPNG16_ ) mePedestalPNG16_->setBinContent( ipx, iex, 6. );
969  if ( meTestPulsePNG01_ ) meTestPulsePNG01_->setBinContent( ipx, iex, 6. );
970  if ( meTestPulsePNG16_ ) meTestPulsePNG16_->setBinContent( ipx, iex, 6. );
971 
972  }
973  }
974 
975  for ( int iex = 1; iex <= 34; iex++ ) {
976  for ( int ipx = 1; ipx <= 72; ipx++ ) {
977  if ( meTriggerTowerEt_ ) meTriggerTowerEt_->setBinContent( ipx, iex, 0. );
981  }
982  }
983 
984  if ( meIntegrity_ ) meIntegrity_->setEntries( 0 );
987  if ( meOccupancy_ ) meOccupancy_->setEntries( 0 );
997 
998  if ( meLaserL1_ ) meLaserL1_->setEntries( 0 );
1003  if ( meLaserL1PN_ ) meLaserL1PN_->setEntries( 0 );
1005 
1006  if ( meLaserL2_ ) meLaserL2_->setEntries( 0 );
1007  if ( meLaserL2Err_ ) meLaserL2Err_->Reset();
1011  if ( meLaserL2PN_ ) meLaserL2PN_->setEntries( 0 );
1013 
1014  if ( meLaserL3_ ) meLaserL3_->setEntries( 0 );
1015  if ( meLaserL3Err_ ) meLaserL3Err_->Reset();
1019  if ( meLaserL3PN_ ) meLaserL3PN_->setEntries( 0 );
1021 
1022  if ( meLaserL4_ ) meLaserL4_->setEntries( 0 );
1023  if ( meLaserL4Err_ ) meLaserL4Err_->Reset();
1027  if ( meLaserL4PN_ ) meLaserL4PN_->setEntries( 0 );
1029 
1043 
1045  if ( meTiming_ ) meTiming_->setEntries( 0 );
1048  if ( meTimingMean_ ) meTimingMean_->Reset();
1049  if ( meTimingRMS_ ) meTimingRMS_->Reset();
1054 
1056 
1057  for ( unsigned int i=0; i<clients_.size(); i++ ) {
1058 
1059  EBIntegrityClient* ebic = dynamic_cast<EBIntegrityClient*>(clients_[i]);
1060  EBStatusFlagsClient* ebsfc = dynamic_cast<EBStatusFlagsClient*>(clients_[i]);
1061  EBPedestalOnlineClient* ebpoc = dynamic_cast<EBPedestalOnlineClient*>(clients_[i]);
1062 
1063  EBLaserClient* eblc = dynamic_cast<EBLaserClient*>(clients_[i]);
1064  EBPedestalClient* ebpc = dynamic_cast<EBPedestalClient*>(clients_[i]);
1065  EBTestPulseClient* ebtpc = dynamic_cast<EBTestPulseClient*>(clients_[i]);
1066 
1067  EBTimingClient* ebtmc = dynamic_cast<EBTimingClient*>(clients_[i]);
1068  EBTriggerTowerClient* ebtttc = dynamic_cast<EBTriggerTowerClient*>(clients_[i]);
1069 
1070  MonitorElement *me;
1071  MonitorElement *me_01, *me_02, *me_03;
1072  MonitorElement *me_04, *me_05;
1073  // MonitorElement *me_f[6], *me_fg[2];
1074  TH2F* h2;
1075  TH2F* h3;
1076 
1077  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
1078 
1079  int ism = superModules_[i];
1080 
1081  char histo[200];
1082 
1083  sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit energy %s").c_str(), Numbers::sEB(ism).c_str());
1084  me = dqmStore_->get(histo);
1085  hot01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hot01_[ism-1] );
1086 
1087  sprintf(histo, (prefixME_ + "/EBPedestalOnlineTask/Gain12/EBPOT pedestal %s G12").c_str(), Numbers::sEB(ism).c_str());
1088  me = dqmStore_->get(histo);
1089  hpot01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hpot01_[ism-1] );
1090 
1091  sprintf(histo, (prefixME_ + "/EBTriggerTowerTask/EBTTT Et map Real Digis %s").c_str(), Numbers::sEB(ism).c_str());
1092  me = dqmStore_->get(histo);
1093  httt01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, httt01_[ism-1] );
1094 
1095  sprintf(histo, (prefixME_ + "/EBTimingTask/EBTMT timing %s").c_str(), Numbers::sEB(ism).c_str());
1096  me = dqmStore_->get(histo);
1097  htmt01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, htmt01_[ism-1] );
1098 
1099  sprintf(histo, (prefixME_ + "/EcalInfo/EBMM DCC").c_str());
1100  me = dqmStore_->get(histo);
1101  norm01_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, norm01_ );
1102 
1103  sprintf(histo, (prefixME_ + "/EBRawDataTask/EBRDT L1A FE errors").c_str());
1104  me = dqmStore_->get(histo);
1105  synch01_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, synch01_ );
1106 
1107  for ( int ie = 1; ie <= 85; ie++ ) {
1108  for ( int ip = 1; ip <= 20; ip++ ) {
1109 
1110  if ( ebic ) {
1111 
1112  me = ebic->meg01_[ism-1];
1113 
1114  if ( me ) {
1115 
1116  float xval = me->getBinContent( ie, ip );
1117 
1118  int iex;
1119  int ipx;
1120 
1121  if ( ism <= 18 ) {
1122  iex = 1+(85-ie);
1123  ipx = ip+20*(ism-1);
1124  } else {
1125  iex = 85+ie;
1126  ipx = 1+(20-ip)+20*(ism-19);
1127  }
1128 
1129  meIntegrity_->setBinContent( ipx, iex, xval );
1130  if( xval == 0 ) meIntegrityErr_->Fill( ism );
1131 
1132  }
1133 
1134  h2 = ebic->h_[ism-1];
1135 
1136  if ( h2 ) {
1137 
1138  float xval = h2->GetBinContent( ie, ip );
1139 
1140  int iex;
1141  int ipx;
1142 
1143  if ( ism <= 18 ) {
1144  iex = 1+(85-ie);
1145  ipx = ip+20*(ism-1);
1146  } else {
1147  iex = 85+ie;
1148  ipx = 1+(20-ip)+20*(ism-19);
1149  }
1150 
1151  meOccupancy_->setBinContent( ipx, iex, xval );
1152  if ( xval != 0 ) meOccupancy1D_->Fill( ism, xval );
1153 
1154  }
1155 
1156  }
1157 
1158  if ( ebpoc ) {
1159 
1160  me = ebpoc->meg03_[ism-1];
1161 
1162  if ( me ) {
1163 
1164  int iex;
1165  int ipx;
1166 
1167  if ( ism <= 18 ) {
1168  iex = 1+(85-ie);
1169  ipx = ip+20*(ism-1);
1170  } else {
1171  iex = 85+ie;
1172  ipx = 1+(20-ip)+20*(ism-19);
1173  }
1174 
1175  float xval = me->getBinContent( ie, ip );
1176 
1177  mePedestalOnline_->setBinContent( ipx, iex, xval );
1178  if ( xval == 0 ) mePedestalOnlineErr_->Fill( ism );
1179 
1180  }
1181 
1182  float num01, mean01, rms01;
1183  bool update01 = UtilsClient::getBinStatistics(hpot01_[ism-1], ie, ip, num01, mean01, rms01);
1184 
1185  if ( update01 ) {
1186 
1187  int iex;
1188  int ipx;
1189 
1190  if ( ism <= 18 ) {
1191  iex = 1+(85-ie);
1192  ipx = ip+20*(ism-1);
1193  } else {
1194  iex = 85+ie;
1195  ipx = 1+(20-ip)+20*(ism-19);
1196  }
1197 
1198  mePedestalOnlineRMSMap_->setBinContent( ipx, iex, rms01 );
1199 
1200  mePedestalOnlineRMS_->Fill( ism, rms01 );
1201 
1202  mePedestalOnlineMean_->Fill( ism, mean01 );
1203 
1204  }
1205 
1206  }
1207 
1208  if ( eblc ) {
1209 
1210  int iex;
1211  int ipx;
1212 
1213  if ( ism <= 18 ) {
1214  iex = 1+(85-ie);
1215  ipx = ip+20*(ism-1);
1216  } else {
1217  iex = 85+ie;
1218  ipx = 1+(20-ip)+20*(ism-19);
1219  }
1220 
1221  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1222 
1223  me = eblc->meg01_[ism-1];
1224 
1225  if ( me ) {
1226 
1227  float xval = me->getBinContent( ie, ip );
1228 
1229  if ( me->getEntries() != 0 ) {
1230  meLaserL1_->setBinContent( ipx, iex, xval );
1231  if ( xval == 0 ) meLaserL1Err_->Fill( ism );
1232  }
1233 
1234  }
1235 
1236  }
1237 
1238  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1239 
1240  me = eblc->meg02_[ism-1];
1241 
1242  if ( me ) {
1243 
1244  float xval = me->getBinContent( ie, ip );
1245 
1246  if ( me->getEntries() != 0 ) {
1247  meLaserL2_->setBinContent( ipx, iex, xval );
1248  if ( xval == 0 ) meLaserL2Err_->Fill( ism );
1249  }
1250 
1251  }
1252 
1253  }
1254 
1255  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1256 
1257  me = eblc->meg03_[ism-1];
1258 
1259  if ( me ) {
1260 
1261  float xval = me->getBinContent( ie, ip );
1262 
1263  if ( me->getEntries() != 0 ) {
1264  meLaserL3_->setBinContent( ipx, iex, xval );
1265  if ( xval == 0 ) meLaserL3Err_->Fill( ism );
1266  }
1267 
1268  }
1269 
1270  }
1271 
1272  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1273 
1274  me = eblc->meg04_[ism-1];
1275 
1276  if ( me ) {
1277 
1278  float xval = me->getBinContent( ie, ip );
1279 
1280  if ( me->getEntries() != 0 ) {
1281  meLaserL4_->setBinContent( ipx, iex, xval );
1282  if ( xval == 0 ) meLaserL4Err_->Fill( ism );
1283  }
1284 
1285  }
1286 
1287  }
1288 
1289  }
1290 
1291  if ( ebpc ) {
1292 
1293  me_01 = ebpc->meg01_[ism-1];
1294  me_02 = ebpc->meg02_[ism-1];
1295  me_03 = ebpc->meg03_[ism-1];
1296 
1297  int iex;
1298  int ipx;
1299 
1300  if ( ism <= 18 ) {
1301  iex = 1+(85-ie);
1302  ipx = ip+20*(ism-1);
1303  } else {
1304  iex = 85+ie;
1305  ipx = 1+(20-ip)+20*(ism-19);
1306  }
1307 
1308  if ( me_01 ) {
1309  float val_01=me_01->getBinContent(ie,ip);
1310  if ( me_01->getEntries() != 0 ) mePedestalG01_->setBinContent( ipx, iex, val_01 );
1311  }
1312  if ( me_02 ) {
1313  float val_02=me_02->getBinContent(ie,ip);
1314  if ( me_02->getEntries() != 0 ) mePedestalG06_->setBinContent( ipx, iex, val_02 );
1315  }
1316  if ( me_03 ) {
1317  float val_03=me_03->getBinContent(ie,ip);
1318  if ( me_03->getEntries() != 0 ) mePedestalG12_->setBinContent( ipx, iex, val_03 );
1319  }
1320 
1321  }
1322 
1323  if ( ebtpc ) {
1324 
1325  me_01 = ebtpc->meg01_[ism-1];
1326  me_02 = ebtpc->meg02_[ism-1];
1327  me_03 = ebtpc->meg03_[ism-1];
1328 
1329  int iex;
1330  int ipx;
1331 
1332  if ( ism <= 18 ) {
1333  iex = 1+(85-ie);
1334  ipx = ip+20*(ism-1);
1335  } else {
1336  iex = 85+ie;
1337  ipx = 1+(20-ip)+20*(ism-19);
1338  }
1339 
1340  if ( me_01 ) {
1341 
1342  float val_01=me_01->getBinContent(ie,ip);
1343 
1344  if ( me_01->getEntries() != 0 ) meTestPulseG01_->setBinContent( ipx, iex, val_01 );
1345 
1346  }
1347  if ( me_02 ) {
1348 
1349  float val_02=me_02->getBinContent(ie,ip);
1350 
1351  if ( me_02->getEntries() != 0 ) meTestPulseG06_->setBinContent( ipx, iex, val_02 );
1352 
1353  }
1354  if ( me_03 ) {
1355 
1356  float val_03=me_03->getBinContent(ie,ip);
1357 
1358  if ( me_03->getEntries() != 0 ) meTestPulseG12_->setBinContent( ipx, iex, val_03 );
1359 
1360  }
1361 
1362 
1363  }
1364 
1365  if ( hot01_[ism-1] ) {
1366 
1367  float xval = hot01_[ism-1]->GetBinContent( ie, ip );
1368 
1369  int iex;
1370  int ipx;
1371 
1372  if ( ism <= 18 ) {
1373  iex = 1+(85-ie);
1374  ipx = ip+20*(ism-1);
1375  } else {
1376  iex = 85+ie;
1377  ipx = 1+(20-ip)+20*(ism-19);
1378  }
1379 
1380  meRecHitEnergy_->setBinContent( ipx, iex, xval );
1381 
1382  }
1383 
1384  if ( ebtmc ) {
1385 
1386  me = ebtmc->meg01_[ism-1];
1387 
1388  if ( me ) {
1389 
1390  float xval = me->getBinContent( ie, ip );
1391 
1392  int iex;
1393  int ipx;
1394 
1395  if ( ism <= 18 ) {
1396  iex = 1+(85-ie);
1397  ipx = ip+20*(ism-1);
1398  } else {
1399  iex = 85+ie;
1400  ipx = 1+(20-ip)+20*(ism-19);
1401  }
1402 
1403  meTiming_->setBinContent( ipx, iex, xval );
1404 
1405  }
1406 
1407 
1408  float num02, mean02, rms02;
1409  bool update02 = UtilsClient::getBinStatistics(htmt01_[ism-1], ie, ip, num02, mean02, rms02);
1410  // Task timing map is shifted of +50 ns for graphical reasons. Shift back it.
1411  mean02 -= 50.;
1412 
1413  if ( update02 ) {
1414 
1415  meTimingMean1D_->Fill(mean02);
1416 
1417  meTimingRMS1D_->Fill(rms02);
1418 
1419  meTimingMean_->Fill( ism, mean02 );
1420 
1421  meTimingRMS_->Fill( ism, rms02 );
1422 
1423  }
1424 
1425  }
1426 
1427  }
1428  }
1429 
1430  for (int ie = 1; ie <= 17; ie++ ) {
1431  for (int ip = 1; ip <= 4; ip++ ) {
1432 
1433  int iex;
1434  int ipx;
1435 
1436  if ( ism <= 18 ) {
1437  iex = 1+(17-ie);
1438  ipx = ip+4*(ism-1);
1439  } else {
1440  iex = 17+ie;
1441  ipx = 1+(4-ip)+4*(ism-19);
1442  }
1443 
1444  if ( ebsfc ) {
1445 
1446  me = dqmStore_->get(prefixME_ + "/EcalInfo/EBMM DCC");
1447 
1448  float xval = 6;
1449 
1450  if ( me ) {
1451 
1452  xval = 2;
1453  if ( me->getBinContent( ism ) > 0 ) xval = 1;
1454 
1455  }
1456 
1457  me = ebsfc->meh01_[ism-1];
1458 
1459  if ( me ) {
1460 
1461  if ( me->getBinContent( ie, ip ) > 0 ) xval = 0;
1462 
1463  meStatusFlags_->setBinContent( ipx, iex, xval );
1464 
1465  if ( me->getBinError( ie, ip ) > 0 && me->getBinError( ie, ip ) < 0.1 ) UtilsClient::maskBinContent( meStatusFlags_, ipx, iex );
1466 
1467  if ( xval == 0 ) meStatusFlagsErr_->Fill( ism );
1468 
1469  }
1470 
1471  }
1472 
1473  if ( ebtttc ) {
1474 
1475  float mean01 = 0;
1476  bool hadNonZeroInterest = false;
1477 
1478  if ( httt01_[ism-1] ) {
1479 
1480  mean01 = httt01_[ism-1]->GetBinContent( ie, ip );
1481 
1482  if ( mean01 != 0. ) {
1483  if ( meTriggerTowerEt_ ) meTriggerTowerEt_->setBinContent( ipx, iex, mean01 );
1484  }
1485 
1486  }
1487 
1488  me = ebtttc->me_o01_[ism-1];
1489 
1490  if ( me ) {
1491 
1492  float xval = me->getBinContent( ie, ip );
1493 
1494  if ( xval != 0. ) {
1495  meTriggerTowerTiming_->setBinContent( ipx, iex, xval );
1496  hadNonZeroInterest = true;
1497  }
1498 
1499  }
1500 
1501  me = ebtttc->me_o02_[ism-1];
1502 
1503  if ( me ) {
1504 
1505  float xval = me->getBinContent( ie, ip );
1506 
1507  if ( xval != 0. ) {
1508  meTriggerTowerNonSingleTiming_->setBinContent( ipx, iex, xval );
1509  }
1510 
1511  }
1512 
1513  float xval = 2;
1514  if( mean01 > 0. ) {
1515 
1516  h2 = ebtttc->l01_[ism-1];
1517  h3 = ebtttc->l02_[ism-1];
1518 
1519  if ( h2 && h3 ) {
1520 
1521  // float emulErrorVal = h2->GetBinContent( ie, ip ) + h3->GetBinContent( ie, ip );
1522  float emulErrorVal = h2->GetBinContent( ie, ip );
1523 
1524  if( emulErrorVal!=0 && hadNonZeroInterest ) xval = 0;
1525 
1526  }
1527 
1528  if ( xval!=0 && hadNonZeroInterest ) xval = 1;
1529 
1530  }
1531 
1532  meTriggerTowerEmulError_->setBinContent( ipx, iex, xval );
1533 
1534  }
1535 
1536  }
1537  }
1538 
1539  // PN's summaries
1540  for( int i = 1; i <= 10; i++ ) {
1541  for( int j = 1; j <= 5; j++ ) {
1542 
1543  int ichanx;
1544  int ipseudostripx;
1545 
1546  if(ism<=18) {
1547  ichanx = i;
1548  ipseudostripx = j+5*(ism-1);
1549  } else {
1550  ichanx = i+10;
1551  ipseudostripx = j+5*(ism-19);
1552  }
1553 
1554  if ( ebic ) {
1555 
1556  me_04 = ebic->meg02_[ism-1];
1557  h2 = ebic->hmem_[ism-1];
1558 
1559  if( me_04 ) {
1560 
1561  float xval = me_04->getBinContent(i,j);
1562  meIntegrityPN_->setBinContent( ipseudostripx, ichanx, xval );
1563 
1564  }
1565 
1566  if ( h2 ) {
1567 
1568  float xval = h2->GetBinContent(i,1);
1569  meOccupancyPN_->setBinContent( ipseudostripx, ichanx, xval );
1570 
1571  }
1572 
1573  }
1574 
1575  if ( ebpc ) {
1576 
1577  me_04 = ebpc->meg04_[ism-1];
1578  me_05 = ebpc->meg05_[ism-1];
1579 
1580  if( me_04 ) {
1581  float val_04=me_04->getBinContent(i,1);
1582  mePedestalPNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
1583  }
1584  if( me_05 ) {
1585  float val_05=me_05->getBinContent(i,1);
1586  mePedestalPNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
1587  }
1588 
1589  }
1590 
1591  if ( ebtpc ) {
1592 
1593  me_04 = ebtpc->meg04_[ism-1];
1594  me_05 = ebtpc->meg05_[ism-1];
1595 
1596  if( me_04 ) {
1597  float val_04=me_04->getBinContent(i,1);
1598  meTestPulsePNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
1599  }
1600  if( me_05 ) {
1601  float val_05=me_05->getBinContent(i,1);
1602  meTestPulsePNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
1603  }
1604 
1605  }
1606 
1607  if ( eblc ) {
1608 
1609  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1610 
1611  me = eblc->meg09_[ism-1];
1612 
1613  if( me ) {
1614 
1615  float xval = me->getBinContent(i,1);
1616 
1617  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
1618  meLaserL1PN_->setBinContent( ipseudostripx, ichanx, xval );
1619  if ( xval == 0 ) meLaserL1PNErr_->Fill( ism );
1620  }
1621 
1622  }
1623 
1624  }
1625 
1626  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1627 
1628  me = eblc->meg10_[ism-1];
1629 
1630  if( me ) {
1631 
1632  float xval = me->getBinContent(i,1);
1633 
1634  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
1635  meLaserL2PN_->setBinContent( ipseudostripx, ichanx, xval );
1636  if ( xval == 0 ) meLaserL2PNErr_->Fill( ism );
1637  }
1638 
1639  }
1640 
1641  }
1642 
1643  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1644 
1645  me = eblc->meg11_[ism-1];
1646 
1647  if( me ) {
1648 
1649  float xval = me->getBinContent(i,1);
1650 
1651  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
1652  meLaserL3PN_->setBinContent( ipseudostripx, ichanx, xval );
1653  if ( xval == 0 ) meLaserL3PNErr_->Fill( ism );
1654  }
1655 
1656  }
1657 
1658  }
1659 
1660  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1661 
1662  me = eblc->meg12_[ism-1];
1663 
1664  if( me ) {
1665 
1666  float xval = me->getBinContent(i,1);
1667 
1668  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
1669  meLaserL4PN_->setBinContent( ipseudostripx, ichanx, xval );
1670  if ( xval == 0 ) meLaserL4PNErr_->Fill( ism );
1671  }
1672 
1673  }
1674 
1675  }
1676 
1677  }
1678 
1679  }
1680  }
1681 
1682  for(int chan=0; chan<1700; chan++) {
1683 
1684  int ie = (chan)/20 + 1;
1685  int ip = (chan)%20 + 1;
1686 
1687  // laser 1D summaries
1688  if ( eblc ) {
1689 
1690  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1691 
1692  MonitorElement *meg = eblc->meg01_[ism-1];
1693 
1694  float xval = 2;
1695  if ( meg ) xval = meg->getBinContent( ie, ip );
1696 
1697  // exclude channels without laser data (yellow in the quality map)
1698  if( xval != 2 && xval != 5 ) {
1699 
1700  MonitorElement* mea01 = eblc->mea01_[ism-1];
1701  MonitorElement* met01 = eblc->met01_[ism-1];
1702  MonitorElement* meaopn01 = eblc->meaopn01_[ism-1];
1703 
1704  if( mea01 && met01 && meaopn01 ) {
1705  meLaserL1Ampl_->Fill( ism, mea01->getBinContent( chan+1 ) );
1706  if( met01->getBinContent( chan+1 ) > 0. ) meLaserL1Timing_->Fill( ism, met01->getBinContent( chan+1 ) );
1707  meLaserL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( chan+1 ) );
1708  }
1709 
1710  }
1711 
1712  }
1713 
1714  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1715 
1716  MonitorElement *meg = eblc->meg02_[ism-1];
1717 
1718  float xval = 2;
1719  if ( meg ) xval = meg->getBinContent( ie, ip );
1720 
1721  // exclude channels without laser data (yellow in the quality map)
1722  if( xval != 2 && xval != 5 ) {
1723 
1724  MonitorElement* mea02 = eblc->mea02_[ism-1];
1725  MonitorElement* met02 = eblc->met02_[ism-1];
1726  MonitorElement* meaopn02 = eblc->meaopn02_[ism-1];
1727 
1728  if( mea02 && met02 && meaopn02 ) {
1729  meLaserL2Ampl_->Fill( ism, mea02->getBinContent( chan+1 ) );
1730  if( met02->getBinContent( chan+1 ) > 0. ) meLaserL2Timing_->Fill( ism, met02->getBinContent( chan+1 ) );
1731  meLaserL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( chan+1 ) );
1732  }
1733 
1734  }
1735 
1736  }
1737 
1738  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1739 
1740  MonitorElement *meg = eblc->meg03_[ism-1];
1741 
1742  float xval = 2;
1743  if ( meg ) xval = meg->getBinContent( ie, ip );
1744 
1745  // exclude channels without laser data (yellow in the quality map)
1746  if( xval != 2 && xval != 5 ) {
1747 
1748  MonitorElement* mea03 = eblc->mea03_[ism-1];
1749  MonitorElement* met03 = eblc->met03_[ism-1];
1750  MonitorElement* meaopn03 = eblc->meaopn03_[ism-1];
1751 
1752  if( mea03 && met03 && meaopn03 ) {
1753  meLaserL3Ampl_->Fill( ism, mea03->getBinContent( chan+1 ) );
1754  if( met03->getBinContent( chan+1 ) > 0. ) meLaserL3Timing_->Fill( ism, met03->getBinContent( chan+1 ) );
1755  meLaserL3AmplOverPN_->Fill( ism, meaopn03->getBinContent( chan+1 ) );
1756  }
1757 
1758  }
1759 
1760  }
1761 
1762  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1763 
1764  MonitorElement *meg = eblc->meg04_[ism-1];
1765 
1766  float xval = 2;
1767  if ( meg ) xval = meg->getBinContent( ie, ip );
1768 
1769  // exclude channels without laser data (yellow in the quality map)
1770  if( xval != 2 && xval != 5 ) {
1771 
1772  MonitorElement* mea04 = eblc->mea04_[ism-1];
1773  MonitorElement* met04 = eblc->met04_[ism-1];
1774  MonitorElement* meaopn04 = eblc->meaopn04_[ism-1];
1775 
1776  if( mea04 && met04 && meaopn04 ) {
1777  meLaserL4Ampl_->Fill( ism, mea04->getBinContent( chan+1 ) );
1778  if( met04->getBinContent( chan+1 ) > 0. ) meLaserL4Timing_->Fill( ism, met04->getBinContent( chan+1 ) );
1779  meLaserL4AmplOverPN_->Fill( ism, meaopn04->getBinContent( chan+1 ) );
1780  }
1781 
1782  }
1783 
1784  }
1785 
1786  }
1787 
1788  if ( ebtpc ) {
1789 
1790  MonitorElement *meg01 = ebtpc->meg01_[ism-1];
1791  MonitorElement *meg02 = ebtpc->meg02_[ism-1];
1792  MonitorElement *meg03 = ebtpc->meg03_[ism-1];
1793 
1794  if ( meg01 ) {
1795 
1796  float xval01 = meg01->getBinContent(ie,ip);
1797 
1798  if ( xval01 != 2 && xval01 != 5 ) {
1799 
1800  me = ebtpc->mea01_[ism-1];
1801 
1802  if ( me ) {
1803 
1804  meTestPulseAmplG01_->Fill( ism, me->getBinContent( chan+1 ) );
1805 
1806  }
1807 
1808  }
1809 
1810  }
1811 
1812  if ( meg02 ) {
1813 
1814  float xval02 = meg02->getBinContent(ie,ip);
1815 
1816  if ( xval02 != 2 && xval02 != 5 ) {
1817 
1818  me = ebtpc->mea02_[ism-1];
1819 
1820  if ( me ) {
1821 
1822  meTestPulseAmplG06_->Fill( ism, me->getBinContent( chan+1 ) );
1823 
1824  }
1825 
1826  }
1827 
1828  }
1829 
1830  if ( meg03 ) {
1831 
1832  float xval03 = meg03->getBinContent(ie,ip);
1833 
1834  if ( xval03 != 2 && xval03 != 5 ) {
1835 
1836  me = ebtpc->mea03_[ism-1];
1837 
1838  if ( me ) {
1839 
1840  meTestPulseAmplG12_->Fill( ism, me->getBinContent( chan+1 ) );
1841 
1842  }
1843 
1844  }
1845 
1846  }
1847 
1848  }
1849 
1850  } // loop on channels
1851 
1852  } // loop on SM
1853 
1854  } // loop on clients
1855 
1856  // The global-summary
1857  int nGlobalErrors = 0;
1858  int nGlobalErrorsEB[36];
1859  int nValidChannels = 0;
1860  int nValidChannelsEB[36];
1861 
1862  for (int i = 0; i < 36; i++) {
1863  nGlobalErrorsEB[i] = 0;
1864  nValidChannelsEB[i] = 0;
1865  }
1866 
1867  for ( int iex = 1; iex <= 170; iex++ ) {
1868  for ( int ipx = 1; ipx <= 360; ipx++ ) {
1869 
1871 
1872  int ism = (ipx-1)/20 + 1 ;
1873  if ( iex>85 ) ism+=18;
1874 
1875  float xval = 6;
1876  float val_in = meIntegrity_->getBinContent(ipx,iex);
1877  float val_po = mePedestalOnline_->getBinContent(ipx,iex);
1878  float val_tm = meTiming_->getBinContent(ipx,iex);
1879  float val_sf = meStatusFlags_->getBinContent((ipx-1)/5+1,(iex-1)/5+1);
1880  // float val_ee = meTriggerTowerEmulError_->getBinContent((ipx-1)/5+1,(iex-1)/5+1); // removed from the global summary temporarily
1881  float val_ee = 1;
1882 
1883  // combine all the available wavelenghts in unique laser status
1884  // for each laser turn dark color and yellow into bright green
1885  float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
1886  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1887  if ( meLaserL1_ ) val_ls_1 = meLaserL1_->getBinContent(ipx,iex);
1888  if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
1889  }
1890  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1891  if ( meLaserL2_ ) val_ls_2 = meLaserL2_->getBinContent(ipx,iex);
1892  if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
1893  }
1894  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1895  if ( meLaserL3_ ) val_ls_3 = meLaserL3_->getBinContent(ipx,iex);
1896  if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
1897  }
1898  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1899  if ( meLaserL4_ ) val_ls_4 = meLaserL4_->getBinContent(ipx,iex);
1900  if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
1901  }
1902 
1903  float val_ls = 1;
1904  if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
1905 
1906  // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY UNTIL LHC COLLISIONS
1907  val_ls = 1;
1908 
1909  // turn each dark color (masked channel) to bright green
1910  // for laser & timing & trigger turn also yellow into bright green
1911  // for pedestal online too because is not computed in calibration events
1912 
1913  // 0/3 = red/dark red
1914  // 1/4 = green/dark green
1915  // 2/5 = yellow/dark yellow
1916  // 6 = unknown
1917 
1918  if( val_in==3 || val_in==4 || val_in==5) val_in=1;
1919  if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
1920  if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
1921  if( val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
1922  if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
1923 
1924  if(val_in==6) xval=6;
1925  else if(val_in==0) xval=0;
1926  else if(val_po==0 || val_ls==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
1927  else if(val_po==2 || val_ls==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
1928  else xval=1;
1929 
1930  // if the SM is entirely not read, the masked channels
1931  // are reverted back to yellow
1932  float iEntries=0;
1933 
1934  if(norm01_ && synch01_) {
1935  float frac_synch_errors = 0.;
1936  float norm = norm01_->GetBinContent(ism);
1937  if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
1938  float val_sy = (frac_synch_errors <= synchErrorThreshold_);
1939  if(val_sy==0) xval=0;
1940  }
1941 
1942  std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
1943  if (iter != superModules_.end()) {
1944  for ( unsigned int i=0; i<clients_.size(); i++ ) {
1945  EBIntegrityClient* ebic = dynamic_cast<EBIntegrityClient*>(clients_[i]);
1946  if ( ebic ) {
1947  TH2F* h2 = ebic->h_[ism-1];
1948  if ( h2 ) {
1949  iEntries = h2->GetEntries();
1950  }
1951  }
1952  }
1953  }
1954 
1955  if ( iEntries==0 ) {
1956  xval=2;
1957  }
1958 
1959  meGlobalSummary_->setBinContent( ipx, iex, xval );
1960 
1961  if ( xval >= 0 && xval <= 5 ) {
1962  if ( xval != 2 && xval != 5 ) ++nValidChannels;
1963  if ( iex <= 85 ) {
1964  if ( xval != 2 && xval != 5 ) ++nValidChannelsEB[(ipx-1)/20];
1965  } else {
1966  if ( xval != 2 && xval != 5 ) ++nValidChannelsEB[18+(ipx-1)/20];
1967  }
1968  if ( xval == 0 ) ++nGlobalErrors;
1969  if ( iex <= 85 ) {
1970  if ( xval == 0 ) ++nGlobalErrorsEB[(ipx-1)/20];
1971  } else {
1972  if ( xval == 0 ) ++nGlobalErrorsEB[18+(ipx-1)/20];
1973  }
1974  }
1975 
1976  }
1977 
1978  }
1979  }
1980 
1981  MonitorElement* me;
1982 
1983  float reportSummary = -1.0;
1984  if ( nValidChannels != 0 )
1985  reportSummary = 1.0 - float(nGlobalErrors)/float(nValidChannels);
1986  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary");
1987  if ( me ) me->Fill(reportSummary);
1988 
1989  char histo[200];
1990 
1991  for (int i = 0; i < 36; i++) {
1992  float reportSummaryEB = -1.0;
1993  if ( nValidChannelsEB[i] != 0 )
1994  reportSummaryEB = 1.0 - float(nGlobalErrorsEB[i])/float(nValidChannelsEB[i]);
1995  sprintf(histo, "EcalBarrel_%s", Numbers::sEB(i+1).c_str());
1996  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/" + histo);
1997  if ( me ) me->Fill(reportSummaryEB);
1998  }
1999 
2000  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap");
2001  if ( me ) {
2002 
2003  int nValidChannelsTT[72][34];
2004  int nGlobalErrorsTT[72][34];
2005  for ( int iettx = 0; iettx < 34; iettx++ ) {
2006  for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
2007  nValidChannelsTT[ipttx][iettx] = 0;
2008  nGlobalErrorsTT[ipttx][iettx] = 0;
2009  }
2010  }
2011 
2012  for ( int iex = 1; iex <= 170; iex++ ) {
2013  for ( int ipx = 1; ipx <= 360; ipx++ ) {
2014 
2015  int iettx = (iex-1)/5+1;
2016  int ipttx = (ipx-1)/5+1;
2017 
2018  float xval = meGlobalSummary_->getBinContent( ipx, iex );
2019 
2020  if ( xval >= 0 && xval <= 5 ) {
2021  if ( xval != 2 && xval != 5 ) ++nValidChannelsTT[ipttx-1][iettx-1];
2022  if ( xval == 0 ) ++nGlobalErrorsTT[ipttx-1][iettx-1];
2023  }
2024 
2025  }
2026  }
2027 
2028  for ( int iettx = 0; iettx < 34; iettx++ ) {
2029  for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
2030 
2031  float xval = -1.0;
2032  if ( nValidChannelsTT[ipttx][iettx] != 0 )
2033  xval = 1.0 - float(nGlobalErrorsTT[ipttx][iettx])/float(nValidChannelsTT[ipttx][iettx]);
2034 
2035  me->setBinContent( ipttx+1, iettx+1, xval );
2036 
2037  }
2038  }
2039 
2040  }
2041 
2042 }
2043 
MonitorElement * mea02_[36]
MonitorElement * meg12_[36]
MonitorElement * mePedestalOnlineRMS_
MonitorElement * meLaserL4PNErr_
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
int i
Definition: DBlmapReader.cc:9
MonitorElement * meOccupancyPN_
MonitorElement * meRecHitEnergy_
MonitorElement * meg09_[36]
MonitorElement * meTriggerTowerEt_
void setBinContent(int binx, double content)
set content of bin (1-D)
virtual ~EBSummaryClient()
Destructor.
static std::string sEB(const int ism)
Definition: Numbers.cc:81
MonitorElement * meLaserL3_
void cleanup(void)
Cleanup.
MonitorElement * meTestPulseAmplG01_
MonitorElement * meg03_[36]
MonitorElement * me_o02_[36]
TProfile2D * hot01_[36]
MonitorElement * meg02_[36]
TProfile2D * httt01_[36]
MonitorElement * meg05_[36]
MonitorElement * meTestPulseG12_
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:519
MonitorElement * meLaserL4AmplOverPN_
MonitorElement * meg04_[36]
MonitorElement * mePedestalPNG01_
MonitorElement * met02_[36]
MonitorElement * meLaserL1Timing_
MonitorElement * meTimingMean_
Some &quot;id&quot; conversions.
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
Definition: UtilsClient.h:189
MonitorElement * meStatusFlagsErr_
MonitorElement * meLaserL1_
MonitorElement * meg02_[36]
MonitorElement * meg03_[36]
void endRun(void)
EndRun.
MonitorElement * mea01_[36]
MonitorElement * meIntegrity_
MonitorElement * meg02_[36]
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * meg01_[36]
MonitorElement * mePedestalOnlineErr_
MonitorElement * mePedestalG06_
MonitorElement * meOccupancy_
MonitorElement * meTestPulseAmplG12_
MonitorElement * meLaserL3Timing_
tuple histo
Definition: trackerHits.py:12
std::vector< int > superModules_
std::vector< int > laserWavelengths_
double getEntries(void) const
get # of entries
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * mea03_[36]
MonitorElement * met04_[36]
MonitorElement * meLaserL2Err_
MonitorElement * meLaserL2_
MonitorElement * meg04_[36]
void Fill(long long x)
MonitorElement * meLaserL3Ampl_
MonitorElement * meTestPulsePNG16_
MonitorElement * mea02_[36]
MonitorElement * mePedestalG01_
MonitorElement * meg10_[36]
MonitorElement * meIntegrityErr_
void beginJob(void)
BeginJob.
MonitorElement * meLaserL3PNErr_
MonitorElement * meg01_[36]
MonitorElement * meLaserL2PN_
MonitorElement * meTestPulsePNG01_
MonitorElement * meLaserL4Timing_
tuple norm
Definition: lumiNorm.py:78
MonitorElement * meLaserL2AmplOverPN_
void removeElement(const std::string &name)
Definition: DQMStore.cc:2338
MonitorElement * meTimingRMS_
std::string prefixME_
EBSummaryClient(const edm::ParameterSet &ps)
Constructor.
MonitorElement * meIntegrityPN_
int j
Definition: DBlmapReader.cc:9
void setup(void)
Setup.
MonitorElement * mea04_[36]
TProfile2D * hpot01_[36]
MonitorElement * meLaserL3Err_
MonitorElement * meLaserL4Err_
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:833
MonitorElement * meh01_[36]
MonitorElement * meg04_[36]
MonitorElement * meTimingRMS1D_
MonitorElement * meOccupancy1D_
void setEntries(double nentries)
set # of entries
MonitorElement * meTriggerTowerEmulError_
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1270
MonitorElement * met03_[36]
MonitorElement * meTriggerTowerTiming_
Ecal Monitor Utils for Client.
DQMStore * dqmStore_
MonitorElement * meLaserL3PN_
MonitorElement * meLaserL3AmplOverPN_
MonitorElement * meg01_[36]
MonitorElement * meaopn04_[36]
MonitorElement * meLaserL4PN_
MonitorElement * meLaserL2Timing_
MonitorElement * meaopn01_[36]
MonitorElement * meTimingMean1D_
MonitorElement * me_o01_[36]
MonitorElement * meTiming_
MonitorElement * meg03_[36]
MonitorElement * meLaserL1AmplOverPN_
MonitorElement * mePedestalOnlineRMSMap_
MonitorElement * meg11_[36]
MonitorElement * meLaserL4Ampl_
MonitorElement * meLaserL1Err_
MonitorElement * mea01_[36]
MonitorElement * mea03_[36]
MonitorElement * meLaserL4_
MonitorElement * meg01_[36]
MonitorElement * meTestPulseAmplG06_
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * mePedestalOnline_
MonitorElement * meGlobalSummary_
void endJob(void)
EndJob.
std::vector< int > MGPAGainsPN_
MonitorElement * meStatusFlags_
MonitorElement * meLaserL1PN_
MonitorElement * meLaserL2PNErr_
MonitorElement * meTestPulseG06_
MonitorElement * meTestPulseG01_
tuple cout
Definition: gather_cfg.py:41
MonitorElement * meLaserL1Ampl_
MonitorElement * meg05_[36]
float synchErrorThreshold_
MonitorElement * meLaserL1PNErr_
MonitorElement * meg02_[36]
MonitorElement * meg03_[36]
tuple status
Definition: ntuplemaker.py:245
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:647
MonitorElement * meg01_[36]
std::vector< int > MGPAGains_
Definition: RunIOV.h:13
MonitorElement * meaopn02_[36]
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:47
MonitorElement * meaopn03_[36]
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
static bool getBinStatistics(const T *histo, const int ix, const int iy, float &num, float &mean, float &rms)
Returns true if the bin contains good statistical data.
Definition: UtilsClient.h:133
MonitorElement * meLaserL2Ampl_
std::vector< EBClient * > clients_
void analyze(void)
Analyze.
void beginRun(void)
BeginRun.
MonitorElement * mePedestalG12_
TProfile2D * htmt01_[36]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:237
MonitorElement * met01_[36]
MonitorElement * meTriggerTowerNonSingleTiming_
MonitorElement * mePedestalOnlineMean_
MonitorElement * mePedestalPNG16_