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: 2012/06/11 22:57:16 $
5  * $Revision: 1.224 $
6  * \author G. Della Ricca
7  *
8 */
9 
10 #include <memory>
11 #include <iostream>
12 #include <fstream>
13 #include <iomanip>
14 #include <math.h>
15 #include <utility>
16 
18 
21 
22 #ifdef WITH_ECAL_COND_DB
25 #endif
26 
30 
32 
36 
48 
50 
52 
53  // cloneME switch
54  cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
55 
56  // verbose switch
57  verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
58 
59  // debug switch
60  debug_ = ps.getUntrackedParameter<bool>("debug", false);
61 
62  // prefixME path
63  prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
64 
65  subfolder_ = ps.getUntrackedParameter<std::string>("subfolder", "");
66 
67  // enableCleanup_ switch
68  enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
69 
70  produceReports_ = ps.getUntrackedParameter<bool>("produceReports", true);
71 
72  reducedReports_ = ps.getUntrackedParameter<bool>("reducedReports", false);
73 
74  // vector of selected Super Modules (Defaults to all 18).
75  superModules_.reserve(18);
76  for ( unsigned int i = 1; i <= 18; i++ ) superModules_.push_back(i);
77  superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
78 
79  laserWavelengths_.reserve(4);
80  for ( unsigned int i = 1; i <= 4; i++ ) laserWavelengths_.push_back(i);
81  laserWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("laserWavelengths", laserWavelengths_);
82 
83  ledWavelengths_.reserve(2);
84  for ( unsigned int i = 1; i <= 2; i++ ) ledWavelengths_.push_back(i);
85  ledWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("ledWavelengths", ledWavelengths_);
86 
87  MGPAGains_.reserve(3);
88  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
89  MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
90 
91  MGPAGainsPN_.reserve(2);
92  for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
93  MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
94 
95  timingNHitThreshold_ = ps.getUntrackedParameter<int>("timingNHitThreshold", 5);
96  synchErrorThreshold_ = ps.getUntrackedParameter<double>("synchErrorThreshold", 0.01);
97 
98  // summary maps
99  meIntegrity_[0] = 0;
100  meIntegrity_[1] = 0;
101  meIntegrityPN_ = 0;
102  meOccupancy_[0] = 0;
103  meOccupancy_[1] = 0;
104  meOccupancyPN_ = 0;
105  meStatusFlags_[0] = 0;
106  meStatusFlags_[1] = 0;
107  mePedestalOnline_[0] = 0;
108  mePedestalOnline_[1] = 0;
113 
114  meLaserL1_[0] = 0;
115  meLaserL1_[1] = 0;
116  meLaserL1PN_ = 0;
117  meLaserL1Ampl_ = 0;
118  meLaserL1Timing_ = 0;
120 
121  meLaserL2_[0] = 0;
122  meLaserL2_[1] = 0;
123  meLaserL2PN_ = 0;
124  meLaserL2Ampl_ = 0;
125  meLaserL2Timing_ = 0;
127 
128  meLaserL3_[0] = 0;
129  meLaserL3_[1] = 0;
130  meLaserL3PN_ = 0;
131  meLaserL3Ampl_ = 0;
132  meLaserL3Timing_ = 0;
134 
135  meLaserL4_[0] = 0;
136  meLaserL4_[1] = 0;
137  meLaserL4PN_ = 0;
138  meLaserL4Ampl_ = 0;
139  meLaserL4Timing_ = 0;
141 
142  meLedL1_[0] = 0;
143  meLedL1_[1] = 0;
144  meLedL1PN_ = 0;
145  meLedL1Ampl_ = 0;
146  meLedL1Timing_ = 0;
147  meLedL1AmplOverPN_ = 0;
148 
149  meLedL2_[0] = 0;
150  meLedL2_[1] = 0;
151  meLedL2PN_ = 0;
152  meLedL2Ampl_ = 0;
153  meLedL2Timing_ = 0;
154  meLedL2AmplOverPN_ = 0;
155 
156  mePedestalG01_[0] = 0;
157  mePedestalG01_[1] = 0;
158  mePedestalG06_[0] = 0;
159  mePedestalG06_[1] = 0;
160  mePedestalG12_[0] = 0;
161  mePedestalG12_[1] = 0;
162  mePedestalPNG01_ = 0;
163  mePedestalPNG16_ = 0;
164  meTestPulseG01_[0] = 0;
165  meTestPulseG01_[1] = 0;
166  meTestPulseG06_[0] = 0;
167  meTestPulseG06_[1] = 0;
168  meTestPulseG12_[0] = 0;
169  meTestPulseG12_[1] = 0;
170  meTestPulsePNG01_ = 0;
171  meTestPulsePNG16_ = 0;
175  meGlobalSummary_[0] = 0;
176  meGlobalSummary_[1] = 0;
177 
178  meRecHitEnergy_[0] = 0;
179  meRecHitEnergy_[1] = 0;
180  meTiming_[0] = 0;
181  meTiming_[1] = 0;
182  meTimingMean1D_[0] = 0;
183  meTimingMean1D_[1] = 0;
184  meTimingRMS1D_[0] = 0;
185  meTimingRMS1D_[1] = 0;
186  meTimingMean_ = 0;
187  meTimingRMS_ = 0;
188 
189  meTriggerTowerEt_[0] = 0;
190  meTriggerTowerEt_[1] = 0;
193  meTriggerTowerTiming_[0] = 0;
194  meTriggerTowerTiming_[1] = 0;
197 
198  // summary errors
199  meIntegrityErr_ = 0;
200  meOccupancy1D_ = 0;
201  meStatusFlagsErr_ = 0;
203  meLaserL1Err_ = 0;
204  meLaserL1PNErr_ = 0;
205  meLaserL2Err_ = 0;
206  meLaserL2PNErr_ = 0;
207  meLaserL3Err_ = 0;
208  meLaserL3PNErr_ = 0;
209  meLaserL4Err_ = 0;
210  meLaserL4PNErr_ = 0;
211  meLedL1Err_ = 0;
212  meLedL1PNErr_ = 0;
213  meLedL2Err_ = 0;
214  meLedL2PNErr_ = 0;
215 
216  meSummaryErr_ = 0;
217 
218  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
219 
220  int ism = superModules_[i];
221 
222  hpot01_[ism-1] = 0;
223  httt01_[ism-1] = 0;
224 
225  }
226 
227 }
228 
230 
231 }
232 
234 
236 
237  if ( debug_ ) std::cout << "EESummaryClient: beginJob" << std::endl;
238 
239  ievt_ = 0;
240  jevt_ = 0;
241 
242 }
243 
245 
246  if ( debug_ ) std::cout << "EESummaryClient: beginRun" << std::endl;
247 
248  jevt_ = 0;
249 
250  this->setup();
251 
252 }
253 
255 
256  if ( debug_ ) std::cout << "EESummaryClient: endJob, ievt = " << ievt_ << std::endl;
257 
258  this->cleanup();
259 
260 }
261 
263 
264  if ( debug_ ) std::cout << "EESummaryClient: endRun, jevt = " << jevt_ << std::endl;
265 
266  this->cleanup();
267 
268 }
269 
271 
272  bool integrityClient(false);
273  bool occupancyClient(false);
274  bool statusFlagsClient(false);
275  bool pedestalOnlineClient(false);
276  bool laserClient(false);
277  bool ledClient(false);
278  bool pedestalClient(false);
279  bool testPulseClient(false);
280  bool timingClient(false);
281  bool triggerTowerClient(false);
282 
283  for(unsigned i = 0; i < clients_.size(); i++){
284 
285  if(dynamic_cast<EEIntegrityClient*>(clients_[i])) integrityClient = true;
286  if(dynamic_cast<EEOccupancyClient*>(clients_[i])) occupancyClient = true;
287  if(dynamic_cast<EEStatusFlagsClient*>(clients_[i])) statusFlagsClient = true;
288  if(dynamic_cast<EEPedestalOnlineClient*>(clients_[i])) pedestalOnlineClient = true;
289  if(dynamic_cast<EELaserClient*>(clients_[i])) laserClient = true;
290  if(dynamic_cast<EELedClient*>(clients_[i])) ledClient = true;
291  if(dynamic_cast<EEPedestalClient*>(clients_[i])) pedestalClient = true;
292  if(dynamic_cast<EETestPulseClient*>(clients_[i])) testPulseClient = true;
293  if(dynamic_cast<EETimingClient*>(clients_[i])) timingClient = true;
294  if(dynamic_cast<EETriggerTowerClient*>(clients_[i])) triggerTowerClient = true;
295 
296  }
297 
298  std::string name;
299 
300  dqmStore_->setCurrentFolder( prefixME_ + "/EESummaryClient" );
301 
302  if(integrityClient){
303  if(produceReports_){
305  name = "EEIT EE - integrity quality summary";
306  meIntegrity_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
307  meIntegrity_[0]->setAxisTitle("ix", 1);
308  meIntegrity_[0]->setAxisTitle("iy", 2);
309 
311  name = "EEIT EE + integrity quality summary";
312  meIntegrity_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
313  meIntegrity_[1]->setAxisTitle("ix", 1);
314  meIntegrity_[1]->setAxisTitle("iy", 2);
315 
317  name = "EEIT integrity quality errors summary";
318  meIntegrityErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
319  for (int i = 0; i < 18; i++) {
321  }
322  }
323  if(laserClient){
325  name = "EEIT PN integrity quality summary";
326  meIntegrityPN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
327  meIntegrityPN_->setAxisTitle("jchannel", 1);
328  meIntegrityPN_->setAxisTitle("jpseudo-strip", 2);
329  }
330  }
331 
332  if(occupancyClient){
333  if(produceReports_){
335  name = "EEOT EE - digi occupancy summary";
336  meOccupancy_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
337  meOccupancy_[0]->setAxisTitle("ix", 1);
338  meOccupancy_[0]->setAxisTitle("iy", 2);
339 
341  name = "EEOT EE + digi occupancy summary";
342  meOccupancy_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
343  meOccupancy_[1]->setAxisTitle("ix", 1);
344  meOccupancy_[1]->setAxisTitle("iy", 2);
345 
347  name = "EEIT digi occupancy summary 1D";
348  meOccupancy1D_ = dqmStore_->book1D(name, name, 18, 1, 19);
349  for (int i = 0; i < 18; i++) {
351  }
352 
354  name = "EEOT EE - energy summary";
355  meRecHitEnergy_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
356  meRecHitEnergy_[0]->setAxisTitle("ix", 1);
357  meRecHitEnergy_[0]->setAxisTitle("iy", 2);
358  meRecHitEnergy_[0]->setAxisTitle("energy (GeV)", 3);
359 
361  name = "EEOT EE + energy summary";
362  meRecHitEnergy_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
363  meRecHitEnergy_[1]->setAxisTitle("ix", 1);
364  meRecHitEnergy_[1]->setAxisTitle("iy", 2);
365  meRecHitEnergy_[1]->setAxisTitle("energy (GeV)", 3);
366  }
367  if(laserClient){
369  name = "EEOT PN digi occupancy summary";
370  meOccupancyPN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
371  meOccupancyPN_->setAxisTitle("channel", 1);
372  meOccupancyPN_->setAxisTitle("pseudo-strip", 2);
373  }
374  }
375 
376  if(statusFlagsClient && produceReports_){
378  name = "EESFT EE - front-end status summary";
379  meStatusFlags_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
380  meStatusFlags_[0]->setAxisTitle("ix", 1);
381  meStatusFlags_[0]->setAxisTitle("iy", 2);
382 
384  name = "EESFT EE + front-end status summary";
385  meStatusFlags_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
386  meStatusFlags_[1]->setAxisTitle("ix", 1);
387  meStatusFlags_[1]->setAxisTitle("iy", 2);
388 
390  name = "EESFT front-end status errors summary";
391  meStatusFlagsErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
392  for (int i = 0; i < 18; i++) {
394  }
395  }
396 
397  if(pedestalOnlineClient && produceReports_){
399  name = "EEPOT EE - pedestal quality summary G12";
400  mePedestalOnline_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
401  mePedestalOnline_[0]->setAxisTitle("ix", 1);
402  mePedestalOnline_[0]->setAxisTitle("iy", 2);
403 
405  name = "EEPOT EE + pedestal quality summary G12";
406  mePedestalOnline_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
407  mePedestalOnline_[1]->setAxisTitle("ix", 1);
408  mePedestalOnline_[1]->setAxisTitle("iy", 2);
409 
411  name = "EEPOT EE - pedestal G12 RMS map";
412  mePedestalOnlineRMSMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
416 
418  name = "EEPOT EE + pedestal G12 RMS map";
419  mePedestalOnlineRMSMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
423 
425  name = "EEPOT pedestal G12 mean";
426  mePedestalOnlineMean_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 150., 250.);
427  for (int i = 0; i < 18; i++) {
429  }
430 
432  name = "EEPOT pedestal G12 rms";
433  mePedestalOnlineRMS_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10.);
434  for (int i = 0; i < 18; i++) {
436  }
437 
439  name = "EEPOT pedestal quality errors summary G12";
440  mePedestalOnlineErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
441  for (int i = 0; i < 18; i++) {
443  }
444  }
445 
446  if(laserClient){
447  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
448 
450  name = "EELT EE - laser quality summary L1";
451  meLaserL1_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
452  meLaserL1_[0]->setAxisTitle("ix", 1);
453  meLaserL1_[0]->setAxisTitle("iy", 2);
454 
456  name = "EELT EE + laser quality summary L1";
457  meLaserL1_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
458  meLaserL1_[1]->setAxisTitle("ix", 1);
459  meLaserL1_[1]->setAxisTitle("iy", 2);
460 
462  name = "EELT laser quality errors summary L1";
463  meLaserL1Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
464  for (int i = 0; i < 18; i++) {
466  }
467 
469  name = "EELT PN laser quality summary L1";
470  meLaserL1PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
471  meLaserL1PN_->setAxisTitle("jchannel", 1);
472  meLaserL1PN_->setAxisTitle("jpseudo-strip", 2);
473 
475  name = "EELT PN laser quality errors summary L1";
476  meLaserL1PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
477  for (int i = 0; i < 18; i++) {
479  }
480 
482  name = "EELT laser L1 amplitude summary";
483  meLaserL1Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
484  for (int i = 0; i < 18; i++) {
486  }
487 
489  name = "EELT laser L1 timing summary";
490  meLaserL1Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
491  for (int i = 0; i < 18; i++) {
493  }
494 
496  name = "EELT laser L1 amplitude over PN summary";
497  meLaserL1AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
498  for (int i = 0; i < 18; i++) {
500  }
501 
502  }
503 
504  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
505 
507  name = "EELT EE - laser quality summary L2";
508  meLaserL2_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
509  meLaserL2_[0]->setAxisTitle("ix", 1);
510  meLaserL2_[0]->setAxisTitle("iy", 2);
511 
513  name = "EELT EE + laser quality summary L2";
514  meLaserL2_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
515  meLaserL2_[1]->setAxisTitle("ix", 1);
516  meLaserL2_[1]->setAxisTitle("iy", 2);
517 
519  name = "EELT laser quality errors summary L2";
520  meLaserL2Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
521  for (int i = 0; i < 18; i++) {
523  }
524 
526  name = "EELT PN laser quality summary L2";
527  meLaserL2PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
528  meLaserL2PN_->setAxisTitle("jchannel", 1);
529  meLaserL2PN_->setAxisTitle("jpseudo-strip", 2);
530 
532  name = "EELT PN laser quality errors summary L2";
533  meLaserL2PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
534  for (int i = 0; i < 18; i++) {
536  }
537 
539  name = "EELT laser L2 amplitude summary";
540  meLaserL2Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
541  for (int i = 0; i < 18; i++) {
543  }
544 
546  name = "EELT laser L2 timing summary";
547  meLaserL2Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
548  for (int i = 0; i < 18; i++) {
550  }
551 
553  name = "EELT laser L2 amplitude over PN summary";
554  meLaserL2AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
555  for (int i = 0; i < 18; i++) {
557  }
558 
559  }
560 
561  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
562 
564  name = "EELT EE - laser quality summary L3";
565  meLaserL3_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
566  meLaserL3_[0]->setAxisTitle("ix", 1);
567  meLaserL3_[0]->setAxisTitle("iy", 2);
568 
570  name = "EELT EE + laser quality summary L3";
571  meLaserL3_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
572  meLaserL3_[1]->setAxisTitle("ix", 1);
573  meLaserL3_[1]->setAxisTitle("iy", 2);
574 
576  name = "EELT laser quality errors summary L3";
577  meLaserL3Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
578  for (int i = 0; i < 18; i++) {
580  }
581 
583  name = "EELT PN laser quality summary L3";
584  meLaserL3PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
585  meLaserL3PN_->setAxisTitle("jchannel", 1);
586  meLaserL3PN_->setAxisTitle("jpseudo-strip", 2);
587 
589  name = "EELT PN laser quality errors summary L3";
590  meLaserL3PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
591  for (int i = 0; i < 18; i++) {
593  }
594 
596  name = "EELT laser L3 amplitude summary";
597  meLaserL3Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
598  for (int i = 0; i < 18; i++) {
600  }
601 
603  name = "EELT laser L3 timing summary";
604  meLaserL3Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
605  for (int i = 0; i < 18; i++) {
607  }
608 
610  name = "EELT laser L3 amplitude over PN summary";
611  meLaserL3AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
612  for (int i = 0; i < 18; i++) {
614  }
615 
616  }
617 
618  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
619 
621  name = "EELT EE - laser quality summary L4";
622  meLaserL4_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
623  meLaserL4_[0]->setAxisTitle("ix", 1);
624  meLaserL4_[0]->setAxisTitle("iy", 2);
625 
627  name = "EELT EE + laser quality summary L4";
628  meLaserL4_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
629  meLaserL4_[1]->setAxisTitle("ix", 1);
630  meLaserL4_[1]->setAxisTitle("iy", 2);
631 
633  name = "EELT laser quality errors summary L4";
634  meLaserL4Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
635  for (int i = 0; i < 18; i++) {
637  }
638 
640  name = "EELT PN laser quality summary L4";
641  meLaserL4PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
642  meLaserL4PN_->setAxisTitle("jchannel", 1);
643  meLaserL4PN_->setAxisTitle("jpseudo-strip", 2);
644 
646  name = "EELT PN laser quality errors summary L4";
647  meLaserL4PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
648  for (int i = 0; i < 18; i++) {
650  }
651 
653  name = "EELT laser L4 amplitude summary";
654  meLaserL4Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
655  for (int i = 0; i < 18; i++) {
657  }
658 
660  name = "EELT laser L4 timing summary";
661  meLaserL4Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
662  for (int i = 0; i < 18; i++) {
664  }
665 
667  name = "EELT laser L4 amplitude over PN summary";
668  meLaserL4AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
669  for (int i = 0; i < 18; i++) {
671  }
672 
673  }
674  }
675 
676  if(ledClient){
677  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
678 
679  if ( meLedL1_[0] ) dqmStore_->removeElement( meLedL1_[0]->getName() );
680  name = "EELDT EE - led quality summary L1";
681  meLedL1_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
682  meLedL1_[0]->setAxisTitle("ix", 1);
683  meLedL1_[0]->setAxisTitle("iy", 2);
684 
685  if ( meLedL1_[1] ) dqmStore_->removeElement( meLedL1_[1]->getName() );
686  name = "EELDT EE + led quality summary L1";
687  meLedL1_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
688  meLedL1_[1]->setAxisTitle("ix", 1);
689  meLedL1_[1]->setAxisTitle("iy", 2);
690 
692  name = "EELDT led quality errors summary L1";
693  meLedL1Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
694  for (int i = 0; i < 18; i++) {
696  }
697 
699  name = "EELDT PN led quality summary L1";
700  meLedL1PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
701  meLedL1PN_->setAxisTitle("jchannel", 1);
702  meLedL1PN_->setAxisTitle("jpseudo-strip", 2);
703 
705  name = "EELDT PN led quality errors summary L1";
706  meLedL1PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
707  for (int i = 0; i < 18; i++) {
709  }
710 
712  name = "EELDT led L1 amplitude summary";
713  meLedL1Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
714  for (int i = 0; i < 18; i++) {
716  }
717 
719  name = "EELDT led L1 timing summary";
720  meLedL1Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
721  for (int i = 0; i < 18; i++) {
723  }
724 
726  name = "EELDT led L1 amplitude over PN summary";
727  meLedL1AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
728  for (int i = 0; i < 18; i++) {
730  }
731 
732  }
733 
734  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
735 
736  if ( meLedL2_[0] ) dqmStore_->removeElement( meLedL2_[0]->getName() );
737  name = "EELDT EE - led quality summary L2";
738  meLedL2_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
739  meLedL2_[0]->setAxisTitle("ix", 1);
740  meLedL2_[0]->setAxisTitle("iy", 2);
741 
742  if ( meLedL2_[1] ) dqmStore_->removeElement( meLedL2_[1]->getName() );
743  name = "EELDT EE + led quality summary L2";
744  meLedL2_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
745  meLedL2_[1]->setAxisTitle("ix", 1);
746  meLedL2_[1]->setAxisTitle("iy", 2);
747 
749  name = "EELDT led quality errors summary L2";
750  meLedL2Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
751  for (int i = 0; i < 18; i++) {
753  }
754 
756  name = "EELDT PN led quality summary L2";
757  meLedL2PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
758  meLedL2PN_->setAxisTitle("jchannel", 1);
759  meLedL2PN_->setAxisTitle("jpseudo-strip", 2);
760 
762  name = "EELDT PN led quality errors summary L2";
763  meLedL2PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
764  for (int i = 0; i < 18; i++) {
766  }
767 
769  name = "EELDT led L2 amplitude summary";
770  meLedL2Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
771  for (int i = 0; i < 18; i++) {
773  }
774 
776  name = "EELDT led L2 timing summary";
777  meLedL2Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
778  for (int i = 0; i < 18; i++) {
780  }
781 
783  name = "EELDT led L2 amplitude over PN summary";
784  meLedL2AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
785  for (int i = 0; i < 18; i++) {
787  }
788 
789  }
790  }
791 
792  if(pedestalClient){
793  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
794 
796  name = "EEPT EE - pedestal quality G01 summary";
797  mePedestalG01_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
798  mePedestalG01_[0]->setAxisTitle("ix", 1);
799  mePedestalG01_[0]->setAxisTitle("iy", 2);
800 
801  }
802 
803  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
804 
806  name = "EEPT EE - pedestal quality G06 summary";
807  mePedestalG06_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
808  mePedestalG06_[0]->setAxisTitle("ix", 1);
809  mePedestalG06_[0]->setAxisTitle("iy", 2);
810 
811  }
812 
813  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
814 
816  name = "EEPT EE - pedestal quality G12 summary";
817  mePedestalG12_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
818  mePedestalG12_[0]->setAxisTitle("ix", 1);
819  mePedestalG12_[0]->setAxisTitle("iy", 2);
820 
821  }
822 
823 
824  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
825 
827  name = "EEPT PN pedestal quality G01 summary";
828  mePedestalPNG01_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10, 10.);
829  mePedestalPNG01_->setAxisTitle("jchannel", 1);
830  mePedestalPNG01_->setAxisTitle("jpseudo-strip", 2);
831 
832  }
833 
834  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
835 
837  name = "EEPT PN pedestal quality G16 summary";
838  mePedestalPNG16_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10, 10.);
839  mePedestalPNG16_->setAxisTitle("jchannel", 1);
840  mePedestalPNG16_->setAxisTitle("jpseudo-strip", 2);
841 
842  }
843 
844  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
845 
847  name = "EEPT EE + pedestal quality G01 summary";
848  mePedestalG01_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
849  mePedestalG01_[1]->setAxisTitle("ix", 1);
850  mePedestalG01_[1]->setAxisTitle("iy", 2);
851 
852  }
853 
854 
855  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
856 
858  name = "EEPT EE + pedestal quality G06 summary";
859  mePedestalG06_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
860  mePedestalG06_[1]->setAxisTitle("ix", 1);
861  mePedestalG06_[1]->setAxisTitle("iy", 2);
862 
863  }
864 
865  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
866 
868  name = "EEPT EE + pedestal quality G12 summary";
869  mePedestalG12_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
870  mePedestalG12_[1]->setAxisTitle("ix", 1);
871  mePedestalG12_[1]->setAxisTitle("iy", 2);
872 
873  }
874  }
875 
876  if(testPulseClient){
877  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
878 
880  name = "EETPT EE - test pulse quality G01 summary";
881  meTestPulseG01_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
882  meTestPulseG01_[0]->setAxisTitle("ix", 1);
883  meTestPulseG01_[0]->setAxisTitle("iy", 2);
884 
885  }
886 
887  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
888 
890  name = "EETPT EE - test pulse quality G06 summary";
891  meTestPulseG06_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
892  meTestPulseG06_[0]->setAxisTitle("ix", 1);
893  meTestPulseG06_[0]->setAxisTitle("iy", 2);
894 
895  }
896 
897  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
898 
900  name = "EETPT EE - test pulse quality G12 summary";
901  meTestPulseG12_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
902  meTestPulseG12_[0]->setAxisTitle("ix", 1);
903  meTestPulseG12_[0]->setAxisTitle("iy", 2);
904 
905  }
906 
907 
908  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
909 
911  name = "EETPT PN test pulse quality G01 summary";
912  meTestPulsePNG01_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
913  meTestPulsePNG01_->setAxisTitle("jchannel", 1);
914  meTestPulsePNG01_->setAxisTitle("jpseudo-strip", 2);
915 
916  }
917 
918  if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
919 
921  name = "EETPT PN test pulse quality G16 summary";
922  meTestPulsePNG16_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
923  meTestPulsePNG16_->setAxisTitle("jchannel", 1);
924  meTestPulsePNG16_->setAxisTitle("jpseudo-strip", 2);
925 
926  }
927 
928  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
929 
931  name = "EETPT EE + test pulse quality G01 summary";
932  meTestPulseG01_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
933  meTestPulseG01_[1]->setAxisTitle("ix", 1);
934  meTestPulseG01_[1]->setAxisTitle("iy", 2);
935 
936  }
937 
938  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
939 
941  name = "EETPT EE + test pulse quality G06 summary";
942  meTestPulseG06_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
943  meTestPulseG06_[1]->setAxisTitle("ix", 1);
944  meTestPulseG06_[1]->setAxisTitle("iy", 2);
945 
946  }
947 
948  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
949 
951  name = "EETPT EE + test pulse quality G12 summary";
952  meTestPulseG12_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
953  meTestPulseG12_[1]->setAxisTitle("ix", 1);
954  meTestPulseG12_[1]->setAxisTitle("iy", 2);
955 
956  }
957 
958  if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
959 
961  name = "EETPT test pulse amplitude G01 summary";
962  meTestPulseAmplG01_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
963  for (int i = 0; i < 18; i++) {
965  }
966 
967  }
968 
969  if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
970 
972  name = "EETPT test pulse amplitude G06 summary";
973  meTestPulseAmplG06_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
974  for (int i = 0; i < 18; i++) {
976  }
977 
978  }
979 
980  if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
981 
983  name = "EETPT test pulse amplitude G12 summary";
984  meTestPulseAmplG12_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
985  for (int i = 0; i < 18; i++) {
987  }
988 
989  }
990  }
991 
992  if(timingClient){
993 
995  name = "EETMT EE - timing quality summary";
996  meTiming_[0] = dqmStore_->book2D(name, name, 20, 0., 100., 20, 0., 100.);
997  meTiming_[0]->setAxisTitle("ix", 1);
998  meTiming_[0]->setAxisTitle("iy", 2);
999 
1000  if( meTiming_[1] ) dqmStore_->removeElement( meTiming_[1]->getName() );
1001  name = "EETMT EE + timing quality summary";
1002  meTiming_[1] = dqmStore_->book2D(name, name, 20, 0., 100., 20, 0., 100.);
1003  meTiming_[1]->setAxisTitle("ix", 1);
1004  meTiming_[1]->setAxisTitle("iy", 2);
1005 
1007  name = "EETMT EE - timing mean 1D summary";
1008  meTimingMean1D_[0] = dqmStore_->book1D(name, name, 100, -25., 25.);
1009  meTimingMean1D_[0]->setAxisTitle("mean (ns)", 1);
1010 
1012  name = "EETMT EE + timing mean 1D summary";
1013  meTimingMean1D_[1] = dqmStore_->book1D(name, name, 100, -25., 25.);
1014  meTimingMean1D_[1]->setAxisTitle("mean (ns)", 1);
1015 
1017  name = "EETMT EE - timing rms 1D summary";
1018  meTimingRMS1D_[0] = dqmStore_->book1D(name, name, 100, 0.0, 10.0);
1019  meTimingRMS1D_[0]->setAxisTitle("rms (ns)", 1);
1020 
1022  name = "EETMT EE + timing rms 1D summary";
1023  meTimingRMS1D_[1] = dqmStore_->book1D(name, name, 100, 0.0, 10.0);
1024  meTimingRMS1D_[1]->setAxisTitle("rms (ns)", 1);
1025 
1027  name = "EETMT timing mean";
1028  meTimingMean_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, -20., 20.,"");
1029  for (int i = 0; i < 18; i++) {
1031  }
1032  meTimingMean_->setAxisTitle("mean (ns)", 2);
1033 
1035  name = "EETMT timing rms";
1036  meTimingRMS_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10.,"");
1037  for (int i = 0; i < 18; i++) {
1039  }
1040  meTimingRMS_->setAxisTitle("rms (ns)", 2);
1041  }
1042 
1043  if(triggerTowerClient){
1045  name = "EETTT EE - Et trigger tower summary";
1046  meTriggerTowerEt_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1047  meTriggerTowerEt_[0]->setAxisTitle("ix", 1);
1048  meTriggerTowerEt_[0]->setAxisTitle("iy", 2);
1049  meTriggerTowerEt_[0]->setAxisTitle("Et (GeV)", 3);
1050 
1052  name = "EETTT EE + Et trigger tower summary";
1053  meTriggerTowerEt_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1054  meTriggerTowerEt_[1]->setAxisTitle("ix", 1);
1055  meTriggerTowerEt_[1]->setAxisTitle("iy", 2);
1056  meTriggerTowerEt_[1]->setAxisTitle("Et (GeV)", 3);
1057 
1059  name = "EETTT EE - emulator error quality summary";
1060  meTriggerTowerEmulError_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1063 
1065  name = "EETTT EE + emulator error quality summary";
1066  meTriggerTowerEmulError_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1069 
1071  name = "EETTT EE - Trigger Primitives Timing summary";
1072  meTriggerTowerTiming_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1073  meTriggerTowerTiming_[0]->setAxisTitle("ix", 1);
1074  meTriggerTowerTiming_[0]->setAxisTitle("iy", 2);
1075  meTriggerTowerTiming_[0]->setAxisTitle("TP data matching emulator", 3);
1076 
1078  name = "EETTT EE + Trigger Primitives Timing summary";
1079  meTriggerTowerTiming_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1080  meTriggerTowerTiming_[1]->setAxisTitle("ix", 1);
1081  meTriggerTowerTiming_[1]->setAxisTitle("iy", 2);
1082  meTriggerTowerTiming_[1]->setAxisTitle("TP data matching emulator", 3);
1083 
1085  name = "EETTT EE - Trigger Primitives Non Single Timing summary";
1086  meTriggerTowerNonSingleTiming_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1089  meTriggerTowerNonSingleTiming_[0]->setAxisTitle("fraction", 3);
1090 
1092  name = "EETTT EE + Trigger Primitives Non Single Timing summary";
1093  meTriggerTowerNonSingleTiming_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1096  meTriggerTowerNonSingleTiming_[1]->setAxisTitle("fraction", 3);
1097  }
1098 
1101  name = "EE global summary EE -";
1102  meGlobalSummary_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1103  meGlobalSummary_[0]->setAxisTitle("ix", 1);
1104  meGlobalSummary_[0]->setAxisTitle("iy", 2);
1105  }
1106 
1109  name = "EE global summary EE +";
1110  meGlobalSummary_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
1111  meGlobalSummary_[1]->setAxisTitle("ix", 1);
1112  meGlobalSummary_[1]->setAxisTitle("iy", 2);
1113  }
1114 
1115  if(meGlobalSummary_[0] && meGlobalSummary_[1]){
1117  name = "EE global summary errors";
1118  meSummaryErr_ = dqmStore_->book1D(name, name, 1, 0., 1.);
1119  }
1120 }
1121 
1123 
1124  if ( ! enableCleanup_ ) return;
1125 
1126  dqmStore_->setCurrentFolder( prefixME_ + "/EESummaryClient" );
1127 
1128  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
1129 
1130  int ism = superModules_[i];
1131 
1132  if ( cloneME_ ) {
1133  if ( hpot01_[ism-1] ) delete hpot01_[ism-1];
1134  if ( httt01_[ism-1] ) delete httt01_[ism-1];
1135  }
1136 
1137  hpot01_[ism-1] = 0;
1138  httt01_[ism-1] = 0;
1139 
1140  }
1141 
1143  meIntegrity_[0] = 0;
1144 
1146  meIntegrity_[1] = 0;
1147 
1149  meIntegrityErr_ = 0;
1150 
1152  meIntegrityPN_ = 0;
1153 
1155  meOccupancy_[0] = 0;
1156 
1158  meOccupancy_[1] = 0;
1159 
1161  meOccupancy1D_ = 0;
1162 
1164  meOccupancyPN_ = 0;
1165 
1167  meStatusFlags_[0] = 0;
1168 
1170  meStatusFlags_[1] = 0;
1171 
1173  meStatusFlagsErr_ = 0;
1174 
1176  mePedestalOnline_[0] = 0;
1177 
1179  mePedestalOnline_[1] = 0;
1180 
1183 
1186 
1189 
1191  mePedestalOnlineRMSMap_[0] = 0;
1192 
1194  mePedestalOnlineRMSMap_[1] = 0;
1195 
1196  if ( meLaserL1_[0] ) dqmStore_->removeElement( meLaserL1_[0]->getName() );
1197  meLaserL1_[0] = 0;
1198 
1199  if ( meLaserL1_[1] ) dqmStore_->removeElement( meLaserL1_[1]->getName() );
1200  meLaserL1_[1] = 0;
1201 
1203  meLaserL1Err_ = 0;
1204 
1206  meLaserL1PN_ = 0;
1207 
1209  meLaserL1PNErr_ = 0;
1210 
1212  meLaserL1Ampl_ = 0;
1213 
1215  meLaserL1Timing_ = 0;
1216 
1219 
1220  if ( meLaserL2_[0] ) dqmStore_->removeElement( meLaserL2_[0]->getName() );
1221  meLaserL2_[0] = 0;
1222 
1223  if ( meLaserL2_[1] ) dqmStore_->removeElement( meLaserL2_[1]->getName() );
1224  meLaserL2_[1] = 0;
1225 
1227  meLaserL2Err_ = 0;
1228 
1230  meLaserL2PN_ = 0;
1231 
1233  meLaserL2PNErr_ = 0;
1234 
1236  meLaserL2Ampl_ = 0;
1237 
1239  meLaserL2Timing_ = 0;
1240 
1243 
1244  if ( meLaserL3_[0] ) dqmStore_->removeElement( meLaserL3_[0]->getName() );
1245  meLaserL3_[0] = 0;
1246 
1247  if ( meLaserL3_[1] ) dqmStore_->removeElement( meLaserL3_[1]->getName() );
1248  meLaserL3_[1] = 0;
1249 
1251  meLaserL3Err_ = 0;
1252 
1254  meLaserL3PN_ = 0;
1255 
1257  meLaserL3PNErr_ = 0;
1258 
1260  meLaserL3Ampl_ = 0;
1261 
1263  meLaserL3Timing_ = 0;
1264 
1267 
1268  if ( meLaserL4_[0] ) dqmStore_->removeElement( meLaserL4_[0]->getName() );
1269  meLaserL4_[0] = 0;
1270 
1271  if ( meLaserL4_[1] ) dqmStore_->removeElement( meLaserL4_[1]->getName() );
1272  meLaserL4_[1] = 0;
1273 
1275  meLaserL4Err_ = 0;
1276 
1278  meLaserL4PN_ = 0;
1279 
1281  meLaserL4PNErr_ = 0;
1282 
1284  meLaserL4Ampl_ = 0;
1285 
1287  meLaserL4Timing_ = 0;
1288 
1291 
1292  if ( meLedL1_[0] ) dqmStore_->removeElement( meLedL1_[0]->getName() );
1293  meLedL1_[0] = 0;
1294 
1295  if ( meLedL1_[1] ) dqmStore_->removeElement( meLedL1_[1]->getName() );
1296  meLedL1_[1] = 0;
1297 
1299  meLedL1Err_ = 0;
1300 
1302  meLedL1PN_ = 0;
1303 
1305  meLedL1PNErr_ = 0;
1306 
1308  meLedL1Ampl_ = 0;
1309 
1311  meLedL1Timing_ = 0;
1312 
1314  meLedL1AmplOverPN_ = 0;
1315 
1316  if ( meLedL2_[0] ) dqmStore_->removeElement( meLedL2_[0]->getName() );
1317  meLedL2_[0] = 0;
1318 
1319  if ( meLedL2_[1] ) dqmStore_->removeElement( meLedL2_[1]->getName() );
1320  meLedL2_[1] = 0;
1321 
1323  meLedL2Err_ = 0;
1324 
1326  meLedL2PN_ = 0;
1327 
1329  meLedL2PNErr_ = 0;
1330 
1332  meLedL2Ampl_ = 0;
1333 
1335  meLedL2Timing_ = 0;
1336 
1338  meLedL2AmplOverPN_ = 0;
1339 
1341  mePedestalG01_[0] = 0;
1342 
1344  mePedestalG01_[1] = 0;
1345 
1347  mePedestalG06_[0] = 0;
1348 
1350  mePedestalG06_[1] = 0;
1351 
1353  mePedestalG12_[0] = 0;
1354 
1356  mePedestalG12_[1] = 0;
1357 
1359  mePedestalPNG01_ = 0;
1360 
1362  mePedestalPNG16_ = 0;
1363 
1365  meTestPulseG01_[0] = 0;
1366 
1368  meTestPulseG01_[1] = 0;
1369 
1371  meTestPulseG06_[0] = 0;
1372 
1374  meTestPulseG06_[1] = 0;
1375 
1377  meTestPulseG12_[0] = 0;
1378 
1380  meTestPulseG12_[1] = 0;
1381 
1383  meTestPulsePNG01_ = 0;
1384 
1386  meTestPulsePNG16_ = 0;
1387 
1389  meTestPulseAmplG01_ = 0;
1390 
1392  meTestPulseAmplG06_ = 0;
1393 
1395  meTestPulseAmplG12_ = 0;
1396 
1398  meRecHitEnergy_[0] = 0;
1399 
1401  meRecHitEnergy_[1] = 0;
1402 
1403  if ( meTiming_[0] ) dqmStore_->removeElement( meTiming_[0]->getName() );
1404  meTiming_[0] = 0;
1405 
1406  if ( meTiming_[1] ) dqmStore_->removeElement( meTiming_[1]->getName() );
1407  meTiming_[1] = 0;
1408 
1410  meTimingMean1D_[0] = 0;
1411 
1413  meTimingMean1D_[1] = 0;
1414 
1416  meTimingRMS1D_[0] = 0;
1417 
1419  meTimingRMS1D_[1] = 0;
1420 
1422  meTriggerTowerEt_[0] = 0;
1423 
1425  meTriggerTowerEt_[1] = 0;
1426 
1428  meTriggerTowerEmulError_[0] = 0;
1429 
1431  meTriggerTowerEmulError_[1] = 0;
1432 
1434  meTriggerTowerTiming_[0] = 0;
1435 
1437  meTriggerTowerTiming_[1] = 0;
1438 
1441 
1444 
1446  meGlobalSummary_[0] = 0;
1447 
1449  meGlobalSummary_[1] = 0;
1450 
1452  meSummaryErr_ = 0;
1453 
1454 }
1455 
1456 #ifdef WITH_ECAL_COND_DB
1457 bool EESummaryClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
1458 
1459  status = true;
1460 
1461  return true;
1462 
1463 }
1464 #endif
1465 
1467 
1468  ievt_++;
1469  jevt_++;
1470  if ( ievt_ % 10 == 0 ) {
1471  if ( debug_ ) std::cout << "EESummaryClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
1472  }
1473 
1474  uint32_t chWarnBit = 1 << EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING;
1475 
1476  for ( int ix = 1; ix <= 100; ix++ ) {
1477  for ( int iy = 1; iy <= 100; iy++ ) {
1478 
1479  if ( meIntegrity_[0] ) meIntegrity_[0]->setBinContent( ix, iy, 6. );
1480  if ( meIntegrity_[1] ) meIntegrity_[1]->setBinContent( ix, iy, 6. );
1481  if ( meOccupancy_[0] ) meOccupancy_[0]->setBinContent( ix, iy, 0. );
1482  if ( meOccupancy_[1] ) meOccupancy_[1]->setBinContent( ix, iy, 0. );
1483  if ( meStatusFlags_[0] ) meStatusFlags_[0]->setBinContent( ix, iy, 6. );
1484  if ( meStatusFlags_[1] ) meStatusFlags_[1]->setBinContent( ix, iy, 6. );
1485  if ( mePedestalOnline_[0] ) mePedestalOnline_[0]->setBinContent( ix, iy, 6. );
1486  if ( mePedestalOnline_[1] ) mePedestalOnline_[1]->setBinContent( ix, iy, 6. );
1487  if ( mePedestalOnlineRMSMap_[0] ) mePedestalOnlineRMSMap_[0]->setBinContent( ix, iy, -1. );
1488  if ( mePedestalOnlineRMSMap_[1] ) mePedestalOnlineRMSMap_[1]->setBinContent( ix, iy, -1. );
1489 
1490  if ( meLaserL1_[0] ) meLaserL1_[0]->setBinContent( ix, iy, 6. );
1491  if ( meLaserL1_[1] ) meLaserL1_[1]->setBinContent( ix, iy, 6. );
1492  if ( meLaserL2_[0] ) meLaserL2_[0]->setBinContent( ix, iy, 6. );
1493  if ( meLaserL2_[1] ) meLaserL2_[1]->setBinContent( ix, iy, 6. );
1494  if ( meLaserL3_[0] ) meLaserL3_[0]->setBinContent( ix, iy, 6. );
1495  if ( meLaserL3_[1] ) meLaserL3_[1]->setBinContent( ix, iy, 6. );
1496  if ( meLaserL4_[0] ) meLaserL4_[0]->setBinContent( ix, iy, 6. );
1497  if ( meLaserL4_[1] ) meLaserL4_[1]->setBinContent( ix, iy, 6. );
1498  if ( meLedL1_[0] ) meLedL1_[0]->setBinContent( ix, iy, 6. );
1499  if ( meLedL1_[1] ) meLedL1_[1]->setBinContent( ix, iy, 6. );
1500  if ( meLedL2_[0] ) meLedL2_[0]->setBinContent( ix, iy, 6. );
1501  if ( meLedL2_[1] ) meLedL2_[1]->setBinContent( ix, iy, 6. );
1502  if ( mePedestalG01_[0] ) mePedestalG01_[0]->setBinContent( ix, iy, 6. );
1503  if ( mePedestalG01_[1] ) mePedestalG01_[1]->setBinContent( ix, iy, 6. );
1504  if ( mePedestalG06_[0] ) mePedestalG06_[0]->setBinContent( ix, iy, 6. );
1505  if ( mePedestalG06_[1] ) mePedestalG06_[1]->setBinContent( ix, iy, 6. );
1506  if ( mePedestalG12_[0] ) mePedestalG12_[0]->setBinContent( ix, iy, 6. );
1507  if ( mePedestalG12_[1] ) mePedestalG12_[1]->setBinContent( ix, iy, 6. );
1508  if ( meTestPulseG01_[0] ) meTestPulseG01_[0]->setBinContent( ix, iy, 6. );
1509  if ( meTestPulseG01_[1] ) meTestPulseG01_[1]->setBinContent( ix, iy, 6. );
1510  if ( meTestPulseG06_[0] ) meTestPulseG06_[0]->setBinContent( ix, iy, 6. );
1511  if ( meTestPulseG06_[1] ) meTestPulseG06_[1]->setBinContent( ix, iy, 6. );
1512  if ( meTestPulseG12_[0] ) meTestPulseG12_[0]->setBinContent( ix, iy, 6. );
1513  if ( meTestPulseG12_[1] ) meTestPulseG12_[1]->setBinContent( ix, iy, 6. );
1514  if ( meRecHitEnergy_[0] ) meRecHitEnergy_[0]->setBinContent( ix, iy, 0. );
1515  if ( meRecHitEnergy_[1] ) meRecHitEnergy_[1]->setBinContent( ix, iy, 0. );
1516 
1517  if( meGlobalSummary_[0] ) meGlobalSummary_[0]->setBinContent( ix, iy, 6. );
1518  if( meGlobalSummary_[1] ) meGlobalSummary_[1]->setBinContent( ix, iy, 6. );
1519 
1520  }
1521  }
1522 
1523  // default is 6 because we want white for the non existing MEM
1524  for ( int ix = 1; ix <= 45; ix++ ) {
1525  for ( int iy = 1; iy <= 20; iy++ ) {
1526 
1527  if ( meIntegrityPN_ ) meIntegrityPN_->setBinContent( ix, iy, 6. );
1528  if ( meOccupancyPN_ ) meOccupancyPN_->setBinContent( ix, iy, 0. );
1529  if ( meLaserL1PN_ ) meLaserL1PN_->setBinContent( ix, iy, 6. );
1530  if ( meLaserL2PN_ ) meLaserL2PN_->setBinContent( ix, iy, 6. );
1531  if ( meLaserL3PN_ ) meLaserL3PN_->setBinContent( ix, iy, 6. );
1532  if ( meLaserL4PN_ ) meLaserL4PN_->setBinContent( ix, iy, 6. );
1533  if ( meLedL1PN_ ) meLedL1PN_->setBinContent( ix, iy, 6. );
1534  if ( meLedL2PN_ ) meLedL2PN_->setBinContent( ix, iy, 6. );
1535  if ( mePedestalPNG01_ ) mePedestalPNG01_->setBinContent( ix, iy, 6. );
1536  if ( mePedestalPNG16_ ) mePedestalPNG16_->setBinContent( ix, iy, 6. );
1537  if ( meTestPulsePNG01_ ) meTestPulsePNG01_->setBinContent( ix, iy, 6. );
1538  if ( meTestPulsePNG16_ ) meTestPulsePNG16_->setBinContent( ix, iy, 6. );
1539 
1540  }
1541  }
1542 
1543  for ( int ix = 1; ix <= 100; ix++ ) {
1544  for ( int iy = 1; iy <= 100; iy++ ) {
1545  if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setBinContent( ix, iy, 0. );
1546  if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setBinContent( ix, iy, 0. );
1549  if ( meTriggerTowerTiming_[0] ) meTriggerTowerTiming_[0]->setBinContent( ix, iy, 0. );
1550  if ( meTriggerTowerTiming_[1] ) meTriggerTowerTiming_[1]->setBinContent( ix, iy, 0. );
1553  }
1554  }
1555 
1556  for ( int ix = 1; ix <= 20; ix++ ) {
1557  for ( int iy = 1; iy <= 20; iy++ ) {
1558  if ( meTiming_[0] ) meTiming_[0]->setBinContent( ix, iy, 6. );
1559  if ( meTiming_[1] ) meTiming_[1]->setBinContent( ix, iy, 6. );
1560  }
1561  }
1562 
1563  if ( meIntegrity_[0] ) meIntegrity_[0]->setEntries( 0 );
1564  if ( meIntegrity_[1] ) meIntegrity_[1]->setEntries( 0 );
1567  if ( meOccupancy_[0] ) meOccupancy_[0]->setEntries( 0 );
1568  if ( meOccupancy_[1] ) meOccupancy_[1]->setEntries( 0 );
1571  if ( meStatusFlags_[0] ) meStatusFlags_[0]->setEntries( 0 );
1572  if ( meStatusFlags_[1] ) meStatusFlags_[1]->setEntries( 0 );
1574  if ( mePedestalOnline_[0] ) mePedestalOnline_[0]->setEntries( 0 );
1575  if ( mePedestalOnline_[1] ) mePedestalOnline_[1]->setEntries( 0 );
1579  if ( meLaserL1_[0] ) meLaserL1_[0]->setEntries( 0 );
1580  if ( meLaserL1_[1] ) meLaserL1_[1]->setEntries( 0 );
1581  if ( meLaserL1Err_ ) meLaserL1Err_->Reset();
1582  if ( meLaserL1PN_ ) meLaserL1PN_->setEntries( 0 );
1587  if ( meLaserL2_[0] ) meLaserL2_[0]->setEntries( 0 );
1588  if ( meLaserL2_[1] ) meLaserL2_[1]->setEntries( 0 );
1589  if ( meLaserL2Err_ ) meLaserL2Err_->Reset();
1590  if ( meLaserL2PN_ ) meLaserL2PN_->setEntries( 0 );
1595  if ( meLaserL3_[0] ) meLaserL3_[0]->setEntries( 0 );
1596  if ( meLaserL3_[1] ) meLaserL3_[1]->setEntries( 0 );
1597  if ( meLaserL3Err_ ) meLaserL3Err_->Reset();
1598  if ( meLaserL3PN_ ) meLaserL3PN_->setEntries( 0 );
1603  if ( meLaserL4_[0] ) meLaserL4_[0]->setEntries( 0 );
1604  if ( meLaserL4_[1] ) meLaserL4_[1]->setEntries( 0 );
1605  if ( meLaserL4Err_ ) meLaserL4Err_->Reset();
1606  if ( meLaserL4PN_ ) meLaserL4PN_->setEntries( 0 );
1611  if ( meLedL1_[0] ) meLedL1_[0]->setEntries( 0 );
1612  if ( meLedL1_[1] ) meLedL1_[1]->setEntries( 0 );
1613  if ( meLedL1Err_ ) meLedL1Err_->Reset();
1614  if ( meLedL1PN_ ) meLedL1PN_->setEntries( 0 );
1615  if ( meLedL1PNErr_ ) meLedL1PNErr_->Reset();
1616  if ( meLedL1Ampl_ ) meLedL1Ampl_->Reset();
1619  if ( meLedL2_[0] ) meLedL2_[0]->setEntries( 0 );
1620  if ( meLedL2_[1] ) meLedL2_[1]->setEntries( 0 );
1621  if ( meLedL2Err_ ) meLedL2Err_->Reset();
1622  if ( meLedL2PN_ ) meLedL2PN_->setEntries( 0 );
1623  if ( meLedL2PNErr_ ) meLedL2PNErr_->Reset();
1624  if ( meLedL2Ampl_ ) meLedL2Ampl_->Reset();
1627  if ( mePedestalG01_[0] ) mePedestalG01_[0]->setEntries( 0 );
1628  if ( mePedestalG01_[1] ) mePedestalG01_[1]->setEntries( 0 );
1629  if ( mePedestalG06_[0] ) mePedestalG06_[0]->setEntries( 0 );
1630  if ( mePedestalG06_[1] ) mePedestalG06_[1]->setEntries( 0 );
1631  if ( mePedestalG12_[0] ) mePedestalG12_[0]->setEntries( 0 );
1632  if ( mePedestalG12_[1] ) mePedestalG12_[1]->setEntries( 0 );
1635  if ( meTestPulseG01_[0] ) meTestPulseG01_[0]->setEntries( 0 );
1636  if ( meTestPulseG01_[1] ) meTestPulseG01_[1]->setEntries( 0 );
1637  if ( meTestPulseG06_[0] ) meTestPulseG06_[0]->setEntries( 0 );
1638  if ( meTestPulseG06_[1] ) meTestPulseG06_[1]->setEntries( 0 );
1639  if ( meTestPulseG12_[0] ) meTestPulseG12_[0]->setEntries( 0 );
1640  if ( meTestPulseG12_[1] ) meTestPulseG12_[1]->setEntries( 0 );
1646 
1647  if ( meRecHitEnergy_[0] ) meRecHitEnergy_[0]->setEntries( 0 );
1648  if ( meRecHitEnergy_[1] ) meRecHitEnergy_[1]->setEntries( 0 );
1649  if ( meTiming_[0] ) meTiming_[0]->setEntries( 0 );
1650  if ( meTiming_[1] ) meTiming_[1]->setEntries( 0 );
1651  if ( meTimingMean1D_[0] ) meTimingMean1D_[0]->Reset();
1652  if ( meTimingMean1D_[1] ) meTimingMean1D_[1]->Reset();
1653  if ( meTimingRMS1D_[0] ) meTimingRMS1D_[0]->Reset();
1654  if ( meTimingRMS1D_[1] ) meTimingRMS1D_[1]->Reset();
1655  if ( meTimingMean_ ) meTimingMean_->Reset();
1656  if ( meTimingRMS_ ) meTimingRMS_->Reset();
1657  if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setEntries( 0 );
1658  if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setEntries( 0 );
1665 
1666  if( meGlobalSummary_[0] ) meGlobalSummary_[0]->setEntries( 0 );
1668 
1670 
1671  MonitorElement *me(0);
1672  me = dqmStore_->get(prefixME_ + "/EETimingTask/EETMT timing map EE +");
1673  TProfile2D *htmtp(0);
1674  htmtp = UtilsClient::getHisto(me, false, htmtp);
1675 
1676  me = dqmStore_->get(prefixME_ + "/EETimingTask/EETMT timing map EE -");
1677  TProfile2D *htmtm(0);
1678  htmtm = UtilsClient::getHisto(me, false, htmtm);
1679 
1680  std::string subdir(subfolder_ == "" ? "" : subfolder_ + "/");
1681 
1682  TH1F* oosTrend(0);
1683 
1684  for ( unsigned int i=0; i<clients_.size(); i++ ) {
1685 
1686  EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
1687  EEStatusFlagsClient* eesfc = dynamic_cast<EEStatusFlagsClient*>(clients_[i]);
1688  if(!produceReports_) eesfc = 0;
1689  EEPedestalOnlineClient* eepoc = dynamic_cast<EEPedestalOnlineClient*>(clients_[i]);
1690  if(!produceReports_) eepoc = 0;
1691 
1692  EELaserClient* eelc = dynamic_cast<EELaserClient*>(clients_[i]);
1693  EELedClient* eeldc = dynamic_cast<EELedClient*>(clients_[i]);
1694  EEPedestalClient* eepc = dynamic_cast<EEPedestalClient*>(clients_[i]);
1695  EETestPulseClient* eetpc = dynamic_cast<EETestPulseClient*>(clients_[i]);
1696 
1697  EETimingClient* eetmc = dynamic_cast<EETimingClient*>(clients_[i]);
1698  EETriggerTowerClient* eetttc = dynamic_cast<EETriggerTowerClient*>(clients_[i]);
1699 
1700  MonitorElement *me_01, *me_02, *me_03;
1701  MonitorElement *me_04, *me_05;
1702  // MonitorElement *me_f[6], *me_fg[2];
1703  TH2F* h2;
1704  TH2F* h3;
1705 
1706  me = dqmStore_->get( prefixME_ + "/EcalInfo/EEMM DCC" );
1708 
1709  me = dqmStore_->get( prefixME_ + "/EERawDataTask/" + subdir + "EERDT L1A FE errors" );
1711 
1712  me = dqmStore_->get(prefixME_ + "/EERawDataTask/" + subdir + "EERDT accumulated FE synchronization errors");
1713  oosTrend = UtilsClient::getHisto(me, cloneME_, oosTrend);
1714 
1715  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
1716 
1717  int ism = superModules_[i];
1718 
1719  me = dqmStore_->get( prefixME_ + "/EEOccupancyTask/" + subdir + "EEOT rec hit energy " + Numbers::sEE(ism) );
1720  hot01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hot01_[ism-1] );
1721 
1722  me = dqmStore_->get( prefixME_ + "/EEPedestalOnlineTask/" + subdir + "Gain12/EEPOT pedestal " + Numbers::sEE(ism) + " G12" );
1723  hpot01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hpot01_[ism-1] );
1724 
1725  me = dqmStore_->get( prefixME_ + "/EETriggerTowerTask/EETTT Et map Real Digis " + Numbers::sEE(ism) );
1726  httt01_[ism-1] = UtilsClient::getHisto( me, cloneME_, httt01_[ism-1] );
1727 
1728  me = dqmStore_->get( prefixME_ + "/EETimingTask/EETMT timing " + Numbers::sEE(ism) );
1729  htmt01_[ism-1] = UtilsClient::getHisto( me, cloneME_, htmt01_[ism-1] );
1730 
1731  for ( int ix = 1; ix <= 50; ix++ ) {
1732  for ( int iy = 1; iy <= 50; iy++ ) {
1733 
1734  int jx = ix + Numbers::ix0EE(ism);
1735  int jy = iy + Numbers::iy0EE(ism);
1736 
1737  if ( ism >= 1 && ism <= 9 ) {
1738  if ( ! Numbers::validEE(ism, 101 - jx, jy) ) continue;
1739  } else {
1740  if ( ! Numbers::validEE(ism, jx, jy) ) continue;
1741  }
1742 
1743  if ( eeic ) {
1744 
1745  me = eeic->meg01_[ism-1];
1746 
1747  if ( me ) {
1748 
1749  float xval = me->getBinContent( ix, iy );
1750 
1751  if ( ism >= 1 && ism <= 9 ) {
1752  if(meIntegrity_[0]) meIntegrity_[0]->setBinContent( 101 - jx, jy, xval );
1753  } else {
1754  if(meIntegrity_[1]) meIntegrity_[1]->setBinContent( jx, jy, xval );
1755  }
1756 
1757  if ( xval == 0 && meIntegrityErr_) meIntegrityErr_->Fill( ism );
1758 
1759  }
1760 
1761  h2 = eeic->h_[ism-1];
1762 
1763  if ( h2 ) {
1764 
1765  float xval = h2->GetBinContent( ix, iy );
1766 
1767  if ( ism >= 1 && ism <= 9 ) {
1768  if ( xval != 0 && meOccupancy_[0]) meOccupancy_[0]->setBinContent( 101 - jx, jy, xval );
1769  } else {
1770  if ( xval != 0 && meOccupancy_[1]) meOccupancy_[1]->setBinContent( jx, jy, xval );
1771  }
1772 
1773  if(meOccupancy1D_) meOccupancy1D_->Fill( ism, xval );
1774 
1775  }
1776 
1777  }
1778 
1779  if ( eepoc ) {
1780 
1781  me = eepoc->meg03_[ism-1];
1782 
1783  if ( me ) {
1784 
1785  float xval = me->getBinContent( ix, iy );
1786 
1787  if ( ism >= 1 && ism <= 9 ) {
1788  if(mePedestalOnline_[0]) mePedestalOnline_[0]->setBinContent( 101 - jx, jy, xval );
1789  } else {
1790  if(mePedestalOnline_[1]) mePedestalOnline_[1]->setBinContent( jx, jy, xval );
1791  }
1792 
1793  if ( xval == 0 && mePedestalOnlineErr_) mePedestalOnlineErr_->Fill( ism );
1794 
1795  }
1796 
1797  float num01, mean01, rms01;
1798  bool update01 = UtilsClient::getBinStatistics(hpot01_[ism-1], ix, iy, num01, mean01, rms01);
1799 
1800  if ( update01 ) {
1801 
1802  if(mePedestalOnlineRMS_) mePedestalOnlineRMS_->Fill( ism, rms01 );
1803  if(mePedestalOnlineMean_) mePedestalOnlineMean_->Fill( ism, mean01 );
1804 
1805  if ( ism >= 1 && ism <= 9 ) {
1806  if(mePedestalOnlineRMSMap_[0]) mePedestalOnlineRMSMap_[0]->setBinContent( 101 - jx, jy, rms01 );
1807  } else {
1809  }
1810 
1811  }
1812 
1813  }
1814 
1815  if ( eelc ) {
1816 
1817  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
1818 
1819  me = eelc->meg01_[ism-1];
1820 
1821  if ( me ) {
1822 
1823  float xval = me->getBinContent( ix, iy );
1824 
1825  if ( me->getEntries() != 0 ) {
1826  if ( ism >= 1 && ism <= 9 ) {
1827  meLaserL1_[0]->setBinContent( 101 - jx, jy, xval );
1828  } else {
1829  meLaserL1_[1]->setBinContent( jx, jy, xval );
1830  }
1831 
1832  if ( xval == 0 ) meLaserL1Err_->Fill( ism );
1833  }
1834 
1835  }
1836 
1837  }
1838 
1839  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
1840 
1841  me = eelc->meg02_[ism-1];
1842 
1843  if ( me ) {
1844 
1845  float xval = me->getBinContent( ix, iy );
1846 
1847  if ( me->getEntries() != 0 ) {
1848  if ( ism >= 1 && ism <= 9 ) {
1849  meLaserL2_[0]->setBinContent( 101 - jx, jy, xval );
1850  } else {
1851  meLaserL2_[1]->setBinContent( jx, jy, xval );
1852  }
1853 
1854  if ( xval == 0 ) meLaserL2Err_->Fill( ism );
1855  }
1856 
1857  }
1858 
1859  }
1860 
1861  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
1862 
1863  me = eelc->meg03_[ism-1];
1864 
1865  if ( me ) {
1866 
1867  float xval = me->getBinContent( ix, iy );
1868 
1869  if ( me->getEntries() != 0 ) {
1870  if ( ism >= 1 && ism <= 9 ) {
1871  meLaserL3_[0]->setBinContent( 101 - jx, jy, xval );
1872  } else {
1873  meLaserL3_[1]->setBinContent( jx, jy, xval );
1874  }
1875 
1876  if ( xval == 0 ) meLaserL3Err_->Fill( ism );
1877  }
1878 
1879  }
1880 
1881  }
1882 
1883  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
1884 
1885  me = eelc->meg04_[ism-1];
1886 
1887  if ( me ) {
1888 
1889  float xval = me->getBinContent( ix, iy );
1890 
1891  if ( me->getEntries() != 0 ) {
1892  if ( ism >= 1 && ism <= 9 ) {
1893  meLaserL4_[0]->setBinContent( 101 - jx, jy, xval );
1894  } else {
1895  meLaserL4_[1]->setBinContent( jx, jy, xval );
1896  }
1897 
1898  if ( xval == 0 ) meLaserL4Err_->Fill( ism );
1899  }
1900 
1901  }
1902 
1903  }
1904 
1905  }
1906 
1907  if ( eeldc ) {
1908 
1909  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
1910 
1911  me = eeldc->meg01_[ism-1];
1912 
1913  if ( me ) {
1914 
1915  float xval = me->getBinContent( ix, iy );
1916 
1917  if ( me->getEntries() != 0 ) {
1918  if ( ism >= 1 && ism <= 9 ) {
1919  meLedL1_[0]->setBinContent( 101 - jx, jy, xval );
1920  } else {
1921  meLedL1_[1]->setBinContent( jx, jy, xval );
1922  }
1923 
1924  if ( xval == 0 ) meLedL1Err_->Fill( ism );
1925  }
1926 
1927  }
1928 
1929  }
1930 
1931  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
1932 
1933  me = eeldc->meg02_[ism-1];
1934 
1935  if ( me ) {
1936 
1937  float xval = me->getBinContent( ix, iy );
1938 
1939  if ( me->getEntries() != 0 ) {
1940  if ( ism >= 1 && ism <= 9 ) {
1941  meLedL2_[0]->setBinContent( 101 - jx, jy, xval );
1942  } else {
1943  meLedL2_[1]->setBinContent( jx, jy, xval );
1944  }
1945 
1946  if ( xval == 0 ) meLedL2Err_->Fill( ism );
1947  }
1948 
1949  }
1950 
1951  }
1952 
1953  }
1954 
1955  if ( eepc ) {
1956 
1957  me_01 = eepc->meg01_[ism-1];
1958  me_02 = eepc->meg02_[ism-1];
1959  me_03 = eepc->meg03_[ism-1];
1960 
1961  if ( me_01 ) {
1962  float val_01=me_01->getBinContent(ix,iy);
1963  if ( me_01->getEntries() != 0 ) {
1964  if ( ism >= 1 && ism <= 9 ) {
1965  mePedestalG01_[0]->setBinContent( 101 - jx, jy, val_01 );
1966  } else {
1967  mePedestalG01_[1]->setBinContent( jx, jy, val_01 );
1968  }
1969  }
1970  }
1971  if ( me_02 ) {
1972  float val_02=me_02->getBinContent(ix,iy);
1973  if ( me_02->getEntries() != 0 ) {
1974  if ( ism >= 1 && ism <= 9 ) {
1975  mePedestalG06_[0]->setBinContent( 101 - jx, jy, val_02 );
1976  } else {
1977  mePedestalG06_[1]->setBinContent( jx, jy, val_02 );
1978  }
1979  }
1980  }
1981  if ( me_03 ) {
1982  float val_03=me_03->getBinContent(ix,iy);
1983  if ( me_03->getEntries() != 0 ) {
1984  if ( ism >= 1 && ism <= 9 ) {
1985  mePedestalG12_[0]->setBinContent( 101 - jx, jy, val_03 );
1986  } else {
1987  mePedestalG12_[1]->setBinContent( jx, jy, val_03 );
1988  }
1989  }
1990  }
1991 
1992  }
1993 
1994  if ( eetpc ) {
1995 
1996  me_01 = eetpc->meg01_[ism-1];
1997  me_02 = eetpc->meg02_[ism-1];
1998  me_03 = eetpc->meg03_[ism-1];
1999 
2000  if ( me_01 ) {
2001  float val_01=me_01->getBinContent(ix,iy);
2002  if ( me_01->getEntries() != 0 ) {
2003  if ( ism >= 1 && ism <= 9 ) {
2004  meTestPulseG01_[0]->setBinContent( 101 - jx, jy, val_01 );
2005  } else {
2006  meTestPulseG01_[1]->setBinContent( jx, jy, val_01 );
2007  }
2008  }
2009  }
2010  if ( me_02 ) {
2011  float val_02=me_02->getBinContent(ix,iy);
2012  if ( me_02->getEntries() != 0 ) {
2013  if ( ism >= 1 && ism <= 9 ) {
2014  meTestPulseG06_[0]->setBinContent( 101 - jx, jy, val_02 );
2015  } else {
2016  meTestPulseG06_[1]->setBinContent( jx, jy, val_02 );
2017  }
2018  }
2019  }
2020  if ( me_03 ) {
2021  float val_03=me_03->getBinContent(ix,iy);
2022  if ( me_03->getEntries() != 0 ) {
2023  if ( ism >= 1 && ism <= 9 ) {
2024  meTestPulseG12_[0]->setBinContent( 101 - jx, jy, val_03 );
2025  } else {
2026  meTestPulseG12_[1]->setBinContent( jx, jy, val_03 );
2027  }
2028  }
2029  }
2030 
2031  }
2032 
2033  if ( hot01_[ism-1] ) {
2034 
2035  float xval = hot01_[ism-1]->GetBinContent( ix, iy );
2036 
2037  if ( ism >= 1 && ism <= 9 ) {
2038  if(meRecHitEnergy_[0]) meRecHitEnergy_[0]->setBinContent( 101 - jx, jy, xval );
2039  } else {
2040  if(meRecHitEnergy_[1]) meRecHitEnergy_[1]->setBinContent( jx, jy, xval );
2041  }
2042 
2043  }
2044 
2045  }
2046  }
2047 
2048  for ( int ix = 1; ix <= 50; ix++ ) {
2049  for ( int iy = 1; iy <= 50; iy++ ) {
2050 
2051  int jx = ix + Numbers::ix0EE(ism);
2052  int jy = iy + Numbers::iy0EE(ism);
2053 
2054  if ( ism >= 1 && ism <= 9 ) {
2055  if ( ! Numbers::validEE(ism, 101 - jx, jy) ) continue;
2056  } else {
2057  if ( ! Numbers::validEE(ism, jx, jy) ) continue;
2058  }
2059 
2060  if ( eesfc ) {
2061 
2062  me = dqmStore_->get(prefixME_ + "/EcalInfo/EEMM DCC");
2063 
2064  float xval = 6;
2065 
2066  if ( me ) {
2067 
2068  xval = 2;
2069  if ( me->getBinContent( ism ) > 0 ) xval = 1;
2070 
2071  }
2072 
2073  me = eesfc->meh01_[ism-1];
2074 
2075  if ( me ) {
2076 
2077  if ( me->getBinContent( ix, iy ) > 0 ) xval = 0;
2078 
2079  if ( ism >= 1 && ism <= 9 ) {
2080 
2081  meStatusFlags_[0]->setBinContent( 101 - jx, jy, xval );
2082 
2083  if ( me->getBinError( ix, iy ) > 0 && me->getBinError( ix, iy ) < 0.1 ) {
2084  UtilsClient::maskBinContent( meStatusFlags_[0], 101 - jx, jy );
2085  }
2086  } else {
2087 
2088  meStatusFlags_[1]->setBinContent( jx, jy, xval );
2089 
2090  if ( me->getBinError( ix, iy ) > 0 && me->getBinError( ix, iy ) < 0.1 ) {
2092  }
2093  }
2094 
2095  if ( xval == 0 ) meStatusFlagsErr_->Fill( ism );
2096 
2097  }
2098 
2099  }
2100 
2101  }
2102  }
2103 
2104  for ( int ix = 1; ix <= 50; ix++ ) {
2105  for ( int iy = 1; iy <= 50; iy++ ) {
2106 
2107  int jx = ix + Numbers::ix0EE(ism);
2108  int jy = iy + Numbers::iy0EE(ism);
2109 
2110  if ( eetttc ) {
2111 
2112  float mean01 = 0;
2113  bool hadNonZeroInterest = false;
2114 
2115  if ( httt01_[ism-1] ) {
2116 
2117  mean01 = httt01_[ism-1]->GetBinContent( ix, iy );
2118 
2119  if ( mean01 != 0. ) {
2120  if ( ism >= 1 && ism <= 9 ) {
2121  if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setBinContent( 101 - jx, jy, mean01 );
2122  } else {
2123  if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setBinContent( jx, jy, mean01 );
2124  }
2125  }
2126 
2127  }
2128 
2129  me = eetttc->me_o01_[ism-1];
2130 
2131  if ( me ) {
2132 
2133  float xval = me->getBinContent( ix, iy );
2134 
2135  if ( xval != 0. ) {
2136  if ( ism >= 1 && ism <= 9 ) {
2137  meTriggerTowerTiming_[0]->setBinContent( 101 - jx, jy, xval );
2138  } else {
2139  meTriggerTowerTiming_[1]->setBinContent( jx, jy, xval );
2140  }
2141  hadNonZeroInterest = true;
2142  }
2143 
2144  }
2145 
2146  me = eetttc->me_o02_[ism-1];
2147 
2148  if ( me ) {
2149 
2150  float xval = me->getBinContent( ix, iy );
2151 
2152  if ( xval != 0. ) {
2153  if ( ism >= 1 && ism <= 9 ) {
2154  meTriggerTowerNonSingleTiming_[0]->setBinContent( 101 - jx, jy, xval );
2155  } else {
2156  meTriggerTowerNonSingleTiming_[1]->setBinContent( jx, jy, xval );
2157  }
2158  }
2159 
2160  }
2161 
2162  float xval = 2;
2163  if( mean01 > 0. ) {
2164 
2165  h2 = eetttc->l01_[ism-1];
2166  h3 = eetttc->l02_[ism-1];
2167 
2168  if ( h2 && h3 ) {
2169 
2170  // float emulErrorVal = h2->GetBinContent( ix, iy ) + h3->GetBinContent( ix, iy );
2171  float emulErrorVal = h2->GetBinContent( ix, iy );
2172 
2173  if( emulErrorVal > 0.01 * ievt_ && hadNonZeroInterest ) xval = 0;
2174 
2175  }
2176 
2177  if ( xval!=0 && hadNonZeroInterest ) xval = 1;
2178 
2179  }
2180 
2181  // see fix below
2182  if ( xval == 2 ) continue;
2183 
2184  if ( ism >= 1 && ism <= 9 ) {
2185  meTriggerTowerEmulError_[0]->setBinContent( 101 - jx, jy, xval );
2186  } else {
2187  meTriggerTowerEmulError_[1]->setBinContent( jx, jy, xval );
2188  }
2189 
2190  }
2191 
2192  if ( eetmc ) {
2193 
2194  float num01, mean01, rms01;
2195  bool update01 = UtilsClient::getBinStatistics(htmt01_[ism-1], ix, iy, num01, mean01, rms01, timingNHitThreshold_);
2196  mean01 -= 50.;
2197 
2198  if( update01 ){
2199 
2200  if ( ism >= 1 && ism <= 9 ) {
2201  meTimingMean1D_[0]->Fill(mean01);
2202  meTimingRMS1D_[0]->Fill(rms01);
2203  } else {
2204  meTimingMean1D_[1]->Fill(mean01);
2205  meTimingRMS1D_[1]->Fill(rms01);
2206  }
2207 
2208  meTimingMean_->Fill( ism, mean01 );
2209 
2210  meTimingRMS_->Fill( ism, rms01 );
2211 
2212  }
2213 
2214  }
2215 
2216  }
2217  }
2218 
2219  for ( int ix = 1; ix <= 10; ix++ ) {
2220  for( int iy = 1; iy <= 10; iy++ ) {
2221 
2222  int jx = ix + Numbers::ix0EE(ism) / 5;
2223  int jy = iy + Numbers::iy0EE(ism) / 5;
2224 
2225  if( jx <= 0 || jx >= 21 || jy <= 0 || jy >= 21 ) continue;
2226 
2227  if ( ism >= 1 && ism <= 9 ) {
2228  if ( ! Numbers::validEESc(ism, 21 - jx, jy) ) continue;
2229  } else {
2230  if ( ! Numbers::validEESc(ism, jx, jy) ) continue;
2231  }
2232 
2233  if ( eetmc ) {
2234 
2235  if ( htmt01_[ism-1] ) {
2236 
2237  int ixedge = (ix-1) * 5;
2238  int iyedge = (iy-1) * 5;
2239  int jxedge = (jx-1) * 5;
2240  int jyedge = (jy-1) * 5;
2241 
2242  float num(0);
2243  int nValid(0);
2244  bool mask(false);
2245 
2246  for(int cx=1; cx<=5; cx++){
2247  for(int cy=1; cy<=5; cy++){
2248  int scjx = (ism >= 1 && ism <= 9) ? 101 - (jxedge + cx) : jxedge + cx;
2249  int scjy = jyedge + cy;
2250  int scix = ixedge + cx;
2251  int sciy = iyedge + cy;
2252 
2253  if ( ! Numbers::validEE(ism, scjx, scjy) ) continue;
2254 
2255  nValid += 1;
2256 
2257  num += htmt01_[ism-1]->GetBinEntries(htmt01_[ism-1]->GetBin(scix, sciy));
2258 
2259  if(Masks::maskChannel(ism, scix, sciy, chWarnBit, EcalEndcap) ) mask = true;
2260  }
2261  }
2262 
2263  float nHitThreshold(timingNHitThreshold_ * 15. * nValid / 25.);
2264 
2265  bool update01(false);
2266  float num01, mean01, rms01;
2267  if(ism >= 1 && ism <= 9)
2268  update01 = UtilsClient::getBinStatistics(htmtm, 21 - jx, jy, num01, mean01, rms01, nHitThreshold);
2269  else
2270  update01 = UtilsClient::getBinStatistics(htmtp, jx, jy, num01, mean01, rms01, nHitThreshold);
2271 
2272  mean01 -= 50.;
2273 
2274  if(!update01){
2275  mean01 = 0.;
2276  rms01 = 0.;
2277  }
2278 
2279  update01 |= num > 1.4 * nHitThreshold; // allow 40% outliers
2280 
2281  float xval = 2.;
2282 
2283  if( update01 ){
2284 
2285  // quality BAD if mean large, rms large, or significantly more outliers (num: # events in +-20 ns time window)
2286  if( std::abs(mean01) > 3. || rms01 > 6. || num > 1.4 * num01 ) xval = 0.;
2287  else xval = 1.;
2288 
2289  }
2290 
2291  int ind;
2292  if ( ism >= 1 && ism <= 9 ){
2293  jx = 21 - jx;
2294  ind = 0;
2295  }else{
2296  ind = 1;
2297  }
2298 
2299  meTiming_[ind]->setBinContent( jx, jy, xval );
2300  if ( mask ) UtilsClient::maskBinContent( meTiming_[ind], jx, jy );
2301 
2302  }
2303 
2304  }
2305 
2306  }
2307  }
2308  // PN's summaries
2309  for( int i = 1; i <= 10; i++ ) {
2310  for( int j = 1; j <= 5; j++ ) {
2311 
2312  int ichanx;
2313  int ipseudostripx;
2314 
2315  if(ism<=9) {
2316  ichanx = i;
2317  ipseudostripx = (ism<=3) ? j+5*(ism-1+6) : j+5*(ism-1-3);
2318  } else {
2319  ichanx = i+10;
2320  ipseudostripx = (ism<=12) ? j+5*(ism-10+6) : j+5*(ism-10-3);
2321  }
2322 
2323  if ( eeic ) {
2324 
2325  me_04 = eeic->meg02_[ism-1];
2326  h2 = eeic->hmem_[ism-1];
2327 
2328 
2329  if( me_04 ) {
2330 
2331  float xval = me_04->getBinContent(i,j);
2332  if(meIntegrityPN_) meIntegrityPN_->setBinContent( ipseudostripx, ichanx, xval );
2333 
2334  }
2335 
2336  if ( h2 ) {
2337 
2338  float xval = h2->GetBinContent(i,1);
2339  if(meOccupancyPN_) meOccupancyPN_->setBinContent( ipseudostripx, ichanx, xval );
2340 
2341  }
2342 
2343  }
2344 
2345  if ( eepc ) {
2346 
2347  me_04 = eepc->meg04_[ism-1];
2348  me_05 = eepc->meg05_[ism-1];
2349 
2350  if( me_04 ) {
2351  float val_04=me_04->getBinContent(i,1);
2352  mePedestalPNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
2353  }
2354  if( me_05 ) {
2355  float val_05=me_05->getBinContent(i,1);
2356  mePedestalPNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
2357  }
2358 
2359  }
2360 
2361  if ( eetpc ) {
2362 
2363  me_04 = eetpc->meg04_[ism-1];
2364  me_05 = eetpc->meg05_[ism-1];
2365 
2366  if( me_04 ) {
2367  float val_04=me_04->getBinContent(i,1);
2368  meTestPulsePNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
2369  }
2370  if( me_05 ) {
2371  float val_05=me_05->getBinContent(i,1);
2372  meTestPulsePNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
2373  }
2374 
2375  }
2376 
2377  if ( eelc ) {
2378 
2379  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
2380 
2381  me = eelc->meg09_[ism-1];
2382 
2383  if( me ) {
2384 
2385  float xval = me->getBinContent(i,1);
2386 
2387  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2388  meLaserL1PN_->setBinContent( ipseudostripx, ichanx, xval );
2389  if ( xval == 0 ) meLaserL1PNErr_->Fill( ism );
2390  }
2391 
2392  }
2393 
2394  }
2395 
2396  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
2397 
2398  me = eelc->meg10_[ism-1];
2399 
2400  if( me ) {
2401 
2402  float xval = me->getBinContent(i,1);
2403 
2404  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2405  meLaserL2PN_->setBinContent( ipseudostripx, ichanx, xval );
2406  if ( xval == 0 ) meLaserL2PNErr_->Fill( ism );
2407  }
2408 
2409  }
2410 
2411  }
2412 
2413  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
2414 
2415  me = eelc->meg11_[ism-1];
2416 
2417  if( me ) {
2418 
2419  float xval = me->getBinContent(i,1);
2420 
2421  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2422  meLaserL3PN_->setBinContent( ipseudostripx, ichanx, xval );
2423  if ( xval == 0 ) meLaserL3PNErr_->Fill( ism );
2424  }
2425 
2426  }
2427 
2428  }
2429 
2430  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
2431 
2432  me = eelc->meg12_[ism-1];
2433 
2434  if( me ) {
2435 
2436  float xval = me->getBinContent(i,1);
2437 
2438  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2439  meLaserL4PN_->setBinContent( ipseudostripx, ichanx, xval );
2440  if ( xval == 0 ) meLaserL4PNErr_->Fill( ism );
2441  }
2442 
2443  }
2444 
2445  }
2446 
2447  }
2448 
2449  if ( eeldc ) {
2450 
2451  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
2452 
2453  me = eeldc->meg09_[ism-1];
2454 
2455  if( me ) {
2456 
2457  float xval = me->getBinContent(i,1);
2458 
2459  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2460  meLedL1PN_->setBinContent( ipseudostripx, ichanx, xval );
2461  if ( xval == 0 ) meLedL1PNErr_->Fill( ism );
2462  }
2463 
2464  }
2465 
2466  }
2467 
2468  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
2469 
2470  me = eeldc->meg10_[ism-1];
2471 
2472  if( me ) {
2473 
2474  float xval = me->getBinContent(i,1);
2475 
2476  if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
2477  meLedL2PN_->setBinContent( ipseudostripx, ichanx, xval );
2478  if ( xval == 0 ) meLedL2PNErr_->Fill( ism );
2479  }
2480 
2481  }
2482 
2483  }
2484 
2485  }
2486 
2487  }
2488  }
2489 
2490  for ( int ix=1; ix<=50; ix++ ) {
2491  for (int iy=1; iy<=50; iy++ ) {
2492 
2493  int jx = ix + Numbers::ix0EE(ism);
2494  int jy = iy + Numbers::iy0EE(ism);
2495  if( ism >= 1 && ism <= 9 ) jx = 101 - jx;
2496 
2497  if( !Numbers::validEE(ism, jx, jy) ) continue;
2498 
2499  int ic = Numbers::icEE(ism, jx, jy);
2500 
2501  if ( eelc ) {
2502 
2503  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
2504 
2505  MonitorElement *meg = eelc->meg01_[ism-1];
2506 
2507  float xval = 2;
2508  if ( meg ) xval = meg->getBinContent( ix, iy );
2509 
2510  // exclude channels without laser data (yellow in the quality map)
2511  if( xval != 2 && xval != 5 ) {
2512 
2513  MonitorElement* mea01 = eelc->mea01_[ism-1];
2514  MonitorElement* met01 = eelc->met01_[ism-1];
2515  MonitorElement* meaopn01 = eelc->meaopn01_[ism-1];
2516 
2517  if( mea01 && met01 && meaopn01 ) {
2518  meLaserL1Ampl_->Fill( ism, mea01->getBinContent( ic ) );
2519  if( met01->getBinContent( ic ) > 0. ) meLaserL1Timing_->Fill( ism, met01->getBinContent( ic ) );
2520  meLaserL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( ic ) );
2521  }
2522 
2523  }
2524 
2525  }
2526 
2527  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
2528 
2529  MonitorElement *meg = eelc->meg02_[ism-1];
2530 
2531  float xval = 2;
2532  if ( meg ) xval = meg->getBinContent( ix, iy );
2533 
2534  // exclude channels without laser data (yellow in the quality map)
2535  if( xval != 2 && xval != 5 ) {
2536 
2537  MonitorElement* mea02 = eelc->mea02_[ism-1];
2538  MonitorElement* met02 = eelc->met02_[ism-1];
2539  MonitorElement* meaopn02 = eelc->meaopn02_[ism-1];
2540 
2541  if( mea02 && met02 && meaopn02 ) {
2542  meLaserL2Ampl_->Fill( ism, mea02->getBinContent( ic ) );
2543  if( met02->getBinContent( ic ) > 0. ) meLaserL2Timing_->Fill( ism, met02->getBinContent( ic ) );
2544  meLaserL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( ic ) );
2545  }
2546 
2547  }
2548 
2549  }
2550 
2551  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
2552 
2553  MonitorElement *meg = eelc->meg03_[ism-1];
2554 
2555  float xval = 2;
2556  if ( meg ) xval = meg->getBinContent( ix, iy );
2557 
2558  // exclude channels without laser data (yellow in the quality map)
2559  if( xval != 2 && xval != 5 ) {
2560 
2561  MonitorElement* mea03 = eelc->mea03_[ism-1];
2562  MonitorElement* met03 = eelc->met03_[ism-1];
2563  MonitorElement* meaopn03 = eelc->meaopn03_[ism-1];
2564 
2565  if( mea03 && met03 && meaopn03 ) {
2566  meLaserL3Ampl_->Fill( ism, mea03->getBinContent( ic ) );
2567  if( met03->getBinContent( ic ) > 0. ) meLaserL3Timing_->Fill( ism, met03->getBinContent( ic ) );
2568  meLaserL3AmplOverPN_->Fill( ism, meaopn03->getBinContent( ic ) );
2569  }
2570 
2571  }
2572 
2573  }
2574 
2575  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
2576 
2577  MonitorElement *meg = eelc->meg04_[ism-1];
2578 
2579  float xval = 2;
2580  if ( meg ) xval = meg->getBinContent( ix, iy );
2581 
2582  // exclude channels without laser data (yellow in the quality map)
2583  if( xval != 2 && xval != 5 ) {
2584 
2585  MonitorElement* mea04 = eelc->mea04_[ism-1];
2586  MonitorElement* met04 = eelc->met04_[ism-1];
2587  MonitorElement* meaopn04 = eelc->meaopn04_[ism-1];
2588 
2589  if( mea04 && met04 && meaopn04 ) {
2590  meLaserL4Ampl_->Fill( ism, mea04->getBinContent( ic ) );
2591  if( met04->getBinContent( ic ) > 0. ) meLaserL4Timing_->Fill( ism, met04->getBinContent( ic ) );
2592  meLaserL4AmplOverPN_->Fill( ism, meaopn04->getBinContent( ic ) );
2593  }
2594 
2595  }
2596 
2597  }
2598 
2599  }
2600 
2601  if ( eeldc ) {
2602 
2603  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
2604 
2605  MonitorElement *meg = eeldc->meg01_[ism-1];
2606 
2607  float xval = 2;
2608  if ( meg ) xval = meg->getBinContent( ix, iy );
2609 
2610  // exclude channels without led data (yellow in the quality map)
2611  if( xval != 2 && xval != 5 ) {
2612 
2613  MonitorElement* mea01 = eeldc->mea01_[ism-1];
2614  MonitorElement* met01 = eeldc->met01_[ism-1];
2615  MonitorElement* meaopn01 = eeldc->meaopn01_[ism-1];
2616 
2617  if( mea01 && met01 && meaopn01 ) {
2618  meLedL1Ampl_->Fill( ism, mea01->getBinContent( ic ) );
2619  if( met01->getBinContent( ic ) > 0. ) meLedL1Timing_->Fill( ism, met01->getBinContent( ic ) );
2620  meLedL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( ic ) );
2621  }
2622 
2623  }
2624 
2625  }
2626 
2627  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
2628 
2629  MonitorElement *meg = eeldc->meg02_[ism-1];
2630 
2631  float xval = 2;
2632  if ( meg ) xval = meg->getBinContent( ix, iy );
2633 
2634  // exclude channels without led data (yellow in the quality map)
2635  if( xval != 2 && xval != 5 ) {
2636 
2637  MonitorElement* mea02 = eeldc->mea02_[ism-1];
2638  MonitorElement* met02 = eeldc->met02_[ism-1];
2639  MonitorElement* meaopn02 = eeldc->meaopn02_[ism-1];
2640 
2641  if( mea02 && met02 && meaopn02 ) {
2642  meLedL2Ampl_->Fill( ism, mea02->getBinContent( ic ) );
2643  if( met02->getBinContent( ic ) > 0. ) meLedL2Timing_->Fill( ism, met02->getBinContent( ic ) );
2644  meLedL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( ic ) );
2645  }
2646 
2647  }
2648 
2649  }
2650 
2651  }
2652 
2653  if ( eetpc ) {
2654 
2655  MonitorElement *meg01 = eetpc->meg01_[ism-1];
2656  MonitorElement *meg02 = eetpc->meg02_[ism-1];
2657  MonitorElement *meg03 = eetpc->meg03_[ism-1];
2658 
2659  if ( meg01 ) {
2660 
2661  float xval01 = meg01->getBinContent( ix, iy );
2662 
2663  if ( xval01 != 2 && xval01 != 5 ) {
2664 
2665  me = eetpc->mea01_[ism-1];
2666 
2667  if ( me ) {
2668 
2669  meTestPulseAmplG01_->Fill( ism, me->getBinContent( ic ) );
2670 
2671  }
2672 
2673  }
2674 
2675  }
2676 
2677  if ( meg02 ) {
2678 
2679  float xval02 = meg02->getBinContent( ix, iy );
2680 
2681  if ( xval02 != 2 && xval02 != 5 ) {
2682 
2683  me = eetpc->mea02_[ism-1];
2684 
2685  if ( me ) {
2686 
2687  meTestPulseAmplG06_->Fill( ism, me->getBinContent( ic ) );
2688 
2689  }
2690 
2691  }
2692 
2693  }
2694 
2695  if ( meg03 ) {
2696 
2697  float xval03 = meg03->getBinContent( ix, iy );
2698 
2699  if ( xval03 != 2 && xval03 != 5 ) {
2700 
2701  me = eetpc->mea03_[ism-1];
2702 
2703  if ( me ) {
2704 
2705  meTestPulseAmplG12_->Fill( ism, me->getBinContent( ic ) );
2706 
2707  }
2708 
2709  }
2710 
2711  }
2712 
2713  } //etpc
2714 
2715 
2716  } // loop on iy
2717  } // loop on ix
2718 
2719  } // loop on SM
2720 
2721  // fix TPG quality plots
2722 
2723  for ( unsigned int i=0; i<superModules_.size(); i++ ) {
2724 
2725  int ism = superModules_[i];
2726 
2727  for ( int ix = 1; ix <= 50; ix++ ) {
2728  for ( int iy = 1; iy <= 50; iy++ ) {
2729 
2730  int jx = ix + Numbers::ix0EE(ism);
2731  int jy = iy + Numbers::iy0EE(ism);
2732 
2733  if ( eetttc ) {
2734 
2735  if ( ism >= 1 && ism <= 9 ) {
2736  if ( meTriggerTowerEmulError_[0]->getBinContent( 101 - jx, jy ) == 6 ) {
2737  if ( Numbers::validEE(ism, 101 - jx, jy) ) meTriggerTowerEmulError_[0]->setBinContent( 101 - jx, jy, 2 );
2738  }
2739  } else {
2740  if ( meTriggerTowerEmulError_[1]->getBinContent( jx, jy ) == 6 ) {
2741  if ( Numbers::validEE(ism, jx, jy) ) meTriggerTowerEmulError_[1]->setBinContent( jx, jy, 2 );
2742  }
2743  }
2744 
2745  }
2746 
2747  }
2748  }
2749 
2750  }
2751 
2752  } // loop on clients
2753 
2754  // The global-summary
2755  int nGlobalErrors = 0;
2756  int nGlobalErrorsEE[18];
2757  int nValidChannels = 0;
2758  int nValidChannelsEE[18];
2759 
2760  for (int i = 0; i < 18; i++) {
2761  nGlobalErrorsEE[i] = 0;
2762  nValidChannelsEE[i] = 0;
2763  }
2764 
2765  for ( int jx = 1; jx <= 100; jx++ ) {
2766  for ( int jy = 1; jy <= 100; jy++ ) {
2767 
2768  if(meGlobalSummary_[0]) {
2769 
2770  float xval = 6;
2771  float val_in = meIntegrity_[0]->getBinContent(jx,jy);
2772  float val_po = mePedestalOnline_[0]->getBinContent(jx,jy);
2773  float val_tm = reducedReports_ ? 1. : meTiming_[0]->getBinContent((jx-1)/5+1,(jy-1)/5+1);
2774  float val_sf = meStatusFlags_[0]->getBinContent(jx,jy);
2775  float val_ee = reducedReports_ ? 1. : meTriggerTowerEmulError_[0]->getBinContent(jx,jy); // removed temporarily from the global summary
2776  // float val_ee = 1;
2777 
2778  // combine all the available wavelenghts in unique laser status
2779  // for each laser turn dark color and yellow into bright green
2780  float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
2781  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
2782  if ( meLaserL1_[0] ) val_ls_1 = meLaserL1_[0]->getBinContent(jx,jy);
2783  if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
2784  }
2785  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
2786  if ( meLaserL2_[0] ) val_ls_2 = meLaserL2_[0]->getBinContent(jx,jy);
2787  if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
2788  }
2789  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
2790  if ( meLaserL3_[0] ) val_ls_3 = meLaserL3_[0]->getBinContent(jx,jy);
2791  if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
2792  }
2793  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
2794  if ( meLaserL4_[0] ) val_ls_4 = meLaserL4_[0]->getBinContent(jx,jy);
2795  if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
2796  }
2797 
2798  float val_ls = 1;
2799  if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
2800 
2801  // combine all the available wavelenghts in unique led status
2802  // for each laser turn dark color and yellow into bright green
2803  float val_ld_1=2, val_ld_2=2;
2804  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
2805  if ( meLedL1_[0] ) val_ld_1 = meLedL1_[0]->getBinContent(jx,jy);
2806  if(val_ld_1==2 || val_ld_1==3 || val_ld_1==4 || val_ld_1==5) val_ld_1=1;
2807  }
2808  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
2809  if ( meLedL2_[0] ) val_ld_2 = meLedL2_[0]->getBinContent(jx,jy);
2810  if(val_ld_2==2 || val_ld_2==3 || val_ld_2==4 || val_ld_2==5) val_ld_2=1;
2811  }
2812 
2813  float val_ld = 1;
2814  if (val_ld_1 == 0 || val_ld_2==0) val_ld=0;
2815 
2816  // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY FOR NOW
2817  val_ls = 1;
2818  val_ld = 1;
2819 
2820  // turn each dark color (masked channel) to bright green
2821  // for laser & timing & trigger turn also yellow into bright green
2822  // for pedestal online too because is not computed in calibration events
2823 
2824  // 0/3 = red/dark red
2825  // 1/4 = green/dark green
2826  // 2/5 = yellow/dark yellow
2827  // 6 = unknown
2828 
2829  if( val_in==3 || val_in==4 || val_in==5) val_in=1;
2830  if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
2831  if(val_ls==2 || val_ls==3 || val_ls==4 || val_ls==5) val_ls=1;
2832  if(val_ld==2 || val_ld==3 || val_ld==4 || val_ld==5) val_ld=1;
2833  if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
2834  if( val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
2835  if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
2836 
2837  if(val_in==6) xval=6;
2838  else if(val_in==0) xval=0;
2839  else if(val_po==0 || val_ls==0 || val_ld==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
2840  else if(val_po==2 || val_ls==2 || val_ld==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
2841  else xval=1;
2842 
2843  bool validCry = false;
2844 
2845  // if the SM is entirely not read, the masked channels
2846  // are reverted back to yellow
2847  float iEntries=0;
2848 
2849  for(int ism = 1; ism <= 9; ism++) {
2850  std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
2851  if (iter != superModules_.end()) {
2852  if ( Numbers::validEE(ism, jx, jy) ) {
2853  validCry = true;
2854 
2855  // recycle the validEE for the synch check of the DCC
2856  if(norm01_ && synch01_) {
2857  float frac_synch_errors = 0.;
2858  float norm = norm01_->GetBinContent(ism);
2859  if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
2860  if(frac_synch_errors > synchErrorThreshold_){
2861  xval = 0;
2862  if(oosTrend && oosTrend->GetBinContent(oosTrend->GetNbinsX()) - oosTrend->GetBinContent(1) < 1.) xval += 3.;
2863  }
2864  }
2865 
2866  for ( unsigned int i=0; i<clients_.size(); i++ ) {
2867  EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
2868  if ( eeic ) {
2869  TH2F* h2 = eeic->h_[ism-1];
2870  if ( h2 ) {
2871  iEntries = h2->GetEntries();
2872  }
2873  }
2874  }
2875  }
2876  }
2877  }
2878 
2879  if ( validCry && iEntries==0 ) {
2880  xval=2;
2881  }
2882 
2883  meGlobalSummary_[0]->setBinContent( jx, jy, xval );
2884 
2885  if ( xval >= 0 && xval <= 5 ) {
2886  if ( xval != 2 && xval != 5 ) ++nValidChannels;
2887  for (int i = 1; i <= 9; i++) {
2888  if ( xval != 2 && xval != 5 ) {
2889  if ( Numbers::validEE(i, jx, jy) ) ++nValidChannelsEE[i-1];
2890  }
2891  }
2892  if ( xval == 0 ) ++nGlobalErrors;
2893  for (int i = 1; i <= 9; i++) {
2894  if ( xval == 0 ) {
2895  if ( Numbers::validEE(i, jx, jy) ) ++nGlobalErrorsEE[i-1];
2896  }
2897  }
2898  }
2899 
2900  }
2901 
2902  if(meGlobalSummary_[1]) {
2903 
2904  float xval = 6;
2905  float val_in = meIntegrity_[1]->getBinContent(jx,jy);
2906  float val_po = mePedestalOnline_[1]->getBinContent(jx,jy);
2907  float val_tm = reducedReports_ ? 1. : meTiming_[1]->getBinContent((jx-1)/5+1,(jy-1)/5+1);
2908  float val_sf = meStatusFlags_[1]->getBinContent(jx,jy);
2909  float val_ee = reducedReports_ ? 1. : meTriggerTowerEmulError_[1]->getBinContent(jx,jy); // removed temporarily from the global summary
2910  // float val_ee = 1;
2911 
2912  // combine all the available wavelenghts in unique laser status
2913  // for each laser turn dark color and yellow into bright green
2914  float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
2915  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
2916  if ( meLaserL1_[1] ) val_ls_1 = meLaserL1_[1]->getBinContent(jx,jy);
2917  if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
2918  }
2919  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
2920  if ( meLaserL2_[1] ) val_ls_2 = meLaserL2_[1]->getBinContent(jx,jy);
2921  if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
2922  }
2923  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
2924  if ( meLaserL3_[1] ) val_ls_3 = meLaserL3_[1]->getBinContent(jx,jy);
2925  if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
2926  }
2927  if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
2928  if ( meLaserL4_[1] ) val_ls_4 = meLaserL4_[1]->getBinContent(jx,jy);
2929  if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
2930  }
2931 
2932  float val_ls = 1;
2933  if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
2934 
2935  // combine all the available wavelenghts in unique laser status
2936  // for each laser turn dark color and yellow into bright green
2937  float val_ld_1=2, val_ld_2=2;
2938  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
2939  if ( meLedL1_[1] ) val_ld_1 = meLedL1_[1]->getBinContent(jx,jy);
2940  if(val_ld_1==2 || val_ld_1==3 || val_ld_1==4 || val_ld_1==5) val_ld_1=1;
2941  }
2942  if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
2943  if ( meLedL2_[1] ) val_ld_2 = meLedL2_[1]->getBinContent(jx,jy);
2944  if(val_ld_2==2 || val_ld_2==3 || val_ld_2==4 || val_ld_2==5) val_ld_2=1;
2945  }
2946 
2947  float val_ld = 1;
2948  if (val_ld_1 == 0 || val_ld_2==0) val_ld=0;
2949 
2950  // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY FOR NOW
2951  val_ls = 1;
2952  val_ld = 1;
2953 
2954  // turn each dark color to bright green
2955  // for laser & timing & trigger turn also yellow into bright green
2956  // for pedestal online too because is not computed in calibration events
2957 
2958  // 0/3 = red/dark red
2959  // 1/4 = green/dark green
2960  // 2/5 = yellow/dark yellow
2961  // 6 = unknown
2962 
2963  if( val_in==3 || val_in==4 || val_in==5) val_in=1;
2964  if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
2965  if(val_ls==2 || val_ls==3 || val_ls==4 || val_ls==5) val_ls=1;
2966  if(val_ld==2 || val_ld==3 || val_ld==4 || val_ld==5) val_ld=1;
2967  if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
2968  if( val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
2969  if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
2970 
2971  if(val_in==6) xval=6;
2972  else if(val_in==0) xval=0;
2973  else if(val_po==0 || val_ls==0 || val_ld==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
2974  else if(val_po==2 || val_ls==2 || val_ld==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
2975  else xval=1;
2976 
2977  bool validCry = false;
2978 
2979  // if the SM is entirely not read, the masked channels
2980  // are reverted back in yellow
2981  float iEntries=0;
2982 
2983  for(int ism = 10; ism <= 18; ism++) {
2984  std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
2985  if (iter != superModules_.end()) {
2986  if ( Numbers::validEE(ism, jx, jy) ) {
2987  validCry = true;
2988 
2989  // recycle the validEE for the synch check of the DCC
2990  if(norm01_ && synch01_) {
2991  float frac_synch_errors = 0.;
2992  float norm = norm01_->GetBinContent(ism);
2993  if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
2994  if(frac_synch_errors > synchErrorThreshold_){
2995  xval = 0.;
2996  if(oosTrend && oosTrend->GetBinContent(oosTrend->GetNbinsX()) - oosTrend->GetBinContent(1) < 1.) xval += 3.;
2997  }
2998  }
2999 
3000  for ( unsigned int i=0; i<clients_.size(); i++ ) {
3001  EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
3002  if ( eeic ) {
3003  TH2F* h2 = eeic->h_[ism-1];
3004  if ( h2 ) {
3005  iEntries = h2->GetEntries();
3006  }
3007  }
3008  }
3009  }
3010  }
3011  }
3012 
3013  if ( validCry && iEntries==0 ) {
3014  xval=2;
3015  }
3016 
3017  meGlobalSummary_[1]->setBinContent( jx, jy, xval );
3018 
3019  if ( xval >= 0 && xval <= 5 ) {
3020  if ( xval != 2 && xval != 5 ) ++nValidChannels;
3021  for (int i = 10; i <= 18; i++) {
3022  if ( xval != 2 && xval != 5 ) {
3023  if ( Numbers::validEE(i, jx, jy) ) ++nValidChannelsEE[i-1];
3024  }
3025  }
3026  if ( xval == 0 ) ++nGlobalErrors;
3027  for (int i = 10; i <= 18; i++) {
3028  if ( xval == 0 ) {
3029  if ( Numbers::validEE(i, jx, jy) ) ++nGlobalErrorsEE[i-1];
3030  }
3031  }
3032  }
3033 
3034  }
3035 
3036  }
3037  }
3038 
3039  if(meSummaryErr_)
3040  meSummaryErr_->setBinContent(1, double(nGlobalErrors) / double(nValidChannels));
3041 
3042  float reportSummary = -1.0;
3043  if ( nValidChannels != 0 )
3044  reportSummary = 1.0 - float(nGlobalErrors)/float(nValidChannels);
3045  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary");
3046  if ( me ) me->Fill(reportSummary);
3047 
3048  for (int i = 0; i < 18; i++) {
3049  float reportSummaryEE = -1.0;
3050  if ( nValidChannelsEE[i] != 0 )
3051  reportSummaryEE = 1.0 - float(nGlobalErrorsEE[i])/float(nValidChannelsEE[i]);
3052  me = dqmStore_->get( prefixME_ + "/EventInfo/reportSummaryContents/EcalEndcap_" + Numbers::sEE(i+1) );
3053  if ( me ) me->Fill(reportSummaryEE);
3054  }
3055 
3056  if(meGlobalSummary_[0] && meGlobalSummary_[1]){
3057 
3058  me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap");
3059  if ( me ) {
3060 
3061  int nValidChannelsSC[2][20][20];
3062  int nGlobalErrorsSC[2][20][20];
3063  for ( int iside = 0; iside < 2; iside++ ) {
3064  for ( int jxdcc = 0; jxdcc < 20; jxdcc++ ) {
3065  for ( int jydcc = 0; jydcc < 20; jydcc++ ) {
3066  nValidChannelsSC[iside][jxdcc][jydcc] = 0;
3067  nGlobalErrorsSC[iside][jxdcc][jydcc] = 0;
3068  }
3069  }
3070  }
3071 
3072  for (int iside = 0; iside < 2; iside++ ) {
3073  for ( int ix = 1; ix <= 100; ix++ ) {
3074  for ( int iy = 1; iy <= 100; iy++ ) {
3075 
3076  int jxsc = (ix-1)/5;
3077  int jysc = (iy-1)/5;
3078 
3079  float xval = meGlobalSummary_[iside]->getBinContent( ix, iy );
3080 
3081  if ( xval >= 0 && xval <= 5 ) {
3082  if ( xval != 2 && xval != 5 ) ++nValidChannelsSC[iside][jxsc][jysc];
3083  if ( xval == 0 ) ++nGlobalErrorsSC[iside][jxsc][jysc];
3084  }
3085 
3086  }
3087  }
3088  }
3089 
3090  // Countermeasure to partial TR failure
3091  // make the whole Dee red if more than 2 towers within a 2x2 matrix fails
3092 
3093  for(int iside(0); iside < 2; iside++){
3094  for(int jy(1); jy <= 20; jy++){
3095  for(int jx(1); jx <= 20; jx++){
3096  int nErr(0);
3097  if(nValidChannelsSC[iside][jx - 1][jy - 1] > 0 && nGlobalErrorsSC[iside][jx - 1][jy - 1] == nValidChannelsSC[iside][jx - 1][jy - 1]) nErr += 1;
3098  if(nValidChannelsSC[iside][jx][jy - 1] > 0 && nGlobalErrorsSC[iside][jx][jy - 1] == nValidChannelsSC[iside][jx][jy - 1]) nErr += 1;
3099  if(nValidChannelsSC[iside][jx - 1][jy] > 0 && nGlobalErrorsSC[iside][jx - 1][jy] == nValidChannelsSC[iside][jx - 1][jy]) nErr += 1;
3100  if(nValidChannelsSC[iside][jx][jy] > 0 && nGlobalErrorsSC[iside][jx][jy] == nValidChannelsSC[iside][jx][jy]) nErr += 1;
3101  if(nErr > 2){
3102  int jx0(((jx - 1) / 10) * 10);
3103  for(int jjx(jx0); jjx < jx0 + 10; jjx++){
3104  for(int jjy(0); jjy < 20; jjy++){
3105  nGlobalErrorsSC[iside][jjx][jjy] = nValidChannelsSC[iside][jjx][jjy];
3106  }
3107  }
3108  }
3109  }
3110  }
3111  }
3112 
3113  for (int iside = 0; iside < 2; iside++ ) {
3114  for ( int jxsc = 0; jxsc < 20; jxsc++ ) {
3115  for ( int jysc = 0; jysc < 20; jysc++ ) {
3116 
3117  float scval = -1;
3118 
3119  if( nValidChannelsSC[iside][jxsc][jysc] != 0 )
3120  scval = 1.0 - float(nGlobalErrorsSC[iside][jxsc][jysc])/float(nValidChannelsSC[iside][jxsc][jysc]);
3121 
3122  me->setBinContent( jxsc+iside*20+1, jysc+1, scval );
3123 
3124  }
3125  }
3126  }
3127  }
3128 
3129 // for ( int jxdcc = 0; jxdcc < 20; jxdcc++ ) {
3130 // for ( int jydcc = 0; jydcc < 20; jydcc++ ) {
3131 // for ( int iside = 0; iside < 2; iside++ ) {
3132 
3133 // float xval = -1.0;
3134 // if ( nOutOfGeometryTT[iside][jxdcc][jydcc] < 25 ) {
3135 // if ( nValidChannelsTT[iside][jxdcc][jydcc] != 0 )
3136 // xval = 1.0 - float(nGlobalErrorsTT[iside][jxdcc][jydcc])/float(nValidChannelsTT[iside][jxdcc][jydcc]);
3137 // }
3138 
3139 // me->setBinContent( 20*iside+jxdcc+1, jydcc+1, xval );
3140 
3141 // }
3142 // }
3143 // }
3144 
3145  }
3146 
3147 }
3148 
void beginJob(void)
BeginJob.
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
static std::string sEE(const unsigned ism)
Definition: Numbers.cc:226
MonitorElement * meg09_[18]
Definition: EELedClient.h:110
int i
Definition: DBlmapReader.cc:9
MonitorElement * mea03_[18]
static bool validEE(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:832
float synchErrorThreshold_
MonitorElement * met01_[18]
void setBinContent(int binx, double content)
set content of bin (1-D)
TProfile2D * httt01_[18]
static bool maskChannel(int ism, int i1, int i2, uint32_t bits, const EcalSubdetector subdet)
Definition: Masks.cc:60
MonitorElement * meLaserL4Ampl_
MonitorElement * meTestPulseG12_[2]
MonitorElement * meLaserL4Timing_
MonitorElement * meg04_[18]
void cleanup(void)
Cleanup.
static unsigned icEE(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:739
static const int PHYSICS_BAD_CHANNEL_WARNING
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:717
MonitorElement * meLaserL3Err_
MonitorElement * meTimingRMS_
std::vector< int > MGPAGainsPN_
static T getHisto(const MonitorElement *me, bool clone=false, T ret=0)
Returns the histogram contained by the Monitor Element.
Definition: UtilsClient.h:91
std::vector< int > superModules_
void analyze(void)
Analyze.
MonitorElement * meTestPulsePNG01_
MonitorElement * mePedestalOnlineErr_
MonitorElement * me_o01_[18]
Some &quot;id&quot; conversions.
TProfile2D * hpot01_[18]
MonitorElement * meTiming_[2]
MonitorElement * meg05_[18]
MonitorElement * meLaserL1Ampl_
MonitorElement * met02_[18]
Definition: EELedClient.h:117
MonitorElement * meLedL1AmplOverPN_
MonitorElement * mePedestalOnlineRMSMap_[2]
TProfile2D * htmt01_[18]
MonitorElement * meLedL1_[2]
static bool validEESc(const unsigned ism, const unsigned ix, const unsigned iy)
Definition: Numbers.cc:855
MonitorElement * mePedestalPNG16_
MonitorElement * meLaserL3AmplOverPN_
MonitorElement * meLaserL3Timing_
MonitorElement * meTestPulseAmplG01_
MonitorElement * meTestPulseAmplG06_
MonitorElement * meg04_[18]
virtual ~EESummaryClient()
Destructor.
MonitorElement * mePedestalG01_[2]
MonitorElement * meLaserL4_[2]
MonitorElement * meTestPulseG01_[2]
MonitorElement * meLedL1Err_
void setBinLabel(int bin, const std::string &label, int axis=1)
set bin label for x, y or z axis (axis=1, 2, 3 respectively)
MonitorElement * met02_[18]
#define abs(x)
Definition: mlp_lapack.h:159
MonitorElement * meLaserL4AmplOverPN_
MonitorElement * meg01_[18]
MonitorElement * meg10_[18]
Definition: EELedClient.h:111
MonitorElement * meg11_[18]
MonitorElement * meg03_[18]
MonitorElement * meLaserL3PNErr_
MonitorElement * meOccupancy_[2]
void setup(void)
Setup.
MonitorElement * meLaserL2AmplOverPN_
MonitorElement * met01_[18]
Definition: EELedClient.h:116
MonitorElement * mePedestalG12_[2]
static int ix0EE(const unsigned ism)
Definition: Numbers.cc:773
MonitorElement * mea01_[18]
MonitorElement * meTriggerTowerEmulError_[2]
MonitorElement * meSummaryErr_
MonitorElement * meLaserL2_[2]
MonitorElement * met04_[18]
double getEntries(void) const
get # of entries
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
MonitorElement * meLedL2PN_
MonitorElement * meIntegrityPN_
MonitorElement * meg12_[18]
static void maskBinContent(const MonitorElement *me, const int ix, const int iy)
Mask the bin content.
Definition: UtilsClient.cc:231
MonitorElement * meg09_[18]
MonitorElement * meIntegrity_[2]
MonitorElement * meaopn02_[18]
Definition: EELedClient.h:126
MonitorElement * meh01_[18]
static int iy0EE(const unsigned ism)
Definition: Numbers.cc:812
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_
MonitorElement * meTriggerTowerTiming_[2]
MonitorElement * meLaserL1PNErr_
MonitorElement * meg04_[18]
void beginRun(void)
BeginRun.
void removeElement(const std::string &name)
Definition: DQMStore.cc:2572
MonitorElement * meLaserL1Timing_
channel masking
int j
Definition: DBlmapReader.cc:9
MonitorElement * meLaserL3PN_
MonitorElement * meg03_[18]
MonitorElement * meaopn04_[18]
MonitorElement * meLedL1Ampl_
MonitorElement * mea02_[18]
MonitorElement * meLaserL1_[2]
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1031
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:1468
MonitorElement * meTriggerTowerNonSingleTiming_[2]
std::string subfolder_
MonitorElement * meg02_[18]
MonitorElement * mea03_[18]
MonitorElement * meg03_[18]
MonitorElement * meaopn01_[18]
Definition: EELedClient.h:125
MonitorElement * meLedL2Timing_
std::string prefixME_
MonitorElement * meLedL1PN_
void endRun(void)
EndRun.
MonitorElement * mea01_[18]
MonitorElement * meLaserL4PNErr_
std::vector< EEClient * > clients_
MonitorElement * me_o02_[18]
MonitorElement * meTimingMean1D_[2]
Ecal Monitor Utils for Client.
static bool getBinStatistics(TH1 *histo, const int ix, const int iy, float &num, float &mean, float &rms, float minEntries=1.)
Returns true if the bin contains good statistical data.
Definition: UtilsClient.cc:74
std::vector< int > laserWavelengths_
MonitorElement * mea02_[18]
MonitorElement * meg01_[18]
Definition: EELedClient.h:104
MonitorElement * meTestPulsePNG16_
MonitorElement * meLedL1Timing_
MonitorElement * mePedestalPNG01_
EESummaryClient(const edm::ParameterSet &ps)
Constructor.
double getBinError(int binx) const
get uncertainty on content of bin (1-D) - See TH1::GetBinError for details
MonitorElement * meg02_[18]
MonitorElement * meLedL1PNErr_
MonitorElement * meStatusFlagsErr_
MonitorElement * meTriggerTowerEt_[2]
long long int num
Definition: procUtils.cc:71
MonitorElement * meg02_[18]
std::vector< int > MGPAGains_
MonitorElement * mePedestalG06_[2]
MonitorElement * meOccupancyPN_
MonitorElement * mea02_[18]
Definition: EELedClient.h:114
MonitorElement * meLedL2AmplOverPN_
MonitorElement * mePedestalOnlineRMS_
MonitorElement * meg10_[18]
MonitorElement * meLaserL2Timing_
MonitorElement * meLaserL2Err_
double getBinContent(int binx) const
get content of bin (1-D)
MonitorElement * meLaserL2Ampl_
MonitorElement * meLaserL1AmplOverPN_
MonitorElement * meLaserL2PN_
std::vector< int > ledWavelengths_
TProfile2D * hot01_[18]
tuple cout
Definition: gather_cfg.py:121
MonitorElement * meLedL2Err_
MonitorElement * meTestPulseG06_[2]
MonitorElement * meLaserL3Ampl_
MonitorElement * met03_[18]
MonitorElement * meg01_[18]
tuple status
Definition: ntuplemaker.py:245
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:845
MonitorElement * meGlobalSummary_[2]
MonitorElement * mePedestalOnlineMean_
Definition: RunIOV.h:13
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
void setAxisTitle(const std::string &title, int axis=1)
set x-, y- or z-axis title (axis=1, 2, 3 respectively)
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * meOccupancy1D_
DQMStore * dqmStore_
MonitorElement * meg02_[18]
Definition: EELedClient.h:105
MonitorElement * meLedL2_[2]
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:429
MonitorElement * meTestPulseAmplG12_
MonitorElement * meLaserL2PNErr_
MonitorElement * meLaserL1Err_
MonitorElement * meIntegrityErr_
MonitorElement * mea01_[18]
Definition: EELedClient.h:113
void endJob(void)
EndJob.
MonitorElement * meg01_[18]