CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
EESummaryClient.cc
Go to the documentation of this file.
1 /*
2  * \file EESummaryClient.cc
3  *
4  * $Date: 2011/09/02 13:55:02 $
5  * $Revision: 1.212 $
6  * \author G. Della Ricca
7  *
8 */
9 
10 #include <memory>
11 #include <iostream>
12 #include <fstream>
13 #include <iomanip>
14 #include <math.h>
15 #include <utility>
16 
18 
21 
22 #ifdef WITH_ECAL_COND_DB
25 #endif
26 
30 
32 
36 
49 
51 
53 
54  // cloneME switch
55  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
56 
57  // verbose switch
58  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
59 
60  // debug switch
61  debug_ = ps.getUntrackedParameter<bool>("debug", false);
62 
63  // prefixME path
64  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
65 
66  // enableCleanup_ switch
67  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
68 
69  // vector of selected Super Modules (Defaults to all 18).
70  superModules_.reserve(18);
71  for ( unsigned int i = 1; i <= 18; i++ ) superModules_.push_back(i);
72  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
73 
74  laserWavelengths_.reserve(4);
75  for ( unsigned int i = 1; i <= 4; i++ ) laserWavelengths_.push_back(i);
76  laserWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("laserWavelengths", laserWavelengths_);
77 
78  ledWavelengths_.reserve(2);
79  for ( unsigned int i = 1; i <= 2; i++ ) ledWavelengths_.push_back(i);
80  ledWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("ledWavelengths", ledWavelengths_);
81 
82  MGPAGains_.reserve(3);
83  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
84  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
85 
86  MGPAGainsPN_.reserve(2);
87  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
88  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
89 
90  // summary maps
91  meIntegrity_[0] = 0;
92  meIntegrity_[1] = 0;
93  meIntegrityPN_ = 0;
94  meOccupancy_[0] = 0;
95  meOccupancy_[1] = 0;
96  meOccupancyPN_ = 0;
97  meStatusFlags_[0] = 0;
98  meStatusFlags_[1] = 0;
99  mePedestalOnline_[0] = 0;
100  mePedestalOnline_[1] = 0;
105 
106  meLaserL1_[0] = 0;
107  meLaserL1_[1] = 0;
108  meLaserL1PN_ = 0;
109  meLaserL1Ampl_ = 0;
110  meLaserL1Timing_ = 0;
112 
113  meLaserL2_[0] = 0;
114  meLaserL2_[1] = 0;
115  meLaserL2PN_ = 0;
116  meLaserL2Ampl_ = 0;
117  meLaserL2Timing_ = 0;
119 
120  meLaserL3_[0] = 0;
121  meLaserL3_[1] = 0;
122  meLaserL3PN_ = 0;
123  meLaserL3Ampl_ = 0;
124  meLaserL3Timing_ = 0;
126 
127  meLaserL4_[0] = 0;
128  meLaserL4_[1] = 0;
129  meLaserL4PN_ = 0;
130  meLaserL4Ampl_ = 0;
131  meLaserL4Timing_ = 0;
133 
134  meLedL1_[0] = 0;
135  meLedL1_[1] = 0;
136  meLedL1PN_ = 0;
137  meLedL1Ampl_ = 0;
138  meLedL1Timing_ = 0;
139  meLedL1AmplOverPN_ = 0;
140 
141  meLedL2_[0] = 0;
142  meLedL2_[1] = 0;
143  meLedL2PN_ = 0;
144  meLedL2Ampl_ = 0;
145  meLedL2Timing_ = 0;
146  meLedL2AmplOverPN_ = 0;
147 
148  mePedestalG01_[0] = 0;
149  mePedestalG01_[1] = 0;
150  mePedestalG06_[0] = 0;
151  mePedestalG06_[1] = 0;
152  mePedestalG12_[0] = 0;
153  mePedestalG12_[1] = 0;
154  mePedestalPNG01_ = 0;
155  mePedestalPNG16_ = 0;
156  meTestPulseG01_[0] = 0;
157  meTestPulseG01_[1] = 0;
158  meTestPulseG06_[0] = 0;
159  meTestPulseG06_[1] = 0;
160  meTestPulseG12_[0] = 0;
161  meTestPulseG12_[1] = 0;
162  meTestPulsePNG01_ = 0;
163  meTestPulsePNG16_ = 0;
167  meGlobalSummary_[0] = 0;
168  meGlobalSummary_[1] = 0;
169 
170  meRecHitEnergy_[0] = 0;
171  meRecHitEnergy_[1] = 0;
172  meTiming_[0] = 0;
173  meTiming_[1] = 0;
174  meTimingMean1D_[0] = 0;
175  meTimingMean1D_[1] = 0;
176  meTimingRMS1D_[0] = 0;
177  meTimingRMS1D_[1] = 0;
178  meTimingMean_ = 0;
179  meTimingRMS_ = 0;
180 
181  meTriggerTowerEt_[0] = 0;
182  meTriggerTowerEt_[1] = 0;
185  meTriggerTowerTiming_[0] = 0;
186  meTriggerTowerTiming_[1] = 0;
189 
190  // summary errors
191  meIntegrityErr_ = 0;
192  meOccupancy1D_ = 0;
193  meStatusFlagsErr_ = 0;
195  meLaserL1Err_ = 0;
196  meLaserL1PNErr_ = 0;
197  meLaserL2Err_ = 0;
198  meLaserL2PNErr_ = 0;
199  meLaserL3Err_ = 0;
200  meLaserL3PNErr_ = 0;
201  meLaserL4Err_ = 0;
202  meLaserL4PNErr_ = 0;
203  meLedL1Err_ = 0;
204  meLedL1PNErr_ = 0;
205  meLedL2Err_ = 0;
206  meLedL2PNErr_ = 0;
207 
208  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
209 
210  int ism = superModules_[i];
211 
212  hpot01_[ism-1] = 0;
213  httt01_[ism-1] = 0;
214 
215  }
216 
217  synchErrorThreshold_ = 0.0;
218 
219 }
220 
222 
223 }
224 
226 
228 
229  if ( debug_ ) std::cout << "EESummaryClient: beginJob" << std::endl;
230 
231  ievt_ = 0;
232  jevt_ = 0;
233 
234 }
235 
237 
238  if ( debug_ ) std::cout << "EESummaryClient: beginRun" << std::endl;
239 
240  jevt_ = 0;
241 
242  this->setup();
243 
244 }
245 
247 
248  if ( debug_ ) std::cout << "EESummaryClient: endJob, ievt = " << ievt_ << std::endl;
249 
250  this->cleanup();
251 
252 }
253 
255 
256  if ( debug_ ) std::cout << "EESummaryClient: endRun, jevt = " << jevt_ << std::endl;
257 
258  this->cleanup();
259 
260 }
261 
263 
264  std::string name;
265 
266  dqmStore_->setCurrentFolder( prefixME_ + "/EESummaryClient" );
267 
269  name = "EEIT EE - integrity quality summary";
270  meIntegrity_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
271  meIntegrity_[0]->setAxisTitle("ix", 1);
272  meIntegrity_[0]->setAxisTitle("iy", 2);
273 
275  name = "EEIT EE + integrity quality summary";
276  meIntegrity_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
277  meIntegrity_[1]->setAxisTitle("ix", 1);
278  meIntegrity_[1]->setAxisTitle("iy", 2);
279 
281  name = "EEIT integrity quality errors summary";
282  meIntegrityErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
283  for (int i = 0; i < 18; i++) {
284  meIntegrityErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
285  }
286 
288  name = "EEIT PN integrity quality summary";
289  meIntegrityPN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
290  meIntegrityPN_->setAxisTitle("jchannel", 1);
291  meIntegrityPN_->setAxisTitle("jpseudo-strip", 2);
292 
294  name = "EEOT EE - digi occupancy summary";
295  meOccupancy_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
296  meOccupancy_[0]->setAxisTitle("ix", 1);
297  meOccupancy_[0]->setAxisTitle("iy", 2);
298 
300  name = "EEOT EE + digi occupancy summary";
301  meOccupancy_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
302  meOccupancy_[1]->setAxisTitle("ix", 1);
303  meOccupancy_[1]->setAxisTitle("iy", 2);
304 
306  name = "EEIT digi occupancy summary 1D";
307  meOccupancy1D_ = dqmStore_->book1D(name, name, 18, 1, 19);
308  for (int i = 0; i < 18; i++) {
309  meOccupancy1D_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
310  }
311 
313  name = "EEOT PN digi occupancy summary";
314  meOccupancyPN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
315  meOccupancyPN_->setAxisTitle("channel", 1);
316  meOccupancyPN_->setAxisTitle("pseudo-strip", 2);
317 
319  name = "EESFT EE - front-end status summary";
320  meStatusFlags_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
321  meStatusFlags_[0]->setAxisTitle("ix", 1);
322  meStatusFlags_[0]->setAxisTitle("iy", 2);
323 
325  name = "EESFT EE + front-end status summary";
326  meStatusFlags_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
327  meStatusFlags_[1]->setAxisTitle("ix", 1);
328  meStatusFlags_[1]->setAxisTitle("iy", 2);
329 
331  name = "EESFT front-end status errors summary";
332  meStatusFlagsErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
333  for (int i = 0; i < 18; i++) {
334  meStatusFlagsErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
335  }
336 
338  name = "EEPOT EE - pedestal quality summary G12";
339  mePedestalOnline_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
340  mePedestalOnline_[0]->setAxisTitle("ix", 1);
341  mePedestalOnline_[0]->setAxisTitle("iy", 2);
342 
344  name = "EEPOT EE + pedestal quality summary G12";
345  mePedestalOnline_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
346  mePedestalOnline_[1]->setAxisTitle("ix", 1);
347  mePedestalOnline_[1]->setAxisTitle("iy", 2);
348 
350  name = "EEPOT EE - pedestal G12 RMS map";
351  mePedestalOnlineRMSMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
354 
356  name = "EEPOT EE + pedestal G12 RMS map";
357  mePedestalOnlineRMSMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
360 
362  name = "EEPOT pedestal G12 mean";
363  mePedestalOnlineMean_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 150., 250.);
364  for (int i = 0; i < 18; i++) {
365  mePedestalOnlineMean_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
366  }
367 
369  name = "EEPOT pedestal G12 rms";
370  mePedestalOnlineRMS_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10.);
371  for (int i = 0; i < 18; i++) {
372  mePedestalOnlineRMS_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
373  }
374 
376  name = "EEPOT pedestal quality errors summary G12";
377  mePedestalOnlineErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
378  for (int i = 0; i < 18; i++) {
379  mePedestalOnlineErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
380  }
381 
382  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
383 
385  name = "EELT EE - laser quality summary L1";
386  meLaserL1_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
387  meLaserL1_[0]->setAxisTitle("ix", 1);
388  meLaserL1_[0]->setAxisTitle("iy", 2);
389 
391  name = "EELT EE + laser quality summary L1";
392  meLaserL1_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
393  meLaserL1_[1]->setAxisTitle("ix", 1);
394  meLaserL1_[1]->setAxisTitle("iy", 2);
395 
397  name = "EELT laser quality errors summary L1";
398  meLaserL1Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
399  for (int i = 0; i < 18; i++) {
400  meLaserL1Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
401  }
402 
404  name = "EELT PN laser quality summary L1";
405  meLaserL1PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
406  meLaserL1PN_->setAxisTitle("jchannel", 1);
407  meLaserL1PN_->setAxisTitle("jpseudo-strip", 2);
408 
410  name = "EELT PN laser quality errors summary L1";
411  meLaserL1PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
412  for (int i = 0; i < 18; i++) {
413  meLaserL1PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
414  }
415 
417  name = "EELT laser L1 amplitude summary";
418  meLaserL1Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
419  for (int i = 0; i < 18; i++) {
420  meLaserL1Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
421  }
422 
424  name = "EELT laser L1 timing summary";
425  meLaserL1Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
426  for (int i = 0; i < 18; i++) {
427  meLaserL1Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
428  }
429 
431  name = "EELT laser L1 amplitude over PN summary";
432  meLaserL1AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
433  for (int i = 0; i < 18; i++) {
434  meLaserL1AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
435  }
436 
437  }
438 
439  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
440 
442  name = "EELT EE - laser quality summary L2";
443  meLaserL2_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
444  meLaserL2_[0]->setAxisTitle("ix", 1);
445  meLaserL2_[0]->setAxisTitle("iy", 2);
446 
448  name = "EELT EE + laser quality summary L2";
449  meLaserL2_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
450  meLaserL2_[1]->setAxisTitle("ix", 1);
451  meLaserL2_[1]->setAxisTitle("iy", 2);
452 
454  name = "EELT laser quality errors summary L2";
455  meLaserL2Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
456  for (int i = 0; i < 18; i++) {
457  meLaserL2Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
458  }
459 
461  name = "EELT PN laser quality summary L2";
462  meLaserL2PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
463  meLaserL2PN_->setAxisTitle("jchannel", 1);
464  meLaserL2PN_->setAxisTitle("jpseudo-strip", 2);
465 
467  name = "EELT PN laser quality errors summary L2";
468  meLaserL2PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
469  for (int i = 0; i < 18; i++) {
470  meLaserL2PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
471  }
472 
474  name = "EELT laser L2 amplitude summary";
475  meLaserL2Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
476  for (int i = 0; i < 18; i++) {
477  meLaserL2Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
478  }
479 
481  name = "EELT laser L2 timing summary";
482  meLaserL2Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
483  for (int i = 0; i < 18; i++) {
484  meLaserL2Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
485  }
486 
488  name = "EELT laser L2 amplitude over PN summary";
489  meLaserL2AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
490  for (int i = 0; i < 18; i++) {
491  meLaserL2AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
492  }
493 
494  }
495 
496  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
497 
499  name = "EELT EE - laser quality summary L3";
500  meLaserL3_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
501  meLaserL3_[0]->setAxisTitle("ix", 1);
502  meLaserL3_[0]->setAxisTitle("iy", 2);
503 
505  name = "EELT EE + laser quality summary L3";
506  meLaserL3_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
507  meLaserL3_[1]->setAxisTitle("ix", 1);
508  meLaserL3_[1]->setAxisTitle("iy", 2);
509 
511  name = "EELT laser quality errors summary L3";
512  meLaserL3Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
513  for (int i = 0; i < 18; i++) {
514  meLaserL3Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
515  }
516 
518  name = "EELT PN laser quality summary L3";
519  meLaserL3PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
520  meLaserL3PN_->setAxisTitle("jchannel", 1);
521  meLaserL3PN_->setAxisTitle("jpseudo-strip", 2);
522 
524  name = "EELT PN laser quality errors summary L3";
525  meLaserL3PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
526  for (int i = 0; i < 18; i++) {
527  meLaserL3PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
528  }
529 
531  name = "EELT laser L3 amplitude summary";
532  meLaserL3Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
533  for (int i = 0; i < 18; i++) {
534  meLaserL3Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
535  }
536 
538  name = "EELT laser L3 timing summary";
539  meLaserL3Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
540  for (int i = 0; i < 18; i++) {
541  meLaserL3Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
542  }
543 
545  name = "EELT laser L3 amplitude over PN summary";
546  meLaserL3AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
547  for (int i = 0; i < 18; i++) {
548  meLaserL3AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
549  }
550 
551  }
552 
553  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
554 
556  name = "EELT EE - laser quality summary L4";
557  meLaserL4_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
558  meLaserL4_[0]->setAxisTitle("ix", 1);
559  meLaserL4_[0]->setAxisTitle("iy", 2);
560 
562  name = "EELT EE + laser quality summary L4";
563  meLaserL4_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
564  meLaserL4_[1]->setAxisTitle("ix", 1);
565  meLaserL4_[1]->setAxisTitle("iy", 2);
566 
568  name = "EELT laser quality errors summary L4";
569  meLaserL4Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
570  for (int i = 0; i < 18; i++) {
571  meLaserL4Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
572  }
573 
575  name = "EELT PN laser quality summary L4";
576  meLaserL4PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
577  meLaserL4PN_->setAxisTitle("jchannel", 1);
578  meLaserL4PN_->setAxisTitle("jpseudo-strip", 2);
579 
581  name = "EELT PN laser quality errors summary L4";
582  meLaserL4PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
583  for (int i = 0; i < 18; i++) {
584  meLaserL4PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
585  }
586 
588  name = "EELT laser L4 amplitude summary";
589  meLaserL4Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
590  for (int i = 0; i < 18; i++) {
591  meLaserL4Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
592  }
593 
595  name = "EELT laser L4 timing summary";
596  meLaserL4Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
597  for (int i = 0; i < 18; i++) {
598  meLaserL4Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
599  }
600 
602  name = "EELT laser L4 amplitude over PN summary";
603  meLaserL4AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
604  for (int i = 0; i < 18; i++) {
605  meLaserL4AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
606  }
607 
608  }
609 
610  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
611 
612  if ( meLedL1_[0] ) dqmStore_->removeElement( meLedL1_[0]->getName() );
613  name = "EELDT EE - led quality summary L1";
614  meLedL1_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
615  meLedL1_[0]->setAxisTitle("ix", 1);
616  meLedL1_[0]->setAxisTitle("iy", 2);
617 
618  if ( meLedL1_[1] ) dqmStore_->removeElement( meLedL1_[1]->getName() );
619  name = "EELDT EE + led quality summary L1";
620  meLedL1_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
621  meLedL1_[1]->setAxisTitle("ix", 1);
622  meLedL1_[1]->setAxisTitle("iy", 2);
623 
625  name = "EELDT led quality errors summary L1";
626  meLedL1Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
627  for (int i = 0; i < 18; i++) {
628  meLedL1Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
629  }
630 
632  name = "EELDT PN led quality summary L1";
633  meLedL1PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
634  meLedL1PN_->setAxisTitle("jchannel", 1);
635  meLedL1PN_->setAxisTitle("jpseudo-strip", 2);
636 
638  name = "EELDT PN led quality errors summary L1";
639  meLedL1PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
640  for (int i = 0; i < 18; i++) {
641  meLedL1PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
642  }
643 
645  name = "EELDT led L1 amplitude summary";
646  meLedL1Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
647  for (int i = 0; i < 18; i++) {
648  meLedL1Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
649  }
650 
652  name = "EELDT led L1 timing summary";
653  meLedL1Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
654  for (int i = 0; i < 18; i++) {
655  meLedL1Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
656  }
657 
659  name = "EELDT led L1 amplitude over PN summary";
660  meLedL1AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
661  for (int i = 0; i < 18; i++) {
662  meLedL1AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
663  }
664 
665  }
666 
667  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
668 
669  if ( meLedL2_[0] ) dqmStore_->removeElement( meLedL2_[0]->getName() );
670  name = "EELDT EE - led quality summary L2";
671  meLedL2_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
672  meLedL2_[0]->setAxisTitle("ix", 1);
673  meLedL2_[0]->setAxisTitle("iy", 2);
674 
675  if ( meLedL2_[1] ) dqmStore_->removeElement( meLedL2_[1]->getName() );
676  name = "EELDT EE + led quality summary L2";
677  meLedL2_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
678  meLedL2_[1]->setAxisTitle("ix", 1);
679  meLedL2_[1]->setAxisTitle("iy", 2);
680 
682  name = "EELDT led quality errors summary L2";
683  meLedL2Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
684  for (int i = 0; i < 18; i++) {
685  meLedL2Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
686  }
687 
689  name = "EELDT PN led quality summary L2";
690  meLedL2PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
691  meLedL2PN_->setAxisTitle("jchannel", 1);
692  meLedL2PN_->setAxisTitle("jpseudo-strip", 2);
693 
695  name = "EELDT PN led quality errors summary L2";
696  meLedL2PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
697  for (int i = 0; i < 18; i++) {
698  meLedL2PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
699  }
700 
702  name = "EELDT led L2 amplitude summary";
703  meLedL2Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
704  for (int i = 0; i < 18; i++) {
705  meLedL2Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
706  }
707 
709  name = "EELDT led L2 timing summary";
710  meLedL2Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
711  for (int i = 0; i < 18; i++) {
712  meLedL2Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
713  }
714 
716  name = "EELDT led L2 amplitude over PN summary";
717  meLedL2AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
718  for (int i = 0; i < 18; i++) {
719  meLedL2AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
720  }
721 
722  }
723 
724  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
725 
727  name = "EEPT EE - pedestal quality G01 summary";
728  mePedestalG01_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
729  mePedestalG01_[0]->setAxisTitle("ix", 1);
730  mePedestalG01_[0]->setAxisTitle("iy", 2);
731 
732  }
733 
734  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
735 
737  name = "EEPT EE - pedestal quality G06 summary";
738  mePedestalG06_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
739  mePedestalG06_[0]->setAxisTitle("ix", 1);
740  mePedestalG06_[0]->setAxisTitle("iy", 2);
741 
742  }
743 
744  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
745 
747  name = "EEPT EE - pedestal quality G12 summary";
748  mePedestalG12_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
749  mePedestalG12_[0]->setAxisTitle("ix", 1);
750  mePedestalG12_[0]->setAxisTitle("iy", 2);
751 
752  }
753 
754 
755  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
756 
758  name = "EEPT PN pedestal quality G01 summary";
759  mePedestalPNG01_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10, 10.);
760  mePedestalPNG01_->setAxisTitle("jchannel", 1);
761  mePedestalPNG01_->setAxisTitle("jpseudo-strip", 2);
762 
763  }
764 
765  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
766 
768  name = "EEPT PN pedestal quality G16 summary";
769  mePedestalPNG16_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10, 10.);
770  mePedestalPNG16_->setAxisTitle("jchannel", 1);
771  mePedestalPNG16_->setAxisTitle("jpseudo-strip", 2);
772 
773  }
774 
775  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
776 
778  name = "EEPT EE + pedestal quality G01 summary";
779  mePedestalG01_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
780  mePedestalG01_[1]->setAxisTitle("ix", 1);
781  mePedestalG01_[1]->setAxisTitle("iy", 2);
782 
783  }
784 
785 
786  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
787 
789  name = "EEPT EE + pedestal quality G06 summary";
790  mePedestalG06_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
791  mePedestalG06_[1]->setAxisTitle("ix", 1);
792  mePedestalG06_[1]->setAxisTitle("iy", 2);
793 
794  }
795 
796  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
797 
799  name = "EEPT EE + pedestal quality G12 summary";
800  mePedestalG12_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
801  mePedestalG12_[1]->setAxisTitle("ix", 1);
802  mePedestalG12_[1]->setAxisTitle("iy", 2);
803 
804  }
805 
806  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
807 
809  name = "EETPT EE - test pulse quality G01 summary";
810  meTestPulseG01_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
811  meTestPulseG01_[0]->setAxisTitle("ix", 1);
812  meTestPulseG01_[0]->setAxisTitle("iy", 2);
813 
814  }
815 
816  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
817 
819  name = "EETPT EE - test pulse quality G06 summary";
820  meTestPulseG06_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
821  meTestPulseG06_[0]->setAxisTitle("ix", 1);
822  meTestPulseG06_[0]->setAxisTitle("iy", 2);
823 
824  }
825 
826  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
827 
829  name = "EETPT EE - test pulse quality G12 summary";
830  meTestPulseG12_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
831  meTestPulseG12_[0]->setAxisTitle("ix", 1);
832  meTestPulseG12_[0]->setAxisTitle("iy", 2);
833 
834  }
835 
836 
837  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
838 
840  name = "EETPT PN test pulse quality G01 summary";
841  meTestPulsePNG01_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
842  meTestPulsePNG01_->setAxisTitle("jchannel", 1);
843  meTestPulsePNG01_->setAxisTitle("jpseudo-strip", 2);
844 
845  }
846 
847  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
848 
850  name = "EETPT PN test pulse quality G16 summary";
851  meTestPulsePNG16_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
852  meTestPulsePNG16_->setAxisTitle("jchannel", 1);
853  meTestPulsePNG16_->setAxisTitle("jpseudo-strip", 2);
854 
855  }
856 
857  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
858 
860  name = "EETPT EE + test pulse quality G01 summary";
861  meTestPulseG01_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
862  meTestPulseG01_[1]->setAxisTitle("ix", 1);
863  meTestPulseG01_[1]->setAxisTitle("iy", 2);
864 
865  }
866 
867  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
868 
870  name = "EETPT EE + test pulse quality G06 summary";
871  meTestPulseG06_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
872  meTestPulseG06_[1]->setAxisTitle("ix", 1);
873  meTestPulseG06_[1]->setAxisTitle("iy", 2);
874 
875  }
876 
877  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
878 
880  name = "EETPT EE + test pulse quality G12 summary";
881  meTestPulseG12_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
882  meTestPulseG12_[1]->setAxisTitle("ix", 1);
883  meTestPulseG12_[1]->setAxisTitle("iy", 2);
884 
885  }
886 
887  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
888 
890  name = "EETPT test pulse amplitude G01 summary";
891  meTestPulseAmplG01_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
892  for (int i = 0; i < 18; i++) {
893  meTestPulseAmplG01_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
894  }
895 
896  }
897 
898  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
899 
901  name = "EETPT test pulse amplitude G06 summary";
902  meTestPulseAmplG06_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
903  for (int i = 0; i < 18; i++) {
904  meTestPulseAmplG06_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
905  }
906 
907  }
908 
909  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
910 
912  name = "EETPT test pulse amplitude G12 summary";
913  meTestPulseAmplG12_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
914  for (int i = 0; i < 18; i++) {
915  meTestPulseAmplG12_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
916  }
917 
918  }
919 
921  name = "EEOT EE - energy summary";
922  meRecHitEnergy_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
923  meRecHitEnergy_[0]->setAxisTitle("ix", 1);
924  meRecHitEnergy_[0]->setAxisTitle("iy", 2);
925 
927  name = "EEOT EE + energy summary";
928  meRecHitEnergy_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
929  meRecHitEnergy_[1]->setAxisTitle("ix", 1);
930  meRecHitEnergy_[1]->setAxisTitle("iy", 2);
931 
933  name = "EETMT EE - timing quality summary";
934  meTiming_[0] = dqmStore_->book2D(name, name, 20, 0., 100., 20, 0., 100.);
935  meTiming_[0]->setAxisTitle("ix", 1);
936  meTiming_[0]->setAxisTitle("iy", 2);
937 
939  name = "EETMT EE + timing quality summary";
940  meTiming_[1] = dqmStore_->book2D(name, name, 20, 0., 100., 20, 0., 100.);
941  meTiming_[1]->setAxisTitle("ix", 1);
942  meTiming_[1]->setAxisTitle("iy", 2);
943 
945  name = "EETMT EE - timing mean 1D summary";
946  meTimingMean1D_[0] = dqmStore_->book1D(name, name, 100, -25., 25.);
947  meTimingMean1D_[0]->setAxisTitle("mean (ns)", 1);
948 
950  name = "EETMT EE + timing mean 1D summary";
951  meTimingMean1D_[1] = dqmStore_->book1D(name, name, 100, -25., 25.);
952  meTimingMean1D_[1]->setAxisTitle("mean (ns)", 1);
953 
955  name = "EETMT EE - timing rms 1D summary";
956  meTimingRMS1D_[0] = dqmStore_->book1D(name, name, 100, 0.0, 10.0);
957  meTimingRMS1D_[0]->setAxisTitle("rms (ns)", 1);
958 
960  name = "EETMT EE + timing rms 1D summary";
961  meTimingRMS1D_[1] = dqmStore_->book1D(name, name, 100, 0.0, 10.0);
962  meTimingRMS1D_[1]->setAxisTitle("rms (ns)", 1);
963 
965  name = "EETMT timing mean";
966  meTimingMean_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, -20., 20.,"");
967  for (int i = 0; i < 18; i++) {
968  meTimingMean_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
969  }
970  meTimingMean_->setAxisTitle("mean (ns)", 2);
971 
973  name = "EETMT timing rms";
974  meTimingRMS_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10.,"");
975  for (int i = 0; i < 18; i++) {
976  meTimingRMS_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
977  }
978  meTimingRMS_->setAxisTitle("rms (ns)", 2);
979 
981  name = "EETTT EE - Et trigger tower summary";
982  meTriggerTowerEt_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
983  meTriggerTowerEt_[0]->setAxisTitle("ix", 1);
984  meTriggerTowerEt_[0]->setAxisTitle("iy", 2);
985 
987  name = "EETTT EE + Et trigger tower summary";
988  meTriggerTowerEt_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
989  meTriggerTowerEt_[1]->setAxisTitle("ix", 1);
990  meTriggerTowerEt_[1]->setAxisTitle("iy", 2);
991 
993  name = "EETTT EE - emulator error quality summary";
994  meTriggerTowerEmulError_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
997 
999  name = "EETTT EE + emulator error quality summary";
1000  meTriggerTowerEmulError_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1003 
1005  name = "EETTT EE - Trigger Primitives Timing summary";
1006  meTriggerTowerTiming_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1007  meTriggerTowerTiming_[0]->setAxisTitle("ix", 1);
1008  meTriggerTowerTiming_[0]->setAxisTitle("iy", 2);
1009  meTriggerTowerTiming_[0]->setAxisTitle("TP data matching emulator", 3);
1010 
1012  name = "EETTT EE + Trigger Primitives Timing summary";
1013  meTriggerTowerTiming_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1014  meTriggerTowerTiming_[1]->setAxisTitle("ix", 1);
1015  meTriggerTowerTiming_[1]->setAxisTitle("iy", 2);
1016  meTriggerTowerTiming_[1]->setAxisTitle("TP data matching emulator", 3);
1017 
1019  name = "EETTT EE - Trigger Primitives Non Single Timing summary";
1020  meTriggerTowerNonSingleTiming_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1023  meTriggerTowerNonSingleTiming_[0]->setAxisTitle("fraction", 3);
1024 
1026  name = "EETTT EE + Trigger Primitives Non Single Timing summary";
1027  meTriggerTowerNonSingleTiming_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1030  meTriggerTowerNonSingleTiming_[1]->setAxisTitle("fraction", 3);
1031 
1033  name = "EE global summary EE -";
1034  meGlobalSummary_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1035  meGlobalSummary_[0]->setAxisTitle("ix", 1);
1036  meGlobalSummary_[0]->setAxisTitle("iy", 2);
1037 
1039  name = "EE global summary EE +";
1040  meGlobalSummary_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1041  meGlobalSummary_[1]->setAxisTitle("ix", 1);
1042  meGlobalSummary_[1]->setAxisTitle("iy", 2);
1043 
1044 }
1045 
1047 
1048  if ( ! enableCleanup_ ) return;
1049 
1050  dqmStore_->setCurrentFolder( prefixME_ + "/EESummaryClient" );
1051 
1052  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
1053 
1054  int ism = superModules_[i];
1055 
1056  if ( cloneME_ ) {
1057  if ( hpot01_[ism-1] ) delete hpot01_[ism-1];
1058  if ( httt01_[ism-1] ) delete httt01_[ism-1];
1059  }
1060 
1061  hpot01_[ism-1] = 0;
1062  httt01_[ism-1] = 0;
1063 
1064  }
1065 
1067  meIntegrity_[0] = 0;
1068 
1070  meIntegrity_[1] = 0;
1071 
1073  meIntegrityErr_ = 0;
1074 
1076  meIntegrityPN_ = 0;
1077 
1079  meOccupancy_[0] = 0;
1080 
1082  meOccupancy_[1] = 0;
1083 
1085  meOccupancy1D_ = 0;
1086 
1088  meOccupancyPN_ = 0;
1089 
1091  meStatusFlags_[0] = 0;
1092 
1094  meStatusFlags_[1] = 0;
1095 
1097  meStatusFlagsErr_ = 0;
1098 
1100  mePedestalOnline_[0] = 0;
1101 
1103  mePedestalOnline_[1] = 0;
1104 
1107 
1110 
1113 
1115  mePedestalOnlineRMSMap_[0] = 0;
1116 
1118  mePedestalOnlineRMSMap_[1] = 0;
1119 
1120  if ( meLaserL1_[0] ) dqmStore_->removeElement( meLaserL1_[0]->getName() );
1121  meLaserL1_[0] = 0;
1122 
1123  if ( meLaserL1_[1] ) dqmStore_->removeElement( meLaserL1_[1]->getName() );
1124  meLaserL1_[1] = 0;
1125 
1127  meLaserL1Err_ = 0;
1128 
1130  meLaserL1PN_ = 0;
1131 
1133  meLaserL1PNErr_ = 0;
1134 
1136  meLaserL1Ampl_ = 0;
1137 
1139  meLaserL1Timing_ = 0;
1140 
1143 
1144  if ( meLaserL2_[0] ) dqmStore_->removeElement( meLaserL2_[0]->getName() );
1145  meLaserL2_[0] = 0;
1146 
1147  if ( meLaserL2_[1] ) dqmStore_->removeElement( meLaserL2_[1]->getName() );
1148  meLaserL2_[1] = 0;
1149 
1151  meLaserL2Err_ = 0;
1152 
1154  meLaserL2PN_ = 0;
1155 
1157  meLaserL2PNErr_ = 0;
1158 
1160  meLaserL2Ampl_ = 0;
1161 
1163  meLaserL2Timing_ = 0;
1164 
1167 
1168  if ( meLaserL3_[0] ) dqmStore_->removeElement( meLaserL3_[0]->getName() );
1169  meLaserL3_[0] = 0;
1170 
1171  if ( meLaserL3_[1] ) dqmStore_->removeElement( meLaserL3_[1]->getName() );
1172  meLaserL3_[1] = 0;
1173 
1175  meLaserL3Err_ = 0;
1176 
1178  meLaserL3PN_ = 0;
1179 
1181  meLaserL3PNErr_ = 0;
1182 
1184  meLaserL3Ampl_ = 0;
1185 
1187  meLaserL3Timing_ = 0;
1188 
1191 
1192  if ( meLaserL4_[0] ) dqmStore_->removeElement( meLaserL4_[0]->getName() );
1193  meLaserL4_[0] = 0;
1194 
1195  if ( meLaserL4_[1] ) dqmStore_->removeElement( meLaserL4_[1]->getName() );
1196  meLaserL4_[1] = 0;
1197 
1199  meLaserL4Err_ = 0;
1200 
1202  meLaserL4PN_ = 0;
1203 
1205  meLaserL4PNErr_ = 0;
1206 
1208  meLaserL4Ampl_ = 0;
1209 
1211  meLaserL4Timing_ = 0;
1212 
1215 
1216  if ( meLedL1_[0] ) dqmStore_->removeElement( meLedL1_[0]->getName() );
1217  meLedL1_[0] = 0;
1218 
1219  if ( meLedL1_[1] ) dqmStore_->removeElement( meLedL1_[1]->getName() );
1220  meLedL1_[1] = 0;
1221 
1223  meLedL1Err_ = 0;
1224 
1226  meLedL1PN_ = 0;
1227 
1229  meLedL1PNErr_ = 0;
1230 
1232  meLedL1Ampl_ = 0;
1233 
1235  meLedL1Timing_ = 0;
1236 
1238  meLedL1AmplOverPN_ = 0;
1239 
1240  if ( meLedL2_[0] ) dqmStore_->removeElement( meLedL2_[0]->getName() );
1241  meLedL2_[0] = 0;
1242 
1243  if ( meLedL2_[1] ) dqmStore_->removeElement( meLedL2_[1]->getName() );
1244  meLedL2_[1] = 0;
1245 
1247  meLedL2Err_ = 0;
1248 
1250  meLedL2PN_ = 0;
1251 
1253  meLedL2PNErr_ = 0;
1254 
1256  meLedL2Ampl_ = 0;
1257 
1259  meLedL2Timing_ = 0;
1260 
1262  meLedL2AmplOverPN_ = 0;
1263 
1265  mePedestalG01_[0] = 0;
1266 
1268  mePedestalG01_[1] = 0;
1269 
1271  mePedestalG06_[0] = 0;
1272 
1274  mePedestalG06_[1] = 0;
1275 
1277  mePedestalG12_[0] = 0;
1278 
1280  mePedestalG12_[1] = 0;
1281 
1283  mePedestalPNG01_ = 0;
1284 
1286  mePedestalPNG16_ = 0;
1287 
1289  meTestPulseG01_[0] = 0;
1290 
1292  meTestPulseG01_[1] = 0;
1293 
1295  meTestPulseG06_[0] = 0;
1296 
1298  meTestPulseG06_[1] = 0;
1299 
1301  meTestPulseG12_[0] = 0;
1302 
1304  meTestPulseG12_[1] = 0;
1305 
1307  meTestPulsePNG01_ = 0;
1308 
1310  meTestPulsePNG16_ = 0;
1311 
1313  meTestPulseAmplG01_ = 0;
1314 
1316  meTestPulseAmplG06_ = 0;
1317 
1319  meTestPulseAmplG12_ = 0;
1320 
1322  meRecHitEnergy_[0] = 0;
1323 
1325  meRecHitEnergy_[1] = 0;
1326 
1327  if ( meTiming_[0] ) dqmStore_->removeElement( meTiming_[0]->getName() );
1328  meTiming_[0] = 0;
1329 
1330  if ( meTiming_[1] ) dqmStore_->removeElement( meTiming_[1]->getName() );
1331  meTiming_[1] = 0;
1332 
1334  meTimingMean1D_[0] = 0;
1335 
1337  meTimingMean1D_[1] = 0;
1338 
1340  meTimingRMS1D_[0] = 0;
1341 
1343  meTimingRMS1D_[1] = 0;
1344 
1346  meTriggerTowerEt_[0] = 0;
1347 
1349  meTriggerTowerEt_[1] = 0;
1350 
1352  meTriggerTowerEmulError_[0] = 0;
1353 
1355  meTriggerTowerEmulError_[1] = 0;
1356 
1358  meTriggerTowerTiming_[0] = 0;
1359 
1361  meTriggerTowerTiming_[1] = 0;
1362 
1365 
1368 
1370  meGlobalSummary_[0] = 0;
1371 
1373  meGlobalSummary_[1] = 0;
1374 
1375 }
1376 
1377 #ifdef WITH_ECAL_COND_DB
1378 bool EESummaryClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
1379 
1380  status = true;
1381 
1382  return true;
1383 
1384 }
1385 #endif
1386 
1388 
1389  ievt_++;
1390  jevt_++;
1391  if ( ievt_ % 10 == 0 ) {
1392  if ( debug_ ) std::cout << "EESummaryClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
1393  }
1394 
1395  uint32_t chWarnBit = 1 << EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING;
1396 
1397  for ( int ix = 1; ix <= 100; ix++ ) {
1398  for ( int iy = 1; iy <= 100; iy++ ) {
1399 
1400  if ( meIntegrity_[0] ) meIntegrity_[0]->setBinContent( ix, iy, 6. );
1401  if ( meIntegrity_[1] ) meIntegrity_[1]->setBinContent( ix, iy, 6. );
1402  if ( meOccupancy_[0] ) meOccupancy_[0]->setBinContent( ix, iy, 0. );
1403  if ( meOccupancy_[1] ) meOccupancy_[1]->setBinContent( ix, iy, 0. );
1404  if ( meStatusFlags_[0] ) meStatusFlags_[0]->setBinContent( ix, iy, 6. );
1405  if ( meStatusFlags_[1] ) meStatusFlags_[1]->setBinContent( ix, iy, 6. );
1406  if ( mePedestalOnline_[0] ) mePedestalOnline_[0]->setBinContent( ix, iy, 6. );
1407  if ( mePedestalOnline_[1] ) mePedestalOnline_[1]->setBinContent( ix, iy, 6. );
1408  if ( mePedestalOnlineRMSMap_[0] ) mePedestalOnlineRMSMap_[0]->setBinContent( ix, iy, -1. );
1409  if ( mePedestalOnlineRMSMap_[1] ) mePedestalOnlineRMSMap_[1]->setBinContent( ix, iy, -1. );
1410 
1411  if ( meLaserL1_[0] ) meLaserL1_[0]->setBinContent( ix, iy, 6. );
1412  if ( meLaserL1_[1] ) meLaserL1_[1]->setBinContent( ix, iy, 6. );
1413  if ( meLaserL2_[0] ) meLaserL2_[0]->setBinContent( ix, iy, 6. );
1414  if ( meLaserL2_[1] ) meLaserL2_[1]->setBinContent( ix, iy, 6. );
1415  if ( meLaserL3_[0] ) meLaserL3_[0]->setBinContent( ix, iy, 6. );
1416  if ( meLaserL3_[1] ) meLaserL3_[1]->setBinContent( ix, iy, 6. );
1417  if ( meLaserL4_[0] ) meLaserL4_[0]->setBinContent( ix, iy, 6. );
1418  if ( meLaserL4_[1] ) meLaserL4_[1]->setBinContent( ix, iy, 6. );
1419  if ( meLedL1_[0] ) meLedL1_[0]->setBinContent( ix, iy, 6. );
1420  if ( meLedL1_[1] ) meLedL1_[1]->setBinContent( ix, iy, 6. );
1421  if ( meLedL2_[0] ) meLedL2_[0]->setBinContent( ix, iy, 6. );
1422  if ( meLedL2_[1] ) meLedL2_[1]->setBinContent( ix, iy, 6. );
1423  if ( mePedestalG01_[0] ) mePedestalG01_[0]->setBinContent( ix, iy, 6. );
1424  if ( mePedestalG01_[1] ) mePedestalG01_[1]->setBinContent( ix, iy, 6. );
1425  if ( mePedestalG06_[0] ) mePedestalG06_[0]->setBinContent( ix, iy, 6. );
1426  if ( mePedestalG06_[1] ) mePedestalG06_[1]->setBinContent( ix, iy, 6. );
1427  if ( mePedestalG12_[0] ) mePedestalG12_[0]->setBinContent( ix, iy, 6. );
1428  if ( mePedestalG12_[1] ) mePedestalG12_[1]->setBinContent( ix, iy, 6. );
1429  if ( meTestPulseG01_[0] ) meTestPulseG01_[0]->setBinContent( ix, iy, 6. );
1430  if ( meTestPulseG01_[1] ) meTestPulseG01_[1]->setBinContent( ix, iy, 6. );
1431  if ( meTestPulseG06_[0] ) meTestPulseG06_[0]->setBinContent( ix, iy, 6. );
1432  if ( meTestPulseG06_[1] ) meTestPulseG06_[1]->setBinContent( ix, iy, 6. );
1433  if ( meTestPulseG12_[0] ) meTestPulseG12_[0]->setBinContent( ix, iy, 6. );
1434  if ( meTestPulseG12_[1] ) meTestPulseG12_[1]->setBinContent( ix, iy, 6. );
1435  if ( meRecHitEnergy_[0] ) meRecHitEnergy_[0]->setBinContent( ix, iy, 0. );
1436  if ( meRecHitEnergy_[1] ) meRecHitEnergy_[1]->setBinContent( ix, iy, 0. );
1437 
1438  if ( meGlobalSummary_[0] ) meGlobalSummary_[0]->setBinContent( ix, iy, 6. );
1439  if ( meGlobalSummary_[1] ) meGlobalSummary_[1]->setBinContent( ix, iy, 6. );
1440 
1441  }
1442  }
1443 
1444  // default is 6 because we want white for the non existing MEM
1445  for ( int ix = 1; ix <= 45; ix++ ) {
1446  for ( int iy = 1; iy <= 20; iy++ ) {
1447 
1448  if ( meIntegrityPN_ ) meIntegrityPN_->setBinContent( ix, iy, 6. );
1449  if ( meOccupancyPN_ ) meOccupancyPN_->setBinContent( ix, iy, 0. );
1450  if ( meLaserL1PN_ ) meLaserL1PN_->setBinContent( ix, iy, 6. );
1451  if ( meLaserL2PN_ ) meLaserL2PN_->setBinContent( ix, iy, 6. );
1452  if ( meLaserL3PN_ ) meLaserL3PN_->setBinContent( ix, iy, 6. );
1453  if ( meLaserL4PN_ ) meLaserL4PN_->setBinContent( ix, iy, 6. );
1454  if ( meLedL1PN_ ) meLedL1PN_->setBinContent( ix, iy, 6. );
1455  if ( meLedL2PN_ ) meLedL2PN_->setBinContent( ix, iy, 6. );
1456  if ( mePedestalPNG01_ ) mePedestalPNG01_->setBinContent( ix, iy, 6. );
1457  if ( mePedestalPNG16_ ) mePedestalPNG16_->setBinContent( ix, iy, 6. );
1458  if ( meTestPulsePNG01_ ) meTestPulsePNG01_->setBinContent( ix, iy, 6. );
1459  if ( meTestPulsePNG16_ ) meTestPulsePNG16_->setBinContent( ix, iy, 6. );
1460 
1461  }
1462  }
1463 
1464  for ( int ix = 1; ix <= 100; ix++ ) {
1465  for ( int iy = 1; iy <= 100; iy++ ) {
1466  if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setBinContent( ix, iy, 0. );
1467  if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setBinContent( ix, iy, 0. );
1470  if ( meTriggerTowerTiming_[0] ) meTriggerTowerTiming_[0]->setBinContent( ix, iy, 0. );
1471  if ( meTriggerTowerTiming_[1] ) meTriggerTowerTiming_[1]->setBinContent( ix, iy, 0. );
1474  }
1475  }
1476 
1477  for ( int ix = 1; ix <= 20; ix++ ) {
1478  for ( int iy = 1; iy <= 20; iy++ ) {
1479  if ( meTiming_[0] ) meTiming_[0]->setBinContent( ix, iy, 6. );
1480  if ( meTiming_[1] ) meTiming_[1]->setBinContent( ix, iy, 6. );
1481  }
1482  }
1483 
1484  if ( meIntegrity_[0] ) meIntegrity_[0]->setEntries( 0 );
1485  if ( meIntegrity_[1] ) meIntegrity_[1]->setEntries( 0 );
1488  if ( meOccupancy_[0] ) meOccupancy_[0]->setEntries( 0 );
1489  if ( meOccupancy_[1] ) meOccupancy_[1]->setEntries( 0 );
1492  if ( meStatusFlags_[0] ) meStatusFlags_[0]->setEntries( 0 );
1493  if ( meStatusFlags_[1] ) meStatusFlags_[1]->setEntries( 0 );
1495  if ( mePedestalOnline_[0] ) mePedestalOnline_[0]->setEntries( 0 );
1496  if ( mePedestalOnline_[1] ) mePedestalOnline_[1]->setEntries( 0 );
1500  if ( meLaserL1_[0] ) meLaserL1_[0]->setEntries( 0 );
1501  if ( meLaserL1_[1] ) meLaserL1_[1]->setEntries( 0 );
1502  if ( meLaserL1Err_ ) meLaserL1Err_->Reset();
1503  if ( meLaserL1PN_ ) meLaserL1PN_->setEntries( 0 );
1508  if ( meLaserL2_[0] ) meLaserL2_[0]->setEntries( 0 );
1509  if ( meLaserL2_[1] ) meLaserL2_[1]->setEntries( 0 );
1510  if ( meLaserL2Err_ ) meLaserL2Err_->Reset();
1511  if ( meLaserL2PN_ ) meLaserL2PN_->setEntries( 0 );
1516  if ( meLaserL3_[0] ) meLaserL3_[0]->setEntries( 0 );
1517  if ( meLaserL3_[1] ) meLaserL3_[1]->setEntries( 0 );
1518  if ( meLaserL3Err_ ) meLaserL3Err_->Reset();
1519  if ( meLaserL3PN_ ) meLaserL3PN_->setEntries( 0 );
1524  if ( meLaserL4_[0] ) meLaserL4_[0]->setEntries( 0 );
1525  if ( meLaserL4_[1] ) meLaserL4_[1]->setEntries( 0 );
1526  if ( meLaserL4Err_ ) meLaserL4Err_->Reset();
1527  if ( meLaserL4PN_ ) meLaserL4PN_->setEntries( 0 );
1532  if ( meLedL1_[0] ) meLedL1_[0]->setEntries( 0 );
1533  if ( meLedL1_[1] ) meLedL1_[1]->setEntries( 0 );
1534  if ( meLedL1Err_ ) meLedL1Err_->Reset();
1535  if ( meLedL1PN_ ) meLedL1PN_->setEntries( 0 );
1536  if ( meLedL1PNErr_ ) meLedL1PNErr_->Reset();
1537  if ( meLedL1Ampl_ ) meLedL1Ampl_->Reset();
1540  if ( meLedL2_[0] ) meLedL2_[0]->setEntries( 0 );
1541  if ( meLedL2_[1] ) meLedL2_[1]->setEntries( 0 );
1542  if ( meLedL2Err_ ) meLedL2Err_->Reset();
1543  if ( meLedL2PN_ ) meLedL2PN_->setEntries( 0 );
1544  if ( meLedL2PNErr_ ) meLedL2PNErr_->Reset();
1545  if ( meLedL2Ampl_ ) meLedL2Ampl_->Reset();
1548  if ( mePedestalG01_[0] ) mePedestalG01_[0]->setEntries( 0 );
1549  if ( mePedestalG01_[1] ) mePedestalG01_[1]->setEntries( 0 );
1550  if ( mePedestalG06_[0] ) mePedestalG06_[0]->setEntries( 0 );
1551  if ( mePedestalG06_[1] ) mePedestalG06_[1]->setEntries( 0 );
1552  if ( mePedestalG12_[0] ) mePedestalG12_[0]->setEntries( 0 );
1553  if ( mePedestalG12_[1] ) mePedestalG12_[1]->setEntries( 0 );
1556  if ( meTestPulseG01_[0] ) meTestPulseG01_[0]->setEntries( 0 );
1557  if ( meTestPulseG01_[1] ) meTestPulseG01_[1]->setEntries( 0 );
1558  if ( meTestPulseG06_[0] ) meTestPulseG06_[0]->setEntries( 0 );
1559  if ( meTestPulseG06_[1] ) meTestPulseG06_[1]->setEntries( 0 );
1560  if ( meTestPulseG12_[0] ) meTestPulseG12_[0]->setEntries( 0 );
1561  if ( meTestPulseG12_[1] ) meTestPulseG12_[1]->setEntries( 0 );
1567 
1568  if ( meRecHitEnergy_[0] ) meRecHitEnergy_[0]->setEntries( 0 );
1569  if ( meRecHitEnergy_[1] ) meRecHitEnergy_[1]->setEntries( 0 );
1570  if ( meTiming_[0] ) meTiming_[0]->setEntries( 0 );
1571  if ( meTiming_[1] ) meTiming_[1]->setEntries( 0 );
1572  if ( meTimingMean1D_[0] ) meTimingMean1D_[0]->Reset();
1573  if ( meTimingMean1D_[1] ) meTimingMean1D_[1]->Reset();
1574  if ( meTimingRMS1D_[0] ) meTimingRMS1D_[0]->Reset();
1575  if ( meTimingRMS1D_[1] ) meTimingRMS1D_[1]->Reset();
1576  if ( meTimingMean_ ) meTimingMean_->Reset();
1577  if ( meTimingRMS_ ) meTimingRMS_->Reset();
1578  if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setEntries( 0 );
1579  if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setEntries( 0 );
1586 
1587  if ( meGlobalSummary_[0] ) meGlobalSummary_[0]->setEntries( 0 );
1588  if ( meGlobalSummary_[1] ) meGlobalSummary_[1]->setEntries( 0 );
1589 
1590  for ( unsigned int i=0; i<clients_.size(); i++ ) {
1591 
1592  EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
1593  EEStatusFlagsClient* eesfc = dynamic_cast<EEStatusFlagsClient*>(clients_[i]);
1594  EEPedestalOnlineClient* eepoc = dynamic_cast<EEPedestalOnlineClient*>(clients_[i]);
1595 
1596  EELaserClient* eelc = dynamic_cast<EELaserClient*>(clients_[i]);
1597  EELedClient* eeldc = dynamic_cast<EELedClient*>(clients_[i]);
1598  EEPedestalClient* eepc = dynamic_cast<EEPedestalClient*>(clients_[i]);
1599  EETestPulseClient* eetpc = dynamic_cast<EETestPulseClient*>(clients_[i]);
1600 
1601  EETimingClient* eetmc = dynamic_cast<EETimingClient*>(clients_[i]);
1602  EETriggerTowerClient* eetttc = dynamic_cast<EETriggerTowerClient*>(clients_[i]);
1603 
1604  MonitorElement *me;
1605  MonitorElement *me_01, *me_02, *me_03;
1606  MonitorElement *me_04, *me_05;
1607  // MonitorElement *me_f[6], *me_fg[2];
1608  TH2F* h2;
1609  TH2F* h3;
1610 
1611  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
1612 
1613  int ism = superModules_[i];
1614 
1615  me = dqmStore_->get( prefixME_ + "/EEOccupancyTask/EEOT rec hit energy " + Numbers::sEE(ism) );
1616  hot01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hot01_[ism-1] );
1617 
1618  me = dqmStore_->get( prefixME_ + "/EEPedestalOnlineTask/Gain12/EEPOT pedestal " + Numbers::sEE(ism) + " G12" );
1619  hpot01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hpot01_[ism-1] );
1620 
1621  me = dqmStore_->get( prefixME_ + "/EETriggerTowerTask/EETTT Et map Real Digis " + Numbers::sEE(ism) );
1622  httt01_[ism-1] = UtilsClient::getHisto( me, cloneME_, httt01_[ism-1] );
1623 
1624  me = dqmStore_->get( prefixME_ + "/EETimingTask/EETMT timing " + Numbers::sEE(ism) );
1625  htmt01_[ism-1] = UtilsClient::getHisto( me, cloneME_, htmt01_[ism-1] );
1626 
1627  me = dqmStore_->get( prefixME_ + "/EcalInfo/EEMM DCC" );
1629 
1630  me = dqmStore_->get( prefixME_ + "/EERawDataTask/EERDT L1A FE errors" );
1632 
1633  for ( int ix = 1; ix <= 50; ix++ ) {
1634  for ( int iy = 1; iy <= 50; iy++ ) {
1635 
1636  int jx = ix + Numbers::ix0EE(ism);
1637  int jy = iy + Numbers::iy0EE(ism);
1638 
1639  if ( ism >= 1 && ism <= 9 ) {
1640  if ( ! Numbers::validEE(ism, 101 - jx, jy) ) continue;
1641  } else {
1642  if ( ! Numbers::validEE(ism, jx, jy) ) continue;
1643  }
1644 
1645  if ( eeic ) {
1646 
1647  me = eeic->meg01_[ism-1];
1648 
1649  if ( me ) {
1650 
1651  float xval = me->getBinContent( ix, iy );
1652 
1653  if ( ism >= 1 && ism <= 9 ) {
1654  meIntegrity_[0]->setBinContent( 101 - jx, jy, xval );
1655  } else {
1656  meIntegrity_[1]->setBinContent( jx, jy, xval );
1657  }
1658 
1659  if ( xval == 0 ) meIntegrityErr_->Fill( ism );
1660 
1661  }
1662 
1663  h2 = eeic->h_[ism-1];
1664 
1665  if ( h2 ) {
1666 
1667  float xval = h2->GetBinContent( ix, iy );
1668 
1669  if ( ism >= 1 && ism <= 9 ) {
1670  if ( xval != 0 ) meOccupancy_[0]->setBinContent( 101 - jx, jy, xval );
1671  } else {
1672  if ( xval != 0 ) meOccupancy_[1]->setBinContent( jx, jy, xval );
1673  }
1674 
1675  meOccupancy1D_->Fill( ism, xval );
1676 
1677  }
1678 
1679  }
1680 
1681  if ( eepoc ) {
1682 
1683  me = eepoc->meg03_[ism-1];
1684 
1685  if ( me ) {
1686 
1687  float xval = me->getBinContent( ix, iy );
1688 
1689  if ( ism >= 1 && ism <= 9 ) {
1690  mePedestalOnline_[0]->setBinContent( 101 - jx, jy, xval );
1691  } else {
1692  mePedestalOnline_[1]->setBinContent( jx, jy, xval );
1693  }
1694 
1695  if ( xval == 0 ) mePedestalOnlineErr_->Fill( ism );
1696 
1697  }
1698 
1699  float num01, mean01, rms01;
1700  bool update01 = UtilsClient::getBinStatistics(hpot01_[ism-1], ix, iy, num01, mean01, rms01);
1701 
1702  if ( update01 ) {
1703 
1704  mePedestalOnlineRMS_->Fill( ism, rms01 );
1705  mePedestalOnlineMean_->Fill( ism, mean01 );
1706 
1707  if ( ism >= 1 && ism <= 9 ) {
1708  mePedestalOnlineRMSMap_[0]->setBinContent( 101 - jx, jy, rms01 );
1709  } else {
1710  mePedestalOnlineRMSMap_[1]->setBinContent( jx, jy, rms01 );
1711  }
1712 
1713  }
1714 
1715  }
1716 
1717  if ( eelc ) {
1718 
1719  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1720 
1721  me = eelc->meg01_[ism-1];
1722 
1723  if ( me ) {
1724 
1725  float xval = me->getBinContent( ix, iy );
1726 
1727  if ( me->getEntries() != 0 ) {
1728  if ( ism >= 1 && ism <= 9 ) {
1729  meLaserL1_[0]->setBinContent( 101 - jx, jy, xval );
1730  } else {
1731  meLaserL1_[1]->setBinContent( jx, jy, xval );
1732  }
1733 
1734  if ( xval == 0 ) meLaserL1Err_->Fill( ism );
1735  }
1736 
1737  }
1738 
1739  }
1740 
1741  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1742 
1743  me = eelc->meg02_[ism-1];
1744 
1745  if ( me ) {
1746 
1747  float xval = me->getBinContent( ix, iy );
1748 
1749  if ( me->getEntries() != 0 ) {
1750  if ( ism >= 1 && ism <= 9 ) {
1751  meLaserL2_[0]->setBinContent( 101 - jx, jy, xval );
1752  } else {
1753  meLaserL2_[1]->setBinContent( jx, jy, xval );
1754  }
1755 
1756  if ( xval == 0 ) meLaserL2Err_->Fill( ism );
1757  }
1758 
1759  }
1760 
1761  }
1762 
1763  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1764 
1765  me = eelc->meg03_[ism-1];
1766 
1767  if ( me ) {
1768 
1769  float xval = me->getBinContent( ix, iy );
1770 
1771  if ( me->getEntries() != 0 ) {
1772  if ( ism >= 1 && ism <= 9 ) {
1773  meLaserL3_[0]->setBinContent( 101 - jx, jy, xval );
1774  } else {
1775  meLaserL3_[1]->setBinContent( jx, jy, xval );
1776  }
1777 
1778  if ( xval == 0 ) meLaserL3Err_->Fill( ism );
1779  }
1780 
1781  }
1782 
1783  }
1784 
1785  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1786 
1787  me = eelc->meg04_[ism-1];
1788 
1789  if ( me ) {
1790 
1791  float xval = me->getBinContent( ix, iy );
1792 
1793  if ( me->getEntries() != 0 ) {
1794  if ( ism >= 1 && ism <= 9 ) {
1795  meLaserL4_[0]->setBinContent( 101 - jx, jy, xval );
1796  } else {
1797  meLaserL4_[1]->setBinContent( jx, jy, xval );
1798  }
1799 
1800  if ( xval == 0 ) meLaserL4Err_->Fill( ism );
1801  }
1802 
1803  }
1804 
1805  }
1806 
1807  }
1808 
1809  if ( eeldc ) {
1810 
1811  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1812 
1813  me = eeldc->meg01_[ism-1];
1814 
1815  if ( me ) {
1816 
1817  float xval = me->getBinContent( ix, iy );
1818 
1819  if ( me->getEntries() != 0 ) {
1820  if ( ism >= 1 && ism <= 9 ) {
1821  meLedL1_[0]->setBinContent( 101 - jx, jy, xval );
1822  } else {
1823  meLedL1_[1]->setBinContent( jx, jy, xval );
1824  }
1825 
1826  if ( xval == 0 ) meLedL1Err_->Fill( ism );
1827  }
1828 
1829  }
1830 
1831  }
1832 
1833  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1834 
1835  me = eeldc->meg02_[ism-1];
1836 
1837  if ( me ) {
1838 
1839  float xval = me->getBinContent( ix, iy );
1840 
1841  if ( me->getEntries() != 0 ) {
1842  if ( ism >= 1 && ism <= 9 ) {
1843  meLedL2_[0]->setBinContent( 101 - jx, jy, xval );
1844  } else {
1845  meLedL2_[1]->setBinContent( jx, jy, xval );
1846  }
1847 
1848  if ( xval == 0 ) meLedL2Err_->Fill( ism );
1849  }
1850 
1851  }
1852 
1853  }
1854 
1855  }
1856 
1857  if ( eepc ) {
1858 
1859  me_01 = eepc->meg01_[ism-1];
1860  me_02 = eepc->meg02_[ism-1];
1861  me_03 = eepc->meg03_[ism-1];
1862 
1863  if ( me_01 ) {
1864  float val_01=me_01->getBinContent(ix,iy);
1865  if ( me_01->getEntries() != 0 ) {
1866  if ( ism >= 1 && ism <= 9 ) {
1867  mePedestalG01_[0]->setBinContent( 101 - jx, jy, val_01 );
1868  } else {
1869  mePedestalG01_[1]->setBinContent( jx, jy, val_01 );
1870  }
1871  }
1872  }
1873  if ( me_02 ) {
1874  float val_02=me_02->getBinContent(ix,iy);
1875  if ( me_02->getEntries() != 0 ) {
1876  if ( ism >= 1 && ism <= 9 ) {
1877  mePedestalG06_[0]->setBinContent( 101 - jx, jy, val_02 );
1878  } else {
1879  mePedestalG06_[1]->setBinContent( jx, jy, val_02 );
1880  }
1881  }
1882  }
1883  if ( me_03 ) {
1884  float val_03=me_03->getBinContent(ix,iy);
1885  if ( me_03->getEntries() != 0 ) {
1886  if ( ism >= 1 && ism <= 9 ) {
1887  mePedestalG12_[0]->setBinContent( 101 - jx, jy, val_03 );
1888  } else {
1889  mePedestalG12_[1]->setBinContent( jx, jy, val_03 );
1890  }
1891  }
1892  }
1893 
1894  }
1895 
1896  if ( eetpc ) {
1897 
1898  me_01 = eetpc->meg01_[ism-1];
1899  me_02 = eetpc->meg02_[ism-1];
1900  me_03 = eetpc->meg03_[ism-1];
1901 
1902  if ( me_01 ) {
1903  float val_01=me_01->getBinContent(ix,iy);
1904  if ( me_01->getEntries() != 0 ) {
1905  if ( ism >= 1 && ism <= 9 ) {
1906  meTestPulseG01_[0]->setBinContent( 101 - jx, jy, val_01 );
1907  } else {
1908  meTestPulseG01_[1]->setBinContent( jx, jy, val_01 );
1909  }
1910  }
1911  }
1912  if ( me_02 ) {
1913  float val_02=me_02->getBinContent(ix,iy);
1914  if ( me_02->getEntries() != 0 ) {
1915  if ( ism >= 1 && ism <= 9 ) {
1916  meTestPulseG06_[0]->setBinContent( 101 - jx, jy, val_02 );
1917  } else {
1918  meTestPulseG06_[1]->setBinContent( jx, jy, val_02 );
1919  }
1920  }
1921  }
1922  if ( me_03 ) {
1923  float val_03=me_03->getBinContent(ix,iy);
1924  if ( me_03->getEntries() != 0 ) {
1925  if ( ism >= 1 && ism <= 9 ) {
1926  meTestPulseG12_[0]->setBinContent( 101 - jx, jy, val_03 );
1927  } else {
1928  meTestPulseG12_[1]->setBinContent( jx, jy, val_03 );
1929  }
1930  }
1931  }
1932 
1933  }
1934 
1935  if ( hot01_[ism-1] ) {
1936 
1937  float xval = hot01_[ism-1]->GetBinContent( ix, iy );
1938 
1939  if ( ism >= 1 && ism <= 9 ) {
1940  meRecHitEnergy_[0]->setBinContent( 101 - jx, jy, xval );
1941  } else {
1942  meRecHitEnergy_[1]->setBinContent( jx, jy, xval );
1943  }
1944 
1945  }
1946 
1947  }
1948  }
1949 
1950  for ( int ix = 1; ix <= 50; ix++ ) {
1951  for ( int iy = 1; iy <= 50; iy++ ) {
1952 
1953  int jx = ix + Numbers::ix0EE(ism);
1954  int jy = iy + Numbers::iy0EE(ism);
1955 
1956  if ( ism >= 1 && ism <= 9 ) {
1957  if ( ! Numbers::validEE(ism, 101 - jx, jy) ) continue;
1958  } else {
1959  if ( ! Numbers::validEE(ism, jx, jy) ) continue;
1960  }
1961 
1962  if ( eesfc ) {
1963 
1964  me = dqmStore_->get(prefixME_ + "/EcalInfo/EEMM DCC");
1965 
1966  float xval = 6;
1967 
1968  if ( me ) {
1969 
1970  xval = 2;
1971  if ( me->getBinContent( ism ) > 0 ) xval = 1;
1972 
1973  }
1974 
1975  me = eesfc->meh01_[ism-1];
1976 
1977  if ( me ) {
1978 
1979  if ( me->getBinContent( ix, iy ) > 0 ) xval = 0;
1980 
1981  if ( ism >= 1 && ism <= 9 ) {
1982 
1983  meStatusFlags_[0]->setBinContent( 101 - jx, jy, xval );
1984 
1985  if ( me->getBinError( ix, iy ) > 0 && me->getBinError( ix, iy ) < 0.1 ) {
1986  UtilsClient::maskBinContent( meStatusFlags_[0], 101 - jx, jy );
1987  }
1988  } else {
1989 
1990  meStatusFlags_[1]->setBinContent( jx, jy, xval );
1991 
1992  if ( me->getBinError( ix, iy ) > 0 && me->getBinError( ix, iy ) < 0.1 ) {
1994  }
1995  }
1996 
1997  if ( xval == 0 ) meStatusFlagsErr_->Fill( ism );
1998 
1999  }
2000 
2001  }
2002 
2003  }
2004  }
2005 
2006  for ( int ix = 1; ix <= 50; ix++ ) {
2007  for ( int iy = 1; iy <= 50; iy++ ) {
2008 
2009  int jx = ix + Numbers::ix0EE(ism);
2010  int jy = iy + Numbers::iy0EE(ism);
2011 
2012  if ( eetttc ) {
2013 
2014  float mean01 = 0;
2015  bool hadNonZeroInterest = false;
2016 
2017  if ( httt01_[ism-1] ) {
2018 
2019  mean01 = httt01_[ism-1]->GetBinContent( ix, iy );
2020 
2021  if ( mean01 != 0. ) {
2022  if ( ism >= 1 && ism <= 9 ) {
2023  if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setBinContent( 101 - jx, jy, mean01 );
2024  } else {
2025  if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setBinContent( jx, jy, mean01 );
2026  }
2027  }
2028 
2029  }
2030 
2031  me = eetttc->me_o01_[ism-1];
2032 
2033  if ( me ) {
2034 
2035  float xval = me->getBinContent( ix, iy );
2036 
2037  if ( xval != 0. ) {
2038  if ( ism >= 1 && ism <= 9 ) {
2039  meTriggerTowerTiming_[0]->setBinContent( 101 - jx, jy, xval );
2040  } else {
2041  meTriggerTowerTiming_[1]->setBinContent( jx, jy, xval );
2042  }
2043  hadNonZeroInterest = true;
2044  }
2045 
2046  }
2047 
2048  me = eetttc->me_o02_[ism-1];
2049 
2050  if ( me ) {
2051 
2052  float xval = me->getBinContent( ix, iy );
2053 
2054  if ( xval != 0. ) {
2055  if ( ism >= 1 && ism <= 9 ) {
2056  meTriggerTowerNonSingleTiming_[0]->setBinContent( 101 - jx, jy, xval );
2057  } else {
2058  meTriggerTowerNonSingleTiming_[1]->setBinContent( jx, jy, xval );
2059  }
2060  }
2061 
2062  }
2063 
2064  float xval = 2;
2065  if( mean01 > 0. ) {
2066 
2067  h2 = eetttc->l01_[ism-1];
2068  h3 = eetttc->l02_[ism-1];
2069 
2070  if ( h2 && h3 ) {
2071 
2072  // float emulErrorVal = h2->GetBinContent( ix, iy ) + h3->GetBinContent( ix, iy );
2073  float emulErrorVal = h2->GetBinContent( ix, iy );
2074 
2075  if( emulErrorVal!=0 && hadNonZeroInterest ) xval = 0;
2076 
2077  }
2078 
2079  if ( xval!=0 && hadNonZeroInterest ) xval = 1;
2080 
2081  }
2082 
2083  // see fix below
2084  if ( xval == 2 ) continue;
2085 
2086  if ( ism >= 1 && ism <= 9 ) {
2087  meTriggerTowerEmulError_[0]->setBinContent( 101 - jx, jy, xval );
2088  } else {
2089  meTriggerTowerEmulError_[1]->setBinContent( jx, jy, xval );
2090  }
2091 
2092  }
2093 
2094  if ( eetmc ) {
2095 
2096  float num01, mean01, rms01;
2097  bool update01 = UtilsClient::getBinStatistics(htmt01_[ism-1], ix, iy, num01, mean01, rms01, 1.);
2098  mean01 -= 50.;
2099 
2100  if( update01 ){
2101 
2102  if ( ism >= 1 && ism <= 9 ) {
2103  meTimingMean1D_[0]->Fill(mean01);
2104  meTimingRMS1D_[0]->Fill(rms01);
2105  } else {
2106  meTimingMean1D_[1]->Fill(mean01);
2107  meTimingRMS1D_[1]->Fill(rms01);
2108  }
2109 
2110  meTimingMean_->Fill( ism, mean01 );
2111 
2112  meTimingRMS_->Fill( ism, rms01 );
2113 
2114  }
2115 
2116  }
2117 
2118  }
2119  }
2120 
2121  for ( int ix = 1; ix <= 10; ix++ ) {
2122  for( int iy = 1; iy <= 10; iy++ ) {
2123 
2124  int jx = ix + Numbers::ix0EE(ism) / 5;
2125  int jy = iy + Numbers::iy0EE(ism) / 5;
2126 
2127  if( jx <= 0 || jx >= 21 || jy <= 0 || jy >= 21 ) continue;
2128 
2129  if ( ism >= 1 && ism <= 9 ) {
2130  if ( ! Numbers::validEESc(ism, 21 - jx, jy) ) continue;
2131  } else {
2132  if ( ! Numbers::validEESc(ism, jx, jy) ) continue;
2133  }
2134 
2135  if ( eetmc ) {
2136 
2137  if ( htmt01_[ism-1] ) {
2138 
2139  int ixedge = (ix-1) * 5;
2140  int iyedge = (iy-1) * 5;
2141  int jxedge = (jx-1) * 5;
2142  int jyedge = (jy-1) * 5;
2143 
2144  float nvalid = 0.;
2145  float ent, cont, err;
2146  float num, sum, sumw2;
2147  num = sum = sumw2 = 0.;
2148  bool mask = false;
2149  for(int cx=1; cx<=5; cx++){
2150  for(int cy=1; cy<=5; cy++){
2151  int scjx = jxedge + cx;
2152  int scjy = jyedge + cy;
2153  int scix = ixedge + cx;
2154  int sciy = iyedge + cy;
2155 
2156  if ( ism >= 1 && ism <= 9 ) {
2157  if ( ! Numbers::validEE(ism, 101 - scjx, scjy) ) continue;
2158  } else {
2159  if ( ! Numbers::validEE(ism, scjx, scjy) ) continue;
2160  }
2161  nvalid += 1.;
2162 
2163  int bin = htmt01_[ism-1]->GetBin(scix, sciy);
2164 
2165  // htmt01_ are booked with option "s" -> error = RMS not RMS/sqrt(N)
2166  ent = htmt01_[ism-1]->GetBinEntries( bin );
2167  cont = htmt01_[ism-1]->GetBinContent( bin ) - 50.;
2168  err = htmt01_[ism-1]->GetBinError( bin );
2169 
2170  num += ent;
2171  sum += cont * ent;
2172  sumw2 += (err * err + cont * cont) * ent;
2173 
2174  if( ent > 1 && (std::abs(cont) > 3. || err > 4.) && Masks::maskChannel(ism, scix, sciy, chWarnBit, EcalEndcap) ) mask = true;
2175  }
2176  }
2177 
2178  float xval = 2.;
2179  if( num > (10. * nvalid / 25.) ){
2180 
2181  float mean = sum / num;
2182  float rms = std::sqrt( sumw2 / num - mean * mean );
2183 
2184  if( std::abs(mean) > 3. || rms > 4. ) xval = 0.;
2185  else xval = 1.;
2186 
2187  }
2188 
2189  int ind;
2190  if ( ism >= 1 && ism <= 9 ){
2191  jx = 21 - jx;
2192  ind = 0;
2193  }else{
2194  ind = 1;
2195  }
2196 
2197  meTiming_[ind]->setBinContent( jx, jy, xval );
2198  if ( mask ) UtilsClient::maskBinContent( meTiming_[ind], jx, jy );
2199 
2200  }
2201 
2202  }
2203 
2204  }
2205  }
2206  // PN's summaries
2207  for( int i = 1; i <= 10; i++ ) {
2208  for( int j = 1; j <= 5; j++ ) {
2209 
2210  int ichanx;
2211  int ipseudostripx;
2212 
2213  if(ism<=9) {
2214  ichanx = i;
2215  ipseudostripx = (ism<=3) ? j+5*(ism-1+6) : j+5*(ism-1-3);
2216  } else {
2217  ichanx = i+10;
2218  ipseudostripx = (ism<=12) ? j+5*(ism-10+6) : j+5*(ism-10-3);
2219  }
2220 
2221  if ( eeic ) {
2222 
2223  me_04 = eeic->meg02_[ism-1];
2224  h2 = eeic->hmem_[ism-1];
2225 
2226 
2227  if( me_04 ) {
2228 
2229  float xval = me_04->getBinContent(i,j);
2230  meIntegrityPN_->setBinContent( ipseudostripx, ichanx, xval );
2231 
2232  }
2233 
2234  if ( h2 ) {
2235 
2236  float xval = h2->GetBinContent(i,1);
2237  meOccupancyPN_->setBinContent( ipseudostripx, ichanx, xval );
2238 
2239  }
2240 
2241  }
2242 
2243  if ( eepc ) {
2244 
2245  me_04 = eepc->meg04_[ism-1];
2246  me_05 = eepc->meg05_[ism-1];
2247 
2248  if( me_04 ) {
2249  float val_04=me_04->getBinContent(i,1);
2250  mePedestalPNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
2251  }
2252  if( me_05 ) {
2253  float val_05=me_05->getBinContent(i,1);
2254  mePedestalPNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
2255  }
2256 
2257  }
2258 
2259  if ( eetpc ) {
2260 
2261  me_04 = eetpc->meg04_[ism-1];
2262  me_05 = eetpc->meg05_[ism-1];
2263 
2264  if( me_04 ) {
2265  float val_04=me_04->getBinContent(i,1);
2266  meTestPulsePNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
2267  }
2268  if( me_05 ) {
2269  float val_05=me_05->getBinContent(i,1);
2270  meTestPulsePNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
2271  }
2272 
2273  }
2274 
2275  if ( eelc ) {
2276 
2277  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
2278 
2279  me = eelc->meg09_[ism-1];
2280 
2281  if( me ) {
2282 
2283  float xval = me->getBinContent(i,1);
2284 
2285  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2286  meLaserL1PN_->setBinContent( ipseudostripx, ichanx, xval );
2287  if ( xval == 0 ) meLaserL1PNErr_->Fill( ism );
2288  }
2289 
2290  }
2291 
2292  }
2293 
2294  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
2295 
2296  me = eelc->meg10_[ism-1];
2297 
2298  if( me ) {
2299 
2300  float xval = me->getBinContent(i,1);
2301 
2302  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2303  meLaserL2PN_->setBinContent( ipseudostripx, ichanx, xval );
2304  if ( xval == 0 ) meLaserL2PNErr_->Fill( ism );
2305  }
2306 
2307  }
2308 
2309  }
2310 
2311  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
2312 
2313  me = eelc->meg11_[ism-1];
2314 
2315  if( me ) {
2316 
2317  float xval = me->getBinContent(i,1);
2318 
2319  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2320  meLaserL3PN_->setBinContent( ipseudostripx, ichanx, xval );
2321  if ( xval == 0 ) meLaserL3PNErr_->Fill( ism );
2322  }
2323 
2324  }
2325 
2326  }
2327 
2328  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
2329 
2330  me = eelc->meg12_[ism-1];
2331 
2332  if( me ) {
2333 
2334  float xval = me->getBinContent(i,1);
2335 
2336  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2337  meLaserL4PN_->setBinContent( ipseudostripx, ichanx, xval );
2338  if ( xval == 0 ) meLaserL4PNErr_->Fill( ism );
2339  }
2340 
2341  }
2342 
2343  }
2344 
2345  }
2346 
2347  if ( eeldc ) {
2348 
2349  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
2350 
2351  me = eeldc->meg09_[ism-1];
2352 
2353  if( me ) {
2354 
2355  float xval = me->getBinContent(i,1);
2356 
2357  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2358  meLedL1PN_->setBinContent( ipseudostripx, ichanx, xval );
2359  if ( xval == 0 ) meLedL1PNErr_->Fill( ism );
2360  }
2361 
2362  }
2363 
2364  }
2365 
2366  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
2367 
2368  me = eeldc->meg10_[ism-1];
2369 
2370  if( me ) {
2371 
2372  float xval = me->getBinContent(i,1);
2373 
2374  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2375  meLedL2PN_->setBinContent( ipseudostripx, ichanx, xval );
2376  if ( xval == 0 ) meLedL2PNErr_->Fill( ism );
2377  }
2378 
2379  }
2380 
2381  }
2382 
2383  }
2384 
2385  }
2386  }
2387 
2388  for ( int ix=1; ix<=50; ix++ ) {
2389  for (int iy=1; iy<=50; iy++ ) {
2390 
2391  int jx = ix + Numbers::ix0EE(ism);
2392  int jy = iy + Numbers::iy0EE(ism);
2393 
2394  int ic = -1;
2395  if ( ism >= 1 && ism <= 9 ) {
2396  ic = Numbers::icEE(ism, 101 - jx, jy);
2397  } else {
2398  ic = Numbers::icEE(ism, jx, jy);
2399  }
2400 
2401  if( ic != -1 ) {
2402 
2403  if ( eelc ) {
2404 
2405  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
2406 
2407  MonitorElement *meg = eelc->meg01_[ism-1];
2408 
2409  float xval = 2;
2410  if ( meg ) xval = meg->getBinContent( ix, iy );
2411 
2412  // exclude channels without laser data (yellow in the quality map)
2413  if( xval != 2 && xval != 5 ) {
2414 
2415  MonitorElement* mea01 = eelc->mea01_[ism-1];
2416  MonitorElement* met01 = eelc->met01_[ism-1];
2417  MonitorElement* meaopn01 = eelc->meaopn01_[ism-1];
2418 
2419  if( mea01 && met01 && meaopn01 ) {
2420  meLaserL1Ampl_->Fill( ism, mea01->getBinContent( ic ) );
2421  if( met01->getBinContent( ic ) > 0. ) meLaserL1Timing_->Fill( ism, met01->getBinContent( ic ) );
2422  meLaserL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( ic ) );
2423  }
2424 
2425  }
2426 
2427  }
2428 
2429  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
2430 
2431  MonitorElement *meg = eelc->meg02_[ism-1];
2432 
2433  float xval = 2;
2434  if ( meg ) xval = meg->getBinContent( ix, iy );
2435 
2436  // exclude channels without laser data (yellow in the quality map)
2437  if( xval != 2 && xval != 5 ) {
2438 
2439  MonitorElement* mea02 = eelc->mea02_[ism-1];
2440  MonitorElement* met02 = eelc->met02_[ism-1];
2441  MonitorElement* meaopn02 = eelc->meaopn02_[ism-1];
2442 
2443  if( mea02 && met02 && meaopn02 ) {
2444  meLaserL2Ampl_->Fill( ism, mea02->getBinContent( ic ) );
2445  if( met02->getBinContent( ic ) > 0. ) meLaserL2Timing_->Fill( ism, met02->getBinContent( ic ) );
2446  meLaserL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( ic ) );
2447  }
2448 
2449  }
2450 
2451  }
2452 
2453  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
2454 
2455  MonitorElement *meg = eelc->meg03_[ism-1];
2456 
2457  float xval = 2;
2458  if ( meg ) xval = meg->getBinContent( ix, iy );
2459 
2460  // exclude channels without laser data (yellow in the quality map)
2461  if( xval != 2 && xval != 5 ) {
2462 
2463  MonitorElement* mea03 = eelc->mea03_[ism-1];
2464  MonitorElement* met03 = eelc->met03_[ism-1];
2465  MonitorElement* meaopn03 = eelc->meaopn03_[ism-1];
2466 
2467  if( mea03 && met03 && meaopn03 ) {
2468  meLaserL3Ampl_->Fill( ism, mea03->getBinContent( ic ) );
2469  if( met03->getBinContent( ic ) > 0. ) meLaserL3Timing_->Fill( ism, met03->getBinContent( ic ) );
2470  meLaserL3AmplOverPN_->Fill( ism, meaopn03->getBinContent( ic ) );
2471  }
2472 
2473  }
2474 
2475  }
2476 
2477  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
2478 
2479  MonitorElement *meg = eelc->meg04_[ism-1];
2480 
2481  float xval = 2;
2482  if ( meg ) xval = meg->getBinContent( ix, iy );
2483 
2484  // exclude channels without laser data (yellow in the quality map)
2485  if( xval != 2 && xval != 5 ) {
2486 
2487  MonitorElement* mea04 = eelc->mea04_[ism-1];
2488  MonitorElement* met04 = eelc->met04_[ism-1];
2489  MonitorElement* meaopn04 = eelc->meaopn04_[ism-1];
2490 
2491  if( mea04 && met04 && meaopn04 ) {
2492  meLaserL4Ampl_->Fill( ism, mea04->getBinContent( ic ) );
2493  if( met04->getBinContent( ic ) > 0. ) meLaserL4Timing_->Fill( ism, met04->getBinContent( ic ) );
2494  meLaserL4AmplOverPN_->Fill( ism, meaopn04->getBinContent( ic ) );
2495  }
2496 
2497  }
2498 
2499  }
2500 
2501  }
2502 
2503  if ( eeldc ) {
2504 
2505  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
2506 
2507  MonitorElement *meg = eeldc->meg01_[ism-1];
2508 
2509  float xval = 2;
2510  if ( meg ) xval = meg->getBinContent( ix, iy );
2511 
2512  // exclude channels without led data (yellow in the quality map)
2513  if( xval != 2 && xval != 5 ) {
2514 
2515  MonitorElement* mea01 = eeldc->mea01_[ism-1];
2516  MonitorElement* met01 = eeldc->met01_[ism-1];
2517  MonitorElement* meaopn01 = eeldc->meaopn01_[ism-1];
2518 
2519  if( mea01 && met01 && meaopn01 ) {
2520  meLedL1Ampl_->Fill( ism, mea01->getBinContent( ic ) );
2521  if( met01->getBinContent( ic ) > 0. ) meLedL1Timing_->Fill( ism, met01->getBinContent( ic ) );
2522  meLedL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( ic ) );
2523  }
2524 
2525  }
2526 
2527  }
2528 
2529  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
2530 
2531  MonitorElement *meg = eeldc->meg02_[ism-1];
2532 
2533  float xval = 2;
2534  if ( meg ) xval = meg->getBinContent( ix, iy );
2535 
2536  // exclude channels without led data (yellow in the quality map)
2537  if( xval != 2 && xval != 5 ) {
2538 
2539  MonitorElement* mea02 = eeldc->mea02_[ism-1];
2540  MonitorElement* met02 = eeldc->met02_[ism-1];
2541  MonitorElement* meaopn02 = eeldc->meaopn02_[ism-1];
2542 
2543  if( mea02 && met02 && meaopn02 ) {
2544  meLedL2Ampl_->Fill( ism, mea02->getBinContent( ic ) );
2545  if( met02->getBinContent( ic ) > 0. ) meLedL2Timing_->Fill( ism, met02->getBinContent( ic ) );
2546  meLedL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( ic ) );
2547  }
2548 
2549  }
2550 
2551  }
2552 
2553  }
2554 
2555  if ( eetpc ) {
2556 
2557  MonitorElement *meg01 = eetpc->meg01_[ism-1];
2558  MonitorElement *meg02 = eetpc->meg02_[ism-1];
2559  MonitorElement *meg03 = eetpc->meg03_[ism-1];
2560 
2561  if ( meg01 ) {
2562 
2563  float xval01 = meg01->getBinContent( ix, iy );
2564 
2565  if ( xval01 != 2 && xval01 != 5 ) {
2566 
2567  me = eetpc->mea01_[ism-1];
2568 
2569  if ( me ) {
2570 
2571  meTestPulseAmplG01_->Fill( ism, me->getBinContent( ic ) );
2572 
2573  }
2574 
2575  }
2576 
2577  }
2578 
2579  if ( meg02 ) {
2580 
2581  float xval02 = meg02->getBinContent( ix, iy );
2582 
2583  if ( xval02 != 2 && xval02 != 5 ) {
2584 
2585  me = eetpc->mea02_[ism-1];
2586 
2587  if ( me ) {
2588 
2589  meTestPulseAmplG06_->Fill( ism, me->getBinContent( ic ) );
2590 
2591  }
2592 
2593  }
2594 
2595  }
2596 
2597  if ( meg03 ) {
2598 
2599  float xval03 = meg03->getBinContent( ix, iy );
2600 
2601  if ( xval03 != 2 && xval03 != 5 ) {
2602 
2603  me = eetpc->mea03_[ism-1];
2604 
2605  if ( me ) {
2606 
2607  meTestPulseAmplG12_->Fill( ism, me->getBinContent( ic ) );
2608 
2609  }
2610 
2611  }
2612 
2613  }
2614 
2615  } //etpc
2616 
2617  }
2618 
2619  } // loop on jy
2620  } // loop on jx
2621 
2622  } // loop on SM
2623 
2624  // fix TPG quality plots
2625 
2626  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
2627 
2628  int ism = superModules_[i];
2629 
2630  for ( int ix = 1; ix <= 50; ix++ ) {
2631  for ( int iy = 1; iy <= 50; iy++ ) {
2632 
2633  int jx = ix + Numbers::ix0EE(ism);
2634  int jy = iy + Numbers::iy0EE(ism);
2635 
2636  if ( eetttc ) {
2637 
2638  if ( ism >= 1 && ism <= 9 ) {
2639  if ( meTriggerTowerEmulError_[0]->getBinContent( 101 - jx, jy ) == 6 ) {
2640  if ( Numbers::validEE(ism, 101 - jx, jy) ) meTriggerTowerEmulError_[0]->setBinContent( 101 - jx, jy, 2 );
2641  }
2642  } else {
2643  if ( meTriggerTowerEmulError_[1]->getBinContent( jx, jy ) == 6 ) {
2644  if ( Numbers::validEE(ism, jx, jy) ) meTriggerTowerEmulError_[1]->setBinContent( jx, jy, 2 );
2645  }
2646  }
2647 
2648  }
2649 
2650  }
2651  }
2652 
2653  }
2654 
2655  } // loop on clients
2656 
2657  // The global-summary
2658  int nGlobalErrors = 0;
2659  int nGlobalErrorsEE[18];
2660  int nValidChannels = 0;
2661  int nValidChannelsEE[18];
2662 
2663  for (int i = 0; i < 18; i++) {
2664  nGlobalErrorsEE[i] = 0;
2665  nValidChannelsEE[i] = 0;
2666  }
2667 
2668  for ( int jx = 1; jx <= 100; jx++ ) {
2669  for ( int jy = 1; jy <= 100; jy++ ) {
2670 
2672 
2673  float xval = 6;
2674  float val_in = meIntegrity_[0]->getBinContent(jx,jy);
2675  float val_po = mePedestalOnline_[0]->getBinContent(jx,jy);
2676  float val_tm = meTiming_[0]->getBinContent((jx-1)/5+1,(jy-1)/5+1);
2677  float val_sf = meStatusFlags_[0]->getBinContent(jx,jy);
2678  // float val_ee = meTriggerTowerEmulError_[0]->getBinContent(jx,jy); // removed temporarily from the global summary
2679  float val_ee = 1;
2680 
2681  // combine all the available wavelenghts in unique laser status
2682  // for each laser turn dark color and yellow into bright green
2683  float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
2684  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
2685  if ( meLaserL1_[0] ) val_ls_1 = meLaserL1_[0]->getBinContent(jx,jy);
2686  if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
2687  }
2688  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
2689  if ( meLaserL2_[0] ) val_ls_2 = meLaserL2_[0]->getBinContent(jx,jy);
2690  if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
2691  }
2692  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
2693  if ( meLaserL3_[0] ) val_ls_3 = meLaserL3_[0]->getBinContent(jx,jy);
2694  if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
2695  }
2696  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
2697  if ( meLaserL4_[0] ) val_ls_4 = meLaserL4_[0]->getBinContent(jx,jy);
2698  if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
2699  }
2700 
2701  float val_ls = 1;
2702  if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
2703 
2704  // combine all the available wavelenghts in unique led status
2705  // for each laser turn dark color and yellow into bright green
2706  float val_ld_1=2, val_ld_2=2;
2707  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
2708  if ( meLedL1_[0] ) val_ld_1 = meLedL1_[0]->getBinContent(jx,jy);
2709  if(val_ld_1==2 || val_ld_1==3 || val_ld_1==4 || val_ld_1==5) val_ld_1=1;
2710  }
2711  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
2712  if ( meLedL2_[0] ) val_ld_2 = meLedL2_[0]->getBinContent(jx,jy);
2713  if(val_ld_2==2 || val_ld_2==3 || val_ld_2==4 || val_ld_2==5) val_ld_2=1;
2714  }
2715 
2716  float val_ld = 1;
2717  if (val_ld_1 == 0 || val_ld_2==0) val_ld=0;
2718 
2719  // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY UNTIL LHC COLLISIONS
2720  val_ls = 1;
2721  val_ld = 1;
2722 
2723  // turn each dark color (masked channel) to bright green
2724  // for laser & timing & trigger turn also yellow into bright green
2725  // for pedestal online too because is not computed in calibration events
2726 
2727  // 0/3 = red/dark red
2728  // 1/4 = green/dark green
2729  // 2/5 = yellow/dark yellow
2730  // 6 = unknown
2731 
2732  if( val_in==3 || val_in==4 || val_in==5) val_in=1;
2733  if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
2734  if(val_ls==2 || val_ls==3 || val_ls==4 || val_ls==5) val_ls=1;
2735  if(val_ld==2 || val_ld==3 || val_ld==4 || val_ld==5) val_ld=1;
2736  if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
2737  if( val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
2738  if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
2739 
2740  if(val_in==6) xval=6;
2741  else if(val_in==0) xval=0;
2742  else if(val_po==0 || val_ls==0 || val_ld==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
2743  else if(val_po==2 || val_ls==2 || val_ld==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
2744  else xval=1;
2745 
2746  bool validCry = false;
2747 
2748  // if the SM is entirely not read, the masked channels
2749  // are reverted back to yellow
2750  float iEntries=0;
2751 
2752  for(int ism = 1; ism <= 9; ism++) {
2753  std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
2754  if (iter != superModules_.end()) {
2755  if ( Numbers::validEE(ism, jx, jy) ) {
2756  validCry = true;
2757 
2758  // recycle the validEE for the synch check of the DCC
2759  if(norm01_ && synch01_) {
2760  float frac_synch_errors = 0.;
2761  float norm = norm01_->GetBinContent(ism);
2762  if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
2763  float val_sy = (frac_synch_errors <= synchErrorThreshold_);
2764  if(val_sy==0) xval=0;
2765  }
2766 
2767  for ( unsigned int i=0; i<clients_.size(); i++ ) {
2768  EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
2769  if ( eeic ) {
2770  TH2F* h2 = eeic->h_[ism-1];
2771  if ( h2 ) {
2772  iEntries = h2->GetEntries();
2773  }
2774  }
2775  }
2776  }
2777  }
2778  }
2779 
2780  if ( validCry && iEntries==0 ) {
2781  xval=2;
2782  }
2783 
2784  meGlobalSummary_[0]->setBinContent( jx, jy, xval );
2785 
2786  if ( xval >= 0 && xval <= 5 ) {
2787  if ( xval != 2 && xval != 5 ) ++nValidChannels;
2788  for (int i = 1; i <= 9; i++) {
2789  if ( xval != 2 && xval != 5 ) {
2790  if ( Numbers::validEE(i, jx, jy) ) ++nValidChannelsEE[i-1];
2791  }
2792  }
2793  if ( xval == 0 ) ++nGlobalErrors;
2794  for (int i = 1; i <= 9; i++) {
2795  if ( xval == 0 ) {
2796  if ( Numbers::validEE(i, jx, jy) ) ++nGlobalErrorsEE[i-1];
2797  }
2798  }
2799  }
2800 
2801  }
2802 
2804 
2805  float xval = 6;
2806  float val_in = meIntegrity_[1]->getBinContent(jx,jy);
2807  float val_po = mePedestalOnline_[1]->getBinContent(jx,jy);
2808  float val_tm = meTiming_[1]->getBinContent((jx-1)/5+1,(jy-1)/5+1);
2809  float val_sf = meStatusFlags_[1]->getBinContent(jx,jy);
2810  // float val_ee = meTriggerTowerEmulError_[1]->getBinContent(jx,jy); // removed temporarily from the global summary
2811  float val_ee = 1;
2812 
2813  // combine all the available wavelenghts in unique laser status
2814  // for each laser turn dark color and yellow into bright green
2815  float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
2816  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
2817  if ( meLaserL1_[1] ) val_ls_1 = meLaserL1_[1]->getBinContent(jx,jy);
2818  if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
2819  }
2820  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
2821  if ( meLaserL2_[1] ) val_ls_2 = meLaserL2_[1]->getBinContent(jx,jy);
2822  if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
2823  }
2824  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
2825  if ( meLaserL3_[1] ) val_ls_3 = meLaserL3_[1]->getBinContent(jx,jy);
2826  if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
2827  }
2828  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
2829  if ( meLaserL4_[1] ) val_ls_4 = meLaserL4_[1]->getBinContent(jx,jy);
2830  if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
2831  }
2832 
2833  float val_ls = 1;
2834  if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
2835 
2836  // combine all the available wavelenghts in unique laser status
2837  // for each laser turn dark color and yellow into bright green
2838  float val_ld_1=2, val_ld_2=2;
2839  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
2840  if ( meLedL1_[1] ) val_ld_1 = meLedL1_[1]->getBinContent(jx,jy);
2841  if(val_ld_1==2 || val_ld_1==3 || val_ld_1==4 || val_ld_1==5) val_ld_1=1;
2842  }
2843  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
2844  if ( meLedL2_[1] ) val_ld_2 = meLedL2_[1]->getBinContent(jx,jy);
2845  if(val_ld_2==2 || val_ld_2==3 || val_ld_2==4 || val_ld_2==5) val_ld_2=1;
2846  }
2847 
2848  float val_ld = 1;
2849  if (val_ld_1 == 0 || val_ld_2==0) val_ld=0;
2850 
2851  // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY UNTIL LHC COLLISIONS
2852  val_ls = 1;
2853  val_ld = 1;
2854 
2855  // turn each dark color to bright green
2856  // for laser & timing & trigger turn also yellow into bright green
2857  // for pedestal online too because is not computed in calibration events
2858 
2859  // 0/3 = red/dark red
2860  // 1/4 = green/dark green
2861  // 2/5 = yellow/dark yellow
2862  // 6 = unknown
2863 
2864  if( val_in==3 || val_in==4 || val_in==5) val_in=1;
2865  if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
2866  if(val_ls==2 || val_ls==3 || val_ls==4 || val_ls==5) val_ls=1;
2867  if(val_ld==2 || val_ld==3 || val_ld==4 || val_ld==5) val_ld=1;
2868  if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
2869  if( val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
2870  if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
2871 
2872  if(val_in==6) xval=6;
2873  else if(val_in==0) xval=0;
2874  else if(val_po==0 || val_ls==0 || val_ld==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
2875  else if(val_po==2 || val_ls==2 || val_ld==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
2876  else xval=1;
2877 
2878  bool validCry = false;
2879 
2880  // if the SM is entirely not read, the masked channels
2881  // are reverted back in yellow
2882  float iEntries=0;
2883 
2884  for(int ism = 10; ism <= 18; ism++) {
2885  std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
2886  if (iter != superModules_.end()) {
2887  if ( Numbers::validEE(ism, jx, jy) ) {
2888  validCry = true;
2889 
2890  // recycle the validEE for the synch check of the DCC
2891  if(norm01_ && synch01_) {
2892  float frac_synch_errors = 0.;
2893  float norm = norm01_->GetBinContent(ism);
2894  if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
2895  float val_sy = (frac_synch_errors <= synchErrorThreshold_);
2896  if(val_sy==0) xval=0;
2897  }
2898 
2899  for ( unsigned int i=0; i<clients_.size(); i++ ) {
2900  EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
2901  if ( eeic ) {
2902  TH2F* h2 = eeic->h_[ism-1];
2903  if ( h2 ) {
2904  iEntries = h2->GetEntries();
2905  }
2906  }
2907  }
2908  }
2909  }
2910  }
2911 
2912  if ( validCry && iEntries==0 ) {
2913  xval=2;
2914  }
2915 
2916  meGlobalSummary_[1]->setBinContent( jx, jy, xval );
2917 
2918  if ( xval >= 0 && xval <= 5 ) {
2919  if ( xval != 2 && xval != 5 ) ++nValidChannels;
2920  for (int i = 10; i <= 18; i++) {
2921  if ( xval != 2 && xval != 5 ) {
2922  if ( Numbers::validEE(i, jx, jy) ) ++nValidChannelsEE[i-1];
2923  }
2924  }
2925  if ( xval == 0 ) ++nGlobalErrors;
2926  for (int i = 10; i <= 18; i++) {
2927  if ( xval == 0 ) {
2928  if ( Numbers::validEE(i, jx, jy) ) ++nGlobalErrorsEE[i-1];
2929  }
2930  }
2931  }
2932 
2933  }
2934 
2935  }
2936  }
2937 
2938  MonitorElement* me;
2939 
2940  float reportSummary = -1.0;
2941  if ( nValidChannels != 0 )
2942  reportSummary = 1.0 - float(nGlobalErrors)/float(nValidChannels);
2943  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary");
2944  if ( me ) me->Fill(reportSummary);
2945 
2946  for (int i = 0; i < 18; i++) {
2947  float reportSummaryEE = -1.0;
2948  if ( nValidChannelsEE[i] != 0 )
2949  reportSummaryEE = 1.0 - float(nGlobalErrorsEE[i])/float(nValidChannelsEE[i]);
2950  me = dqmStore_->get( prefixME_ + "/EventInfo/reportSummaryContents/EcalEndcap_" + Numbers::sEE(i+1) );
2951  if ( me ) me->Fill(reportSummaryEE);
2952  }
2953 
2954  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap");
2955  if ( me ) {
2956 
2957  int nValidChannelsSC[2][20][20];
2958  int nGlobalErrorsSC[2][20][20];
2959  for ( int iside = 0; iside < 2; iside++ ) {
2960  for ( int jxdcc = 0; jxdcc < 20; jxdcc++ ) {
2961  for ( int jydcc = 0; jydcc < 20; jydcc++ ) {
2962  nValidChannelsSC[iside][jxdcc][jydcc] = 0;
2963  nGlobalErrorsSC[iside][jxdcc][jydcc] = 0;
2964  }
2965  }
2966  }
2967 
2968  for (int iside = 0; iside < 2; iside++ ) {
2969  for ( int ix = 1; ix <= 100; ix++ ) {
2970  for ( int iy = 1; iy <= 100; iy++ ) {
2971 
2972  int jxsc = (ix-1)/5;
2973  int jysc = (iy-1)/5;
2974 
2975  float xval = meGlobalSummary_[iside]->getBinContent( ix, iy );
2976 
2977  if ( xval >= 0 && xval <= 5 ) {
2978  if ( xval != 2 && xval != 5 ) ++nValidChannelsSC[iside][jxsc][jysc];
2979  if ( xval == 0 ) ++nGlobalErrorsSC[iside][jxsc][jysc];
2980  }
2981 
2982  }
2983  }
2984  }
2985 
2986  for (int iside = 0; iside < 2; iside++ ) {
2987  for ( int jxsc = 0; jxsc < 20; jxsc++ ) {
2988  for ( int jysc = 0; jysc < 20; jysc++ ) {
2989 
2990  float scval = -1;
2991 
2992  if( nValidChannelsSC[iside][jxsc][jysc] != 0 )
2993  scval = 1.0 - float(nGlobalErrorsSC[iside][jxsc][jysc])/float(nValidChannelsSC[iside][jxsc][jysc]);
2994 
2995  me->setBinContent( jxsc+iside*20+1, jysc+1, scval );
2996 
2997  }
2998  }
2999  }
3000 
3001 // for ( int jxdcc = 0; jxdcc < 20; jxdcc++ ) {
3002 // for ( int jydcc = 0; jydcc < 20; jydcc++ ) {
3003 // for ( int iside = 0; iside < 2; iside++ ) {
3004 
3005 // float xval = -1.0;
3006 // if ( nOutOfGeometryTT[iside][jxdcc][jydcc] < 25 ) {
3007 // if ( nValidChannelsTT[iside][jxdcc][jydcc] != 0 )
3008 // xval = 1.0 - float(nGlobalErrorsTT[iside][jxdcc][jydcc])/float(nValidChannelsTT[iside][jxdcc][jydcc]);
3009 // }
3010 
3011 // me->setBinContent( 20*iside+jxdcc+1, jydcc+1, xval );
3012 
3013 // }
3014 // }
3015 // }
3016 
3017  }
3018 
3019 }
3020 
void beginJob(void)
BeginJob.
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * meg09_[18]
Definition: EELedClient.h:110
int i
Definition: DBlmapReader.cc:9
MonitorElement * mea03_[18]
float synchErrorThreshold_
MonitorElement * met01_[18]
void setBinContent(int binx, double content)
set content of bin (1-D)
TProfile2D * httt01_[18]
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:60
MonitorElement * meLaserL4Ampl_
MonitorElement * meTestPulseG12_[2]
MonitorElement * meLaserL4Timing_
MonitorElement * meg04_[18]
void cleanup(void)
Cleanup.
static const int PHYSICS_BAD_CHANNEL_WARNING
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:514
MonitorElement * meLaserL3Err_
MonitorElement * meTimingRMS_
std::vector< int > MGPAGainsPN_
static int iy0EE(const int ism)
Definition: Numbers.cc:987
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:91
std::vector< int > superModules_
void analyze(void)
Analyze.
MonitorElement * meTestPulsePNG01_
MonitorElement * mePedestalOnlineErr_
MonitorElement * me_o01_[18]
Some &quot;id&quot; conversions.
TProfile2D * hpot01_[18]
MonitorElement * meTiming_[2]
MonitorElement * meg05_[18]
MonitorElement * meLaserL1Ampl_
MonitorElement * met02_[18]
Definition: EELedClient.h:117
MonitorElement * meLedL1AmplOverPN_
MonitorElement * mePedestalOnlineRMSMap_[2]
TProfile2D * htmt01_[18]
static std::string sEE(const int ism)
Definition: Numbers.cc:205
MonitorElement * meLedL1_[2]
MonitorElement * mePedestalPNG16_
MonitorElement * meLaserL3AmplOverPN_
MonitorElement * meLaserL3Timing_
MonitorElement * meTestPulseAmplG01_
MonitorElement * meTestPulseAmplG06_
MonitorElement * meg04_[18]
virtual ~EESummaryClient()
Destructor.
MonitorElement * mePedestalG01_[2]
MonitorElement * meLaserL4_[2]
MonitorElement * meTestPulseG01_[2]
MonitorElement * meLedL1Err_
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 * met02_[18]
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * meLaserL4AmplOverPN_
MonitorElement * meg01_[18]
MonitorElement * meg10_[18]
Definition: EELedClient.h:111
MonitorElement * meg11_[18]
MonitorElement * meg03_[18]
MonitorElement * meLaserL3PNErr_
MonitorElement * meOccupancy_[2]
void setup(void)
Setup.
MonitorElement * meLaserL2AmplOverPN_
MonitorElement * met01_[18]
Definition: EELedClient.h:116
MonitorElement * mePedestalG12_[2]
MonitorElement * mea01_[18]
MonitorElement * meTriggerTowerEmulError_[2]
MonitorElement * meLaserL2_[2]
MonitorElement * met04_[18]
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 * meLedL2PN_
MonitorElement * meIntegrityPN_
MonitorElement * meg12_[18]
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
Definition: UtilsClient.cc:231
static bool validEESc(const int ism, const int ix, const int iy)
Definition: Numbers.cc:1026
MonitorElement * meg09_[18]
MonitorElement * meIntegrity_[2]
MonitorElement * meaopn02_[18]
Definition: EELedClient.h:126
MonitorElement * meh01_[18]
MonitorElement * meg01_[18]
MonitorElement * meg05_[18]
MonitorElement * meLaserL4PN_
void Fill(long long x)
MonitorElement * meRecHitEnergy_[2]
MonitorElement * meg02_[18]
MonitorElement * mea04_[18]
MonitorElement * meLaserL3_[2]
MonitorElement * meaopn01_[18]
MonitorElement * meTimingRMS1D_[2]
MonitorElement * mePedestalOnline_[2]
MonitorElement * meStatusFlags_[2]
MonitorElement * meg03_[18]
MonitorElement * meLaserL4Err_
MonitorElement * meaopn03_[18]
MonitorElement * meLedL2PNErr_
static int icEE(const int ism, const int ix, const int iy)
Definition: Numbers.cc:906
MonitorElement * meTriggerTowerTiming_[2]
MonitorElement * meLaserL1PNErr_
T sqrt(T t)
Definition: SSEVec.h:28
MonitorElement * meg04_[18]
void beginRun(void)
BeginRun.
tuple norm
Definition: lumiNorm.py:78
void removeElement(const std::string &name)
Definition: DQMStore.cc:2353
MonitorElement * meLaserL1Timing_
channel masking
int j
Definition: DBlmapReader.cc:9
MonitorElement * meLaserL3PN_
MonitorElement * meg03_[18]
MonitorElement * meaopn04_[18]
MonitorElement * meLedL1Ampl_
MonitorElement * mea02_[18]
MonitorElement * meLaserL1_[2]
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:828
std::string getName(Reflex::Type &cc)
Definition: ClassFiller.cc:18
MonitorElement * meTimingMean_
void setEntries(double nentries)
set # of entries
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. &quot;my/long/dir/my_histo&quot;)
Definition: DQMStore.cc:1265
MonitorElement * meTriggerTowerNonSingleTiming_[2]
MonitorElement * meg02_[18]
MonitorElement * mea03_[18]
MonitorElement * meg03_[18]
MonitorElement * meaopn01_[18]
Definition: EELedClient.h:125
MonitorElement * meLedL2Timing_
std::string prefixME_
MonitorElement * meLedL1PN_
void endRun(void)
EndRun.
MonitorElement * mea01_[18]
MonitorElement * meLaserL4PNErr_
std::vector< EEClient * > clients_
MonitorElement * me_o02_[18]
MonitorElement * meTimingMean1D_[2]
Ecal Monitor Utils for Client.
static bool getBinStatistics(TH1 *histo, const int ix, const int iy, float &num, float &mean, float &rms, float minEntries=1.)
Returns true if the bin contains good statistical data.
Definition: UtilsClient.cc:74
std::vector< int > laserWavelengths_
MonitorElement * mea02_[18]
MonitorElement * meg01_[18]
Definition: EELedClient.h:104
MonitorElement * meTestPulsePNG16_
MonitorElement * meLedL1Timing_
MonitorElement * mePedestalPNG01_
EESummaryClient(const edm::ParameterSet &ps)
Constructor.
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
MonitorElement * meg02_[18]
MonitorElement * meLedL1PNErr_
MonitorElement * meStatusFlagsErr_
MonitorElement * meTriggerTowerEt_[2]
long long int num
Definition: procUtils.cc:71
MonitorElement * meg02_[18]
std::vector< int > MGPAGains_
MonitorElement * mePedestalG06_[2]
MonitorElement * meOccupancyPN_
MonitorElement * mea02_[18]
Definition: EELedClient.h:114
MonitorElement * meLedL2AmplOverPN_
int cont
MonitorElement * mePedestalOnlineRMS_
MonitorElement * meg10_[18]
MonitorElement * meLaserL2Timing_
MonitorElement * meLaserL2Err_
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * meLaserL2Ampl_
static int ix0EE(const int ism)
Definition: Numbers.cc:952
MonitorElement * meLaserL1AmplOverPN_
MonitorElement * meLaserL2PN_
std::vector< int > ledWavelengths_
TProfile2D * hot01_[18]
tuple cout
Definition: gather_cfg.py:41
MonitorElement * meLedL2Err_
MonitorElement * meTestPulseG06_[2]
MonitorElement * meLaserL3Ampl_
MonitorElement * met03_[18]
MonitorElement * meg01_[18]
tuple status
Definition: ntuplemaker.py:245
static bool validEE(const int ism, const int ix, const int iy)
Definition: Numbers.cc:1005
MonitorElement * meLaserL1PN_
MonitorElement * meaopn02_[18]
MonitorElement * meLedL2Ampl_
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:642
MonitorElement * meGlobalSummary_[2]
MonitorElement * mePedestalOnlineMean_
Definition: RunIOV.h:13
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
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)
MonitorElement * meOccupancy1D_
DQMStore * dqmStore_
MonitorElement * meg02_[18]
Definition: EELedClient.h:105
MonitorElement * meLedL2_[2]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:232
MonitorElement * meTestPulseAmplG12_
MonitorElement * meLaserL2PNErr_
MonitorElement * meLaserL1Err_
MonitorElement * meIntegrityErr_
MonitorElement * mea01_[18]
Definition: EELedClient.h:113
void endJob(void)
EndJob.
MonitorElement * meg01_[18]