CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/DQM/EcalEndcapMonitorClient/src/EESummaryClient.cc

Go to the documentation of this file.
00001 /*
00002  * \file EESummaryClient.cc
00003  *
00004  * $Date: 2011/09/02 14:02:36 $
00005  * $Revision: 1.213 $
00006  * \author G. Della Ricca
00007  *
00008 */
00009 
00010 #include <memory>
00011 #include <iostream>
00012 #include <fstream>
00013 #include <iomanip>
00014 #include <math.h>
00015 #include <utility>
00016 
00017 #include "FWCore/ServiceRegistry/interface/Service.h"
00018 
00019 #include "DQMServices/Core/interface/DQMStore.h"
00020 #include "DQMServices/Core/interface/MonitorElement.h"
00021 
00022 #ifdef WITH_ECAL_COND_DB
00023 #include "OnlineDB/EcalCondDB/interface/RunTag.h"
00024 #include "OnlineDB/EcalCondDB/interface/RunIOV.h"
00025 #endif
00026 
00027 #include "DataFormats/EcalDetId/interface/EcalScDetId.h"
00028 #include "DataFormats/EcalDetId/interface/EcalTriggerElectronicsId.h"
00029 #include "DataFormats/EcalDetId/interface/EEDetId.h"
00030 
00031 #include "Geometry/EcalMapping/interface/EcalElectronicsMapping.h"
00032 
00033 #include "DQM/EcalCommon/interface/UtilsClient.h"
00034 #include "DQM/EcalCommon/interface/Numbers.h"
00035 #include "DQM/EcalCommon/interface/Masks.h"
00036 
00037 #include "DQM/EcalEndcapMonitorClient/interface/EEStatusFlagsClient.h"
00038 #include "DQM/EcalEndcapMonitorClient/interface/EEIntegrityClient.h"
00039 #include "DQM/EcalEndcapMonitorClient/interface/EELaserClient.h"
00040 #include "DQM/EcalEndcapMonitorClient/interface/EELedClient.h"
00041 #include "DQM/EcalEndcapMonitorClient/interface/EEPedestalClient.h"
00042 #include "DQM/EcalEndcapMonitorClient/interface/EEPedestalOnlineClient.h"
00043 #include "DQM/EcalEndcapMonitorClient/interface/EETestPulseClient.h"
00044 #include "DQM/EcalEndcapMonitorClient/interface/EEBeamCaloClient.h"
00045 #include "DQM/EcalEndcapMonitorClient/interface/EEBeamHodoClient.h"
00046 #include "DQM/EcalEndcapMonitorClient/interface/EETriggerTowerClient.h"
00047 #include "DQM/EcalEndcapMonitorClient/interface/EEClusterClient.h"
00048 #include "DQM/EcalEndcapMonitorClient/interface/EETimingClient.h"
00049 
00050 #include "DQM/EcalEndcapMonitorClient/interface/EESummaryClient.h"
00051 
00052 EESummaryClient::EESummaryClient(const edm::ParameterSet& ps) {
00053 
00054   // cloneME switch
00055   cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
00056 
00057   // verbose switch
00058   verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
00059 
00060   // debug switch
00061   debug_ = ps.getUntrackedParameter<bool>("debug", false);
00062 
00063   // prefixME path
00064   prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
00065 
00066   // enableCleanup_ switch
00067   enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
00068 
00069   // vector of selected Super Modules (Defaults to all 18).
00070   superModules_.reserve(18);
00071   for ( unsigned int i = 1; i <= 18; i++ ) superModules_.push_back(i);
00072   superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
00073 
00074   laserWavelengths_.reserve(4);
00075   for ( unsigned int i = 1; i <= 4; i++ ) laserWavelengths_.push_back(i);
00076   laserWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("laserWavelengths", laserWavelengths_);
00077 
00078   ledWavelengths_.reserve(2);
00079   for ( unsigned int i = 1; i <= 2; i++ ) ledWavelengths_.push_back(i);
00080   ledWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("ledWavelengths", ledWavelengths_);
00081 
00082   MGPAGains_.reserve(3);
00083   for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
00084   MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
00085 
00086   MGPAGainsPN_.reserve(2);
00087   for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
00088   MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
00089 
00090   // summary maps
00091   meIntegrity_[0]      = 0;
00092   meIntegrity_[1]      = 0;
00093   meIntegrityPN_       = 0;
00094   meOccupancy_[0]      = 0;
00095   meOccupancy_[1]      = 0;
00096   meOccupancyPN_       = 0;
00097   meStatusFlags_[0]    = 0;
00098   meStatusFlags_[1]    = 0;
00099   mePedestalOnline_[0] = 0;
00100   mePedestalOnline_[1] = 0;
00101   mePedestalOnlineRMSMap_[0] = 0;
00102   mePedestalOnlineRMSMap_[1] = 0;
00103   mePedestalOnlineMean_   = 0;
00104   mePedestalOnlineRMS_    = 0;
00105 
00106   meLaserL1_[0]        = 0;
00107   meLaserL1_[1]        = 0;
00108   meLaserL1PN_         = 0;
00109   meLaserL1Ampl_       = 0;
00110   meLaserL1Timing_     = 0;
00111   meLaserL1AmplOverPN_ = 0;
00112 
00113   meLaserL2_[0]        = 0;
00114   meLaserL2_[1]        = 0;
00115   meLaserL2PN_         = 0;
00116   meLaserL2Ampl_       = 0;
00117   meLaserL2Timing_     = 0;
00118   meLaserL2AmplOverPN_ = 0;
00119 
00120   meLaserL3_[0]        = 0;
00121   meLaserL3_[1]        = 0;
00122   meLaserL3PN_         = 0;
00123   meLaserL3Ampl_       = 0;
00124   meLaserL3Timing_     = 0;
00125   meLaserL3AmplOverPN_ = 0;
00126 
00127   meLaserL4_[0]        = 0;
00128   meLaserL4_[1]        = 0;
00129   meLaserL4PN_         = 0;
00130   meLaserL4Ampl_       = 0;
00131   meLaserL4Timing_     = 0;
00132   meLaserL4AmplOverPN_ = 0;
00133 
00134   meLedL1_[0]          = 0;
00135   meLedL1_[1]          = 0;
00136   meLedL1PN_           = 0;
00137   meLedL1Ampl_         = 0;
00138   meLedL1Timing_       = 0;
00139   meLedL1AmplOverPN_   = 0;
00140 
00141   meLedL2_[0]          = 0;
00142   meLedL2_[1]          = 0;
00143   meLedL2PN_           = 0;
00144   meLedL2Ampl_         = 0;
00145   meLedL2Timing_       = 0;
00146   meLedL2AmplOverPN_   = 0;
00147 
00148   mePedestalG01_[0]       = 0;
00149   mePedestalG01_[1]       = 0;
00150   mePedestalG06_[0]       = 0;
00151   mePedestalG06_[1]       = 0;
00152   mePedestalG12_[0]       = 0;
00153   mePedestalG12_[1]       = 0;
00154   mePedestalPNG01_        = 0;
00155   mePedestalPNG16_        = 0;
00156   meTestPulseG01_[0]      = 0;
00157   meTestPulseG01_[1]      = 0;
00158   meTestPulseG06_[0]      = 0;
00159   meTestPulseG06_[1]      = 0;
00160   meTestPulseG12_[0]      = 0;
00161   meTestPulseG12_[1]      = 0;
00162   meTestPulsePNG01_       = 0;
00163   meTestPulsePNG16_       = 0;
00164   meTestPulseAmplG01_ = 0;
00165   meTestPulseAmplG06_ = 0;
00166   meTestPulseAmplG12_ = 0;
00167   meGlobalSummary_[0]  = 0;
00168   meGlobalSummary_[1]  = 0;
00169 
00170   meRecHitEnergy_[0]   = 0;
00171   meRecHitEnergy_[1]   = 0;
00172   meTiming_[0]         = 0;
00173   meTiming_[1]         = 0;
00174   meTimingMean1D_[0]   = 0;
00175   meTimingMean1D_[1]   = 0;
00176   meTimingRMS1D_[0]   = 0;
00177   meTimingRMS1D_[1]   = 0;
00178   meTimingMean_ = 0;
00179   meTimingRMS_  = 0;
00180 
00181   meTriggerTowerEt_[0]        = 0;
00182   meTriggerTowerEt_[1]        = 0;
00183   meTriggerTowerEmulError_[0] = 0;
00184   meTriggerTowerEmulError_[1] = 0;
00185   meTriggerTowerTiming_[0] = 0;
00186   meTriggerTowerTiming_[1] = 0;
00187   meTriggerTowerNonSingleTiming_[0] = 0;
00188   meTriggerTowerNonSingleTiming_[1] = 0;
00189 
00190   // summary errors
00191   meIntegrityErr_       = 0;
00192   meOccupancy1D_        = 0;
00193   meStatusFlagsErr_     = 0;
00194   mePedestalOnlineErr_  = 0;
00195   meLaserL1Err_         = 0;
00196   meLaserL1PNErr_       = 0;
00197   meLaserL2Err_         = 0;
00198   meLaserL2PNErr_       = 0;
00199   meLaserL3Err_         = 0;
00200   meLaserL3PNErr_       = 0;
00201   meLaserL4Err_         = 0;
00202   meLaserL4PNErr_       = 0;
00203   meLedL1Err_           = 0;
00204   meLedL1PNErr_         = 0;
00205   meLedL2Err_           = 0;
00206   meLedL2PNErr_         = 0;
00207 
00208   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00209 
00210     int ism = superModules_[i];
00211 
00212     hpot01_[ism-1] = 0;
00213     httt01_[ism-1] = 0;
00214 
00215   }
00216 
00217   synchErrorThreshold_ = 0.0;
00218 
00219 }
00220 
00221 EESummaryClient::~EESummaryClient() {
00222 
00223 }
00224 
00225 void EESummaryClient::beginJob(void) {
00226 
00227   dqmStore_ = edm::Service<DQMStore>().operator->();
00228 
00229   if ( debug_ ) std::cout << "EESummaryClient: beginJob" << std::endl;
00230 
00231   ievt_ = 0;
00232   jevt_ = 0;
00233 
00234 }
00235 
00236 void EESummaryClient::beginRun(void) {
00237 
00238   if ( debug_ ) std::cout << "EESummaryClient: beginRun" << std::endl;
00239 
00240   jevt_ = 0;
00241 
00242   this->setup();
00243 
00244 }
00245 
00246 void EESummaryClient::endJob(void) {
00247 
00248   if ( debug_ ) std::cout << "EESummaryClient: endJob, ievt = " << ievt_ << std::endl;
00249 
00250   this->cleanup();
00251 
00252 }
00253 
00254 void EESummaryClient::endRun(void) {
00255 
00256   if ( debug_ ) std::cout << "EESummaryClient: endRun, jevt = " << jevt_ << std::endl;
00257 
00258   this->cleanup();
00259 
00260 }
00261 
00262 void EESummaryClient::setup(void) {
00263 
00264   std::string name;
00265 
00266   dqmStore_->setCurrentFolder( prefixME_ + "/EESummaryClient" );
00267 
00268   if ( meIntegrity_[0] ) dqmStore_->removeElement( meIntegrity_[0]->getName() );
00269   name = "EEIT EE - integrity quality summary";
00270   meIntegrity_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00271   meIntegrity_[0]->setAxisTitle("ix", 1);
00272   meIntegrity_[0]->setAxisTitle("iy", 2);
00273 
00274   if ( meIntegrity_[1] ) dqmStore_->removeElement( meIntegrity_[1]->getName() );
00275   name = "EEIT EE + integrity quality summary";
00276   meIntegrity_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00277   meIntegrity_[1]->setAxisTitle("ix", 1);
00278   meIntegrity_[1]->setAxisTitle("iy", 2);
00279 
00280   if ( meIntegrityErr_ ) dqmStore_->removeElement( meIntegrityErr_->getName() );
00281   name = "EEIT integrity quality errors summary";
00282   meIntegrityErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00283   for (int i = 0; i < 18; i++) {
00284     meIntegrityErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00285   }
00286 
00287   if ( meIntegrityPN_ ) dqmStore_->removeElement( meIntegrityPN_->getName() );
00288   name = "EEIT PN integrity quality summary";
00289   meIntegrityPN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00290   meIntegrityPN_->setAxisTitle("jchannel", 1);
00291   meIntegrityPN_->setAxisTitle("jpseudo-strip", 2);
00292 
00293   if ( meOccupancy_[0] ) dqmStore_->removeElement( meOccupancy_[0]->getName() );
00294   name = "EEOT EE - digi occupancy summary";
00295   meOccupancy_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00296   meOccupancy_[0]->setAxisTitle("ix", 1);
00297   meOccupancy_[0]->setAxisTitle("iy", 2);
00298 
00299   if ( meOccupancy_[1] ) dqmStore_->removeElement( meOccupancy_[1]->getName() );
00300   name = "EEOT EE + digi occupancy summary";
00301   meOccupancy_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00302   meOccupancy_[1]->setAxisTitle("ix", 1);
00303   meOccupancy_[1]->setAxisTitle("iy", 2);
00304 
00305   if ( meOccupancy1D_ ) dqmStore_->removeElement( meOccupancy1D_->getName() );
00306   name = "EEIT digi occupancy summary 1D";
00307   meOccupancy1D_ = dqmStore_->book1D(name, name, 18, 1, 19);
00308   for (int i = 0; i < 18; i++) {
00309     meOccupancy1D_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00310   }
00311 
00312   if ( meOccupancyPN_ ) dqmStore_->removeElement( meOccupancyPN_->getName() );
00313   name = "EEOT PN digi occupancy summary";
00314   meOccupancyPN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00315   meOccupancyPN_->setAxisTitle("channel", 1);
00316   meOccupancyPN_->setAxisTitle("pseudo-strip", 2);
00317 
00318   if ( meStatusFlags_[0] ) dqmStore_->removeElement( meStatusFlags_[0]->getName() );
00319   name = "EESFT EE - front-end status summary";
00320   meStatusFlags_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00321   meStatusFlags_[0]->setAxisTitle("ix", 1);
00322   meStatusFlags_[0]->setAxisTitle("iy", 2);
00323 
00324   if ( meStatusFlags_[1] ) dqmStore_->removeElement( meStatusFlags_[1]->getName() );
00325   name = "EESFT EE + front-end status summary";
00326   meStatusFlags_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00327   meStatusFlags_[1]->setAxisTitle("ix", 1);
00328   meStatusFlags_[1]->setAxisTitle("iy", 2);
00329 
00330   if ( meStatusFlagsErr_ ) dqmStore_->removeElement( meStatusFlagsErr_->getName() );
00331   name = "EESFT front-end status errors summary";
00332   meStatusFlagsErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00333   for (int i = 0; i < 18; i++) {
00334     meStatusFlagsErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00335   }
00336 
00337   if ( mePedestalOnline_[0] ) dqmStore_->removeElement( mePedestalOnline_[0]->getName() );
00338   name = "EEPOT EE - pedestal quality summary G12";
00339   mePedestalOnline_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00340   mePedestalOnline_[0]->setAxisTitle("ix", 1);
00341   mePedestalOnline_[0]->setAxisTitle("iy", 2);
00342 
00343   if ( mePedestalOnline_[1] ) dqmStore_->removeElement( mePedestalOnline_[1]->getName() );
00344   name = "EEPOT EE + pedestal quality summary G12";
00345   mePedestalOnline_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00346   mePedestalOnline_[1]->setAxisTitle("ix", 1);
00347   mePedestalOnline_[1]->setAxisTitle("iy", 2);
00348 
00349   if ( mePedestalOnlineRMSMap_[0] ) dqmStore_->removeElement( mePedestalOnlineRMSMap_[0]->getName() );
00350   name = "EEPOT EE - pedestal G12 RMS map";
00351   mePedestalOnlineRMSMap_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00352   mePedestalOnlineRMSMap_[0]->setAxisTitle("ix", 1);
00353   mePedestalOnlineRMSMap_[0]->setAxisTitle("iy", 2);
00354 
00355   if ( mePedestalOnlineRMSMap_[1] ) dqmStore_->removeElement( mePedestalOnlineRMSMap_[1]->getName() );
00356   name = "EEPOT EE + pedestal G12 RMS map";
00357   mePedestalOnlineRMSMap_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00358   mePedestalOnlineRMSMap_[1]->setAxisTitle("ix", 1);
00359   mePedestalOnlineRMSMap_[1]->setAxisTitle("iy", 2);
00360 
00361   if ( mePedestalOnlineMean_ ) dqmStore_->removeElement( mePedestalOnlineMean_->getName() );
00362   name = "EEPOT pedestal G12 mean";
00363   mePedestalOnlineMean_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 150., 250.);
00364   for (int i = 0; i < 18; i++) {
00365     mePedestalOnlineMean_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00366   }
00367 
00368   if ( mePedestalOnlineRMS_ ) dqmStore_->removeElement( mePedestalOnlineRMS_->getName() );
00369   name = "EEPOT pedestal G12 rms";
00370   mePedestalOnlineRMS_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10.);
00371   for (int i = 0; i < 18; i++) {
00372     mePedestalOnlineRMS_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00373   }
00374 
00375   if ( mePedestalOnlineErr_ ) dqmStore_->removeElement( mePedestalOnlineErr_->getName() );
00376   name = "EEPOT pedestal quality errors summary G12";
00377   mePedestalOnlineErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00378   for (int i = 0; i < 18; i++) {
00379     mePedestalOnlineErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00380   }
00381 
00382   if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
00383 
00384     if ( meLaserL1_[0] ) dqmStore_->removeElement( meLaserL1_[0]->getName() );
00385     name = "EELT EE - laser quality summary L1";
00386     meLaserL1_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00387     meLaserL1_[0]->setAxisTitle("ix", 1);
00388     meLaserL1_[0]->setAxisTitle("iy", 2);
00389 
00390     if ( meLaserL1_[1] ) dqmStore_->removeElement( meLaserL1_[1]->getName() );
00391     name = "EELT EE + laser quality summary L1";
00392     meLaserL1_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00393     meLaserL1_[1]->setAxisTitle("ix", 1);
00394     meLaserL1_[1]->setAxisTitle("iy", 2);
00395 
00396     if ( meLaserL1Err_ ) dqmStore_->removeElement( meLaserL1Err_->getName() );
00397     name = "EELT laser quality errors summary L1";
00398     meLaserL1Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
00399     for (int i = 0; i < 18; i++) {
00400       meLaserL1Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00401     }
00402 
00403     if ( meLaserL1PN_ ) dqmStore_->removeElement( meLaserL1PN_->getName() );
00404     name = "EELT PN laser quality summary L1";
00405     meLaserL1PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00406     meLaserL1PN_->setAxisTitle("jchannel", 1);
00407     meLaserL1PN_->setAxisTitle("jpseudo-strip", 2);
00408 
00409     if ( meLaserL1PNErr_ ) dqmStore_->removeElement( meLaserL1PNErr_->getName() );
00410     name = "EELT PN laser quality errors summary L1";
00411     meLaserL1PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00412     for (int i = 0; i < 18; i++) {
00413       meLaserL1PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00414     }
00415 
00416     if ( meLaserL1Ampl_ ) dqmStore_->removeElement( meLaserL1Ampl_->getName() );
00417     name = "EELT laser L1 amplitude summary";
00418     meLaserL1Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
00419     for (int i = 0; i < 18; i++) {
00420       meLaserL1Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00421     }
00422 
00423     if ( meLaserL1Timing_ ) dqmStore_->removeElement( meLaserL1Timing_->getName() );
00424     name = "EELT laser L1 timing summary";
00425     meLaserL1Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
00426     for (int i = 0; i < 18; i++) {
00427       meLaserL1Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00428     }
00429 
00430     if ( meLaserL1AmplOverPN_ ) dqmStore_->removeElement( meLaserL1AmplOverPN_->getName() );
00431     name = "EELT laser L1 amplitude over PN summary";
00432     meLaserL1AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00433     for (int i = 0; i < 18; i++) {
00434       meLaserL1AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00435     }
00436 
00437   }
00438 
00439   if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
00440 
00441     if ( meLaserL2_[0] ) dqmStore_->removeElement( meLaserL2_[0]->getName() );
00442     name = "EELT EE - laser quality summary L2";
00443     meLaserL2_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00444     meLaserL2_[0]->setAxisTitle("ix", 1);
00445     meLaserL2_[0]->setAxisTitle("iy", 2);
00446 
00447     if ( meLaserL2_[1] ) dqmStore_->removeElement( meLaserL2_[1]->getName() );
00448     name = "EELT EE + laser quality summary L2";
00449     meLaserL2_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00450     meLaserL2_[1]->setAxisTitle("ix", 1);
00451     meLaserL2_[1]->setAxisTitle("iy", 2);
00452 
00453     if ( meLaserL2Err_ ) dqmStore_->removeElement( meLaserL2Err_->getName() );
00454     name = "EELT laser quality errors summary L2";
00455     meLaserL2Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
00456     for (int i = 0; i < 18; i++) {
00457       meLaserL2Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00458     }
00459 
00460     if ( meLaserL2PN_ ) dqmStore_->removeElement( meLaserL2PN_->getName() );
00461     name = "EELT PN laser quality summary L2";
00462     meLaserL2PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00463     meLaserL2PN_->setAxisTitle("jchannel", 1);
00464     meLaserL2PN_->setAxisTitle("jpseudo-strip", 2);
00465 
00466     if ( meLaserL2PNErr_ ) dqmStore_->removeElement( meLaserL2PNErr_->getName() );
00467     name = "EELT PN laser quality errors summary L2";
00468     meLaserL2PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00469     for (int i = 0; i < 18; i++) {
00470       meLaserL2PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00471     }
00472 
00473     if ( meLaserL2Ampl_ ) dqmStore_->removeElement( meLaserL2Ampl_->getName() );
00474     name = "EELT laser L2 amplitude summary";
00475     meLaserL2Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
00476     for (int i = 0; i < 18; i++) {
00477       meLaserL2Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00478     }
00479 
00480     if ( meLaserL2Timing_ ) dqmStore_->removeElement( meLaserL2Timing_->getName() );
00481     name = "EELT laser L2 timing summary";
00482     meLaserL2Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
00483     for (int i = 0; i < 18; i++) {
00484       meLaserL2Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00485     }
00486 
00487     if ( meLaserL2AmplOverPN_ ) dqmStore_->removeElement( meLaserL2AmplOverPN_->getName() );
00488     name = "EELT laser L2 amplitude over PN summary";
00489     meLaserL2AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00490     for (int i = 0; i < 18; i++) {
00491       meLaserL2AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00492     }
00493 
00494   }
00495 
00496   if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
00497 
00498     if ( meLaserL3_[0] ) dqmStore_->removeElement( meLaserL3_[0]->getName() );
00499     name = "EELT EE - laser quality summary L3";
00500     meLaserL3_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00501     meLaserL3_[0]->setAxisTitle("ix", 1);
00502     meLaserL3_[0]->setAxisTitle("iy", 2);
00503 
00504     if ( meLaserL3_[1] ) dqmStore_->removeElement( meLaserL3_[1]->getName() );
00505     name = "EELT EE + laser quality summary L3";
00506     meLaserL3_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00507     meLaserL3_[1]->setAxisTitle("ix", 1);
00508     meLaserL3_[1]->setAxisTitle("iy", 2);
00509 
00510     if ( meLaserL3Err_ ) dqmStore_->removeElement( meLaserL3Err_->getName() );
00511     name = "EELT laser quality errors summary L3";
00512     meLaserL3Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
00513     for (int i = 0; i < 18; i++) {
00514       meLaserL3Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00515     }
00516 
00517     if ( meLaserL3PN_ ) dqmStore_->removeElement( meLaserL3PN_->getName() );
00518     name = "EELT PN laser quality summary L3";
00519     meLaserL3PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00520     meLaserL3PN_->setAxisTitle("jchannel", 1);
00521     meLaserL3PN_->setAxisTitle("jpseudo-strip", 2);
00522 
00523     if ( meLaserL3PNErr_ ) dqmStore_->removeElement( meLaserL3PNErr_->getName() );
00524     name = "EELT PN laser quality errors summary L3";
00525     meLaserL3PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00526     for (int i = 0; i < 18; i++) {
00527       meLaserL3PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00528     }
00529 
00530     if ( meLaserL3Ampl_ ) dqmStore_->removeElement( meLaserL3Ampl_->getName() );
00531     name = "EELT laser L3 amplitude summary";
00532     meLaserL3Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
00533     for (int i = 0; i < 18; i++) {
00534       meLaserL3Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00535     }
00536 
00537     if ( meLaserL3Timing_ ) dqmStore_->removeElement( meLaserL3Timing_->getName() );
00538     name = "EELT laser L3 timing summary";
00539     meLaserL3Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
00540     for (int i = 0; i < 18; i++) {
00541       meLaserL3Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00542     }
00543 
00544     if ( meLaserL3AmplOverPN_ ) dqmStore_->removeElement( meLaserL3AmplOverPN_->getName() );
00545     name = "EELT laser L3 amplitude over PN summary";
00546     meLaserL3AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00547     for (int i = 0; i < 18; i++) {
00548       meLaserL3AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00549     }
00550 
00551   }
00552 
00553   if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
00554 
00555     if ( meLaserL4_[0] ) dqmStore_->removeElement( meLaserL4_[0]->getName() );
00556     name = "EELT EE - laser quality summary L4";
00557     meLaserL4_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00558     meLaserL4_[0]->setAxisTitle("ix", 1);
00559     meLaserL4_[0]->setAxisTitle("iy", 2);
00560 
00561     if ( meLaserL4_[1] ) dqmStore_->removeElement( meLaserL4_[1]->getName() );
00562     name = "EELT EE + laser quality summary L4";
00563     meLaserL4_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00564     meLaserL4_[1]->setAxisTitle("ix", 1);
00565     meLaserL4_[1]->setAxisTitle("iy", 2);
00566 
00567     if ( meLaserL4Err_ ) dqmStore_->removeElement( meLaserL4Err_->getName() );
00568     name = "EELT laser quality errors summary L4";
00569     meLaserL4Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
00570     for (int i = 0; i < 18; i++) {
00571       meLaserL4Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00572     }
00573 
00574     if ( meLaserL4PN_ ) dqmStore_->removeElement( meLaserL4PN_->getName() );
00575     name = "EELT PN laser quality summary L4";
00576     meLaserL4PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00577     meLaserL4PN_->setAxisTitle("jchannel", 1);
00578     meLaserL4PN_->setAxisTitle("jpseudo-strip", 2);
00579 
00580     if ( meLaserL4PNErr_ ) dqmStore_->removeElement( meLaserL4PNErr_->getName() );
00581     name = "EELT PN laser quality errors summary L4";
00582     meLaserL4PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00583     for (int i = 0; i < 18; i++) {
00584       meLaserL4PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00585     }
00586 
00587     if ( meLaserL4Ampl_ ) dqmStore_->removeElement( meLaserL4Ampl_->getName() );
00588     name = "EELT laser L4 amplitude summary";
00589     meLaserL4Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
00590     for (int i = 0; i < 18; i++) {
00591       meLaserL4Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00592     }
00593 
00594     if ( meLaserL4Timing_ ) dqmStore_->removeElement( meLaserL4Timing_->getName() );
00595     name = "EELT laser L4 timing summary";
00596     meLaserL4Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
00597     for (int i = 0; i < 18; i++) {
00598       meLaserL4Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00599     }
00600 
00601     if ( meLaserL4AmplOverPN_ ) dqmStore_->removeElement( meLaserL4AmplOverPN_->getName() );
00602     name = "EELT laser L4 amplitude over PN summary";
00603     meLaserL4AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00604     for (int i = 0; i < 18; i++) {
00605       meLaserL4AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00606     }
00607 
00608   }
00609 
00610   if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
00611 
00612     if ( meLedL1_[0] ) dqmStore_->removeElement( meLedL1_[0]->getName() );
00613     name = "EELDT EE - led quality summary L1";
00614     meLedL1_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00615     meLedL1_[0]->setAxisTitle("ix", 1);
00616     meLedL1_[0]->setAxisTitle("iy", 2);
00617 
00618     if ( meLedL1_[1] ) dqmStore_->removeElement( meLedL1_[1]->getName() );
00619     name = "EELDT EE + led quality summary L1";
00620     meLedL1_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00621     meLedL1_[1]->setAxisTitle("ix", 1);
00622     meLedL1_[1]->setAxisTitle("iy", 2);
00623 
00624     if ( meLedL1Err_ ) dqmStore_->removeElement( meLedL1Err_->getName() );
00625     name = "EELDT led quality errors summary L1";
00626     meLedL1Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
00627     for (int i = 0; i < 18; i++) {
00628       meLedL1Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00629     }
00630 
00631     if ( meLedL1PN_ ) dqmStore_->removeElement( meLedL1PN_->getName() );
00632     name = "EELDT PN led quality summary L1";
00633     meLedL1PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00634     meLedL1PN_->setAxisTitle("jchannel", 1);
00635     meLedL1PN_->setAxisTitle("jpseudo-strip", 2);
00636 
00637     if ( meLedL1PNErr_ ) dqmStore_->removeElement( meLedL1PNErr_->getName() );
00638     name = "EELDT PN led quality errors summary L1";
00639     meLedL1PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00640     for (int i = 0; i < 18; i++) {
00641       meLedL1PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00642     }
00643 
00644     if ( meLedL1Ampl_ ) dqmStore_->removeElement( meLedL1Ampl_->getName() );
00645     name = "EELDT led L1 amplitude summary";
00646     meLedL1Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
00647     for (int i = 0; i < 18; i++) {
00648       meLedL1Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00649     }
00650 
00651     if ( meLedL1Timing_ ) dqmStore_->removeElement( meLedL1Timing_->getName() );
00652     name = "EELDT led L1 timing summary";
00653     meLedL1Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
00654     for (int i = 0; i < 18; i++) {
00655       meLedL1Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00656     }
00657 
00658     if ( meLedL1AmplOverPN_ ) dqmStore_->removeElement( meLedL1AmplOverPN_->getName() );
00659     name = "EELDT led L1 amplitude over PN summary";
00660     meLedL1AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00661     for (int i = 0; i < 18; i++) {
00662       meLedL1AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00663     }
00664 
00665   }
00666 
00667   if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
00668 
00669     if ( meLedL2_[0] ) dqmStore_->removeElement( meLedL2_[0]->getName() );
00670     name = "EELDT EE - led quality summary L2";
00671     meLedL2_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00672     meLedL2_[0]->setAxisTitle("ix", 1);
00673     meLedL2_[0]->setAxisTitle("iy", 2);
00674 
00675     if ( meLedL2_[1] ) dqmStore_->removeElement( meLedL2_[1]->getName() );
00676     name = "EELDT EE + led quality summary L2";
00677     meLedL2_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00678     meLedL2_[1]->setAxisTitle("ix", 1);
00679     meLedL2_[1]->setAxisTitle("iy", 2);
00680 
00681     if ( meLedL2Err_ ) dqmStore_->removeElement( meLedL2Err_->getName() );
00682     name = "EELDT led quality errors summary L2";
00683     meLedL2Err_ = dqmStore_->book1D(name, name, 18, 1, 19);
00684     for (int i = 0; i < 18; i++) {
00685       meLedL2Err_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00686     }
00687 
00688     if ( meLedL2PN_ ) dqmStore_->removeElement( meLedL2PN_->getName() );
00689     name = "EELDT PN led quality summary L2";
00690     meLedL2PN_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00691     meLedL2PN_->setAxisTitle("jchannel", 1);
00692     meLedL2PN_->setAxisTitle("jpseudo-strip", 2);
00693 
00694     if ( meLedL2PNErr_ ) dqmStore_->removeElement( meLedL2PNErr_->getName() );
00695     name = "EELDT PN led quality errors summary L2";
00696     meLedL2PNErr_ = dqmStore_->book1D(name, name, 18, 1, 19);
00697     for (int i = 0; i < 18; i++) {
00698       meLedL2PNErr_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00699     }
00700 
00701     if ( meLedL2Ampl_ ) dqmStore_->removeElement( meLedL2Ampl_->getName() );
00702     name = "EELDT led L2 amplitude summary";
00703     meLedL2Ampl_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096., "s");
00704     for (int i = 0; i < 18; i++) {
00705       meLedL2Ampl_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00706     }
00707 
00708     if ( meLedL2Timing_ ) dqmStore_->removeElement( meLedL2Timing_->getName() );
00709     name = "EELDT led L2 timing summary";
00710     meLedL2Timing_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10., "s");
00711     for (int i = 0; i < 18; i++) {
00712       meLedL2Timing_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00713     }
00714 
00715     if ( meLedL2AmplOverPN_ ) dqmStore_->removeElement( meLedL2AmplOverPN_->getName() );
00716     name = "EELDT led L2 amplitude over PN summary";
00717     meLedL2AmplOverPN_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00718     for (int i = 0; i < 18; i++) {
00719       meLedL2AmplOverPN_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00720     }
00721 
00722   }
00723 
00724   if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
00725 
00726     if( mePedestalG01_[0] ) dqmStore_->removeElement( mePedestalG01_[0]->getName() );
00727     name = "EEPT EE - pedestal quality G01 summary";
00728     mePedestalG01_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00729     mePedestalG01_[0]->setAxisTitle("ix", 1);
00730     mePedestalG01_[0]->setAxisTitle("iy", 2);
00731 
00732   }
00733 
00734   if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
00735 
00736     if( mePedestalG06_[0] ) dqmStore_->removeElement( mePedestalG06_[0]->getName() );
00737     name = "EEPT EE - pedestal quality G06 summary";
00738     mePedestalG06_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00739     mePedestalG06_[0]->setAxisTitle("ix", 1);
00740     mePedestalG06_[0]->setAxisTitle("iy", 2);
00741 
00742   }
00743 
00744   if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
00745 
00746     if( mePedestalG12_[0] ) dqmStore_->removeElement( mePedestalG12_[0]->getName() );
00747     name = "EEPT EE - pedestal quality G12 summary";
00748     mePedestalG12_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00749     mePedestalG12_[0]->setAxisTitle("ix", 1);
00750     mePedestalG12_[0]->setAxisTitle("iy", 2);
00751 
00752   }
00753 
00754 
00755   if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
00756 
00757     if( mePedestalPNG01_ ) dqmStore_->removeElement( mePedestalPNG01_->getName() );
00758     name = "EEPT PN pedestal quality G01 summary";
00759     mePedestalPNG01_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10, 10.);
00760     mePedestalPNG01_->setAxisTitle("jchannel", 1);
00761     mePedestalPNG01_->setAxisTitle("jpseudo-strip", 2);
00762 
00763   }
00764 
00765   if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
00766 
00767     if( mePedestalPNG16_ ) dqmStore_->removeElement( mePedestalPNG16_->getName() );
00768     name = "EEPT PN pedestal quality G16 summary";
00769     mePedestalPNG16_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10, 10.);
00770     mePedestalPNG16_->setAxisTitle("jchannel", 1);
00771     mePedestalPNG16_->setAxisTitle("jpseudo-strip", 2);
00772 
00773   }
00774 
00775   if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
00776 
00777     if( mePedestalG01_[1] ) dqmStore_->removeElement( mePedestalG01_[1]->getName() );
00778     name = "EEPT EE + pedestal quality G01 summary";
00779     mePedestalG01_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00780     mePedestalG01_[1]->setAxisTitle("ix", 1);
00781     mePedestalG01_[1]->setAxisTitle("iy", 2);
00782 
00783   }
00784 
00785 
00786   if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
00787 
00788     if( mePedestalG06_[1] ) dqmStore_->removeElement( mePedestalG06_[1]->getName() );
00789     name = "EEPT EE + pedestal quality G06 summary";
00790     mePedestalG06_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00791     mePedestalG06_[1]->setAxisTitle("ix", 1);
00792     mePedestalG06_[1]->setAxisTitle("iy", 2);
00793 
00794   }
00795 
00796   if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
00797 
00798     if( mePedestalG12_[1] ) dqmStore_->removeElement( mePedestalG12_[1]->getName() );
00799     name = "EEPT EE + pedestal quality G12 summary";
00800     mePedestalG12_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00801     mePedestalG12_[1]->setAxisTitle("ix", 1);
00802     mePedestalG12_[1]->setAxisTitle("iy", 2);
00803 
00804   }
00805 
00806   if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
00807 
00808     if( meTestPulseG01_[0] ) dqmStore_->removeElement( meTestPulseG01_[0]->getName() );
00809     name = "EETPT EE - test pulse quality G01 summary";
00810     meTestPulseG01_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00811     meTestPulseG01_[0]->setAxisTitle("ix", 1);
00812     meTestPulseG01_[0]->setAxisTitle("iy", 2);
00813 
00814   }
00815 
00816   if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
00817 
00818     if( meTestPulseG06_[0] ) dqmStore_->removeElement( meTestPulseG06_[0]->getName() );
00819     name = "EETPT EE - test pulse quality G06 summary";
00820     meTestPulseG06_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00821     meTestPulseG06_[0]->setAxisTitle("ix", 1);
00822     meTestPulseG06_[0]->setAxisTitle("iy", 2);
00823 
00824   }
00825 
00826   if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
00827 
00828     if( meTestPulseG12_[0] ) dqmStore_->removeElement( meTestPulseG12_[0]->getName() );
00829     name = "EETPT EE - test pulse quality G12 summary";
00830     meTestPulseG12_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00831     meTestPulseG12_[0]->setAxisTitle("ix", 1);
00832     meTestPulseG12_[0]->setAxisTitle("iy", 2);
00833 
00834   }
00835 
00836 
00837   if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
00838 
00839     if( meTestPulsePNG01_ ) dqmStore_->removeElement( meTestPulsePNG01_->getName() );
00840     name = "EETPT PN test pulse quality G01 summary";
00841     meTestPulsePNG01_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00842     meTestPulsePNG01_->setAxisTitle("jchannel", 1);
00843     meTestPulsePNG01_->setAxisTitle("jpseudo-strip", 2);
00844 
00845   }
00846 
00847   if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
00848 
00849     if( meTestPulsePNG16_ ) dqmStore_->removeElement( meTestPulsePNG16_->getName() );
00850     name = "EETPT PN test pulse quality G16 summary";
00851     meTestPulsePNG16_ = dqmStore_->book2D(name, name, 45, 0., 45., 20, -10., 10.);
00852     meTestPulsePNG16_->setAxisTitle("jchannel", 1);
00853     meTestPulsePNG16_->setAxisTitle("jpseudo-strip", 2);
00854 
00855   }
00856 
00857   if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
00858 
00859     if( meTestPulseG01_[1] ) dqmStore_->removeElement( meTestPulseG01_[1]->getName() );
00860     name = "EETPT EE + test pulse quality G01 summary";
00861     meTestPulseG01_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00862     meTestPulseG01_[1]->setAxisTitle("ix", 1);
00863     meTestPulseG01_[1]->setAxisTitle("iy", 2);
00864 
00865   }
00866 
00867   if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
00868 
00869     if( meTestPulseG06_[1] ) dqmStore_->removeElement( meTestPulseG06_[1]->getName() );
00870     name = "EETPT EE + test pulse quality G06 summary";
00871     meTestPulseG06_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00872     meTestPulseG06_[1]->setAxisTitle("ix", 1);
00873     meTestPulseG06_[1]->setAxisTitle("iy", 2);
00874 
00875   }
00876 
00877   if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
00878 
00879     if( meTestPulseG12_[1] ) dqmStore_->removeElement( meTestPulseG12_[1]->getName() );
00880     name = "EETPT EE + test pulse quality G12 summary";
00881     meTestPulseG12_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00882     meTestPulseG12_[1]->setAxisTitle("ix", 1);
00883     meTestPulseG12_[1]->setAxisTitle("iy", 2);
00884 
00885   }
00886 
00887   if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
00888 
00889     if( meTestPulseAmplG01_ ) dqmStore_->removeElement( meTestPulseAmplG01_->getName() );
00890     name = "EETPT test pulse amplitude G01 summary";
00891     meTestPulseAmplG01_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00892     for (int i = 0; i < 18; i++) {
00893       meTestPulseAmplG01_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00894     }
00895 
00896   }
00897 
00898   if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
00899 
00900     if( meTestPulseAmplG06_ ) dqmStore_->removeElement( meTestPulseAmplG06_->getName() );
00901     name = "EETPT test pulse amplitude G06 summary";
00902     meTestPulseAmplG06_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00903     for (int i = 0; i < 18; i++) {
00904       meTestPulseAmplG06_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00905     }
00906 
00907   }
00908 
00909   if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
00910 
00911     if( meTestPulseAmplG12_ ) dqmStore_->removeElement( meTestPulseAmplG12_->getName() );
00912     name = "EETPT test pulse amplitude G12 summary";
00913     meTestPulseAmplG12_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 4096, 0., 4096.*12., "s");
00914     for (int i = 0; i < 18; i++) {
00915       meTestPulseAmplG12_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00916     }
00917 
00918   }
00919 
00920   if( meRecHitEnergy_[0] ) dqmStore_->removeElement( meRecHitEnergy_[0]->getName() );
00921   name = "EEOT EE - energy summary";
00922   meRecHitEnergy_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00923   meRecHitEnergy_[0]->setAxisTitle("ix", 1);
00924   meRecHitEnergy_[0]->setAxisTitle("iy", 2);
00925 
00926   if( meRecHitEnergy_[1] ) dqmStore_->removeElement( meRecHitEnergy_[1]->getName() );
00927   name = "EEOT EE + energy summary";
00928   meRecHitEnergy_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00929   meRecHitEnergy_[1]->setAxisTitle("ix", 1);
00930   meRecHitEnergy_[1]->setAxisTitle("iy", 2);
00931 
00932   if( meTiming_[0] ) dqmStore_->removeElement( meTiming_[0]->getName() );
00933   name = "EETMT EE - timing quality summary";
00934   meTiming_[0] = dqmStore_->book2D(name, name, 20, 0., 100., 20, 0., 100.);
00935   meTiming_[0]->setAxisTitle("ix", 1);
00936   meTiming_[0]->setAxisTitle("iy", 2);
00937 
00938   if( meTiming_[1] ) dqmStore_->removeElement( meTiming_[1]->getName() );
00939   name = "EETMT EE + timing quality summary";
00940   meTiming_[1] = dqmStore_->book2D(name, name, 20, 0., 100., 20, 0., 100.);
00941   meTiming_[1]->setAxisTitle("ix", 1);
00942   meTiming_[1]->setAxisTitle("iy", 2);
00943 
00944   if( meTimingMean1D_[0] ) dqmStore_->removeElement( meTimingMean1D_[0]->getName() );
00945   name = "EETMT EE - timing mean 1D summary";
00946   meTimingMean1D_[0] = dqmStore_->book1D(name, name, 100, -25., 25.);
00947   meTimingMean1D_[0]->setAxisTitle("mean (ns)", 1);
00948 
00949   if( meTimingMean1D_[1] ) dqmStore_->removeElement( meTimingMean1D_[1]->getName() );
00950   name = "EETMT EE + timing mean 1D summary";
00951   meTimingMean1D_[1] = dqmStore_->book1D(name, name, 100, -25., 25.);
00952   meTimingMean1D_[1]->setAxisTitle("mean (ns)", 1);
00953 
00954   if( meTimingRMS1D_[0] ) dqmStore_->removeElement( meTimingRMS1D_[0]->getName() );
00955   name = "EETMT EE - timing rms 1D summary";
00956   meTimingRMS1D_[0] = dqmStore_->book1D(name, name, 100, 0.0, 10.0);
00957   meTimingRMS1D_[0]->setAxisTitle("rms (ns)", 1);
00958 
00959   if( meTimingRMS1D_[1] ) dqmStore_->removeElement( meTimingRMS1D_[1]->getName() );
00960   name = "EETMT EE + timing rms 1D summary";
00961   meTimingRMS1D_[1] = dqmStore_->book1D(name, name, 100, 0.0, 10.0);
00962   meTimingRMS1D_[1]->setAxisTitle("rms (ns)", 1);
00963 
00964   if ( meTimingMean_ ) dqmStore_->removeElement( meTimingMean_->getName() );
00965   name = "EETMT timing mean";
00966   meTimingMean_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, -20., 20.,"");
00967   for (int i = 0; i < 18; i++) {
00968     meTimingMean_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00969   }
00970   meTimingMean_->setAxisTitle("mean (ns)", 2);
00971 
00972   if ( meTimingRMS_ ) dqmStore_->removeElement( meTimingRMS_->getName() );
00973   name = "EETMT timing rms";
00974   meTimingRMS_ = dqmStore_->bookProfile(name, name, 18, 1, 19, 100, 0., 10.,"");
00975   for (int i = 0; i < 18; i++) {
00976     meTimingRMS_->setBinLabel(i+1, Numbers::sEE(i+1).c_str(), 1);
00977   }
00978   meTimingRMS_->setAxisTitle("rms (ns)", 2);
00979 
00980   if( meTriggerTowerEt_[0] ) dqmStore_->removeElement( meTriggerTowerEt_[0]->getName() );
00981   name = "EETTT EE - Et trigger tower summary";
00982   meTriggerTowerEt_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00983   meTriggerTowerEt_[0]->setAxisTitle("ix", 1);
00984   meTriggerTowerEt_[0]->setAxisTitle("iy", 2);
00985 
00986   if( meTriggerTowerEt_[1] ) dqmStore_->removeElement( meTriggerTowerEt_[1]->getName() );
00987   name = "EETTT EE + Et trigger tower summary";
00988   meTriggerTowerEt_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00989   meTriggerTowerEt_[1]->setAxisTitle("ix", 1);
00990   meTriggerTowerEt_[1]->setAxisTitle("iy", 2);
00991 
00992   if( meTriggerTowerEmulError_[0] ) dqmStore_->removeElement( meTriggerTowerEmulError_[0]->getName() );
00993   name = "EETTT EE - emulator error quality summary";
00994   meTriggerTowerEmulError_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
00995   meTriggerTowerEmulError_[0]->setAxisTitle("ix", 1);
00996   meTriggerTowerEmulError_[0]->setAxisTitle("iy", 2);
00997 
00998   if( meTriggerTowerEmulError_[1] ) dqmStore_->removeElement( meTriggerTowerEmulError_[1]->getName() );
00999   name = "EETTT EE + emulator error quality summary";
01000   meTriggerTowerEmulError_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
01001   meTriggerTowerEmulError_[1]->setAxisTitle("ix", 1);
01002   meTriggerTowerEmulError_[1]->setAxisTitle("iy", 2);
01003 
01004   if( meTriggerTowerTiming_[0] ) dqmStore_->removeElement( meTriggerTowerTiming_[0]->getName() );
01005   name = "EETTT EE - Trigger Primitives Timing summary";
01006   meTriggerTowerTiming_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
01007   meTriggerTowerTiming_[0]->setAxisTitle("ix", 1);
01008   meTriggerTowerTiming_[0]->setAxisTitle("iy", 2);
01009   meTriggerTowerTiming_[0]->setAxisTitle("TP data matching emulator", 3);
01010 
01011   if( meTriggerTowerTiming_[1] ) dqmStore_->removeElement( meTriggerTowerTiming_[1]->getName() );
01012   name = "EETTT EE + Trigger Primitives Timing summary";
01013   meTriggerTowerTiming_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
01014   meTriggerTowerTiming_[1]->setAxisTitle("ix", 1);
01015   meTriggerTowerTiming_[1]->setAxisTitle("iy", 2);
01016   meTriggerTowerTiming_[1]->setAxisTitle("TP data matching emulator", 3);
01017 
01018   if( meTriggerTowerNonSingleTiming_[0] ) dqmStore_->removeElement( meTriggerTowerNonSingleTiming_[0]->getName() );
01019   name = "EETTT EE - Trigger Primitives Non Single Timing summary";
01020   meTriggerTowerNonSingleTiming_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
01021   meTriggerTowerNonSingleTiming_[0]->setAxisTitle("ix", 1);
01022   meTriggerTowerNonSingleTiming_[0]->setAxisTitle("iy", 2);
01023   meTriggerTowerNonSingleTiming_[0]->setAxisTitle("fraction", 3);
01024 
01025   if( meTriggerTowerNonSingleTiming_[1] ) dqmStore_->removeElement( meTriggerTowerNonSingleTiming_[1]->getName() );
01026   name = "EETTT EE + Trigger Primitives Non Single Timing summary";
01027   meTriggerTowerNonSingleTiming_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
01028   meTriggerTowerNonSingleTiming_[1]->setAxisTitle("ix", 1);
01029   meTriggerTowerNonSingleTiming_[1]->setAxisTitle("iy", 2);
01030   meTriggerTowerNonSingleTiming_[1]->setAxisTitle("fraction", 3);
01031 
01032   if( meGlobalSummary_[0] ) dqmStore_->removeElement( meGlobalSummary_[0]->getName() );
01033   name = "EE global summary EE -";
01034   meGlobalSummary_[0] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
01035   meGlobalSummary_[0]->setAxisTitle("ix", 1);
01036   meGlobalSummary_[0]->setAxisTitle("iy", 2);
01037 
01038   if( meGlobalSummary_[1] ) dqmStore_->removeElement( meGlobalSummary_[1]->getName() );
01039   name = "EE global summary EE +";
01040   meGlobalSummary_[1] = dqmStore_->book2D(name, name, 100, 0., 100., 100, 0., 100.);
01041   meGlobalSummary_[1]->setAxisTitle("ix", 1);
01042   meGlobalSummary_[1]->setAxisTitle("iy", 2);
01043 
01044 }
01045 
01046 void EESummaryClient::cleanup(void) {
01047 
01048   if ( ! enableCleanup_ ) return;
01049 
01050   dqmStore_->setCurrentFolder( prefixME_ + "/EESummaryClient" );
01051 
01052   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
01053 
01054     int ism = superModules_[i];
01055 
01056     if ( cloneME_ ) {
01057       if ( hpot01_[ism-1] ) delete hpot01_[ism-1];
01058       if ( httt01_[ism-1] ) delete httt01_[ism-1];
01059     }
01060 
01061     hpot01_[ism-1] = 0;
01062     httt01_[ism-1] = 0;
01063 
01064   }
01065 
01066   if ( meIntegrity_[0] ) dqmStore_->removeElement( meIntegrity_[0]->getName() );
01067   meIntegrity_[0] = 0;
01068 
01069   if ( meIntegrity_[1] ) dqmStore_->removeElement( meIntegrity_[1]->getName() );
01070   meIntegrity_[1] = 0;
01071 
01072   if ( meIntegrityErr_ ) dqmStore_->removeElement( meIntegrityErr_->getName() );
01073   meIntegrityErr_ = 0;
01074 
01075   if ( meIntegrityPN_ ) dqmStore_->removeElement( meIntegrityPN_->getName() );
01076   meIntegrityPN_ = 0;
01077 
01078   if ( meOccupancy_[0] ) dqmStore_->removeElement( meOccupancy_[0]->getName() );
01079   meOccupancy_[0] = 0;
01080 
01081   if ( meOccupancy_[1] ) dqmStore_->removeElement( meOccupancy_[1]->getName() );
01082   meOccupancy_[1] = 0;
01083 
01084   if ( meOccupancy1D_ ) dqmStore_->removeElement( meOccupancy1D_->getName() );
01085   meOccupancy1D_ = 0;
01086 
01087   if ( meOccupancyPN_ ) dqmStore_->removeElement( meOccupancyPN_->getName() );
01088   meOccupancyPN_ = 0;
01089 
01090   if ( meStatusFlags_[0] ) dqmStore_->removeElement( meStatusFlags_[0]->getName() );
01091   meStatusFlags_[0] = 0;
01092 
01093   if ( meStatusFlags_[1] ) dqmStore_->removeElement( meStatusFlags_[1]->getName() );
01094   meStatusFlags_[1] = 0;
01095 
01096   if ( meStatusFlagsErr_ ) dqmStore_->removeElement( meStatusFlagsErr_->getName() );
01097   meStatusFlagsErr_ = 0;
01098 
01099   if ( mePedestalOnline_[0] ) dqmStore_->removeElement( mePedestalOnline_[0]->getName() );
01100   mePedestalOnline_[0] = 0;
01101 
01102   if ( mePedestalOnline_[1] ) dqmStore_->removeElement( mePedestalOnline_[1]->getName() );
01103   mePedestalOnline_[1] = 0;
01104 
01105   if ( mePedestalOnlineErr_ ) dqmStore_->removeElement( mePedestalOnlineErr_->getName() );
01106   mePedestalOnlineErr_ = 0;
01107 
01108   if ( mePedestalOnlineMean_ ) dqmStore_->removeElement( mePedestalOnlineMean_->getName() );
01109   mePedestalOnlineMean_ = 0;
01110 
01111   if ( mePedestalOnlineRMS_ ) dqmStore_->removeElement( mePedestalOnlineRMS_->getName() );
01112   mePedestalOnlineRMS_ = 0;
01113 
01114   if ( mePedestalOnlineRMSMap_[0] ) dqmStore_->removeElement( mePedestalOnlineRMSMap_[0]->getName() );
01115   mePedestalOnlineRMSMap_[0] = 0;
01116 
01117   if ( mePedestalOnlineRMSMap_[1] ) dqmStore_->removeElement( mePedestalOnlineRMSMap_[1]->getName() );
01118   mePedestalOnlineRMSMap_[1] = 0;
01119 
01120   if ( meLaserL1_[0] ) dqmStore_->removeElement( meLaserL1_[0]->getName() );
01121   meLaserL1_[0] = 0;
01122 
01123   if ( meLaserL1_[1] ) dqmStore_->removeElement( meLaserL1_[1]->getName() );
01124   meLaserL1_[1] = 0;
01125 
01126   if ( meLaserL1Err_ ) dqmStore_->removeElement( meLaserL1Err_->getName() );
01127   meLaserL1Err_ = 0;
01128 
01129   if ( meLaserL1PN_ ) dqmStore_->removeElement( meLaserL1PN_->getName() );
01130   meLaserL1PN_ = 0;
01131 
01132   if ( meLaserL1PNErr_ ) dqmStore_->removeElement( meLaserL1PNErr_->getName() );
01133   meLaserL1PNErr_ = 0;
01134 
01135   if ( meLaserL1Ampl_ ) dqmStore_->removeElement( meLaserL1Ampl_->getName() );
01136   meLaserL1Ampl_ = 0;
01137 
01138   if ( meLaserL1Timing_ ) dqmStore_->removeElement( meLaserL1Timing_->getName() );
01139   meLaserL1Timing_ = 0;
01140 
01141   if ( meLaserL1AmplOverPN_ ) dqmStore_->removeElement( meLaserL1AmplOverPN_->getName() );
01142   meLaserL1AmplOverPN_ = 0;
01143 
01144   if ( meLaserL2_[0] ) dqmStore_->removeElement( meLaserL2_[0]->getName() );
01145   meLaserL2_[0] = 0;
01146 
01147   if ( meLaserL2_[1] ) dqmStore_->removeElement( meLaserL2_[1]->getName() );
01148   meLaserL2_[1] = 0;
01149 
01150   if ( meLaserL2Err_ ) dqmStore_->removeElement( meLaserL2Err_->getName() );
01151   meLaserL2Err_ = 0;
01152 
01153   if ( meLaserL2PN_ ) dqmStore_->removeElement( meLaserL2PN_->getName() );
01154   meLaserL2PN_ = 0;
01155 
01156   if ( meLaserL2PNErr_ ) dqmStore_->removeElement( meLaserL2PNErr_->getName() );
01157   meLaserL2PNErr_ = 0;
01158 
01159   if ( meLaserL2Ampl_ ) dqmStore_->removeElement( meLaserL2Ampl_->getName() );
01160   meLaserL2Ampl_ = 0;
01161 
01162   if ( meLaserL2Timing_ ) dqmStore_->removeElement( meLaserL2Timing_->getName() );
01163   meLaserL2Timing_ = 0;
01164 
01165   if ( meLaserL2AmplOverPN_ ) dqmStore_->removeElement( meLaserL2AmplOverPN_->getName() );
01166   meLaserL2AmplOverPN_ = 0;
01167 
01168   if ( meLaserL3_[0] ) dqmStore_->removeElement( meLaserL3_[0]->getName() );
01169   meLaserL3_[0] = 0;
01170 
01171   if ( meLaserL3_[1] ) dqmStore_->removeElement( meLaserL3_[1]->getName() );
01172   meLaserL3_[1] = 0;
01173 
01174   if ( meLaserL3Err_ ) dqmStore_->removeElement( meLaserL3Err_->getName() );
01175   meLaserL3Err_ = 0;
01176 
01177   if ( meLaserL3PN_ ) dqmStore_->removeElement( meLaserL3PN_->getName() );
01178   meLaserL3PN_ = 0;
01179 
01180   if ( meLaserL3PNErr_ ) dqmStore_->removeElement( meLaserL3PNErr_->getName() );
01181   meLaserL3PNErr_ = 0;
01182 
01183   if ( meLaserL3Ampl_ ) dqmStore_->removeElement( meLaserL3Ampl_->getName() );
01184   meLaserL3Ampl_ = 0;
01185 
01186   if ( meLaserL3Timing_ ) dqmStore_->removeElement( meLaserL3Timing_->getName() );
01187   meLaserL3Timing_ = 0;
01188 
01189   if ( meLaserL3AmplOverPN_ ) dqmStore_->removeElement( meLaserL3AmplOverPN_->getName() );
01190   meLaserL3AmplOverPN_ = 0;
01191 
01192   if ( meLaserL4_[0] ) dqmStore_->removeElement( meLaserL4_[0]->getName() );
01193   meLaserL4_[0] = 0;
01194 
01195   if ( meLaserL4_[1] ) dqmStore_->removeElement( meLaserL4_[1]->getName() );
01196   meLaserL4_[1] = 0;
01197 
01198   if ( meLaserL4Err_ ) dqmStore_->removeElement( meLaserL4Err_->getName() );
01199   meLaserL4Err_ = 0;
01200 
01201   if ( meLaserL4PN_ ) dqmStore_->removeElement( meLaserL4PN_->getName() );
01202   meLaserL4PN_ = 0;
01203 
01204   if ( meLaserL4PNErr_ ) dqmStore_->removeElement( meLaserL4PNErr_->getName() );
01205   meLaserL4PNErr_ = 0;
01206 
01207   if ( meLaserL4Ampl_ ) dqmStore_->removeElement( meLaserL4Ampl_->getName() );
01208   meLaserL4Ampl_ = 0;
01209 
01210   if ( meLaserL4Timing_ ) dqmStore_->removeElement( meLaserL4Timing_->getName() );
01211   meLaserL4Timing_ = 0;
01212 
01213   if ( meLaserL4AmplOverPN_ ) dqmStore_->removeElement( meLaserL4AmplOverPN_->getName() );
01214   meLaserL4AmplOverPN_ = 0;
01215 
01216   if ( meLedL1_[0] ) dqmStore_->removeElement( meLedL1_[0]->getName() );
01217   meLedL1_[0] = 0;
01218 
01219   if ( meLedL1_[1] ) dqmStore_->removeElement( meLedL1_[1]->getName() );
01220   meLedL1_[1] = 0;
01221 
01222   if ( meLedL1Err_ ) dqmStore_->removeElement( meLedL1Err_->getName() );
01223   meLedL1Err_ = 0;
01224 
01225   if ( meLedL1PN_ ) dqmStore_->removeElement( meLedL1PN_->getName() );
01226   meLedL1PN_ = 0;
01227 
01228   if ( meLedL1PNErr_ ) dqmStore_->removeElement( meLedL1PNErr_->getName() );
01229   meLedL1PNErr_ = 0;
01230 
01231   if ( meLedL1Ampl_ ) dqmStore_->removeElement( meLedL1Ampl_->getName() );
01232   meLedL1Ampl_ = 0;
01233 
01234   if ( meLedL1Timing_ ) dqmStore_->removeElement( meLedL1Timing_->getName() );
01235   meLedL1Timing_ = 0;
01236 
01237   if ( meLedL1AmplOverPN_ ) dqmStore_->removeElement( meLedL1AmplOverPN_->getName() );
01238   meLedL1AmplOverPN_ = 0;
01239 
01240   if ( meLedL2_[0] ) dqmStore_->removeElement( meLedL2_[0]->getName() );
01241   meLedL2_[0] = 0;
01242 
01243   if ( meLedL2_[1] ) dqmStore_->removeElement( meLedL2_[1]->getName() );
01244   meLedL2_[1] = 0;
01245 
01246   if ( meLedL2Err_ ) dqmStore_->removeElement( meLedL2Err_->getName() );
01247   meLedL2Err_ = 0;
01248 
01249   if ( meLedL2PN_ ) dqmStore_->removeElement( meLedL2PN_->getName() );
01250   meLedL2PN_ = 0;
01251 
01252   if ( meLedL2PNErr_ ) dqmStore_->removeElement( meLedL2PNErr_->getName() );
01253   meLedL2PNErr_ = 0;
01254 
01255   if ( meLedL2Ampl_ ) dqmStore_->removeElement( meLedL2Ampl_->getName() );
01256   meLedL2Ampl_ = 0;
01257 
01258   if ( meLedL2Timing_ ) dqmStore_->removeElement( meLedL2Timing_->getName() );
01259   meLedL2Timing_ = 0;
01260 
01261   if ( meLedL2AmplOverPN_ ) dqmStore_->removeElement( meLedL2AmplOverPN_->getName() );
01262   meLedL2AmplOverPN_ = 0;
01263 
01264   if ( mePedestalG01_[0] ) dqmStore_->removeElement( mePedestalG01_[0]->getName() );
01265   mePedestalG01_[0] = 0;
01266 
01267   if ( mePedestalG01_[1] ) dqmStore_->removeElement( mePedestalG01_[1]->getName() );
01268   mePedestalG01_[1] = 0;
01269 
01270   if ( mePedestalG06_[0] ) dqmStore_->removeElement( mePedestalG06_[0]->getName() );
01271   mePedestalG06_[0] = 0;
01272 
01273   if ( mePedestalG06_[1] ) dqmStore_->removeElement( mePedestalG06_[1]->getName() );
01274   mePedestalG06_[1] = 0;
01275 
01276   if ( mePedestalG12_[0] ) dqmStore_->removeElement( mePedestalG12_[0]->getName() );
01277   mePedestalG12_[0] = 0;
01278 
01279   if ( mePedestalG12_[1] ) dqmStore_->removeElement( mePedestalG12_[1]->getName() );
01280   mePedestalG12_[1] = 0;
01281 
01282   if ( mePedestalPNG01_ ) dqmStore_->removeElement( mePedestalPNG01_->getName() );
01283   mePedestalPNG01_ = 0;
01284 
01285   if ( mePedestalPNG16_ ) dqmStore_->removeElement( mePedestalPNG16_->getName() );
01286   mePedestalPNG16_ = 0;
01287 
01288   if ( meTestPulseG01_[0] ) dqmStore_->removeElement( meTestPulseG01_[0]->getName() );
01289   meTestPulseG01_[0] = 0;
01290 
01291   if ( meTestPulseG01_[1] ) dqmStore_->removeElement( meTestPulseG01_[1]->getName() );
01292   meTestPulseG01_[1] = 0;
01293 
01294   if ( meTestPulseG06_[0] ) dqmStore_->removeElement( meTestPulseG06_[0]->getName() );
01295   meTestPulseG06_[0] = 0;
01296 
01297   if ( meTestPulseG06_[1] ) dqmStore_->removeElement( meTestPulseG06_[1]->getName() );
01298   meTestPulseG06_[1] = 0;
01299 
01300   if ( meTestPulseG12_[0] ) dqmStore_->removeElement( meTestPulseG12_[0]->getName() );
01301   meTestPulseG12_[0] = 0;
01302 
01303   if ( meTestPulseG12_[1] ) dqmStore_->removeElement( meTestPulseG12_[1]->getName() );
01304   meTestPulseG12_[1] = 0;
01305 
01306   if ( meTestPulsePNG01_ ) dqmStore_->removeElement( meTestPulsePNG01_->getName() );
01307   meTestPulsePNG01_ = 0;
01308 
01309   if ( meTestPulsePNG16_ ) dqmStore_->removeElement( meTestPulsePNG16_->getName() );
01310   meTestPulsePNG16_ = 0;
01311 
01312   if ( meTestPulseAmplG01_ ) dqmStore_->removeElement( meTestPulseAmplG01_->getName() );
01313   meTestPulseAmplG01_ = 0;
01314 
01315   if ( meTestPulseAmplG06_ ) dqmStore_->removeElement( meTestPulseAmplG06_->getName() );
01316   meTestPulseAmplG06_ = 0;
01317 
01318   if ( meTestPulseAmplG12_ ) dqmStore_->removeElement( meTestPulseAmplG12_->getName() );
01319   meTestPulseAmplG12_ = 0;
01320 
01321   if ( meRecHitEnergy_[0] ) dqmStore_->removeElement( meRecHitEnergy_[0]->getName() );
01322   meRecHitEnergy_[0] = 0;
01323 
01324   if ( meRecHitEnergy_[1] ) dqmStore_->removeElement( meRecHitEnergy_[1]->getName() );
01325   meRecHitEnergy_[1] = 0;
01326 
01327   if ( meTiming_[0] ) dqmStore_->removeElement( meTiming_[0]->getName() );
01328   meTiming_[0] = 0;
01329 
01330   if ( meTiming_[1] ) dqmStore_->removeElement( meTiming_[1]->getName() );
01331   meTiming_[1] = 0;
01332 
01333   if ( meTimingMean1D_[0] ) dqmStore_->removeElement( meTimingMean1D_[0]->getName() );
01334   meTimingMean1D_[0] = 0;
01335 
01336   if ( meTimingMean1D_[1] ) dqmStore_->removeElement( meTimingMean1D_[1]->getName() );
01337   meTimingMean1D_[1] = 0;
01338 
01339   if ( meTimingRMS1D_[0] ) dqmStore_->removeElement( meTimingRMS1D_[0]->getName() );
01340   meTimingRMS1D_[0] = 0;
01341 
01342   if ( meTimingRMS1D_[1] ) dqmStore_->removeElement( meTimingRMS1D_[1]->getName() );
01343   meTimingRMS1D_[1] = 0;
01344 
01345   if ( meTriggerTowerEt_[0] ) dqmStore_->removeElement( meTriggerTowerEt_[0]->getName() );
01346   meTriggerTowerEt_[0] = 0;
01347 
01348   if ( meTriggerTowerEt_[1] ) dqmStore_->removeElement( meTriggerTowerEt_[1]->getName() );
01349   meTriggerTowerEt_[1] = 0;
01350 
01351   if ( meTriggerTowerEmulError_[0] ) dqmStore_->removeElement( meTriggerTowerEmulError_[0]->getName() );
01352   meTriggerTowerEmulError_[0] = 0;
01353 
01354   if ( meTriggerTowerEmulError_[1] ) dqmStore_->removeElement( meTriggerTowerEmulError_[1]->getName() );
01355   meTriggerTowerEmulError_[1] = 0;
01356 
01357   if ( meTriggerTowerTiming_[0] ) dqmStore_->removeElement( meTriggerTowerTiming_[0]->getName() );
01358   meTriggerTowerTiming_[0] = 0;
01359 
01360   if ( meTriggerTowerTiming_[1] ) dqmStore_->removeElement( meTriggerTowerTiming_[1]->getName() );
01361   meTriggerTowerTiming_[1] = 0;
01362 
01363   if ( meTriggerTowerNonSingleTiming_[0] ) dqmStore_->removeElement( meTriggerTowerNonSingleTiming_[0]->getName() );
01364   meTriggerTowerNonSingleTiming_[0] = 0;
01365 
01366   if ( meTriggerTowerNonSingleTiming_[1] ) dqmStore_->removeElement( meTriggerTowerNonSingleTiming_[1]->getName() );
01367   meTriggerTowerNonSingleTiming_[1] = 0;
01368 
01369   if ( meGlobalSummary_[0] ) dqmStore_->removeElement( meGlobalSummary_[0]->getName() );
01370   meGlobalSummary_[0] = 0;
01371 
01372   if ( meGlobalSummary_[1] ) dqmStore_->removeElement( meGlobalSummary_[1]->getName() );
01373   meGlobalSummary_[1] = 0;
01374 
01375 }
01376 
01377 #ifdef WITH_ECAL_COND_DB
01378 bool EESummaryClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
01379 
01380   status = true;
01381 
01382   return true;
01383 
01384 }
01385 #endif
01386 
01387 void EESummaryClient::analyze(void) {
01388 
01389   ievt_++;
01390   jevt_++;
01391   if ( ievt_ % 10 == 0 ) {
01392     if ( debug_ ) std::cout << "EESummaryClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
01393   }
01394 
01395   uint32_t chWarnBit = 1 << EcalDQMStatusHelper::PHYSICS_BAD_CHANNEL_WARNING;
01396 
01397   for ( int ix = 1; ix <= 100; ix++ ) {
01398     for ( int iy = 1; iy <= 100; iy++ ) {
01399 
01400       if ( meIntegrity_[0] ) meIntegrity_[0]->setBinContent( ix, iy, 6. );
01401       if ( meIntegrity_[1] ) meIntegrity_[1]->setBinContent( ix, iy, 6. );
01402       if ( meOccupancy_[0] ) meOccupancy_[0]->setBinContent( ix, iy, 0. );
01403       if ( meOccupancy_[1] ) meOccupancy_[1]->setBinContent( ix, iy, 0. );
01404       if ( meStatusFlags_[0] ) meStatusFlags_[0]->setBinContent( ix, iy, 6. );
01405       if ( meStatusFlags_[1] ) meStatusFlags_[1]->setBinContent( ix, iy, 6. );
01406       if ( mePedestalOnline_[0] ) mePedestalOnline_[0]->setBinContent( ix, iy, 6. );
01407       if ( mePedestalOnline_[1] ) mePedestalOnline_[1]->setBinContent( ix, iy, 6. );
01408       if ( mePedestalOnlineRMSMap_[0] ) mePedestalOnlineRMSMap_[0]->setBinContent( ix, iy, -1. );
01409       if ( mePedestalOnlineRMSMap_[1] ) mePedestalOnlineRMSMap_[1]->setBinContent( ix, iy, -1. );
01410 
01411       if ( meLaserL1_[0] ) meLaserL1_[0]->setBinContent( ix, iy, 6. );
01412       if ( meLaserL1_[1] ) meLaserL1_[1]->setBinContent( ix, iy, 6. );
01413       if ( meLaserL2_[0] ) meLaserL2_[0]->setBinContent( ix, iy, 6. );
01414       if ( meLaserL2_[1] ) meLaserL2_[1]->setBinContent( ix, iy, 6. );
01415       if ( meLaserL3_[0] ) meLaserL3_[0]->setBinContent( ix, iy, 6. );
01416       if ( meLaserL3_[1] ) meLaserL3_[1]->setBinContent( ix, iy, 6. );
01417       if ( meLaserL4_[0] ) meLaserL4_[0]->setBinContent( ix, iy, 6. );
01418       if ( meLaserL4_[1] ) meLaserL4_[1]->setBinContent( ix, iy, 6. );
01419       if ( meLedL1_[0] ) meLedL1_[0]->setBinContent( ix, iy, 6. );
01420       if ( meLedL1_[1] ) meLedL1_[1]->setBinContent( ix, iy, 6. );
01421       if ( meLedL2_[0] ) meLedL2_[0]->setBinContent( ix, iy, 6. );
01422       if ( meLedL2_[1] ) meLedL2_[1]->setBinContent( ix, iy, 6. );
01423       if ( mePedestalG01_[0] ) mePedestalG01_[0]->setBinContent( ix, iy, 6. );
01424       if ( mePedestalG01_[1] ) mePedestalG01_[1]->setBinContent( ix, iy, 6. );
01425       if ( mePedestalG06_[0] ) mePedestalG06_[0]->setBinContent( ix, iy, 6. );
01426       if ( mePedestalG06_[1] ) mePedestalG06_[1]->setBinContent( ix, iy, 6. );
01427       if ( mePedestalG12_[0] ) mePedestalG12_[0]->setBinContent( ix, iy, 6. );
01428       if ( mePedestalG12_[1] ) mePedestalG12_[1]->setBinContent( ix, iy, 6. );
01429       if ( meTestPulseG01_[0] ) meTestPulseG01_[0]->setBinContent( ix, iy, 6. );
01430       if ( meTestPulseG01_[1] ) meTestPulseG01_[1]->setBinContent( ix, iy, 6. );
01431       if ( meTestPulseG06_[0] ) meTestPulseG06_[0]->setBinContent( ix, iy, 6. );
01432       if ( meTestPulseG06_[1] ) meTestPulseG06_[1]->setBinContent( ix, iy, 6. );
01433       if ( meTestPulseG12_[0] ) meTestPulseG12_[0]->setBinContent( ix, iy, 6. );
01434       if ( meTestPulseG12_[1] ) meTestPulseG12_[1]->setBinContent( ix, iy, 6. );
01435       if ( meRecHitEnergy_[0] ) meRecHitEnergy_[0]->setBinContent( ix, iy, 0. );
01436       if ( meRecHitEnergy_[1] ) meRecHitEnergy_[1]->setBinContent( ix, iy, 0. );
01437 
01438       if ( meGlobalSummary_[0] ) meGlobalSummary_[0]->setBinContent( ix, iy, 6. );
01439       if ( meGlobalSummary_[1] ) meGlobalSummary_[1]->setBinContent( ix, iy, 6. );
01440 
01441     }
01442   }
01443 
01444   // default is 6 because we want white for the non existing MEM
01445   for ( int ix = 1; ix <= 45; ix++ ) {
01446     for ( int iy = 1; iy <= 20; iy++ ) {
01447 
01448       if ( meIntegrityPN_ ) meIntegrityPN_->setBinContent( ix, iy, 6. );
01449       if ( meOccupancyPN_ ) meOccupancyPN_->setBinContent( ix, iy, 0. );
01450       if ( meLaserL1PN_ ) meLaserL1PN_->setBinContent( ix, iy, 6. );
01451       if ( meLaserL2PN_ ) meLaserL2PN_->setBinContent( ix, iy, 6. );
01452       if ( meLaserL3PN_ ) meLaserL3PN_->setBinContent( ix, iy, 6. );
01453       if ( meLaserL4PN_ ) meLaserL4PN_->setBinContent( ix, iy, 6. );
01454       if ( meLedL1PN_ ) meLedL1PN_->setBinContent( ix, iy, 6. );
01455       if ( meLedL2PN_ ) meLedL2PN_->setBinContent( ix, iy, 6. );
01456       if ( mePedestalPNG01_ ) mePedestalPNG01_->setBinContent( ix, iy, 6. );
01457       if ( mePedestalPNG16_ ) mePedestalPNG16_->setBinContent( ix, iy, 6. );
01458       if ( meTestPulsePNG01_ ) meTestPulsePNG01_->setBinContent( ix, iy, 6. );
01459       if ( meTestPulsePNG16_ ) meTestPulsePNG16_->setBinContent( ix, iy, 6. );
01460 
01461     }
01462   }
01463 
01464   for ( int ix = 1; ix <= 100; ix++ ) {
01465     for ( int iy = 1; iy <= 100; iy++ ) {
01466       if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setBinContent( ix, iy, 0. );
01467       if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setBinContent( ix, iy, 0. );
01468       if ( meTriggerTowerEmulError_[0] ) meTriggerTowerEmulError_[0]->setBinContent( ix, iy, 6. );
01469       if ( meTriggerTowerEmulError_[1] ) meTriggerTowerEmulError_[1]->setBinContent( ix, iy, 6. );
01470       if ( meTriggerTowerTiming_[0] ) meTriggerTowerTiming_[0]->setBinContent( ix, iy, 0. );
01471       if ( meTriggerTowerTiming_[1] ) meTriggerTowerTiming_[1]->setBinContent( ix, iy, 0. );
01472       if ( meTriggerTowerNonSingleTiming_[0] ) meTriggerTowerNonSingleTiming_[0]->setBinContent( ix, iy, -1 );
01473       if ( meTriggerTowerNonSingleTiming_[1] ) meTriggerTowerNonSingleTiming_[1]->setBinContent( ix, iy, -1 );
01474     }
01475   }
01476 
01477   for ( int ix = 1; ix <= 20; ix++ ) {
01478     for ( int iy = 1; iy <= 20; iy++ ) {
01479       if ( meTiming_[0] ) meTiming_[0]->setBinContent( ix, iy, 6. );
01480       if ( meTiming_[1] ) meTiming_[1]->setBinContent( ix, iy, 6. );
01481     }
01482   }
01483 
01484   if ( meIntegrity_[0] ) meIntegrity_[0]->setEntries( 0 );
01485   if ( meIntegrity_[1] ) meIntegrity_[1]->setEntries( 0 );
01486   if ( meIntegrityErr_ ) meIntegrityErr_->Reset();
01487   if ( meIntegrityPN_ ) meIntegrityPN_->setEntries( 0 );
01488   if ( meOccupancy_[0] ) meOccupancy_[0]->setEntries( 0 );
01489   if ( meOccupancy_[1] ) meOccupancy_[1]->setEntries( 0 );
01490   if ( meOccupancy1D_ ) meOccupancy1D_->Reset();
01491   if ( meOccupancyPN_ ) meOccupancyPN_->setEntries( 0 );
01492   if ( meStatusFlags_[0] ) meStatusFlags_[0]->setEntries( 0 );
01493   if ( meStatusFlags_[1] ) meStatusFlags_[1]->setEntries( 0 );
01494   if ( meStatusFlagsErr_ ) meStatusFlagsErr_->Reset();
01495   if ( mePedestalOnline_[0] ) mePedestalOnline_[0]->setEntries( 0 );
01496   if ( mePedestalOnline_[1] ) mePedestalOnline_[1]->setEntries( 0 );
01497   if ( mePedestalOnlineErr_ ) mePedestalOnlineErr_->Reset();
01498   if ( mePedestalOnlineMean_ ) mePedestalOnlineMean_->Reset();
01499   if ( mePedestalOnlineRMS_ ) mePedestalOnlineRMS_->Reset();
01500   if ( meLaserL1_[0] ) meLaserL1_[0]->setEntries( 0 );
01501   if ( meLaserL1_[1] ) meLaserL1_[1]->setEntries( 0 );
01502   if ( meLaserL1Err_ ) meLaserL1Err_->Reset();
01503   if ( meLaserL1PN_ ) meLaserL1PN_->setEntries( 0 );
01504   if ( meLaserL1PNErr_ ) meLaserL1PNErr_->Reset();
01505   if ( meLaserL1Ampl_ ) meLaserL1Ampl_->Reset();
01506   if ( meLaserL1Timing_ ) meLaserL1Timing_->Reset();
01507   if ( meLaserL1AmplOverPN_ ) meLaserL1AmplOverPN_->Reset();
01508   if ( meLaserL2_[0] ) meLaserL2_[0]->setEntries( 0 );
01509   if ( meLaserL2_[1] ) meLaserL2_[1]->setEntries( 0 );
01510   if ( meLaserL2Err_ ) meLaserL2Err_->Reset();
01511   if ( meLaserL2PN_ ) meLaserL2PN_->setEntries( 0 );
01512   if ( meLaserL2PNErr_ ) meLaserL2PNErr_->Reset();
01513   if ( meLaserL2Ampl_ ) meLaserL2Ampl_->Reset();
01514   if ( meLaserL2Timing_ ) meLaserL2Timing_->Reset();
01515   if ( meLaserL2AmplOverPN_ ) meLaserL2AmplOverPN_->Reset();
01516   if ( meLaserL3_[0] ) meLaserL3_[0]->setEntries( 0 );
01517   if ( meLaserL3_[1] ) meLaserL3_[1]->setEntries( 0 );
01518   if ( meLaserL3Err_ ) meLaserL3Err_->Reset();
01519   if ( meLaserL3PN_ ) meLaserL3PN_->setEntries( 0 );
01520   if ( meLaserL3PNErr_ ) meLaserL3PNErr_->Reset();
01521   if ( meLaserL3Ampl_ ) meLaserL3Ampl_->Reset();
01522   if ( meLaserL3Timing_ ) meLaserL3Timing_->Reset();
01523   if ( meLaserL3AmplOverPN_ ) meLaserL3AmplOverPN_->Reset();
01524   if ( meLaserL4_[0] ) meLaserL4_[0]->setEntries( 0 );
01525   if ( meLaserL4_[1] ) meLaserL4_[1]->setEntries( 0 );
01526   if ( meLaserL4Err_ ) meLaserL4Err_->Reset();
01527   if ( meLaserL4PN_ ) meLaserL4PN_->setEntries( 0 );
01528   if ( meLaserL4PNErr_ ) meLaserL4PNErr_->Reset();
01529   if ( meLaserL4Ampl_ ) meLaserL4Ampl_->Reset();
01530   if ( meLaserL4Timing_ ) meLaserL4Timing_->Reset();
01531   if ( meLaserL4AmplOverPN_ ) meLaserL4AmplOverPN_->Reset();
01532   if ( meLedL1_[0] ) meLedL1_[0]->setEntries( 0 );
01533   if ( meLedL1_[1] ) meLedL1_[1]->setEntries( 0 );
01534   if ( meLedL1Err_ ) meLedL1Err_->Reset();
01535   if ( meLedL1PN_ ) meLedL1PN_->setEntries( 0 );
01536   if ( meLedL1PNErr_ ) meLedL1PNErr_->Reset();
01537   if ( meLedL1Ampl_ ) meLedL1Ampl_->Reset();
01538   if ( meLedL1Timing_ ) meLedL1Timing_->Reset();
01539   if ( meLedL1AmplOverPN_ ) meLedL1AmplOverPN_->Reset();
01540   if ( meLedL2_[0] ) meLedL2_[0]->setEntries( 0 );
01541   if ( meLedL2_[1] ) meLedL2_[1]->setEntries( 0 );
01542   if ( meLedL2Err_ ) meLedL2Err_->Reset();
01543   if ( meLedL2PN_ ) meLedL2PN_->setEntries( 0 );
01544   if ( meLedL2PNErr_ ) meLedL2PNErr_->Reset();
01545   if ( meLedL2Ampl_ ) meLedL2Ampl_->Reset();
01546   if ( meLedL2Timing_ ) meLedL2Timing_->Reset();
01547   if ( meLedL2AmplOverPN_ ) meLedL2AmplOverPN_->Reset();
01548   if ( mePedestalG01_[0] ) mePedestalG01_[0]->setEntries( 0 );
01549   if ( mePedestalG01_[1] ) mePedestalG01_[1]->setEntries( 0 );
01550   if ( mePedestalG06_[0] ) mePedestalG06_[0]->setEntries( 0 );
01551   if ( mePedestalG06_[1] ) mePedestalG06_[1]->setEntries( 0 );
01552   if ( mePedestalG12_[0] ) mePedestalG12_[0]->setEntries( 0 );
01553   if ( mePedestalG12_[1] ) mePedestalG12_[1]->setEntries( 0 );
01554   if ( mePedestalPNG01_ ) mePedestalPNG01_->setEntries( 0 );
01555   if ( mePedestalPNG16_ ) mePedestalPNG16_->setEntries( 0 );
01556   if ( meTestPulseG01_[0] ) meTestPulseG01_[0]->setEntries( 0 );
01557   if ( meTestPulseG01_[1] ) meTestPulseG01_[1]->setEntries( 0 );
01558   if ( meTestPulseG06_[0] ) meTestPulseG06_[0]->setEntries( 0 );
01559   if ( meTestPulseG06_[1] ) meTestPulseG06_[1]->setEntries( 0 );
01560   if ( meTestPulseG12_[0] ) meTestPulseG12_[0]->setEntries( 0 );
01561   if ( meTestPulseG12_[1] ) meTestPulseG12_[1]->setEntries( 0 );
01562   if ( meTestPulsePNG01_ ) meTestPulsePNG01_->setEntries( 0 );
01563   if ( meTestPulsePNG16_ ) meTestPulsePNG16_->setEntries( 0 );
01564   if ( meTestPulseAmplG01_ ) meTestPulseAmplG01_->Reset();
01565   if ( meTestPulseAmplG06_ ) meTestPulseAmplG06_->Reset();
01566   if ( meTestPulseAmplG12_ ) meTestPulseAmplG12_->Reset();
01567 
01568   if ( meRecHitEnergy_[0] ) meRecHitEnergy_[0]->setEntries( 0 );
01569   if ( meRecHitEnergy_[1] ) meRecHitEnergy_[1]->setEntries( 0 );
01570   if ( meTiming_[0] ) meTiming_[0]->setEntries( 0 );
01571   if ( meTiming_[1] ) meTiming_[1]->setEntries( 0 );
01572   if ( meTimingMean1D_[0] ) meTimingMean1D_[0]->Reset();
01573   if ( meTimingMean1D_[1] ) meTimingMean1D_[1]->Reset();
01574   if ( meTimingRMS1D_[0] ) meTimingRMS1D_[0]->Reset();
01575   if ( meTimingRMS1D_[1] ) meTimingRMS1D_[1]->Reset();
01576   if ( meTimingMean_ ) meTimingMean_->Reset();
01577   if ( meTimingRMS_ ) meTimingRMS_->Reset();
01578   if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setEntries( 0 );
01579   if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setEntries( 0 );
01580   if ( meTriggerTowerEmulError_[0] ) meTriggerTowerEmulError_[0]->setEntries( 0 );
01581   if ( meTriggerTowerEmulError_[1] ) meTriggerTowerEmulError_[1]->setEntries( 0 );
01582   if ( meTriggerTowerTiming_[0] ) meTriggerTowerTiming_[0]->setEntries( 0 );
01583   if ( meTriggerTowerTiming_[1] ) meTriggerTowerTiming_[1]->setEntries( 0 );
01584   if ( meTriggerTowerNonSingleTiming_[0] ) meTriggerTowerNonSingleTiming_[0]->setEntries( 0 );
01585   if ( meTriggerTowerNonSingleTiming_[1] ) meTriggerTowerNonSingleTiming_[1]->setEntries( 0 );
01586 
01587   if ( meGlobalSummary_[0] ) meGlobalSummary_[0]->setEntries( 0 );
01588   if ( meGlobalSummary_[1] ) meGlobalSummary_[1]->setEntries( 0 );
01589 
01590   for ( unsigned int i=0; i<clients_.size(); i++ ) {
01591 
01592     EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
01593     EEStatusFlagsClient* eesfc = dynamic_cast<EEStatusFlagsClient*>(clients_[i]);
01594     EEPedestalOnlineClient* eepoc = dynamic_cast<EEPedestalOnlineClient*>(clients_[i]);
01595 
01596     EELaserClient* eelc = dynamic_cast<EELaserClient*>(clients_[i]);
01597     EELedClient* eeldc = dynamic_cast<EELedClient*>(clients_[i]);
01598     EEPedestalClient* eepc = dynamic_cast<EEPedestalClient*>(clients_[i]);
01599     EETestPulseClient* eetpc = dynamic_cast<EETestPulseClient*>(clients_[i]);
01600 
01601     EETimingClient* eetmc = dynamic_cast<EETimingClient*>(clients_[i]);
01602     EETriggerTowerClient* eetttc = dynamic_cast<EETriggerTowerClient*>(clients_[i]);
01603 
01604     MonitorElement *me;
01605     MonitorElement *me_01, *me_02, *me_03;
01606     MonitorElement *me_04, *me_05;
01607     //    MonitorElement *me_f[6], *me_fg[2];
01608     TH2F* h2;
01609     TH2F* h3;
01610 
01611     for ( unsigned int i=0; i<superModules_.size(); i++ ) {
01612 
01613       int ism = superModules_[i];
01614 
01615       me = dqmStore_->get( prefixME_ + "/EEOccupancyTask/EEOT rec hit energy " + Numbers::sEE(ism) );
01616       hot01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hot01_[ism-1] );
01617 
01618       me = dqmStore_->get( prefixME_ + "/EEPedestalOnlineTask/Gain12/EEPOT pedestal " + Numbers::sEE(ism) + " G12" );
01619       hpot01_[ism-1] = UtilsClient::getHisto( me, cloneME_, hpot01_[ism-1] );
01620 
01621       me = dqmStore_->get( prefixME_ + "/EETriggerTowerTask/EETTT Et map Real Digis " + Numbers::sEE(ism) );
01622       httt01_[ism-1] = UtilsClient::getHisto( me, cloneME_, httt01_[ism-1] );
01623 
01624       me = dqmStore_->get( prefixME_ + "/EETimingTask/EETMT timing " + Numbers::sEE(ism) );
01625       htmt01_[ism-1] = UtilsClient::getHisto( me, cloneME_, htmt01_[ism-1] );
01626 
01627       me = dqmStore_->get( prefixME_ + "/EcalInfo/EEMM DCC" );
01628       norm01_ = UtilsClient::getHisto( me, cloneME_, norm01_ );
01629 
01630       me = dqmStore_->get( prefixME_ + "/EERawDataTask/EERDT L1A FE errors" );
01631       synch01_ = UtilsClient::getHisto( me, cloneME_, synch01_ );
01632 
01633       for ( int ix = 1; ix <= 50; ix++ ) {
01634         for ( int iy = 1; iy <= 50; iy++ ) {
01635 
01636           int jx = ix + Numbers::ix0EE(ism);
01637           int jy = iy + Numbers::iy0EE(ism);
01638 
01639           if ( ism >= 1 && ism <= 9 ) {
01640             if ( ! Numbers::validEE(ism, 101 - jx, jy) ) continue;
01641           } else {
01642             if ( ! Numbers::validEE(ism, jx, jy) ) continue;
01643           }
01644 
01645           if ( eeic ) {
01646 
01647             me = eeic->meg01_[ism-1];
01648 
01649             if ( me ) {
01650 
01651               float xval = me->getBinContent( ix, iy );
01652 
01653               if ( ism >= 1 && ism <= 9 ) {
01654                 meIntegrity_[0]->setBinContent( 101 - jx, jy, xval );
01655               } else {
01656                 meIntegrity_[1]->setBinContent( jx, jy, xval );
01657               }
01658 
01659               if ( xval == 0 ) meIntegrityErr_->Fill( ism );
01660 
01661             }
01662 
01663             h2 = eeic->h_[ism-1];
01664 
01665             if ( h2 ) {
01666 
01667               float xval = h2->GetBinContent( ix, iy );
01668 
01669               if ( ism >= 1 && ism <= 9 ) {
01670                 if ( xval != 0 ) meOccupancy_[0]->setBinContent( 101 - jx, jy, xval );
01671               } else {
01672                 if ( xval != 0 ) meOccupancy_[1]->setBinContent( jx, jy, xval );
01673               }
01674 
01675               meOccupancy1D_->Fill( ism, xval );
01676 
01677             }
01678 
01679           }
01680 
01681           if ( eepoc ) {
01682 
01683             me = eepoc->meg03_[ism-1];
01684 
01685             if ( me ) {
01686 
01687               float xval = me->getBinContent( ix, iy );
01688 
01689               if ( ism >= 1 && ism <= 9 ) {
01690                 mePedestalOnline_[0]->setBinContent( 101 - jx, jy, xval );
01691               } else {
01692                 mePedestalOnline_[1]->setBinContent( jx, jy, xval );
01693               }
01694 
01695               if ( xval == 0 ) mePedestalOnlineErr_->Fill( ism );
01696 
01697             }
01698 
01699             float num01, mean01, rms01;
01700             bool update01 = UtilsClient::getBinStatistics(hpot01_[ism-1], ix, iy, num01, mean01, rms01);
01701 
01702             if ( update01 ) {
01703 
01704               mePedestalOnlineRMS_->Fill( ism, rms01 );
01705               mePedestalOnlineMean_->Fill( ism, mean01 );
01706 
01707               if ( ism >= 1 && ism <= 9 ) {
01708                 mePedestalOnlineRMSMap_[0]->setBinContent( 101 - jx, jy, rms01 );
01709               } else {
01710                 mePedestalOnlineRMSMap_[1]->setBinContent( jx, jy, rms01 );
01711               }
01712 
01713             }
01714 
01715           }
01716 
01717           if ( eelc ) {
01718 
01719             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
01720 
01721               me = eelc->meg01_[ism-1];
01722 
01723               if ( me ) {
01724 
01725                 float xval = me->getBinContent( ix, iy );
01726 
01727                 if ( me->getEntries() != 0 ) {
01728                   if ( ism >= 1 && ism <= 9 ) {
01729                     meLaserL1_[0]->setBinContent( 101 - jx, jy, xval );
01730                   } else {
01731                     meLaserL1_[1]->setBinContent( jx, jy, xval );
01732                   }
01733 
01734                   if ( xval == 0 ) meLaserL1Err_->Fill( ism );
01735                 }
01736 
01737               }
01738 
01739             }
01740 
01741             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
01742 
01743               me = eelc->meg02_[ism-1];
01744 
01745               if ( me ) {
01746 
01747                 float xval = me->getBinContent( ix, iy );
01748 
01749                 if ( me->getEntries() != 0 ) {
01750                   if ( ism >= 1 && ism <= 9 ) {
01751                     meLaserL2_[0]->setBinContent( 101 - jx, jy, xval );
01752                   } else {
01753                     meLaserL2_[1]->setBinContent( jx, jy, xval );
01754                   }
01755 
01756                   if ( xval == 0 ) meLaserL2Err_->Fill( ism );
01757                 }
01758 
01759               }
01760 
01761             }
01762 
01763             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
01764 
01765               me = eelc->meg03_[ism-1];
01766 
01767               if ( me ) {
01768 
01769                 float xval = me->getBinContent( ix, iy );
01770 
01771                 if ( me->getEntries() != 0 ) {
01772                   if ( ism >= 1 && ism <= 9 ) {
01773                     meLaserL3_[0]->setBinContent( 101 - jx, jy, xval );
01774                   } else {
01775                     meLaserL3_[1]->setBinContent( jx, jy, xval );
01776                   }
01777 
01778                   if ( xval == 0 ) meLaserL3Err_->Fill( ism );
01779                 }
01780 
01781               }
01782 
01783             }
01784 
01785             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
01786 
01787               me = eelc->meg04_[ism-1];
01788 
01789               if ( me ) {
01790 
01791                 float xval = me->getBinContent( ix, iy );
01792 
01793                 if ( me->getEntries() != 0 ) {
01794                   if ( ism >= 1 && ism <= 9 ) {
01795                     meLaserL4_[0]->setBinContent( 101 - jx, jy, xval );
01796                   } else {
01797                     meLaserL4_[1]->setBinContent( jx, jy, xval );
01798                   }
01799 
01800                   if ( xval == 0 ) meLaserL4Err_->Fill( ism );
01801                 }
01802 
01803               }
01804 
01805             }
01806 
01807           }
01808 
01809           if ( eeldc ) {
01810 
01811             if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
01812 
01813               me = eeldc->meg01_[ism-1];
01814 
01815               if ( me ) {
01816 
01817                 float xval = me->getBinContent( ix, iy );
01818 
01819                 if ( me->getEntries() != 0 ) {
01820                   if ( ism >= 1 && ism <= 9 ) {
01821                     meLedL1_[0]->setBinContent( 101 - jx, jy, xval );
01822                   } else {
01823                     meLedL1_[1]->setBinContent( jx, jy, xval );
01824                   }
01825 
01826                   if ( xval == 0 ) meLedL1Err_->Fill( ism );
01827                 }
01828 
01829               }
01830 
01831             }
01832 
01833             if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
01834 
01835               me = eeldc->meg02_[ism-1];
01836 
01837               if ( me ) {
01838 
01839                 float xval = me->getBinContent( ix, iy );
01840 
01841                 if ( me->getEntries() != 0 ) {
01842                   if ( ism >= 1 && ism <= 9 ) {
01843                     meLedL2_[0]->setBinContent( 101 - jx, jy, xval );
01844                   } else {
01845                     meLedL2_[1]->setBinContent( jx, jy, xval );
01846                   }
01847 
01848                   if ( xval == 0 ) meLedL2Err_->Fill( ism );
01849                 }
01850 
01851               }
01852 
01853             }
01854 
01855           }
01856 
01857           if ( eepc ) {
01858 
01859             me_01 = eepc->meg01_[ism-1];
01860             me_02 = eepc->meg02_[ism-1];
01861             me_03 = eepc->meg03_[ism-1];
01862 
01863             if ( me_01 ) {
01864               float val_01=me_01->getBinContent(ix,iy);
01865               if ( me_01->getEntries() != 0 ) {
01866                 if ( ism >= 1 && ism <= 9 ) {
01867                   mePedestalG01_[0]->setBinContent( 101 - jx, jy, val_01 );
01868                 } else {
01869                   mePedestalG01_[1]->setBinContent( jx, jy, val_01 );
01870                 }
01871               }
01872             }
01873             if ( me_02 ) {
01874               float val_02=me_02->getBinContent(ix,iy);
01875               if ( me_02->getEntries() != 0 ) {
01876                 if ( ism >= 1 && ism <= 9 ) {
01877                   mePedestalG06_[0]->setBinContent( 101 - jx, jy, val_02 );
01878                 } else {
01879                   mePedestalG06_[1]->setBinContent( jx, jy, val_02 );
01880                 }
01881               }
01882             }
01883             if ( me_03 ) {
01884               float val_03=me_03->getBinContent(ix,iy);
01885               if ( me_03->getEntries() != 0 ) {
01886                 if ( ism >= 1 && ism <= 9 ) {
01887                   mePedestalG12_[0]->setBinContent( 101 - jx, jy, val_03 );
01888                 } else {
01889                   mePedestalG12_[1]->setBinContent( jx, jy, val_03 );
01890                 }
01891               }
01892             }
01893 
01894           }
01895 
01896           if ( eetpc ) {
01897 
01898             me_01 = eetpc->meg01_[ism-1];
01899             me_02 = eetpc->meg02_[ism-1];
01900             me_03 = eetpc->meg03_[ism-1];
01901 
01902             if ( me_01 ) {
01903               float val_01=me_01->getBinContent(ix,iy);
01904               if ( me_01->getEntries() != 0 ) {
01905                 if ( ism >= 1 && ism <= 9 ) {
01906                   meTestPulseG01_[0]->setBinContent( 101 - jx, jy, val_01 );
01907                 } else {
01908                   meTestPulseG01_[1]->setBinContent( jx, jy, val_01 );
01909                 }
01910               }
01911             }
01912             if ( me_02 ) {
01913               float val_02=me_02->getBinContent(ix,iy);
01914               if ( me_02->getEntries() != 0 ) {
01915                 if ( ism >= 1 && ism <= 9 ) {
01916                   meTestPulseG06_[0]->setBinContent( 101 - jx, jy, val_02 );
01917                 } else {
01918                   meTestPulseG06_[1]->setBinContent( jx, jy, val_02 );
01919                 }
01920               }
01921             }
01922             if ( me_03 ) {
01923               float val_03=me_03->getBinContent(ix,iy);
01924               if ( me_03->getEntries() != 0 ) {
01925                 if ( ism >= 1 && ism <= 9 ) {
01926                   meTestPulseG12_[0]->setBinContent( 101 - jx, jy, val_03 );
01927                 } else {
01928                   meTestPulseG12_[1]->setBinContent( jx, jy, val_03 );
01929                 }
01930               }
01931             }
01932 
01933           }
01934 
01935           if ( hot01_[ism-1] ) {
01936 
01937             float xval = hot01_[ism-1]->GetBinContent( ix, iy );
01938 
01939             if ( ism >= 1 && ism <= 9 ) {
01940               meRecHitEnergy_[0]->setBinContent( 101 - jx, jy, xval );
01941             } else {
01942               meRecHitEnergy_[1]->setBinContent( jx, jy, xval );
01943             }
01944 
01945           }
01946 
01947         }
01948       }
01949 
01950       for ( int ix = 1; ix <= 50; ix++ ) {
01951         for ( int iy = 1; iy <= 50; iy++ ) {
01952 
01953           int jx = ix + Numbers::ix0EE(ism);
01954           int jy = iy + Numbers::iy0EE(ism);
01955 
01956           if ( ism >= 1 && ism <= 9 ) {
01957             if ( ! Numbers::validEE(ism, 101 - jx, jy) ) continue;
01958           } else {
01959             if ( ! Numbers::validEE(ism, jx, jy) ) continue;
01960           }
01961 
01962           if ( eesfc ) {
01963 
01964             me = dqmStore_->get(prefixME_ + "/EcalInfo/EEMM DCC");
01965 
01966             float xval = 6;
01967 
01968             if ( me ) {
01969 
01970               xval = 2;
01971               if ( me->getBinContent( ism ) > 0 ) xval = 1;
01972 
01973             }
01974 
01975             me = eesfc->meh01_[ism-1];
01976 
01977             if ( me ) {
01978 
01979               if ( me->getBinContent( ix, iy ) > 0 ) xval = 0;
01980 
01981               if ( ism >= 1 && ism <= 9 ) {
01982 
01983                 meStatusFlags_[0]->setBinContent( 101 - jx, jy, xval );
01984 
01985                 if ( me->getBinError( ix, iy ) > 0 && me->getBinError( ix, iy ) < 0.1 ) {
01986                   UtilsClient::maskBinContent( meStatusFlags_[0], 101 - jx, jy );
01987                 }
01988               } else {
01989 
01990                 meStatusFlags_[1]->setBinContent( jx, jy, xval );
01991 
01992                 if ( me->getBinError( ix, iy ) > 0 && me->getBinError( ix, iy ) < 0.1 ) {
01993                   UtilsClient::maskBinContent( meStatusFlags_[1], jx, jy );
01994                 }
01995               }
01996 
01997               if ( xval == 0 ) meStatusFlagsErr_->Fill( ism );
01998 
01999             }
02000 
02001           }
02002 
02003         }
02004       }
02005 
02006       for ( int ix = 1; ix <= 50; ix++ ) {
02007         for ( int iy = 1; iy <= 50; iy++ ) {
02008 
02009           int jx = ix + Numbers::ix0EE(ism);
02010           int jy = iy + Numbers::iy0EE(ism);
02011 
02012           if ( eetttc ) {
02013 
02014             float mean01 = 0;
02015             bool hadNonZeroInterest = false;
02016 
02017             if ( httt01_[ism-1] ) {
02018 
02019               mean01 = httt01_[ism-1]->GetBinContent( ix, iy );
02020 
02021               if ( mean01 != 0. ) {
02022                 if ( ism >= 1 && ism <= 9 ) {
02023                   if ( meTriggerTowerEt_[0] ) meTriggerTowerEt_[0]->setBinContent( 101 - jx, jy, mean01 );
02024                 } else {
02025                   if ( meTriggerTowerEt_[1] ) meTriggerTowerEt_[1]->setBinContent( jx, jy, mean01 );
02026                 }
02027               }
02028 
02029             }
02030 
02031             me = eetttc->me_o01_[ism-1];
02032 
02033             if ( me ) {
02034 
02035               float xval = me->getBinContent( ix, iy );
02036 
02037               if ( xval != 0. ) {
02038                 if ( ism >= 1 && ism <= 9 ) {
02039                   meTriggerTowerTiming_[0]->setBinContent( 101 - jx, jy, xval );
02040                 } else {
02041                   meTriggerTowerTiming_[1]->setBinContent( jx, jy, xval );
02042                 }
02043                 hadNonZeroInterest = true;
02044               }
02045 
02046             }
02047 
02048             me = eetttc->me_o02_[ism-1];
02049 
02050             if ( me ) {
02051 
02052               float xval = me->getBinContent( ix, iy );
02053 
02054               if ( xval != 0. ) {
02055                 if ( ism >= 1 && ism <= 9 ) {
02056                   meTriggerTowerNonSingleTiming_[0]->setBinContent( 101 - jx, jy, xval );
02057                 } else {
02058                   meTriggerTowerNonSingleTiming_[1]->setBinContent( jx, jy, xval );
02059                 }
02060               }
02061 
02062             }
02063 
02064             float xval = 2;
02065             if( mean01 > 0. ) {
02066 
02067               h2 = eetttc->l01_[ism-1];
02068               h3 = eetttc->l02_[ism-1];
02069 
02070               if ( h2 && h3 ) {
02071 
02072                 // float emulErrorVal = h2->GetBinContent( ix, iy ) + h3->GetBinContent( ix, iy );
02073                 float emulErrorVal = h2->GetBinContent( ix, iy );
02074 
02075                 if( emulErrorVal!=0 && hadNonZeroInterest ) xval = 0;
02076 
02077               }
02078 
02079               if ( xval!=0 && hadNonZeroInterest ) xval = 1;
02080 
02081             }
02082 
02083             // see fix below
02084             if ( xval == 2 ) continue;
02085 
02086             if ( ism >= 1 && ism <= 9 ) {
02087               meTriggerTowerEmulError_[0]->setBinContent( 101 - jx, jy, xval );
02088             } else {
02089               meTriggerTowerEmulError_[1]->setBinContent( jx, jy, xval );
02090             }
02091 
02092           }
02093 
02094           if ( eetmc ) {
02095 
02096             float num01, mean01, rms01;
02097             bool update01 = UtilsClient::getBinStatistics(htmt01_[ism-1], ix, iy, num01, mean01, rms01, 1.);
02098             mean01 -= 50.;
02099 
02100             if( update01 ){
02101 
02102               if ( ism >= 1 && ism <= 9 ) {
02103                 meTimingMean1D_[0]->Fill(mean01);
02104                 meTimingRMS1D_[0]->Fill(rms01);
02105               } else {
02106                 meTimingMean1D_[1]->Fill(mean01);
02107                 meTimingRMS1D_[1]->Fill(rms01);
02108               }
02109 
02110               meTimingMean_->Fill( ism, mean01 );
02111 
02112               meTimingRMS_->Fill( ism, rms01 );
02113 
02114             }
02115 
02116           }
02117 
02118         }
02119       }
02120 
02121       for ( int ix = 1; ix <= 10; ix++ ) {
02122         for( int iy = 1; iy <= 10; iy++ ) {
02123 
02124           int jx = ix + Numbers::ix0EE(ism) / 5;
02125           int jy = iy + Numbers::iy0EE(ism) / 5;
02126 
02127           if( jx <= 0 || jx >= 21 || jy <= 0 || jy >= 21 ) continue;
02128 
02129           if ( ism >= 1 && ism <= 9 ) {
02130             if ( ! Numbers::validEESc(ism, 21 - jx, jy) ) continue;
02131           } else {
02132             if ( ! Numbers::validEESc(ism, jx, jy) ) continue;
02133           }
02134 
02135           if ( eetmc ) {
02136 
02137             if ( htmt01_[ism-1] ) {
02138 
02139               int ixedge = (ix-1) * 5;
02140               int iyedge = (iy-1) * 5;
02141               int jxedge = (jx-1) * 5;
02142               int jyedge = (jy-1) * 5;
02143 
02144               float nvalid = 0.;
02145               float ent, cont, err;
02146               float num, sum, sumw2;
02147               num = sum = sumw2 = 0.;
02148               bool mask = false;
02149               for(int cx=1; cx<=5; cx++){
02150                 for(int cy=1; cy<=5; cy++){
02151                   int scjx = jxedge + cx;
02152                   int scjy = jyedge + cy;
02153                   int scix = ixedge + cx;
02154                   int sciy = iyedge + cy;
02155 
02156                   if ( ism >= 1 && ism <= 9 ) {
02157                     if ( ! Numbers::validEE(ism, 101 - scjx, scjy) ) continue;
02158                   } else {
02159                     if ( ! Numbers::validEE(ism, scjx, scjy) ) continue;
02160                   }
02161                   nvalid += 1.;
02162 
02163                   int bin = htmt01_[ism-1]->GetBin(scix, sciy);
02164 
02165                   // htmt01_ are booked with option "s" -> error = RMS not RMS/sqrt(N)
02166                   ent = htmt01_[ism-1]->GetBinEntries( bin );
02167                   cont = htmt01_[ism-1]->GetBinContent( bin ) - 50.;
02168                   err = htmt01_[ism-1]->GetBinError( bin );
02169 
02170                   num += ent;
02171                   sum += cont * ent;
02172                   sumw2 += (err * err + cont * cont) * ent;
02173 
02174                   if( ent > 1 && (std::abs(cont) > 3. || err > 4.) && Masks::maskChannel(ism, scix, sciy, chWarnBit, EcalEndcap) ) mask = true;
02175                 }
02176               }
02177 
02178               float xval = 2.;
02179               if( num > (10. * nvalid / 25.) ){
02180 
02181                 float mean = sum / num;
02182                 float rms = std::sqrt( sumw2 / num - mean * mean );
02183 
02184                 if( std::abs(mean) > 3. || rms > 4. ) xval = 0.;
02185                 else xval = 1.;
02186 
02187               }
02188 
02189               int ind;
02190               if ( ism >= 1 && ism <= 9 ){
02191                 jx = 21 - jx;
02192                 ind = 0;
02193               }else{
02194                 ind = 1;
02195               }
02196 
02197               meTiming_[ind]->setBinContent( jx, jy, xval );
02198               if ( mask ) UtilsClient::maskBinContent( meTiming_[ind], jx, jy );
02199 
02200             }
02201 
02202           }
02203 
02204         }
02205       }
02206       // PN's summaries
02207       for( int i = 1; i <= 10; i++ ) {
02208         for( int j = 1; j <= 5; j++ ) {
02209 
02210           int ichanx;
02211           int ipseudostripx;
02212 
02213           if(ism<=9) {
02214             ichanx = i;
02215             ipseudostripx = (ism<=3) ? j+5*(ism-1+6) : j+5*(ism-1-3);
02216           } else {
02217             ichanx = i+10;
02218             ipseudostripx = (ism<=12) ? j+5*(ism-10+6) : j+5*(ism-10-3);
02219           }
02220 
02221           if ( eeic ) {
02222 
02223             me_04 = eeic->meg02_[ism-1];
02224             h2 = eeic->hmem_[ism-1];
02225 
02226 
02227             if( me_04 ) {
02228 
02229               float xval = me_04->getBinContent(i,j);
02230               meIntegrityPN_->setBinContent( ipseudostripx, ichanx, xval );
02231 
02232             }
02233 
02234             if ( h2 ) {
02235 
02236               float xval = h2->GetBinContent(i,1);
02237               meOccupancyPN_->setBinContent( ipseudostripx, ichanx, xval );
02238 
02239             }
02240 
02241           }
02242 
02243           if ( eepc ) {
02244 
02245             me_04 = eepc->meg04_[ism-1];
02246             me_05 = eepc->meg05_[ism-1];
02247 
02248             if( me_04 ) {
02249               float val_04=me_04->getBinContent(i,1);
02250               mePedestalPNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
02251             }
02252             if( me_05 ) {
02253               float val_05=me_05->getBinContent(i,1);
02254               mePedestalPNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
02255             }
02256 
02257           }
02258 
02259           if ( eetpc ) {
02260 
02261             me_04 = eetpc->meg04_[ism-1];
02262             me_05 = eetpc->meg05_[ism-1];
02263 
02264             if( me_04 ) {
02265               float val_04=me_04->getBinContent(i,1);
02266               meTestPulsePNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
02267             }
02268             if( me_05 ) {
02269               float val_05=me_05->getBinContent(i,1);
02270               meTestPulsePNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
02271             }
02272 
02273           }
02274 
02275           if ( eelc ) {
02276 
02277             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
02278 
02279               me = eelc->meg09_[ism-1];
02280 
02281               if( me ) {
02282 
02283                 float xval = me->getBinContent(i,1);
02284 
02285                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
02286                   meLaserL1PN_->setBinContent( ipseudostripx, ichanx, xval );
02287                   if ( xval == 0 ) meLaserL1PNErr_->Fill( ism );
02288                 }
02289 
02290               }
02291 
02292             }
02293 
02294             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
02295 
02296               me = eelc->meg10_[ism-1];
02297 
02298               if( me ) {
02299 
02300                 float xval = me->getBinContent(i,1);
02301 
02302                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
02303                   meLaserL2PN_->setBinContent( ipseudostripx, ichanx, xval );
02304                   if ( xval == 0 ) meLaserL2PNErr_->Fill( ism );
02305                 }
02306 
02307               }
02308 
02309             }
02310 
02311             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
02312 
02313               me = eelc->meg11_[ism-1];
02314 
02315               if( me ) {
02316 
02317                 float xval = me->getBinContent(i,1);
02318 
02319                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
02320                   meLaserL3PN_->setBinContent( ipseudostripx, ichanx, xval );
02321                   if ( xval == 0 ) meLaserL3PNErr_->Fill( ism );
02322                 }
02323 
02324               }
02325 
02326             }
02327 
02328             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
02329 
02330               me = eelc->meg12_[ism-1];
02331 
02332               if( me ) {
02333 
02334                 float xval = me->getBinContent(i,1);
02335 
02336                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
02337                   meLaserL4PN_->setBinContent( ipseudostripx, ichanx, xval );
02338                   if ( xval == 0 ) meLaserL4PNErr_->Fill( ism );
02339                 }
02340 
02341               }
02342 
02343             }
02344 
02345           }
02346 
02347           if ( eeldc ) {
02348 
02349             if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
02350 
02351               me = eeldc->meg09_[ism-1];
02352 
02353               if( me ) {
02354 
02355                 float xval = me->getBinContent(i,1);
02356 
02357                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
02358                   meLedL1PN_->setBinContent( ipseudostripx, ichanx, xval );
02359                   if ( xval == 0 ) meLedL1PNErr_->Fill( ism );
02360                 }
02361 
02362               }
02363 
02364             }
02365 
02366             if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
02367 
02368               me = eeldc->meg10_[ism-1];
02369 
02370               if( me ) {
02371 
02372                 float xval = me->getBinContent(i,1);
02373 
02374                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
02375                   meLedL2PN_->setBinContent( ipseudostripx, ichanx, xval );
02376                   if ( xval == 0 ) meLedL2PNErr_->Fill( ism );
02377                 }
02378 
02379               }
02380 
02381             }
02382 
02383           }
02384 
02385         }
02386       }
02387 
02388       for ( int ix=1; ix<=50; ix++ ) {
02389         for (int iy=1; iy<=50; iy++ ) {
02390 
02391           int jx = ix + Numbers::ix0EE(ism);
02392           int jy = iy + Numbers::iy0EE(ism);
02393 
02394           int ic = -1;
02395           if ( ism >= 1 && ism <= 9 ) {
02396             ic = Numbers::icEE(ism, 101 - jx, jy);
02397           } else {
02398             ic = Numbers::icEE(ism, jx, jy);
02399           }
02400 
02401           if( ic != -1 ) {
02402 
02403             if ( eelc ) {
02404 
02405               if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
02406 
02407                 MonitorElement *meg = eelc->meg01_[ism-1];
02408 
02409                 float xval = 2;
02410                 if ( meg ) xval = meg->getBinContent( ix, iy );
02411 
02412                 // exclude channels without laser data (yellow in the quality map)
02413                 if( xval != 2 && xval != 5 ) {
02414 
02415                   MonitorElement* mea01 = eelc->mea01_[ism-1];
02416                   MonitorElement* met01 = eelc->met01_[ism-1];
02417                   MonitorElement* meaopn01 = eelc->meaopn01_[ism-1];
02418 
02419                   if( mea01 && met01 && meaopn01 ) {
02420                     meLaserL1Ampl_->Fill( ism, mea01->getBinContent( ic ) );
02421                     if( met01->getBinContent( ic ) > 0. ) meLaserL1Timing_->Fill( ism, met01->getBinContent( ic ) );
02422                     meLaserL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( ic ) );
02423                   }
02424 
02425                 }
02426 
02427               }
02428 
02429               if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
02430 
02431                 MonitorElement *meg = eelc->meg02_[ism-1];
02432 
02433                 float xval = 2;
02434                 if ( meg ) xval = meg->getBinContent( ix, iy );
02435 
02436                 // exclude channels without laser data (yellow in the quality map)
02437                 if( xval != 2 && xval != 5 ) {
02438 
02439                   MonitorElement* mea02 = eelc->mea02_[ism-1];
02440                   MonitorElement* met02 = eelc->met02_[ism-1];
02441                   MonitorElement* meaopn02 = eelc->meaopn02_[ism-1];
02442 
02443                   if( mea02 && met02 && meaopn02 ) {
02444                     meLaserL2Ampl_->Fill( ism, mea02->getBinContent( ic ) );
02445                     if( met02->getBinContent( ic ) > 0. ) meLaserL2Timing_->Fill( ism, met02->getBinContent( ic ) );
02446                     meLaserL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( ic ) );
02447                   }
02448 
02449                 }
02450 
02451               }
02452 
02453               if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
02454 
02455                 MonitorElement *meg = eelc->meg03_[ism-1];
02456 
02457                 float xval = 2;
02458                 if ( meg ) xval = meg->getBinContent( ix, iy );
02459 
02460                 // exclude channels without laser data (yellow in the quality map)
02461                 if( xval != 2 && xval != 5 ) {
02462 
02463                   MonitorElement* mea03 = eelc->mea03_[ism-1];
02464                   MonitorElement* met03 = eelc->met03_[ism-1];
02465                   MonitorElement* meaopn03 = eelc->meaopn03_[ism-1];
02466 
02467                   if( mea03 && met03 && meaopn03 ) {
02468                     meLaserL3Ampl_->Fill( ism, mea03->getBinContent( ic ) );
02469                     if( met03->getBinContent( ic ) > 0. ) meLaserL3Timing_->Fill( ism, met03->getBinContent( ic ) );
02470                     meLaserL3AmplOverPN_->Fill( ism, meaopn03->getBinContent( ic ) );
02471                   }
02472 
02473                 }
02474 
02475               }
02476 
02477               if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
02478 
02479                 MonitorElement *meg = eelc->meg04_[ism-1];
02480 
02481                 float xval = 2;
02482                 if ( meg ) xval = meg->getBinContent( ix, iy );
02483 
02484                 // exclude channels without laser data (yellow in the quality map)
02485                 if( xval != 2 && xval != 5 ) {
02486 
02487                   MonitorElement* mea04 = eelc->mea04_[ism-1];
02488                   MonitorElement* met04 = eelc->met04_[ism-1];
02489                   MonitorElement* meaopn04 = eelc->meaopn04_[ism-1];
02490 
02491                   if( mea04 && met04 && meaopn04 ) {
02492                     meLaserL4Ampl_->Fill( ism, mea04->getBinContent( ic ) );
02493                     if( met04->getBinContent( ic ) > 0. ) meLaserL4Timing_->Fill( ism, met04->getBinContent( ic ) );
02494                     meLaserL4AmplOverPN_->Fill( ism, meaopn04->getBinContent( ic ) );
02495                   }
02496 
02497                 }
02498 
02499               }
02500 
02501             }
02502 
02503             if ( eeldc ) {
02504 
02505               if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
02506 
02507                 MonitorElement *meg = eeldc->meg01_[ism-1];
02508 
02509                 float xval = 2;
02510                 if ( meg )  xval = meg->getBinContent( ix, iy );
02511 
02512                 // exclude channels without led data (yellow in the quality map)
02513                 if( xval != 2 && xval != 5 ) {
02514 
02515                   MonitorElement* mea01 = eeldc->mea01_[ism-1];
02516                   MonitorElement* met01 = eeldc->met01_[ism-1];
02517                   MonitorElement* meaopn01 = eeldc->meaopn01_[ism-1];
02518 
02519                   if( mea01 && met01 && meaopn01 ) {
02520                     meLedL1Ampl_->Fill( ism, mea01->getBinContent( ic ) );
02521                     if( met01->getBinContent( ic ) > 0. ) meLedL1Timing_->Fill( ism, met01->getBinContent( ic ) );
02522                     meLedL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( ic ) );
02523                   }
02524 
02525                 }
02526 
02527               }
02528 
02529               if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
02530 
02531                 MonitorElement *meg = eeldc->meg02_[ism-1];
02532 
02533                 float xval = 2;
02534                 if ( meg )  xval = meg->getBinContent( ix, iy );
02535 
02536                 // exclude channels without led data (yellow in the quality map)
02537                 if( xval != 2 && xval != 5 ) {
02538 
02539                   MonitorElement* mea02 = eeldc->mea02_[ism-1];
02540                   MonitorElement* met02 = eeldc->met02_[ism-1];
02541                   MonitorElement* meaopn02 = eeldc->meaopn02_[ism-1];
02542 
02543                   if( mea02 && met02 && meaopn02 ) {
02544                     meLedL2Ampl_->Fill( ism, mea02->getBinContent( ic ) );
02545                     if( met02->getBinContent( ic ) > 0. ) meLedL2Timing_->Fill( ism, met02->getBinContent( ic ) );
02546                     meLedL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( ic ) );
02547                   }
02548 
02549                 }
02550 
02551               }
02552 
02553             }
02554 
02555             if ( eetpc ) {
02556 
02557               MonitorElement *meg01 = eetpc->meg01_[ism-1];
02558               MonitorElement *meg02 = eetpc->meg02_[ism-1];
02559               MonitorElement *meg03 = eetpc->meg03_[ism-1];
02560 
02561               if ( meg01 ) {
02562 
02563                 float xval01 = meg01->getBinContent( ix, iy );
02564 
02565                 if ( xval01 != 2 && xval01 != 5 ) {
02566 
02567                   me = eetpc->mea01_[ism-1];
02568 
02569                   if ( me ) {
02570 
02571                     meTestPulseAmplG01_->Fill( ism, me->getBinContent( ic ) );
02572 
02573                   }
02574 
02575                 }
02576 
02577               }
02578 
02579               if ( meg02 ) {
02580 
02581                 float xval02 = meg02->getBinContent( ix, iy );
02582 
02583                 if ( xval02 != 2 && xval02 != 5 ) {
02584 
02585                   me = eetpc->mea02_[ism-1];
02586 
02587                   if ( me ) {
02588 
02589                     meTestPulseAmplG06_->Fill( ism, me->getBinContent( ic ) );
02590 
02591                   }
02592 
02593                 }
02594 
02595               }
02596 
02597               if ( meg03 ) {
02598 
02599                 float xval03 = meg03->getBinContent( ix, iy );
02600 
02601                 if ( xval03 != 2 && xval03 != 5 ) {
02602 
02603                   me = eetpc->mea03_[ism-1];
02604 
02605                   if ( me ) {
02606 
02607                     meTestPulseAmplG12_->Fill( ism, me->getBinContent( ic ) );
02608 
02609                   }
02610 
02611                 }
02612 
02613               }
02614 
02615             } //etpc
02616 
02617           }
02618 
02619         } // loop on jy
02620       } // loop on jx
02621 
02622     } // loop on SM
02623 
02624     // fix TPG quality plots
02625 
02626     for ( unsigned int i=0; i<superModules_.size(); i++ ) {
02627 
02628       int ism = superModules_[i];
02629 
02630       for ( int ix = 1; ix <= 50; ix++ ) {
02631         for ( int iy = 1; iy <= 50; iy++ ) {
02632 
02633           int jx = ix + Numbers::ix0EE(ism);
02634           int jy = iy + Numbers::iy0EE(ism);
02635 
02636           if ( eetttc ) {
02637 
02638             if ( ism >= 1 && ism <= 9 ) {
02639               if ( meTriggerTowerEmulError_[0]->getBinContent( 101 - jx, jy ) == 6 ) {
02640                 if ( Numbers::validEE(ism, 101 - jx, jy) ) meTriggerTowerEmulError_[0]->setBinContent( 101 - jx, jy, 2 );
02641               }
02642             } else {
02643               if ( meTriggerTowerEmulError_[1]->getBinContent( jx, jy ) == 6 ) {
02644                 if ( Numbers::validEE(ism, jx, jy) ) meTriggerTowerEmulError_[1]->setBinContent( jx, jy, 2 );
02645               }
02646             }
02647 
02648           }
02649 
02650         }
02651       }
02652 
02653     }
02654 
02655   } // loop on clients
02656 
02657   // The global-summary
02658   int nGlobalErrors = 0;
02659   int nGlobalErrorsEE[18];
02660   int nValidChannels = 0;
02661   int nValidChannelsEE[18];
02662 
02663   for (int i = 0; i < 18; i++) {
02664     nGlobalErrorsEE[i] = 0;
02665     nValidChannelsEE[i] = 0;
02666   }
02667 
02668   for ( int jx = 1; jx <= 100; jx++ ) {
02669     for ( int jy = 1; jy <= 100; jy++ ) {
02670 
02671       if(meIntegrity_[0] && mePedestalOnline_[0] && meTiming_[0] && meStatusFlags_[0] && meTriggerTowerEmulError_[0]) {
02672 
02673         float xval = 6;
02674         float val_in = meIntegrity_[0]->getBinContent(jx,jy);
02675         float val_po = mePedestalOnline_[0]->getBinContent(jx,jy);
02676         float val_tm = meTiming_[0]->getBinContent((jx-1)/5+1,(jy-1)/5+1);
02677         float val_sf = meStatusFlags_[0]->getBinContent(jx,jy);
02678         // float val_ee = meTriggerTowerEmulError_[0]->getBinContent(jx,jy); // removed temporarily from the global summary
02679         float val_ee = 1;
02680 
02681         // combine all the available wavelenghts in unique laser status
02682         // for each laser turn dark color and yellow into bright green
02683         float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
02684         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
02685           if ( meLaserL1_[0] ) val_ls_1 = meLaserL1_[0]->getBinContent(jx,jy);
02686           if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
02687         }
02688         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
02689           if ( meLaserL2_[0] ) val_ls_2 = meLaserL2_[0]->getBinContent(jx,jy);
02690           if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
02691         }
02692         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
02693           if ( meLaserL3_[0] ) val_ls_3 = meLaserL3_[0]->getBinContent(jx,jy);
02694           if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
02695         }
02696         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
02697           if ( meLaserL4_[0] ) val_ls_4 = meLaserL4_[0]->getBinContent(jx,jy);
02698           if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
02699         }
02700 
02701         float val_ls = 1;
02702         if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
02703 
02704         // combine all the available wavelenghts in unique led status
02705         // for each laser turn dark color and yellow into bright green
02706         float val_ld_1=2, val_ld_2=2;
02707         if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
02708           if ( meLedL1_[0] ) val_ld_1 = meLedL1_[0]->getBinContent(jx,jy);
02709           if(val_ld_1==2 || val_ld_1==3 || val_ld_1==4 || val_ld_1==5) val_ld_1=1;
02710         }
02711         if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
02712           if ( meLedL2_[0] ) val_ld_2 = meLedL2_[0]->getBinContent(jx,jy);
02713           if(val_ld_2==2 || val_ld_2==3 || val_ld_2==4 || val_ld_2==5) val_ld_2=1;
02714         }
02715 
02716         float val_ld = 1;
02717         if (val_ld_1 == 0 || val_ld_2==0) val_ld=0;
02718 
02719         // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY UNTIL LHC COLLISIONS
02720         val_ls = 1;
02721         val_ld = 1;
02722 
02723         // turn each dark color (masked channel) to bright green
02724         // for laser & timing & trigger turn also yellow into bright green
02725         // for pedestal online too because is not computed in calibration events
02726 
02727         //  0/3 = red/dark red
02728         //  1/4 = green/dark green
02729         //  2/5 = yellow/dark yellow
02730         //  6   = unknown
02731 
02732         if(             val_in==3 || val_in==4 || val_in==5) val_in=1;
02733         if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
02734         if(val_ls==2 || val_ls==3 || val_ls==4 || val_ls==5) val_ls=1;
02735         if(val_ld==2 || val_ld==3 || val_ld==4 || val_ld==5) val_ld=1;
02736         if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
02737         if(             val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
02738         if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
02739 
02740         if(val_in==6) xval=6;
02741         else if(val_in==0) xval=0;
02742         else if(val_po==0 || val_ls==0 || val_ld==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
02743         else if(val_po==2 || val_ls==2 || val_ld==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
02744         else xval=1;
02745 
02746         bool validCry = false;
02747 
02748         // if the SM is entirely not read, the masked channels
02749         // are reverted back to yellow
02750         float iEntries=0;
02751 
02752         for(int ism = 1; ism <= 9; ism++) {
02753           std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
02754           if (iter != superModules_.end()) {
02755             if ( Numbers::validEE(ism, jx, jy) ) {
02756               validCry = true;
02757 
02758               // recycle the validEE for the synch check of the DCC
02759               if(norm01_ && synch01_) {
02760                 float frac_synch_errors = 0.;
02761                 float norm = norm01_->GetBinContent(ism);
02762                 if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
02763                 float val_sy = (frac_synch_errors <= synchErrorThreshold_);
02764                 if(val_sy==0) xval=0;
02765               }
02766 
02767               for ( unsigned int i=0; i<clients_.size(); i++ ) {
02768                 EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
02769                 if ( eeic ) {
02770                   TH2F* h2 = eeic->h_[ism-1];
02771                   if ( h2 ) {
02772                     iEntries = h2->GetEntries();
02773                   }
02774                 }
02775               }
02776             }
02777           }
02778         }
02779 
02780         if ( validCry && iEntries==0 ) {
02781           xval=2;
02782         }
02783 
02784         meGlobalSummary_[0]->setBinContent( jx, jy, xval );
02785 
02786         if ( xval >= 0 && xval <= 5 ) {
02787           if ( xval != 2 && xval != 5 ) ++nValidChannels;
02788           for (int i = 1; i <= 9; i++) {
02789             if ( xval != 2 && xval != 5 ) {
02790               if ( Numbers::validEE(i, jx, jy) ) ++nValidChannelsEE[i-1];
02791             }
02792           }
02793           if ( xval == 0 ) ++nGlobalErrors;
02794           for (int i = 1; i <= 9; i++) {
02795             if ( xval == 0 ) {
02796               if ( Numbers::validEE(i, jx, jy) ) ++nGlobalErrorsEE[i-1];
02797             }
02798           }
02799         }
02800 
02801       }
02802 
02803       if(meIntegrity_[1] && mePedestalOnline_[1] && meTiming_[1] && meStatusFlags_[1] && meTriggerTowerEmulError_[1]) {
02804 
02805         float xval = 6;
02806         float val_in = meIntegrity_[1]->getBinContent(jx,jy);
02807         float val_po = mePedestalOnline_[1]->getBinContent(jx,jy);
02808         float val_tm = meTiming_[1]->getBinContent((jx-1)/5+1,(jy-1)/5+1);
02809         float val_sf = meStatusFlags_[1]->getBinContent(jx,jy);
02810         // float val_ee = meTriggerTowerEmulError_[1]->getBinContent(jx,jy); // removed temporarily from the global summary
02811         float val_ee = 1;
02812 
02813         // combine all the available wavelenghts in unique laser status
02814         // for each laser turn dark color and yellow into bright green
02815         float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
02816         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
02817           if ( meLaserL1_[1] ) val_ls_1 = meLaserL1_[1]->getBinContent(jx,jy);
02818           if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
02819         }
02820         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
02821           if ( meLaserL2_[1] ) val_ls_2 = meLaserL2_[1]->getBinContent(jx,jy);
02822           if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
02823         }
02824         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
02825           if ( meLaserL3_[1] ) val_ls_3 = meLaserL3_[1]->getBinContent(jx,jy);
02826           if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
02827         }
02828         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
02829           if ( meLaserL4_[1] ) val_ls_4 = meLaserL4_[1]->getBinContent(jx,jy);
02830           if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
02831         }
02832 
02833         float val_ls = 1;
02834         if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
02835 
02836         // combine all the available wavelenghts in unique laser status
02837         // for each laser turn dark color and yellow into bright green
02838         float val_ld_1=2, val_ld_2=2;
02839         if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 1) != ledWavelengths_.end() ) {
02840           if ( meLedL1_[1] ) val_ld_1 = meLedL1_[1]->getBinContent(jx,jy);
02841           if(val_ld_1==2 || val_ld_1==3 || val_ld_1==4 || val_ld_1==5) val_ld_1=1;
02842         }
02843         if ( find(ledWavelengths_.begin(), ledWavelengths_.end(), 2) != ledWavelengths_.end() ) {
02844           if ( meLedL2_[1] ) val_ld_2 = meLedL2_[1]->getBinContent(jx,jy);
02845           if(val_ld_2==2 || val_ld_2==3 || val_ld_2==4 || val_ld_2==5) val_ld_2=1;
02846         }
02847 
02848         float val_ld = 1;
02849         if (val_ld_1 == 0 || val_ld_2==0) val_ld=0;
02850 
02851         // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY UNTIL LHC COLLISIONS
02852         val_ls = 1;
02853         val_ld = 1;
02854 
02855         // turn each dark color to bright green
02856         // for laser & timing & trigger turn also yellow into bright green
02857         // for pedestal online too because is not computed in calibration events
02858 
02859         //  0/3 = red/dark red
02860         //  1/4 = green/dark green
02861         //  2/5 = yellow/dark yellow
02862         //  6   = unknown
02863 
02864         if(             val_in==3 || val_in==4 || val_in==5) val_in=1;
02865         if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
02866         if(val_ls==2 || val_ls==3 || val_ls==4 || val_ls==5) val_ls=1;
02867         if(val_ld==2 || val_ld==3 || val_ld==4 || val_ld==5) val_ld=1;
02868         if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
02869         if(             val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
02870         if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
02871 
02872         if(val_in==6) xval=6;
02873         else if(val_in==0) xval=0;
02874         else if(val_po==0 || val_ls==0 || val_ld==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
02875         else if(val_po==2 || val_ls==2 || val_ld==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
02876         else xval=1;
02877 
02878         bool validCry = false;
02879 
02880         // if the SM is entirely not read, the masked channels
02881         // are reverted back in yellow
02882         float iEntries=0;
02883 
02884         for(int ism = 10; ism <= 18; ism++) {
02885           std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
02886           if (iter != superModules_.end()) {
02887             if ( Numbers::validEE(ism, jx, jy) ) {
02888               validCry = true;
02889 
02890               // recycle the validEE for the synch check of the DCC
02891               if(norm01_ && synch01_) {
02892                 float frac_synch_errors = 0.;
02893                 float norm = norm01_->GetBinContent(ism);
02894                 if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
02895                 float val_sy = (frac_synch_errors <= synchErrorThreshold_);
02896                 if(val_sy==0) xval=0;
02897               }
02898 
02899               for ( unsigned int i=0; i<clients_.size(); i++ ) {
02900                 EEIntegrityClient* eeic = dynamic_cast<EEIntegrityClient*>(clients_[i]);
02901                 if ( eeic ) {
02902                   TH2F* h2 = eeic->h_[ism-1];
02903                   if ( h2 ) {
02904                     iEntries = h2->GetEntries();
02905                   }
02906                 }
02907               }
02908             }
02909           }
02910         }
02911 
02912         if ( validCry && iEntries==0 ) {
02913           xval=2;
02914         }
02915 
02916         meGlobalSummary_[1]->setBinContent( jx, jy, xval );
02917 
02918         if ( xval >= 0 && xval <= 5 ) {
02919           if ( xval != 2 && xval != 5 ) ++nValidChannels;
02920           for (int i = 10; i <= 18; i++) {
02921             if ( xval != 2 && xval != 5 ) {
02922               if ( Numbers::validEE(i, jx, jy) ) ++nValidChannelsEE[i-1];
02923             }
02924           }
02925           if ( xval == 0 ) ++nGlobalErrors;
02926           for (int i = 10; i <= 18; i++) {
02927             if ( xval == 0 ) {
02928               if ( Numbers::validEE(i, jx, jy) ) ++nGlobalErrorsEE[i-1];
02929             }
02930           }
02931         }
02932 
02933       }
02934 
02935     }
02936   }
02937 
02938   MonitorElement* me;
02939 
02940   float reportSummary = -1.0;
02941   if ( nValidChannels != 0 )
02942     reportSummary = 1.0 - float(nGlobalErrors)/float(nValidChannels);
02943   me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary");
02944   if ( me ) me->Fill(reportSummary);
02945 
02946   for (int i = 0; i < 18; i++) {
02947     float reportSummaryEE = -1.0;
02948     if ( nValidChannelsEE[i] != 0 )
02949       reportSummaryEE = 1.0 - float(nGlobalErrorsEE[i])/float(nValidChannelsEE[i]);
02950     me = dqmStore_->get( prefixME_ + "/EventInfo/reportSummaryContents/EcalEndcap_" + Numbers::sEE(i+1) );
02951     if ( me ) me->Fill(reportSummaryEE);
02952   }
02953 
02954   me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap");
02955   if ( me ) {
02956 
02957     int nValidChannelsSC[2][20][20];
02958     int nGlobalErrorsSC[2][20][20];
02959     for ( int iside = 0; iside < 2; iside++ ) {
02960       for ( int jxdcc = 0; jxdcc < 20; jxdcc++ ) {
02961         for ( int jydcc = 0; jydcc < 20; jydcc++ ) {
02962           nValidChannelsSC[iside][jxdcc][jydcc] = 0;
02963           nGlobalErrorsSC[iside][jxdcc][jydcc] = 0;
02964         }
02965       }
02966     }
02967 
02968     for (int iside = 0; iside < 2; iside++ ) {
02969       for ( int ix = 1; ix <= 100; ix++ ) {
02970         for ( int iy = 1; iy <= 100; iy++ ) {
02971 
02972           int jxsc = (ix-1)/5;
02973           int jysc = (iy-1)/5;
02974 
02975           float xval = meGlobalSummary_[iside]->getBinContent( ix, iy );
02976 
02977           if ( xval >= 0 && xval <= 5 ) {
02978             if ( xval != 2 && xval != 5 ) ++nValidChannelsSC[iside][jxsc][jysc];
02979             if ( xval == 0 ) ++nGlobalErrorsSC[iside][jxsc][jysc];
02980           }
02981 
02982         }
02983       }
02984     }
02985 
02986     for (int iside = 0; iside < 2; iside++ ) {
02987       for ( int jxsc = 0; jxsc < 20; jxsc++ ) {
02988         for ( int jysc = 0; jysc < 20; jysc++ ) {
02989 
02990           float scval = -1;
02991 
02992           if( nValidChannelsSC[iside][jxsc][jysc] != 0 )
02993             scval = 1.0 - float(nGlobalErrorsSC[iside][jxsc][jysc])/float(nValidChannelsSC[iside][jxsc][jysc]);
02994 
02995           me->setBinContent( jxsc+iside*20+1, jysc+1, scval );
02996 
02997         }
02998       }
02999     }
03000 
03001 //     for ( int jxdcc = 0; jxdcc < 20; jxdcc++ ) {
03002 //       for ( int jydcc = 0; jydcc < 20; jydcc++ ) {
03003 //         for ( int iside = 0; iside < 2; iside++ ) {
03004 
03005 //           float xval = -1.0;
03006 //           if ( nOutOfGeometryTT[iside][jxdcc][jydcc] < 25 ) {
03007 //             if ( nValidChannelsTT[iside][jxdcc][jydcc] != 0 )
03008 //               xval = 1.0 - float(nGlobalErrorsTT[iside][jxdcc][jydcc])/float(nValidChannelsTT[iside][jxdcc][jydcc]);
03009 //           }
03010 
03011 //           me->setBinContent( 20*iside+jxdcc+1, jydcc+1, xval );
03012 
03013 //         }
03014 //       }
03015 //     }
03016 
03017   }
03018 
03019 }
03020