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