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