CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/DQM/EcalBarrelMonitorClient/src/EBSummaryClient.cc

Go to the documentation of this file.
00001 /*
00002  * \file EBSummaryClient.cc
00003  *
00004  * $Date: 2010/09/01 08:46:10 $
00005  * $Revision: 1.220 $
00006  * \author G. Della Ricca
00007  *
00008 */
00009 
00010 #include <memory>
00011 #include <iostream>
00012 #include <fstream>
00013 #include <iomanip>
00014 
00015 #include "FWCore/ServiceRegistry/interface/Service.h"
00016 
00017 #include "DQMServices/Core/interface/DQMStore.h"
00018 
00019 #ifdef WITH_ECAL_COND_DB
00020 #include "OnlineDB/EcalCondDB/interface/RunTag.h"
00021 #include "OnlineDB/EcalCondDB/interface/RunIOV.h"
00022 #endif
00023 
00024 #include "DQM/EcalCommon/interface/UtilsClient.h"
00025 #include "DQM/EcalCommon/interface/Numbers.h"
00026 
00027 #include "DQM/EcalBarrelMonitorClient/interface/EBStatusFlagsClient.h"
00028 #include "DQM/EcalBarrelMonitorClient/interface/EBIntegrityClient.h"
00029 #include "DQM/EcalBarrelMonitorClient/interface/EBLaserClient.h"
00030 #include "DQM/EcalBarrelMonitorClient/interface/EBPedestalClient.h"
00031 #include "DQM/EcalBarrelMonitorClient/interface/EBPedestalOnlineClient.h"
00032 #include "DQM/EcalBarrelMonitorClient/interface/EBTestPulseClient.h"
00033 #include "DQM/EcalBarrelMonitorClient/interface/EBBeamCaloClient.h"
00034 #include "DQM/EcalBarrelMonitorClient/interface/EBBeamHodoClient.h"
00035 #include "DQM/EcalBarrelMonitorClient/interface/EBTriggerTowerClient.h"
00036 #include "DQM/EcalBarrelMonitorClient/interface/EBClusterClient.h"
00037 #include "DQM/EcalBarrelMonitorClient/interface/EBTimingClient.h"
00038 
00039 #include "DQM/EcalBarrelMonitorClient/interface/EBSummaryClient.h"
00040 
00041 EBSummaryClient::EBSummaryClient(const edm::ParameterSet& ps) {
00042 
00043   // cloneME switch
00044   cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
00045 
00046   // verbose switch
00047   verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
00048 
00049   // debug switch
00050   debug_ = ps.getUntrackedParameter<bool>("debug", false);
00051 
00052   // prefixME path
00053   prefixME_ = ps.getUntrackedParameter<std::string>("prefixME", "");
00054 
00055   // enableCleanup_ switch
00056   enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
00057 
00058   // vector of selected Super Modules (Defaults to all 36).
00059   superModules_.reserve(36);
00060   for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
00061   superModules_ = ps.getUntrackedParameter<std::vector<int> >("superModules", superModules_);
00062 
00063   laserWavelengths_.reserve(4);
00064   for ( unsigned int i = 1; i <= 4; i++ ) laserWavelengths_.push_back(i);
00065   laserWavelengths_ = ps.getUntrackedParameter<std::vector<int> >("laserWavelengths", laserWavelengths_);
00066 
00067   MGPAGains_.reserve(3);
00068   for ( unsigned int i = 1; i <= 3; i++ ) MGPAGains_.push_back(i);
00069   MGPAGains_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGains", MGPAGains_);
00070 
00071   MGPAGainsPN_.reserve(2);
00072   for ( unsigned int i = 1; i <= 3; i++ ) MGPAGainsPN_.push_back(i);
00073   MGPAGainsPN_ = ps.getUntrackedParameter<std::vector<int> >("MGPAGainsPN", MGPAGainsPN_);
00074 
00075   // summary maps
00076   meIntegrity_            = 0;
00077   meIntegrityPN_          = 0;
00078   meOccupancy_            = 0;
00079   meOccupancyPN_          = 0;
00080   meStatusFlags_          = 0;
00081   mePedestalOnline_       = 0;
00082   mePedestalOnlineRMSMap_ = 0;
00083   mePedestalOnlineMean_   = 0;
00084   mePedestalOnlineRMS_    = 0;
00085 
00086   meLaserL1_              = 0;
00087   meLaserL1PN_            = 0;
00088   meLaserL1Ampl_          = 0;
00089   meLaserL1Timing_        = 0;
00090   meLaserL1AmplOverPN_    = 0;
00091 
00092   meLaserL2_              = 0;
00093   meLaserL2PN_            = 0;
00094   meLaserL2Ampl_          = 0;
00095   meLaserL2Timing_        = 0;
00096   meLaserL2AmplOverPN_    = 0;
00097 
00098   meLaserL3_              = 0;
00099   meLaserL3PN_            = 0;
00100   meLaserL3Ampl_          = 0;
00101   meLaserL3Timing_        = 0;
00102   meLaserL3AmplOverPN_    = 0;
00103 
00104   meLaserL4_              = 0;
00105   meLaserL4PN_            = 0;
00106   meLaserL4Ampl_          = 0;
00107   meLaserL4Timing_        = 0;
00108   meLaserL4AmplOverPN_    = 0;
00109 
00110   mePedestalG01_          = 0;
00111   mePedestalG06_          = 0;
00112   mePedestalG12_          = 0;
00113   mePedestalPNG01_        = 0;
00114   mePedestalPNG16_        = 0;
00115   meTestPulseG01_         = 0;
00116   meTestPulseG06_         = 0;
00117   meTestPulseG12_         = 0;
00118   meTestPulsePNG01_       = 0;
00119   meTestPulsePNG16_       = 0;
00120   meTestPulseAmplG01_     = 0;
00121   meTestPulseAmplG06_     = 0;
00122   meTestPulseAmplG12_     = 0;
00123   meGlobalSummary_        = 0;
00124 
00125   meRecHitEnergy_         = 0;
00126   meTiming_         = 0;
00127   meTimingMean1D_   = 0;
00128   meTimingRMS1D_    = 0;
00129   meTimingMean_     = 0;
00130   meTimingRMS_      = 0;
00131   meTriggerTowerEt_        = 0;
00132   meTriggerTowerEmulError_ = 0;
00133   meTriggerTowerTiming_ = 0;
00134   meTriggerTowerNonSingleTiming_ = 0;
00135 
00136   // summary errors
00137   meIntegrityErr_       = 0;
00138   meOccupancy1D_        = 0;
00139   meStatusFlagsErr_     = 0;
00140   mePedestalOnlineErr_  = 0;
00141   meLaserL1Err_         = 0;
00142   meLaserL1PNErr_       = 0;
00143   meLaserL2Err_         = 0;
00144   meLaserL2PNErr_       = 0;
00145   meLaserL3Err_         = 0;
00146   meLaserL3PNErr_       = 0;
00147   meLaserL4Err_         = 0;
00148   meLaserL4PNErr_       = 0;
00149 
00150   // additional histograms from tasks
00151   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00152 
00153     int ism = superModules_[i];
00154 
00155     hpot01_[ism-1] = 0;
00156     httt01_[ism-1] = 0;
00157     htmt01_[ism-1] = 0;
00158 
00159   }
00160 
00161   synchErrorThreshold_ = 0.0;
00162 
00163 }
00164 
00165 EBSummaryClient::~EBSummaryClient() {
00166 
00167 }
00168 
00169 void EBSummaryClient::beginJob(void) {
00170 
00171   dqmStore_ = edm::Service<DQMStore>().operator->();
00172 
00173   if ( debug_ ) std::cout << "EBSummaryClient: beginJob" << std::endl;
00174 
00175   ievt_ = 0;
00176   jevt_ = 0;
00177 
00178 }
00179 
00180 void EBSummaryClient::beginRun(void) {
00181 
00182   if ( debug_ ) std::cout << "EBSummaryClient: beginRun" << std::endl;
00183 
00184   jevt_ = 0;
00185 
00186   this->setup();
00187 
00188 }
00189 
00190 void EBSummaryClient::endJob(void) {
00191 
00192   if ( debug_ ) std::cout << "EBSummaryClient: endJob, ievt = " << ievt_ << std::endl;
00193 
00194   this->cleanup();
00195 
00196 }
00197 
00198 void EBSummaryClient::endRun(void) {
00199 
00200   if ( debug_ ) std::cout << "EBSummaryClient: endRun, jevt = " << jevt_ << std::endl;
00201 
00202   this->cleanup();
00203 
00204 }
00205 
00206 void EBSummaryClient::setup(void) {
00207 
00208   char histo[200];
00209 
00210   dqmStore_->setCurrentFolder( prefixME_ + "/EBSummaryClient" );
00211 
00212   if ( meIntegrity_ ) dqmStore_->removeElement( meIntegrity_->getName() );
00213   sprintf(histo, "EBIT integrity quality summary");
00214   meIntegrity_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00215   meIntegrity_->setAxisTitle("jphi", 1);
00216   meIntegrity_->setAxisTitle("jeta", 2);
00217 
00218   if ( meIntegrityErr_ ) dqmStore_->removeElement( meIntegrityErr_->getName() );
00219   sprintf(histo, "EBIT integrity quality errors summary");
00220   meIntegrityErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00221   for (int i = 0; i < 36; i++) {
00222     meIntegrityErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00223   }
00224 
00225   if ( meIntegrityPN_ ) dqmStore_->removeElement( meIntegrityPN_->getName() );
00226   sprintf(histo, "EBIT PN integrity quality summary");
00227   meIntegrityPN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
00228   meIntegrityPN_->setAxisTitle("jchannel", 1);
00229   meIntegrityPN_->setAxisTitle("jpseudo-strip", 2);
00230 
00231   if ( meOccupancy_ ) dqmStore_->removeElement( meOccupancy_->getName() );
00232   sprintf(histo, "EBOT digi occupancy summary");
00233   meOccupancy_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00234   meOccupancy_->setAxisTitle("jphi", 1);
00235   meOccupancy_->setAxisTitle("jeta", 2);
00236 
00237   if ( meOccupancy1D_ ) dqmStore_->removeElement( meOccupancy1D_->getName() );
00238   sprintf(histo, "EBOT digi occupancy summary 1D");
00239   meOccupancy1D_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00240   for (int i = 0; i < 36; i++) {
00241     meOccupancy1D_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00242   }
00243 
00244   if ( meOccupancyPN_ ) dqmStore_->removeElement( meOccupancyPN_->getName() );
00245   sprintf(histo, "EBOT PN digi occupancy summary");
00246   meOccupancyPN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
00247   meOccupancyPN_->setAxisTitle("jchannel", 1);
00248   meOccupancyPN_->setAxisTitle("jpseudo-strip", 2);
00249 
00250   if ( meStatusFlags_ ) dqmStore_->removeElement( meStatusFlags_->getName() );
00251   sprintf(histo, "EBSFT front-end status summary");
00252   meStatusFlags_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
00253   meStatusFlags_->setAxisTitle("jphi'", 1);
00254   meStatusFlags_->setAxisTitle("jeta'", 2);
00255 
00256   if ( meStatusFlagsErr_ ) dqmStore_->removeElement( meStatusFlagsErr_->getName() );
00257   sprintf(histo, "EBSFT front-end status errors summary");
00258   meStatusFlagsErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00259   for (int i = 0; i < 36; i++) {
00260     meStatusFlagsErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00261   }
00262 
00263   if ( mePedestalOnline_ ) dqmStore_->removeElement( mePedestalOnline_->getName() );
00264   sprintf(histo, "EBPOT pedestal quality summary G12");
00265   mePedestalOnline_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00266   mePedestalOnline_->setAxisTitle("jphi", 1);
00267   mePedestalOnline_->setAxisTitle("jeta", 2);
00268 
00269   if ( mePedestalOnlineErr_ ) dqmStore_->removeElement( mePedestalOnlineErr_->getName() );
00270   sprintf(histo, "EBPOT pedestal quality errors summary G12");
00271   mePedestalOnlineErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00272   for (int i = 0; i < 36; i++) {
00273     mePedestalOnlineErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00274   }
00275 
00276   if ( mePedestalOnlineRMSMap_ ) dqmStore_->removeElement( mePedestalOnlineRMSMap_->getName() );
00277   sprintf(histo, "EBPOT pedestal G12 RMS map");
00278   mePedestalOnlineRMSMap_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00279   mePedestalOnlineRMSMap_->setAxisTitle("jphi", 1);
00280   mePedestalOnlineRMSMap_->setAxisTitle("jeta", 2);
00281 
00282   if ( mePedestalOnlineMean_ ) dqmStore_->removeElement( mePedestalOnlineMean_->getName() );
00283   sprintf(histo, "EBPOT pedestal G12 mean");
00284   mePedestalOnlineMean_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 150., 250.);
00285   for (int i = 0; i < 36; i++) {
00286     mePedestalOnlineMean_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00287   }
00288 
00289   if ( mePedestalOnlineRMS_ ) dqmStore_->removeElement( mePedestalOnlineRMS_->getName() );
00290   sprintf(histo, "EBPOT pedestal G12 rms");
00291   mePedestalOnlineRMS_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10.);
00292   for (int i = 0; i < 36; i++) {
00293     mePedestalOnlineRMS_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00294   }
00295 
00296   if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
00297 
00298     if ( meLaserL1_ ) dqmStore_->removeElement( meLaserL1_->getName() );
00299     sprintf(histo, "EBLT laser quality summary L1");
00300     meLaserL1_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00301     meLaserL1_->setAxisTitle("jphi", 1);
00302     meLaserL1_->setAxisTitle("jeta", 2);
00303 
00304     if ( meLaserL1Err_ ) dqmStore_->removeElement( meLaserL1Err_->getName() );
00305     sprintf(histo, "EBLT laser quality errors summary L1");
00306     meLaserL1Err_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00307     for (int i = 0; i < 36; i++) {
00308       meLaserL1Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00309     }
00310 
00311     if ( meLaserL1PN_ ) dqmStore_->removeElement( meLaserL1PN_->getName() );
00312     sprintf(histo, "EBLT PN laser quality summary L1");
00313     meLaserL1PN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
00314     meLaserL1PN_->setAxisTitle("jchannel", 1);
00315     meLaserL1PN_->setAxisTitle("jpseudo-strip", 2);
00316 
00317     if ( meLaserL1PNErr_ ) dqmStore_->removeElement( meLaserL1PNErr_->getName() );
00318     sprintf(histo, "EBLT PN laser quality errors summary L1");
00319     meLaserL1PNErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00320     for (int i = 0; i < 36; i++) {
00321       meLaserL1PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00322     }
00323 
00324     if ( meLaserL1Ampl_ ) dqmStore_->removeElement( meLaserL1Ampl_->getName() );
00325     sprintf(histo, "EBLT laser L1 amplitude summary");
00326     meLaserL1Ampl_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096., "s");
00327     for (int i = 0; i < 36; i++) {
00328       meLaserL1Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00329     }
00330 
00331     if ( meLaserL1Timing_ ) dqmStore_->removeElement( meLaserL1Timing_->getName() );
00332     sprintf(histo, "EBLT laser L1 timing summary");
00333     meLaserL1Timing_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10., "s");
00334     for (int i = 0; i < 36; i++) {
00335       meLaserL1Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00336     }
00337 
00338     if ( meLaserL1AmplOverPN_ ) dqmStore_->removeElement( meLaserL1AmplOverPN_->getName() );
00339     sprintf(histo, "EBLT laser L1 amplitude over PN summary");
00340     meLaserL1AmplOverPN_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
00341     for (int i = 0; i < 36; i++) {
00342       meLaserL1AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00343     }
00344 
00345   }
00346 
00347   if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
00348 
00349     if ( meLaserL2_ ) dqmStore_->removeElement( meLaserL2_->getName() );
00350     sprintf(histo, "EBLT laser quality summary L2");
00351     meLaserL2_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00352     meLaserL2_->setAxisTitle("jphi", 1);
00353     meLaserL2_->setAxisTitle("jeta", 2);
00354 
00355     if ( meLaserL2Err_ ) dqmStore_->removeElement( meLaserL2Err_->getName() );
00356     sprintf(histo, "EBLT laser quality errors summary L2");
00357     meLaserL2Err_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00358     for (int i = 0; i < 36; i++) {
00359       meLaserL2Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00360     }
00361 
00362     if ( meLaserL2PN_ ) dqmStore_->removeElement( meLaserL2PN_->getName() );
00363     sprintf(histo, "EBLT PN laser quality summary L2");
00364     meLaserL2PN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
00365     meLaserL2PN_->setAxisTitle("jchannel", 1);
00366     meLaserL2PN_->setAxisTitle("jpseudo-strip", 2);
00367 
00368     if ( meLaserL2PNErr_ ) dqmStore_->removeElement( meLaserL2PNErr_->getName() );
00369     sprintf(histo, "EBLT PN laser quality errors summary L2");
00370     meLaserL2PNErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00371     for (int i = 0; i < 36; i++) {
00372       meLaserL2PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00373     }
00374 
00375     if ( meLaserL2Ampl_ ) dqmStore_->removeElement( meLaserL2Ampl_->getName() );
00376     sprintf(histo, "EBLT laser L2 amplitude summary");
00377     meLaserL2Ampl_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096., "s");
00378     for (int i = 0; i < 36; i++) {
00379       meLaserL2Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00380     }
00381 
00382     if ( meLaserL2Timing_ ) dqmStore_->removeElement( meLaserL2Timing_->getName() );
00383     sprintf(histo, "EBLT laser L2 timing summary");
00384     meLaserL2Timing_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10., "s");
00385     for (int i = 0; i < 36; i++) {
00386       meLaserL2Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00387     }
00388 
00389     if ( meLaserL2AmplOverPN_ ) dqmStore_->removeElement( meLaserL2AmplOverPN_->getName() );
00390     sprintf(histo, "EBLT laser L2 amplitude over PN summary");
00391     meLaserL2AmplOverPN_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
00392     for (int i = 0; i < 36; i++) {
00393       meLaserL2AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00394     }
00395 
00396   }
00397 
00398   if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
00399 
00400     if ( meLaserL3_ ) dqmStore_->removeElement( meLaserL3_->getName() );
00401     sprintf(histo, "EBLT laser quality summary L3");
00402     meLaserL3_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00403     meLaserL3_->setAxisTitle("jphi", 1);
00404     meLaserL3_->setAxisTitle("jeta", 2);
00405 
00406     if ( meLaserL3Err_ ) dqmStore_->removeElement( meLaserL3Err_->getName() );
00407     sprintf(histo, "EBLT laser quality errors summary L3");
00408     meLaserL3Err_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00409     for (int i = 0; i < 36; i++) {
00410       meLaserL3Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00411     }
00412 
00413     if ( meLaserL3PN_ ) dqmStore_->removeElement( meLaserL3PN_->getName() );
00414     sprintf(histo, "EBLT PN laser quality summary L3");
00415     meLaserL3PN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
00416     meLaserL3PN_->setAxisTitle("jchannel", 1);
00417     meLaserL3PN_->setAxisTitle("jpseudo-strip", 2);
00418 
00419     if ( meLaserL3PNErr_ ) dqmStore_->removeElement( meLaserL3PNErr_->getName() );
00420     sprintf(histo, "EBLT PN laser quality errors summary L3");
00421     meLaserL3PNErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00422     for (int i = 0; i < 36; i++) {
00423       meLaserL3PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00424     }
00425 
00426     if ( meLaserL3Ampl_ ) dqmStore_->removeElement( meLaserL3Ampl_->getName() );
00427     sprintf(histo, "EBLT laser L3 amplitude summary");
00428     meLaserL3Ampl_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096., "s");
00429     for (int i = 0; i < 36; i++) {
00430       meLaserL3Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00431     }
00432 
00433     if ( meLaserL3Timing_ ) dqmStore_->removeElement( meLaserL3Timing_->getName() );
00434     sprintf(histo, "EBLT laser L3 timing summary");
00435     meLaserL3Timing_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10., "s");
00436     for (int i = 0; i < 36; i++) {
00437       meLaserL3Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00438     }
00439 
00440     if ( meLaserL3AmplOverPN_ ) dqmStore_->removeElement( meLaserL3AmplOverPN_->getName() );
00441     sprintf(histo, "EBLT laser L3 amplitude over PN summary");
00442     meLaserL3AmplOverPN_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
00443     for (int i = 0; i < 36; i++) {
00444       meLaserL3AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00445     }
00446 
00447   }
00448 
00449   if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
00450 
00451     if ( meLaserL4_ ) dqmStore_->removeElement( meLaserL4_->getName() );
00452     sprintf(histo, "EBLT laser quality summary L4");
00453     meLaserL4_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00454     meLaserL4_->setAxisTitle("jphi", 1);
00455     meLaserL4_->setAxisTitle("jeta", 2);
00456 
00457     if ( meLaserL4Err_ ) dqmStore_->removeElement( meLaserL4Err_->getName() );
00458     sprintf(histo, "EBLT laser quality errors summary L4");
00459     meLaserL4Err_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00460     for (int i = 0; i < 36; i++) {
00461       meLaserL4Err_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00462     }
00463 
00464     if ( meLaserL4PN_ ) dqmStore_->removeElement( meLaserL4PN_->getName() );
00465     sprintf(histo, "EBLT PN laser quality summary L4");
00466     meLaserL4PN_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
00467     meLaserL4PN_->setAxisTitle("jchannel", 1);
00468     meLaserL4PN_->setAxisTitle("jpseudo-strip", 2);
00469 
00470     if ( meLaserL4PNErr_ ) dqmStore_->removeElement( meLaserL4PNErr_->getName() );
00471     sprintf(histo, "EBLT PN laser quality errors summary L4");
00472     meLaserL4PNErr_ = dqmStore_->book1D(histo, histo, 36, 1, 37);
00473     for (int i = 0; i < 36; i++) {
00474       meLaserL4PNErr_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00475     }
00476 
00477     if ( meLaserL4Ampl_ ) dqmStore_->removeElement( meLaserL4Ampl_->getName() );
00478     sprintf(histo, "EBLT laser L4 amplitude summary");
00479     meLaserL4Ampl_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096., "s");
00480     for (int i = 0; i < 36; i++) {
00481       meLaserL4Ampl_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00482     }
00483 
00484     if ( meLaserL4Timing_ ) dqmStore_->removeElement( meLaserL4Timing_->getName() );
00485     sprintf(histo, "EBLT laser L4 timing summary");
00486     meLaserL4Timing_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 10., "s");
00487     for (int i = 0; i < 36; i++) {
00488       meLaserL4Timing_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00489     }
00490 
00491     if ( meLaserL4AmplOverPN_ ) dqmStore_->removeElement( meLaserL4AmplOverPN_->getName() );
00492     sprintf(histo, "EBLT laser L4 amplitude over PN summary");
00493     meLaserL4AmplOverPN_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
00494     for (int i = 0; i < 36; i++) {
00495       meLaserL4AmplOverPN_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00496     }
00497 
00498   }
00499 
00500   if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
00501 
00502     if( mePedestalG01_ ) dqmStore_->removeElement( mePedestalG01_->getName() );
00503     sprintf(histo, "EBPT pedestal quality G01 summary");
00504     mePedestalG01_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00505     mePedestalG01_->setAxisTitle("jphi", 1);
00506     mePedestalG01_->setAxisTitle("jeta", 2);
00507 
00508   }
00509 
00510   if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
00511 
00512     if( mePedestalG06_ ) dqmStore_->removeElement( mePedestalG06_->getName() );
00513     sprintf(histo, "EBPT pedestal quality G06 summary");
00514     mePedestalG06_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00515     mePedestalG06_->setAxisTitle("jphi", 1);
00516     mePedestalG06_->setAxisTitle("jeta", 2);
00517 
00518   }
00519 
00520   if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
00521 
00522     if( mePedestalG12_ ) dqmStore_->removeElement( mePedestalG12_->getName() );
00523     sprintf(histo, "EBPT pedestal quality G12 summary");
00524     mePedestalG12_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00525     mePedestalG12_->setAxisTitle("jphi", 1);
00526     mePedestalG12_->setAxisTitle("jeta", 2);
00527 
00528   }
00529 
00530   if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
00531 
00532     if( mePedestalPNG01_ ) dqmStore_->removeElement( mePedestalPNG01_->getName() );
00533     sprintf(histo, "EBPT PN pedestal quality G01 summary");
00534     mePedestalPNG01_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10, 10.);
00535     mePedestalPNG01_->setAxisTitle("jchannel", 1);
00536     mePedestalPNG01_->setAxisTitle("jpseudo-strip", 2);
00537 
00538   }
00539 
00540   if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
00541 
00542     if( mePedestalPNG16_ ) dqmStore_->removeElement( mePedestalPNG16_->getName() );
00543     sprintf(histo, "EBPT PN pedestal quality G16 summary");
00544     mePedestalPNG16_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10, 10.);
00545     mePedestalPNG16_->setAxisTitle("jchannel", 1);
00546     mePedestalPNG16_->setAxisTitle("jpseudo-strip", 2);
00547 
00548   }
00549 
00550   if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
00551 
00552     if( meTestPulseG01_ ) dqmStore_->removeElement( meTestPulseG01_->getName() );
00553     sprintf(histo, "EBTPT test pulse quality G01 summary");
00554     meTestPulseG01_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00555     meTestPulseG01_->setAxisTitle("jphi", 1);
00556     meTestPulseG01_->setAxisTitle("jeta", 2);
00557 
00558   }
00559 
00560   if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
00561 
00562     if( meTestPulseG06_ ) dqmStore_->removeElement( meTestPulseG06_->getName() );
00563     sprintf(histo, "EBTPT test pulse quality G06 summary");
00564     meTestPulseG06_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00565     meTestPulseG06_->setAxisTitle("jphi", 1);
00566     meTestPulseG06_->setAxisTitle("jeta", 2);
00567 
00568   }
00569 
00570   if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
00571 
00572     if( meTestPulseG12_ ) dqmStore_->removeElement( meTestPulseG12_->getName() );
00573     sprintf(histo, "EBTPT test pulse quality G12 summary");
00574     meTestPulseG12_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00575     meTestPulseG12_->setAxisTitle("jphi", 1);
00576     meTestPulseG12_->setAxisTitle("jeta", 2);
00577 
00578   }
00579 
00580   if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 1) != MGPAGainsPN_.end() ) {
00581 
00582     if( meTestPulsePNG01_ ) dqmStore_->removeElement( meTestPulsePNG01_->getName() );
00583     sprintf(histo, "EBTPT PN test pulse quality G01 summary");
00584     meTestPulsePNG01_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
00585     meTestPulsePNG01_->setAxisTitle("jchannel", 1);
00586     meTestPulsePNG01_->setAxisTitle("jpseudo-strip", 2);
00587 
00588   }
00589 
00590   if (find(MGPAGainsPN_.begin(), MGPAGainsPN_.end(), 16) != MGPAGainsPN_.end() ) {
00591 
00592     if( meTestPulsePNG16_ ) dqmStore_->removeElement( meTestPulsePNG16_->getName() );
00593     sprintf(histo, "EBTPT PN test pulse quality G16 summary");
00594     meTestPulsePNG16_ = dqmStore_->book2D(histo, histo, 90, 0., 90., 20, -10., 10.);
00595     meTestPulsePNG16_->setAxisTitle("jchannel", 1);
00596     meTestPulsePNG16_->setAxisTitle("jpseudo-strip", 2);
00597 
00598   }
00599 
00600   if (find(MGPAGains_.begin(), MGPAGains_.end(), 1) != MGPAGains_.end() ) {
00601 
00602     if( meTestPulseAmplG01_ ) dqmStore_->removeElement( meTestPulseAmplG01_->getName() );
00603     sprintf(histo, "EBTPT test pulse amplitude G01 summary");
00604     meTestPulseAmplG01_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
00605     for (int i = 0; i < 36; i++) {
00606       meTestPulseAmplG01_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00607     }
00608 
00609   }
00610 
00611   if (find(MGPAGains_.begin(), MGPAGains_.end(), 6) != MGPAGains_.end() ) {
00612 
00613     if( meTestPulseAmplG06_ ) dqmStore_->removeElement( meTestPulseAmplG06_->getName() );
00614     sprintf(histo, "EBTPT test pulse amplitude G06 summary");
00615     meTestPulseAmplG06_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
00616     for (int i = 0; i < 36; i++) {
00617       meTestPulseAmplG06_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00618     }
00619 
00620   }
00621 
00622   if (find(MGPAGains_.begin(), MGPAGains_.end(), 12) != MGPAGains_.end() ) {
00623 
00624     if( meTestPulseAmplG12_ ) dqmStore_->removeElement( meTestPulseAmplG12_->getName() );
00625     sprintf(histo, "EBTPT test pulse amplitude G12 summary");
00626     meTestPulseAmplG12_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 4096, 0., 4096.*12., "s");
00627     for (int i = 0; i < 36; i++) {
00628       meTestPulseAmplG12_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00629     }
00630 
00631   }
00632 
00633   if( meRecHitEnergy_ ) dqmStore_->removeElement( meRecHitEnergy_->getName() );
00634   sprintf(histo, "EBOT energy summary");
00635   meRecHitEnergy_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00636   meRecHitEnergy_->setAxisTitle("jphi", 1);
00637   meRecHitEnergy_->setAxisTitle("jeta", 2);
00638 
00639   if( meTiming_ ) dqmStore_->removeElement( meTiming_->getName() );
00640   sprintf(histo, "EBTMT timing quality summary");
00641   meTiming_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00642   meTiming_->setAxisTitle("jphi", 1);
00643   meTiming_->setAxisTitle("jeta", 2);
00644 
00645   if( meTimingMean1D_ ) dqmStore_->removeElement( meTimingMean1D_->getName() );
00646   sprintf(histo, "EBTMT timing mean 1D summary");
00647   meTimingMean1D_ = dqmStore_->book1D(histo, histo, 100, -50., 50.);
00648   meTimingMean1D_->setAxisTitle("mean (ns)", 1);
00649 
00650   if( meTimingRMS1D_ ) dqmStore_->removeElement( meTimingRMS1D_->getName() );
00651   sprintf(histo, "EBTMT timing rms 1D summary");
00652   meTimingRMS1D_ = dqmStore_->book1D(histo, histo, 100, 0.0, 150.0);
00653   meTimingRMS1D_->setAxisTitle("rms (ns)", 1);
00654 
00655   if ( meTimingMean_ ) dqmStore_->removeElement( meTimingMean_->getName() );
00656   sprintf(histo, "EBTMT timing mean");
00657   meTimingMean_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, -50., 50.);
00658   for (int i = 0; i < 36; i++) {
00659     meTimingMean_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00660   }
00661   meTimingMean_->setAxisTitle("mean (ns)", 2);
00662 
00663   if ( meTimingRMS_ ) dqmStore_->removeElement( meTimingRMS_->getName() );
00664   sprintf(histo, "EBTMT timing rms");
00665   meTimingRMS_ = dqmStore_->bookProfile(histo, histo, 36, 1, 37, 100, 0., 150.);
00666   for (int i = 0; i < 36; i++) {
00667     meTimingRMS_->setBinLabel(i+1, Numbers::sEB(i+1).c_str(), 1);
00668   }
00669   meTimingRMS_->setAxisTitle("rms (ns)", 2);
00670 
00671   if( meTriggerTowerEt_ ) dqmStore_->removeElement( meTriggerTowerEt_->getName() );
00672   sprintf(histo, "EBTTT Et trigger tower summary");
00673   meTriggerTowerEt_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
00674   meTriggerTowerEt_->setAxisTitle("jphi'", 1);
00675   meTriggerTowerEt_->setAxisTitle("jeta'", 2);
00676 
00677   if( meTriggerTowerEmulError_ ) dqmStore_->removeElement( meTriggerTowerEmulError_->getName() );
00678   sprintf(histo, "EBTTT emulator error quality summary");
00679   meTriggerTowerEmulError_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
00680   meTriggerTowerEmulError_->setAxisTitle("jphi'", 1);
00681   meTriggerTowerEmulError_->setAxisTitle("jeta'", 2);
00682 
00683   if( meTriggerTowerTiming_ ) dqmStore_->removeElement( meTriggerTowerTiming_->getName() );
00684   sprintf(histo, "EBTTT Trigger Primitives Timing summary");
00685   meTriggerTowerTiming_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
00686   meTriggerTowerTiming_->setAxisTitle("jphi'", 1);
00687   meTriggerTowerTiming_->setAxisTitle("jeta'", 2);
00688   meTriggerTowerTiming_->setAxisTitle("TP data matching emulator", 3);
00689 
00690   if( meTriggerTowerNonSingleTiming_ ) dqmStore_->removeElement( meTriggerTowerNonSingleTiming_->getName() );
00691   sprintf(histo, "EBTTT Trigger Primitives Non Single Timing summary");
00692   meTriggerTowerNonSingleTiming_ = dqmStore_->book2D(histo, histo, 72, 0., 72., 34, -17., 17.);
00693   meTriggerTowerNonSingleTiming_->setAxisTitle("jphi'", 1);
00694   meTriggerTowerNonSingleTiming_->setAxisTitle("jeta'", 2);
00695   meTriggerTowerNonSingleTiming_->setAxisTitle("fraction", 3);
00696 
00697   if( meGlobalSummary_ ) dqmStore_->removeElement( meGlobalSummary_->getName() );
00698   sprintf(histo, "EB global summary");
00699   meGlobalSummary_ = dqmStore_->book2D(histo, histo, 360, 0., 360., 170, -85., 85.);
00700   meGlobalSummary_->setAxisTitle("jphi", 1);
00701   meGlobalSummary_->setAxisTitle("jeta", 2);
00702 
00703 }
00704 
00705 void EBSummaryClient::cleanup(void) {
00706 
00707   if ( ! enableCleanup_ ) return;
00708 
00709   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00710 
00711     int ism = superModules_[i];
00712 
00713     if ( cloneME_ ) {
00714       if ( hpot01_[ism-1] ) delete hpot01_[ism-1];
00715       if ( httt01_[ism-1] ) delete httt01_[ism-1];
00716     }
00717 
00718     hpot01_[ism-1] = 0;
00719     httt01_[ism-1] = 0;
00720 
00721   }
00722 
00723   dqmStore_->setCurrentFolder( prefixME_ + "/EBSummaryClient" );
00724 
00725   if ( meIntegrity_ ) dqmStore_->removeElement( meIntegrity_->getName() );
00726   meIntegrity_ = 0;
00727 
00728   if ( meIntegrityErr_ ) dqmStore_->removeElement( meIntegrityErr_->getName() );
00729   meIntegrityErr_ = 0;
00730 
00731   if ( meIntegrityPN_ ) dqmStore_->removeElement( meIntegrityPN_->getName() );
00732   meIntegrityPN_ = 0;
00733 
00734   if ( meOccupancy_ ) dqmStore_->removeElement( meOccupancy_->getName() );
00735   meOccupancy_ = 0;
00736 
00737   if ( meOccupancy1D_ ) dqmStore_->removeElement( meOccupancy1D_->getName() );
00738   meOccupancy1D_ = 0;
00739 
00740   if ( meOccupancyPN_ ) dqmStore_->removeElement( meOccupancyPN_->getName() );
00741   meOccupancyPN_ = 0;
00742 
00743   if ( meStatusFlags_ ) dqmStore_->removeElement( meStatusFlags_->getName() );
00744   meStatusFlags_ = 0;
00745 
00746   if ( meStatusFlagsErr_ ) dqmStore_->removeElement( meStatusFlagsErr_->getName() );
00747   meStatusFlagsErr_ = 0;
00748 
00749   if ( mePedestalOnline_ ) dqmStore_->removeElement( mePedestalOnline_->getName() );
00750   mePedestalOnline_ = 0;
00751 
00752   if ( mePedestalOnlineErr_ ) dqmStore_->removeElement( mePedestalOnlineErr_->getName() );
00753   mePedestalOnlineErr_ = 0;
00754 
00755   if ( mePedestalOnlineMean_ ) dqmStore_->removeElement( mePedestalOnlineMean_->getName() );
00756   mePedestalOnlineMean_ = 0;
00757 
00758   if ( mePedestalOnlineRMS_ ) dqmStore_->removeElement( mePedestalOnlineRMS_->getName() );
00759   mePedestalOnlineRMS_ = 0;
00760 
00761   if ( mePedestalOnlineRMSMap_ ) dqmStore_->removeElement( mePedestalOnlineRMSMap_->getName() );
00762   mePedestalOnlineRMSMap_ = 0;
00763 
00764   if ( meLaserL1_ ) dqmStore_->removeElement( meLaserL1_->getName() );
00765   meLaserL1_ = 0;
00766 
00767   if ( meLaserL1Err_ ) dqmStore_->removeElement( meLaserL1Err_->getName() );
00768   meLaserL1Err_ = 0;
00769 
00770   if ( meLaserL1Ampl_ ) dqmStore_->removeElement( meLaserL1Ampl_->getName() );
00771   meLaserL1Ampl_ = 0;
00772 
00773   if ( meLaserL1Timing_ ) dqmStore_->removeElement( meLaserL1Timing_->getName() );
00774   meLaserL1Timing_ = 0;
00775 
00776   if ( meLaserL1AmplOverPN_ ) dqmStore_->removeElement( meLaserL1AmplOverPN_->getName() );
00777   meLaserL1AmplOverPN_ = 0;
00778 
00779   if ( meLaserL1PN_ ) dqmStore_->removeElement( meLaserL1PN_->getName() );
00780   meLaserL1PN_ = 0;
00781 
00782   if ( meLaserL1PNErr_ ) dqmStore_->removeElement( meLaserL1PNErr_->getName() );
00783   meLaserL1PNErr_ = 0;
00784 
00785   if ( meLaserL2_ ) dqmStore_->removeElement( meLaserL2_->getName() );
00786   meLaserL2_ = 0;
00787 
00788   if ( meLaserL2Err_ ) dqmStore_->removeElement( meLaserL2Err_->getName() );
00789   meLaserL2Err_ = 0;
00790 
00791   if ( meLaserL2Ampl_ ) dqmStore_->removeElement( meLaserL2Ampl_->getName() );
00792   meLaserL2Ampl_ = 0;
00793 
00794   if ( meLaserL2Timing_ ) dqmStore_->removeElement( meLaserL2Timing_->getName() );
00795   meLaserL2Timing_ = 0;
00796 
00797   if ( meLaserL2AmplOverPN_ ) dqmStore_->removeElement( meLaserL2AmplOverPN_->getName() );
00798   meLaserL2AmplOverPN_ = 0;
00799 
00800   if ( meLaserL2PN_ ) dqmStore_->removeElement( meLaserL2PN_->getName() );
00801   meLaserL2PN_ = 0;
00802 
00803   if ( meLaserL2PNErr_ ) dqmStore_->removeElement( meLaserL2PNErr_->getName() );
00804   meLaserL2PNErr_ = 0;
00805 
00806   if ( meLaserL3_ ) dqmStore_->removeElement( meLaserL3_->getName() );
00807   meLaserL3_ = 0;
00808 
00809   if ( meLaserL3Err_ ) dqmStore_->removeElement( meLaserL3Err_->getName() );
00810   meLaserL3Err_ = 0;
00811 
00812   if ( meLaserL3Ampl_ ) dqmStore_->removeElement( meLaserL3Ampl_->getName() );
00813   meLaserL3Ampl_ = 0;
00814 
00815   if ( meLaserL3Timing_ ) dqmStore_->removeElement( meLaserL3Timing_->getName() );
00816   meLaserL3Timing_ = 0;
00817 
00818   if ( meLaserL3AmplOverPN_ ) dqmStore_->removeElement( meLaserL3AmplOverPN_->getName() );
00819   meLaserL3AmplOverPN_ = 0;
00820 
00821   if ( meLaserL3PN_ ) dqmStore_->removeElement( meLaserL3PN_->getName() );
00822   meLaserL3PN_ = 0;
00823 
00824   if ( meLaserL3PNErr_ ) dqmStore_->removeElement( meLaserL3PNErr_->getName() );
00825   meLaserL3PNErr_ = 0;
00826 
00827   if ( meLaserL4_ ) dqmStore_->removeElement( meLaserL4_->getName() );
00828   meLaserL4_ = 0;
00829 
00830   if ( meLaserL4Err_ ) dqmStore_->removeElement( meLaserL4Err_->getName() );
00831   meLaserL4Err_ = 0;
00832 
00833   if ( meLaserL4Ampl_ ) dqmStore_->removeElement( meLaserL4Ampl_->getName() );
00834   meLaserL4Ampl_ = 0;
00835 
00836   if ( meLaserL4Timing_ ) dqmStore_->removeElement( meLaserL4Timing_->getName() );
00837   meLaserL4Timing_ = 0;
00838 
00839   if ( meLaserL4AmplOverPN_ ) dqmStore_->removeElement( meLaserL4AmplOverPN_->getName() );
00840   meLaserL4AmplOverPN_ = 0;
00841 
00842   if ( meLaserL4PN_ ) dqmStore_->removeElement( meLaserL4PN_->getName() );
00843   meLaserL4PN_ = 0;
00844 
00845   if ( meLaserL4PNErr_ ) dqmStore_->removeElement( meLaserL4PNErr_->getName() );
00846   meLaserL4PNErr_ = 0;
00847 
00848   if ( mePedestalG01_ ) dqmStore_->removeElement( mePedestalG01_->getName() );
00849   mePedestalG01_ = 0;
00850 
00851   if ( mePedestalG06_ ) dqmStore_->removeElement( mePedestalG06_->getName() );
00852   mePedestalG06_ = 0;
00853 
00854   if ( mePedestalG12_ ) dqmStore_->removeElement( mePedestalG12_->getName() );
00855   mePedestalG12_ = 0;
00856 
00857   if ( meTestPulseG01_ ) dqmStore_->removeElement( meTestPulseG01_->getName() );
00858   meTestPulseG01_ = 0;
00859 
00860   if ( meTestPulseG06_ ) dqmStore_->removeElement( meTestPulseG06_->getName() );
00861   meTestPulseG06_ = 0;
00862 
00863   if ( meTestPulseG12_ ) dqmStore_->removeElement( meTestPulseG12_->getName() );
00864   meTestPulseG12_ = 0;
00865 
00866   if ( meTestPulseG01_ ) dqmStore_->removeElement( meTestPulseG01_->getName() );
00867   meTestPulseG01_ = 0;
00868 
00869   if ( meTestPulseAmplG01_ ) dqmStore_->removeElement( meTestPulseAmplG01_->getName() );
00870   meTestPulseAmplG01_ = 0;
00871 
00872   if ( meTestPulseAmplG06_ ) dqmStore_->removeElement( meTestPulseAmplG06_->getName() );
00873   meTestPulseAmplG06_ = 0;
00874 
00875   if ( meTestPulseAmplG12_ ) dqmStore_->removeElement( meTestPulseAmplG12_->getName() );
00876   meTestPulseAmplG12_ = 0;
00877 
00878   if ( meRecHitEnergy_ ) dqmStore_->removeElement( meRecHitEnergy_->getName() );
00879   meRecHitEnergy_ = 0;
00880 
00881   if ( meTiming_ ) dqmStore_->removeElement( meTiming_->getName() );
00882   meTiming_ = 0;
00883 
00884   if ( meTimingMean1D_ ) dqmStore_->removeElement( meTimingMean1D_->getName() );
00885   meTimingMean1D_ = 0;
00886 
00887   if ( meTimingRMS1D_ ) dqmStore_->removeElement( meTimingRMS1D_->getName() );
00888   meTimingRMS1D_ = 0;
00889 
00890   if ( meTimingMean_ ) dqmStore_->removeElement( meTimingMean_->getName() );
00891   meTimingMean_ = 0;
00892 
00893   if ( meTimingRMS_ ) dqmStore_->removeElement( meTimingRMS_->getName() );
00894   meTimingRMS_ = 0;
00895 
00896   if ( meTriggerTowerEt_ ) dqmStore_->removeElement( meTriggerTowerEt_->getName() );
00897   meTriggerTowerEt_ = 0;
00898 
00899   if ( meTriggerTowerEmulError_ ) dqmStore_->removeElement( meTriggerTowerEmulError_->getName() );
00900   meTriggerTowerEmulError_ = 0;
00901 
00902   if ( meTriggerTowerTiming_ ) dqmStore_->removeElement( meTriggerTowerTiming_->getName() );
00903   meTriggerTowerTiming_ = 0;
00904 
00905   if ( meTriggerTowerNonSingleTiming_ ) dqmStore_->removeElement( meTriggerTowerNonSingleTiming_->getName() );
00906   meTriggerTowerNonSingleTiming_ = 0;
00907 
00908   if ( meGlobalSummary_ ) dqmStore_->removeElement( meGlobalSummary_->getName() );
00909   meGlobalSummary_ = 0;
00910 
00911 }
00912 
00913 #ifdef WITH_ECAL_COND_DB
00914 bool EBSummaryClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status) {
00915 
00916   status = true;
00917 
00918   return true;
00919 
00920 }
00921 #endif
00922 
00923 void EBSummaryClient::analyze(void) {
00924 
00925   ievt_++;
00926   jevt_++;
00927   if ( ievt_ % 10 == 0 ) {
00928     if ( debug_ ) std::cout << "EBSummaryClient: ievt/jevt = " << ievt_ << "/" << jevt_ << std::endl;
00929   }
00930 
00931   for ( int iex = 1; iex <= 170; iex++ ) {
00932     for ( int ipx = 1; ipx <= 360; ipx++ ) {
00933 
00934       if ( meIntegrity_ ) meIntegrity_->setBinContent( ipx, iex, 6. );
00935       if ( meOccupancy_ ) meOccupancy_->setBinContent( ipx, iex, 0. );
00936       if ( meStatusFlags_ ) meStatusFlags_->setBinContent( ipx, iex, 6. );
00937       if ( mePedestalOnline_ ) mePedestalOnline_->setBinContent( ipx, iex, 6. );
00938       if ( mePedestalOnlineRMSMap_ ) mePedestalOnlineRMSMap_->setBinContent( ipx, iex, -1.);
00939       if ( meLaserL1_ ) meLaserL1_->setBinContent( ipx, iex, 6. );
00940       if ( meLaserL2_ ) meLaserL2_->setBinContent( ipx, iex, 6. );
00941       if ( meLaserL3_ ) meLaserL3_->setBinContent( ipx, iex, 6. );
00942       if ( meLaserL4_ ) meLaserL4_->setBinContent( ipx, iex, 6. );
00943       if ( mePedestalG01_ ) mePedestalG01_->setBinContent( ipx, iex, 6. );
00944       if ( mePedestalG06_ ) mePedestalG06_->setBinContent( ipx, iex, 6. );
00945       if ( mePedestalG12_ ) mePedestalG12_->setBinContent( ipx, iex, 6. );
00946       if ( meTestPulseG01_ ) meTestPulseG01_->setBinContent( ipx, iex, 6. );
00947       if ( meTestPulseG06_ ) meTestPulseG06_->setBinContent( ipx, iex, 6. );
00948       if ( meTestPulseG12_ ) meTestPulseG12_->setBinContent( ipx, iex, 6. );
00949 
00950       if ( meRecHitEnergy_ ) meRecHitEnergy_->setBinContent( ipx, iex, 0. );
00951       if ( meTiming_ ) meTiming_->setBinContent( ipx, iex, 6. );
00952 
00953       if ( meGlobalSummary_ ) meGlobalSummary_->setBinContent( ipx, iex, 6. );
00954 
00955     }
00956   }
00957 
00958   for ( int iex = 1; iex <= 20; iex++ ) {
00959     for ( int ipx = 1; ipx <= 90; ipx++ ) {
00960 
00961       if ( meIntegrityPN_ ) meIntegrityPN_->setBinContent( ipx, iex, 6. );
00962       if ( meOccupancyPN_ ) meOccupancyPN_->setBinContent( ipx, iex, 0. );
00963       if ( meLaserL1PN_ ) meLaserL1PN_->setBinContent( ipx, iex, 6. );
00964       if ( meLaserL2PN_ ) meLaserL2PN_->setBinContent( ipx, iex, 6. );
00965       if ( meLaserL3PN_ ) meLaserL3PN_->setBinContent( ipx, iex, 6. );
00966       if ( meLaserL4PN_ ) meLaserL4PN_->setBinContent( ipx, iex, 6. );
00967       if ( mePedestalPNG01_ ) mePedestalPNG01_->setBinContent( ipx, iex, 6. );
00968       if ( mePedestalPNG16_ ) mePedestalPNG16_->setBinContent( ipx, iex, 6. );
00969       if ( meTestPulsePNG01_ ) meTestPulsePNG01_->setBinContent( ipx, iex, 6. );
00970       if ( meTestPulsePNG16_ ) meTestPulsePNG16_->setBinContent( ipx, iex, 6. );
00971 
00972     }
00973   }
00974 
00975   for ( int iex = 1; iex <= 34; iex++ ) {
00976     for ( int ipx = 1; ipx <= 72; ipx++ ) {
00977       if ( meTriggerTowerEt_ ) meTriggerTowerEt_->setBinContent( ipx, iex, 0. );
00978       if ( meTriggerTowerEmulError_ ) meTriggerTowerEmulError_->setBinContent( ipx, iex, 6. );
00979       if ( meTriggerTowerTiming_ ) meTriggerTowerTiming_->setBinContent( ipx, iex, 0. );
00980       if ( meTriggerTowerNonSingleTiming_ ) meTriggerTowerNonSingleTiming_->setBinContent( ipx, iex, -1. );
00981     }
00982   }
00983 
00984   if ( meIntegrity_ ) meIntegrity_->setEntries( 0 );
00985   if ( meIntegrityErr_ ) meIntegrityErr_->Reset();
00986   if ( meIntegrityPN_ ) meIntegrityPN_->setEntries( 0 );
00987   if ( meOccupancy_ ) meOccupancy_->setEntries( 0 );
00988   if ( meOccupancy1D_ ) meOccupancy1D_->Reset();
00989   if ( meOccupancyPN_ ) meOccupancyPN_->setEntries( 0 );
00990   if ( meStatusFlags_ ) meStatusFlags_->setEntries( 0 );
00991   if ( meStatusFlagsErr_ ) meStatusFlagsErr_->Reset();
00992   if ( mePedestalOnline_ ) mePedestalOnline_->setEntries( 0 );
00993   if ( mePedestalOnlineErr_ ) mePedestalOnlineErr_->Reset();
00994   if ( mePedestalOnlineMean_ ) mePedestalOnlineMean_->Reset();
00995   if ( mePedestalOnlineRMS_ ) mePedestalOnlineRMS_->Reset();
00996   if ( mePedestalOnlineRMSMap_ ) mePedestalOnlineRMSMap_->Reset();
00997 
00998   if ( meLaserL1_ ) meLaserL1_->setEntries( 0 );
00999   if ( meLaserL1Err_ ) meLaserL1Err_->Reset();
01000   if ( meLaserL1Ampl_ ) meLaserL1Ampl_->Reset();
01001   if ( meLaserL1Timing_ ) meLaserL1Timing_->Reset();
01002   if ( meLaserL1AmplOverPN_ ) meLaserL1AmplOverPN_->Reset();
01003   if ( meLaserL1PN_ ) meLaserL1PN_->setEntries( 0 );
01004   if ( meLaserL1PNErr_ ) meLaserL1PNErr_->Reset();
01005 
01006   if ( meLaserL2_ ) meLaserL2_->setEntries( 0 );
01007   if ( meLaserL2Err_ ) meLaserL2Err_->Reset();
01008   if ( meLaserL2Ampl_ ) meLaserL2Ampl_->Reset();
01009   if ( meLaserL2Timing_ ) meLaserL2Timing_->Reset();
01010   if ( meLaserL2AmplOverPN_ ) meLaserL2AmplOverPN_->Reset();
01011   if ( meLaserL2PN_ ) meLaserL2PN_->setEntries( 0 );
01012   if ( meLaserL2PNErr_ ) meLaserL2PNErr_->Reset();
01013 
01014   if ( meLaserL3_ ) meLaserL3_->setEntries( 0 );
01015   if ( meLaserL3Err_ ) meLaserL3Err_->Reset();
01016   if ( meLaserL3Ampl_ ) meLaserL3Ampl_->Reset();
01017   if ( meLaserL3Timing_ ) meLaserL3Timing_->Reset();
01018   if ( meLaserL3AmplOverPN_ ) meLaserL3AmplOverPN_->Reset();
01019   if ( meLaserL3PN_ ) meLaserL3PN_->setEntries( 0 );
01020   if ( meLaserL3PNErr_ ) meLaserL3PNErr_->Reset();
01021 
01022   if ( meLaserL4_ ) meLaserL4_->setEntries( 0 );
01023   if ( meLaserL4Err_ ) meLaserL4Err_->Reset();
01024   if ( meLaserL4Ampl_ ) meLaserL4Ampl_->Reset();
01025   if ( meLaserL4Timing_ ) meLaserL4Timing_->Reset();
01026   if ( meLaserL4AmplOverPN_ ) meLaserL4AmplOverPN_->Reset();
01027   if ( meLaserL4PN_ ) meLaserL4PN_->setEntries( 0 );
01028   if ( meLaserL4PNErr_ ) meLaserL4PNErr_->Reset();
01029 
01030   if ( mePedestalG01_ ) mePedestalG01_->setEntries( 0 );
01031   if ( mePedestalG06_ ) mePedestalG06_->setEntries( 0 );
01032   if ( mePedestalG12_ ) mePedestalG12_->setEntries( 0 );
01033   if ( mePedestalPNG01_ ) mePedestalPNG01_->setEntries( 0 );
01034   if ( mePedestalPNG16_ ) mePedestalPNG16_->setEntries( 0 );
01035   if ( meTestPulseG01_ ) meTestPulseG01_->setEntries( 0 );
01036   if ( meTestPulseG06_ ) meTestPulseG06_->setEntries( 0 );
01037   if ( meTestPulseG12_ ) meTestPulseG12_->setEntries( 0 );
01038   if ( meTestPulsePNG01_ ) meTestPulsePNG01_->setEntries( 0 );
01039   if ( meTestPulsePNG16_ ) meTestPulsePNG16_->setEntries( 0 );
01040   if ( meTestPulseAmplG01_ ) meTestPulseAmplG01_->Reset();
01041   if ( meTestPulseAmplG06_ ) meTestPulseAmplG06_->Reset();
01042   if ( meTestPulseAmplG12_ ) meTestPulseAmplG12_->Reset();
01043 
01044   if ( meRecHitEnergy_ ) meRecHitEnergy_->setEntries( 0 );
01045   if ( meTiming_ ) meTiming_->setEntries( 0 );
01046   if ( meTimingMean1D_ ) meTimingMean1D_->Reset();
01047   if ( meTimingRMS1D_ ) meTimingRMS1D_->Reset();
01048   if ( meTimingMean_ ) meTimingMean_->Reset();
01049   if ( meTimingRMS_ ) meTimingRMS_->Reset();
01050   if ( meTriggerTowerEt_ ) meTriggerTowerEt_->setEntries( 0 );
01051   if ( meTriggerTowerEmulError_ ) meTriggerTowerEmulError_->setEntries( 0 );
01052   if ( meTriggerTowerTiming_ ) meTriggerTowerTiming_->setEntries( 0 );
01053   if ( meTriggerTowerNonSingleTiming_ ) meTriggerTowerNonSingleTiming_->setEntries( 0 );
01054 
01055   meGlobalSummary_->setEntries( 0 );
01056 
01057   for ( unsigned int i=0; i<clients_.size(); i++ ) {
01058 
01059     EBIntegrityClient* ebic = dynamic_cast<EBIntegrityClient*>(clients_[i]);
01060     EBStatusFlagsClient* ebsfc = dynamic_cast<EBStatusFlagsClient*>(clients_[i]);
01061     EBPedestalOnlineClient* ebpoc = dynamic_cast<EBPedestalOnlineClient*>(clients_[i]);
01062 
01063     EBLaserClient* eblc = dynamic_cast<EBLaserClient*>(clients_[i]);
01064     EBPedestalClient* ebpc = dynamic_cast<EBPedestalClient*>(clients_[i]);
01065     EBTestPulseClient* ebtpc = dynamic_cast<EBTestPulseClient*>(clients_[i]);
01066 
01067     EBTimingClient* ebtmc = dynamic_cast<EBTimingClient*>(clients_[i]);
01068     EBTriggerTowerClient* ebtttc = dynamic_cast<EBTriggerTowerClient*>(clients_[i]);
01069 
01070     MonitorElement *me;
01071     MonitorElement *me_01, *me_02, *me_03;
01072     MonitorElement *me_04, *me_05;
01073     //    MonitorElement *me_f[6], *me_fg[2];
01074     TH2F* h2;
01075     TH2F* h3;
01076 
01077     for ( unsigned int i=0; i<superModules_.size(); i++ ) {
01078 
01079       int ism = superModules_[i];
01080 
01081       char histo[200];
01082 
01083       sprintf(histo, (prefixME_ + "/EBOccupancyTask/EBOT rec hit energy %s").c_str(), Numbers::sEB(ism).c_str());
01084       me = dqmStore_->get(histo);
01085       hot01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hot01_[ism-1] );
01086 
01087       sprintf(histo, (prefixME_ + "/EBPedestalOnlineTask/Gain12/EBPOT pedestal %s G12").c_str(), Numbers::sEB(ism).c_str());
01088       me = dqmStore_->get(histo);
01089       hpot01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hpot01_[ism-1] );
01090 
01091       sprintf(histo, (prefixME_ + "/EBTriggerTowerTask/EBTTT Et map Real Digis %s").c_str(), Numbers::sEB(ism).c_str());
01092       me = dqmStore_->get(histo);
01093       httt01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, httt01_[ism-1] );
01094 
01095       sprintf(histo, (prefixME_ + "/EBTimingTask/EBTMT timing %s").c_str(), Numbers::sEB(ism).c_str());
01096       me = dqmStore_->get(histo);
01097       htmt01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, htmt01_[ism-1] );
01098 
01099       sprintf(histo, (prefixME_ + "/EcalInfo/EBMM DCC").c_str());
01100       me = dqmStore_->get(histo);
01101       norm01_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, norm01_ );
01102 
01103       sprintf(histo, (prefixME_ + "/EBRawDataTask/EBRDT L1A FE errors").c_str());
01104       me = dqmStore_->get(histo);
01105       synch01_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, synch01_ );
01106 
01107       for ( int ie = 1; ie <= 85; ie++ ) {
01108         for ( int ip = 1; ip <= 20; ip++ ) {
01109 
01110           if ( ebic ) {
01111 
01112             me = ebic->meg01_[ism-1];
01113 
01114             if ( me ) {
01115 
01116               float xval = me->getBinContent( ie, ip );
01117 
01118               int iex;
01119               int ipx;
01120 
01121               if ( ism <= 18 ) {
01122                 iex = 1+(85-ie);
01123                 ipx = ip+20*(ism-1);
01124               } else {
01125                 iex = 85+ie;
01126                 ipx = 1+(20-ip)+20*(ism-19);
01127               }
01128 
01129               meIntegrity_->setBinContent( ipx, iex, xval );
01130               if( xval == 0 ) meIntegrityErr_->Fill( ism );
01131 
01132             }
01133 
01134             h2 = ebic->h_[ism-1];
01135 
01136             if ( h2 ) {
01137 
01138               float xval = h2->GetBinContent( ie, ip );
01139 
01140               int iex;
01141               int ipx;
01142 
01143               if ( ism <= 18 ) {
01144                 iex = 1+(85-ie);
01145                 ipx = ip+20*(ism-1);
01146               } else {
01147                 iex = 85+ie;
01148                 ipx = 1+(20-ip)+20*(ism-19);
01149               }
01150 
01151               meOccupancy_->setBinContent( ipx, iex, xval );
01152               if ( xval != 0 ) meOccupancy1D_->Fill( ism, xval );
01153 
01154             }
01155 
01156           }
01157 
01158           if ( ebpoc ) {
01159 
01160             me = ebpoc->meg03_[ism-1];
01161 
01162             if ( me ) {
01163 
01164               int iex;
01165               int ipx;
01166 
01167               if ( ism <= 18 ) {
01168                 iex = 1+(85-ie);
01169                 ipx = ip+20*(ism-1);
01170               } else {
01171                 iex = 85+ie;
01172                 ipx = 1+(20-ip)+20*(ism-19);
01173               }
01174 
01175               float xval = me->getBinContent( ie, ip );
01176 
01177               mePedestalOnline_->setBinContent( ipx, iex, xval );
01178               if ( xval == 0 ) mePedestalOnlineErr_->Fill( ism );
01179 
01180             }
01181 
01182             float num01, mean01, rms01;
01183             bool update01 = UtilsClient::getBinStatistics(hpot01_[ism-1], ie, ip, num01, mean01, rms01);
01184 
01185             if ( update01 ) {
01186 
01187               int iex;
01188               int ipx;
01189 
01190               if ( ism <= 18 ) {
01191                 iex = 1+(85-ie);
01192                 ipx = ip+20*(ism-1);
01193               } else {
01194                 iex = 85+ie;
01195                 ipx = 1+(20-ip)+20*(ism-19);
01196               }
01197 
01198               mePedestalOnlineRMSMap_->setBinContent( ipx, iex, rms01 );
01199 
01200               mePedestalOnlineRMS_->Fill( ism, rms01 );
01201 
01202               mePedestalOnlineMean_->Fill( ism, mean01 );
01203 
01204             }
01205 
01206           }
01207 
01208           if ( eblc ) {
01209 
01210             int iex;
01211             int ipx;
01212 
01213             if ( ism <= 18 ) {
01214               iex = 1+(85-ie);
01215               ipx = ip+20*(ism-1);
01216             } else {
01217               iex = 85+ie;
01218               ipx = 1+(20-ip)+20*(ism-19);
01219             }
01220 
01221             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
01222 
01223               me = eblc->meg01_[ism-1];
01224 
01225               if ( me ) {
01226 
01227                 float xval = me->getBinContent( ie, ip );
01228 
01229                 if ( me->getEntries() != 0 ) {
01230                   meLaserL1_->setBinContent( ipx, iex, xval );
01231                   if ( xval == 0 ) meLaserL1Err_->Fill( ism );
01232                 }
01233 
01234               }
01235 
01236             }
01237 
01238             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
01239 
01240               me = eblc->meg02_[ism-1];
01241 
01242               if ( me ) {
01243 
01244                 float xval = me->getBinContent( ie, ip );
01245 
01246                 if ( me->getEntries() != 0 ) {
01247                   meLaserL2_->setBinContent( ipx, iex, xval );
01248                   if ( xval == 0 ) meLaserL2Err_->Fill( ism );
01249                 }
01250 
01251               }
01252 
01253             }
01254 
01255             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
01256 
01257               me = eblc->meg03_[ism-1];
01258 
01259               if ( me ) {
01260 
01261                 float xval = me->getBinContent( ie, ip );
01262 
01263                 if ( me->getEntries() != 0 ) {
01264                   meLaserL3_->setBinContent( ipx, iex, xval );
01265                   if ( xval == 0 ) meLaserL3Err_->Fill( ism );
01266                 }
01267 
01268               }
01269 
01270             }
01271 
01272             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
01273 
01274               me = eblc->meg04_[ism-1];
01275 
01276               if ( me ) {
01277 
01278                 float xval = me->getBinContent( ie, ip );
01279 
01280                 if ( me->getEntries() != 0 ) {
01281                   meLaserL4_->setBinContent( ipx, iex, xval );
01282                   if ( xval == 0 ) meLaserL4Err_->Fill( ism );
01283                 }
01284 
01285               }
01286 
01287             }
01288 
01289           }
01290 
01291           if ( ebpc ) {
01292 
01293             me_01 = ebpc->meg01_[ism-1];
01294             me_02 = ebpc->meg02_[ism-1];
01295             me_03 = ebpc->meg03_[ism-1];
01296 
01297             int iex;
01298             int ipx;
01299 
01300             if ( ism <= 18 ) {
01301               iex = 1+(85-ie);
01302               ipx = ip+20*(ism-1);
01303             } else {
01304               iex = 85+ie;
01305               ipx = 1+(20-ip)+20*(ism-19);
01306             }
01307 
01308             if ( me_01 ) {
01309               float val_01=me_01->getBinContent(ie,ip);
01310               if ( me_01->getEntries() != 0 ) mePedestalG01_->setBinContent( ipx, iex, val_01 );
01311             }
01312             if ( me_02 ) {
01313               float val_02=me_02->getBinContent(ie,ip);
01314               if ( me_02->getEntries() != 0 ) mePedestalG06_->setBinContent( ipx, iex, val_02 );
01315             }
01316             if ( me_03 ) {
01317               float val_03=me_03->getBinContent(ie,ip);
01318               if ( me_03->getEntries() != 0 ) mePedestalG12_->setBinContent( ipx, iex, val_03 );
01319             }
01320 
01321           }
01322 
01323           if ( ebtpc ) {
01324 
01325             me_01 = ebtpc->meg01_[ism-1];
01326             me_02 = ebtpc->meg02_[ism-1];
01327             me_03 = ebtpc->meg03_[ism-1];
01328 
01329             int iex;
01330             int ipx;
01331 
01332             if ( ism <= 18 ) {
01333               iex = 1+(85-ie);
01334               ipx = ip+20*(ism-1);
01335             } else {
01336               iex = 85+ie;
01337               ipx = 1+(20-ip)+20*(ism-19);
01338             }
01339 
01340             if ( me_01 ) {
01341 
01342               float val_01=me_01->getBinContent(ie,ip);
01343 
01344               if ( me_01->getEntries() != 0 ) meTestPulseG01_->setBinContent( ipx, iex, val_01 );
01345 
01346             }
01347             if ( me_02 ) {
01348 
01349               float val_02=me_02->getBinContent(ie,ip);
01350 
01351               if ( me_02->getEntries() != 0 ) meTestPulseG06_->setBinContent( ipx, iex, val_02 );
01352 
01353             }
01354             if ( me_03 ) {
01355 
01356               float val_03=me_03->getBinContent(ie,ip);
01357 
01358               if ( me_03->getEntries() != 0 ) meTestPulseG12_->setBinContent( ipx, iex, val_03 );
01359 
01360             }
01361 
01362 
01363           }
01364 
01365           if ( hot01_[ism-1] ) {
01366 
01367             float xval = hot01_[ism-1]->GetBinContent( ie, ip );
01368 
01369             int iex;
01370             int ipx;
01371 
01372             if ( ism <= 18 ) {
01373               iex = 1+(85-ie);
01374               ipx = ip+20*(ism-1);
01375             } else {
01376               iex = 85+ie;
01377               ipx = 1+(20-ip)+20*(ism-19);
01378             }
01379 
01380             meRecHitEnergy_->setBinContent( ipx, iex, xval );
01381 
01382           }
01383 
01384           if ( ebtmc ) {
01385 
01386             me = ebtmc->meg01_[ism-1];
01387 
01388             if ( me ) {
01389 
01390               float xval = me->getBinContent( ie, ip );
01391 
01392               int iex;
01393               int ipx;
01394 
01395               if ( ism <= 18 ) {
01396                 iex = 1+(85-ie);
01397                 ipx = ip+20*(ism-1);
01398               } else {
01399                 iex = 85+ie;
01400                 ipx = 1+(20-ip)+20*(ism-19);
01401               }
01402 
01403               meTiming_->setBinContent( ipx, iex, xval );
01404 
01405             }
01406 
01407 
01408             float num02, mean02, rms02;
01409             bool update02 = UtilsClient::getBinStatistics(htmt01_[ism-1], ie, ip, num02, mean02, rms02);
01410             // Task timing map is shifted of +50 ns for graphical reasons. Shift back it.
01411             mean02 -= 50.;
01412 
01413             if ( update02 ) {
01414 
01415               meTimingMean1D_->Fill(mean02);
01416 
01417               meTimingRMS1D_->Fill(rms02);
01418 
01419               meTimingMean_->Fill( ism, mean02 );
01420 
01421               meTimingRMS_->Fill( ism, rms02 );
01422 
01423             }
01424 
01425           }
01426 
01427         }
01428       }
01429 
01430       for (int ie = 1; ie <= 17; ie++ ) {
01431         for (int ip = 1; ip <= 4; ip++ ) {
01432 
01433           int iex;
01434           int ipx;
01435 
01436           if ( ism <= 18 ) {
01437             iex = 1+(17-ie);
01438             ipx = ip+4*(ism-1);
01439           } else {
01440             iex = 17+ie;
01441             ipx = 1+(4-ip)+4*(ism-19);
01442           }
01443 
01444           if ( ebsfc ) {
01445 
01446             me = dqmStore_->get(prefixME_ + "/EcalInfo/EBMM DCC");
01447 
01448             float xval = 6;
01449 
01450             if ( me ) {
01451 
01452               xval = 2;
01453               if ( me->getBinContent( ism ) > 0 ) xval = 1;
01454 
01455             }
01456 
01457             me = ebsfc->meh01_[ism-1];
01458 
01459             if ( me ) {
01460 
01461               if ( me->getBinContent( ie, ip ) > 0 ) xval = 0;
01462 
01463               meStatusFlags_->setBinContent( ipx, iex, xval );
01464 
01465               if ( me->getBinError( ie, ip ) > 0 && me->getBinError( ie, ip ) < 0.1 ) UtilsClient::maskBinContent( meStatusFlags_, ipx, iex );
01466 
01467               if ( xval == 0 ) meStatusFlagsErr_->Fill( ism );
01468 
01469             }
01470 
01471           }
01472 
01473           if ( ebtttc ) {
01474 
01475             float mean01 = 0;
01476             bool hadNonZeroInterest = false;
01477 
01478             if ( httt01_[ism-1] ) {
01479 
01480               mean01 = httt01_[ism-1]->GetBinContent( ie, ip );
01481 
01482               if ( mean01 != 0. ) {
01483                 if ( meTriggerTowerEt_ ) meTriggerTowerEt_->setBinContent( ipx, iex, mean01 );
01484               }
01485 
01486             }
01487 
01488             me = ebtttc->me_o01_[ism-1];
01489 
01490             if ( me ) {
01491 
01492               float xval = me->getBinContent( ie, ip );
01493 
01494               if ( xval != 0. ) {
01495                 meTriggerTowerTiming_->setBinContent( ipx, iex, xval );
01496                 hadNonZeroInterest = true;
01497               }
01498 
01499             }
01500 
01501             me = ebtttc->me_o02_[ism-1];
01502 
01503             if ( me ) {
01504 
01505               float xval = me->getBinContent( ie, ip );
01506 
01507               if ( xval != 0. ) {
01508                 meTriggerTowerNonSingleTiming_->setBinContent( ipx, iex, xval );
01509               }
01510 
01511             }
01512 
01513             float xval = 2;
01514             if( mean01 > 0. ) {
01515 
01516               h2 = ebtttc->l01_[ism-1];
01517               h3 = ebtttc->l02_[ism-1];
01518 
01519               if ( h2 && h3 ) {
01520 
01521                 // float emulErrorVal = h2->GetBinContent( ie, ip ) + h3->GetBinContent( ie, ip );
01522                 float emulErrorVal = h2->GetBinContent( ie, ip );
01523 
01524                 if( emulErrorVal!=0 && hadNonZeroInterest ) xval = 0;
01525 
01526               }
01527 
01528               if ( xval!=0 && hadNonZeroInterest ) xval = 1;
01529 
01530             }
01531 
01532             meTriggerTowerEmulError_->setBinContent( ipx, iex, xval );
01533 
01534           }
01535 
01536         }
01537       }
01538 
01539       // PN's summaries
01540       for( int i = 1; i <= 10; i++ ) {
01541         for( int j = 1; j <= 5; j++ ) {
01542 
01543           int ichanx;
01544           int ipseudostripx;
01545 
01546           if(ism<=18) {
01547             ichanx = i;
01548             ipseudostripx = j+5*(ism-1);
01549           } else {
01550             ichanx = i+10;
01551             ipseudostripx = j+5*(ism-19);
01552           }
01553 
01554           if ( ebic ) {
01555 
01556             me_04 = ebic->meg02_[ism-1];
01557             h2 = ebic->hmem_[ism-1];
01558 
01559             if( me_04 ) {
01560 
01561               float xval = me_04->getBinContent(i,j);
01562               meIntegrityPN_->setBinContent( ipseudostripx, ichanx, xval );
01563 
01564             }
01565 
01566             if ( h2 ) {
01567 
01568               float xval = h2->GetBinContent(i,1);
01569               meOccupancyPN_->setBinContent( ipseudostripx, ichanx, xval );
01570 
01571             }
01572 
01573           }
01574 
01575           if ( ebpc ) {
01576 
01577             me_04 = ebpc->meg04_[ism-1];
01578             me_05 = ebpc->meg05_[ism-1];
01579 
01580             if( me_04 ) {
01581               float val_04=me_04->getBinContent(i,1);
01582               mePedestalPNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
01583             }
01584             if( me_05 ) {
01585               float val_05=me_05->getBinContent(i,1);
01586               mePedestalPNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
01587             }
01588 
01589           }
01590 
01591           if ( ebtpc ) {
01592 
01593             me_04 = ebtpc->meg04_[ism-1];
01594             me_05 = ebtpc->meg05_[ism-1];
01595 
01596             if( me_04 ) {
01597               float val_04=me_04->getBinContent(i,1);
01598               meTestPulsePNG01_->setBinContent( ipseudostripx, ichanx, val_04 );
01599             }
01600             if( me_05 ) {
01601               float val_05=me_05->getBinContent(i,1);
01602               meTestPulsePNG16_->setBinContent( ipseudostripx, ichanx, val_05 );
01603             }
01604 
01605           }
01606 
01607           if ( eblc ) {
01608 
01609             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
01610 
01611               me = eblc->meg09_[ism-1];
01612 
01613               if( me ) {
01614 
01615                 float xval = me->getBinContent(i,1);
01616 
01617                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
01618                   meLaserL1PN_->setBinContent( ipseudostripx, ichanx, xval );
01619                   if ( xval == 0 ) meLaserL1PNErr_->Fill( ism );
01620                 }
01621 
01622               }
01623 
01624             }
01625 
01626             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
01627 
01628               me = eblc->meg10_[ism-1];
01629 
01630               if( me ) {
01631 
01632                 float xval = me->getBinContent(i,1);
01633 
01634                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
01635                   meLaserL2PN_->setBinContent( ipseudostripx, ichanx, xval );
01636                   if ( xval == 0 ) meLaserL2PNErr_->Fill( ism );
01637                 }
01638 
01639               }
01640 
01641             }
01642 
01643             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
01644 
01645               me = eblc->meg11_[ism-1];
01646 
01647               if( me ) {
01648 
01649                 float xval = me->getBinContent(i,1);
01650 
01651                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
01652                   meLaserL3PN_->setBinContent( ipseudostripx, ichanx, xval );
01653                   if ( xval == 0 ) meLaserL3PNErr_->Fill( ism );
01654                 }
01655 
01656               }
01657 
01658             }
01659 
01660             if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
01661 
01662               me = eblc->meg12_[ism-1];
01663 
01664               if( me ) {
01665 
01666                 float xval = me->getBinContent(i,1);
01667 
01668                 if ( me->getEntries() != 0 && me->getEntries() != 0 ) {
01669                   meLaserL4PN_->setBinContent( ipseudostripx, ichanx, xval );
01670                   if ( xval == 0 ) meLaserL4PNErr_->Fill( ism );
01671                 }
01672 
01673               }
01674 
01675             }
01676 
01677           }
01678 
01679         }
01680       }
01681 
01682       for(int chan=0; chan<1700; chan++) {
01683 
01684         int ie = (chan)/20 + 1;
01685         int ip = (chan)%20 + 1;
01686 
01687         // laser 1D summaries
01688         if ( eblc ) {
01689 
01690           if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
01691 
01692             MonitorElement *meg = eblc->meg01_[ism-1];
01693 
01694             float xval = 2;
01695             if ( meg ) xval = meg->getBinContent( ie, ip );
01696 
01697             // exclude channels without laser data (yellow in the quality map)
01698             if( xval != 2 && xval != 5 ) {
01699 
01700               MonitorElement* mea01 = eblc->mea01_[ism-1];
01701               MonitorElement* met01 = eblc->met01_[ism-1];
01702               MonitorElement* meaopn01 = eblc->meaopn01_[ism-1];
01703 
01704               if( mea01 && met01 && meaopn01 ) {
01705                 meLaserL1Ampl_->Fill( ism, mea01->getBinContent( chan+1 ) );
01706                 if( met01->getBinContent( chan+1 ) > 0. ) meLaserL1Timing_->Fill( ism, met01->getBinContent( chan+1 ) );
01707                 meLaserL1AmplOverPN_->Fill( ism, meaopn01->getBinContent( chan+1 ) );
01708               }
01709 
01710             }
01711 
01712           }
01713 
01714           if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
01715 
01716             MonitorElement *meg = eblc->meg02_[ism-1];
01717 
01718             float xval = 2;
01719             if ( meg ) xval = meg->getBinContent( ie, ip );
01720 
01721             // exclude channels without laser data (yellow in the quality map)
01722             if( xval != 2 && xval != 5 ) {
01723 
01724               MonitorElement* mea02 = eblc->mea02_[ism-1];
01725               MonitorElement* met02 = eblc->met02_[ism-1];
01726               MonitorElement* meaopn02 = eblc->meaopn02_[ism-1];
01727 
01728               if( mea02 && met02 && meaopn02 ) {
01729                 meLaserL2Ampl_->Fill( ism, mea02->getBinContent( chan+1 ) );
01730                 if( met02->getBinContent( chan+1 ) > 0. ) meLaserL2Timing_->Fill( ism, met02->getBinContent( chan+1 ) );
01731                 meLaserL2AmplOverPN_->Fill( ism, meaopn02->getBinContent( chan+1 ) );
01732               }
01733 
01734             }
01735 
01736           }
01737 
01738           if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
01739 
01740             MonitorElement *meg = eblc->meg03_[ism-1];
01741 
01742             float xval = 2;
01743             if ( meg ) xval = meg->getBinContent( ie, ip );
01744 
01745             // exclude channels without laser data (yellow in the quality map)
01746             if( xval != 2 && xval != 5 ) {
01747 
01748               MonitorElement* mea03 = eblc->mea03_[ism-1];
01749               MonitorElement* met03 = eblc->met03_[ism-1];
01750               MonitorElement* meaopn03 = eblc->meaopn03_[ism-1];
01751 
01752               if( mea03 && met03 && meaopn03 ) {
01753                 meLaserL3Ampl_->Fill( ism, mea03->getBinContent( chan+1 ) );
01754                 if( met03->getBinContent( chan+1 ) > 0. ) meLaserL3Timing_->Fill( ism, met03->getBinContent( chan+1 ) );
01755                 meLaserL3AmplOverPN_->Fill( ism, meaopn03->getBinContent( chan+1 ) );
01756               }
01757 
01758             }
01759 
01760           }
01761 
01762           if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
01763 
01764             MonitorElement *meg = eblc->meg04_[ism-1];
01765 
01766             float xval = 2;
01767             if ( meg ) xval = meg->getBinContent( ie, ip );
01768 
01769             // exclude channels without laser data (yellow in the quality map)
01770             if( xval != 2 && xval != 5 ) {
01771 
01772               MonitorElement* mea04 = eblc->mea04_[ism-1];
01773               MonitorElement* met04 = eblc->met04_[ism-1];
01774               MonitorElement* meaopn04 = eblc->meaopn04_[ism-1];
01775 
01776               if( mea04 && met04 && meaopn04 ) {
01777                 meLaserL4Ampl_->Fill( ism, mea04->getBinContent( chan+1 ) );
01778                 if( met04->getBinContent( chan+1 ) > 0. ) meLaserL4Timing_->Fill( ism, met04->getBinContent( chan+1 ) );
01779                 meLaserL4AmplOverPN_->Fill( ism, meaopn04->getBinContent( chan+1 ) );
01780               }
01781 
01782             }
01783 
01784           }
01785 
01786         }
01787 
01788         if ( ebtpc ) {
01789 
01790           MonitorElement *meg01 = ebtpc->meg01_[ism-1];
01791           MonitorElement *meg02 = ebtpc->meg02_[ism-1];
01792           MonitorElement *meg03 = ebtpc->meg03_[ism-1];
01793 
01794           if ( meg01 ) {
01795 
01796             float xval01 = meg01->getBinContent(ie,ip);
01797 
01798             if ( xval01 != 2 && xval01 != 5 ) {
01799 
01800               me = ebtpc->mea01_[ism-1];
01801 
01802               if ( me ) {
01803 
01804                 meTestPulseAmplG01_->Fill( ism, me->getBinContent( chan+1 ) );
01805 
01806               }
01807 
01808             }
01809 
01810           }
01811 
01812           if ( meg02 ) {
01813 
01814             float xval02 = meg02->getBinContent(ie,ip);
01815 
01816             if ( xval02 != 2 && xval02 != 5 ) {
01817 
01818               me = ebtpc->mea02_[ism-1];
01819 
01820               if ( me ) {
01821 
01822                 meTestPulseAmplG06_->Fill( ism, me->getBinContent( chan+1 ) );
01823 
01824               }
01825 
01826             }
01827 
01828           }
01829 
01830           if ( meg03 ) {
01831 
01832             float xval03 = meg03->getBinContent(ie,ip);
01833 
01834             if ( xval03 != 2 && xval03 != 5 ) {
01835 
01836               me = ebtpc->mea03_[ism-1];
01837 
01838               if ( me ) {
01839 
01840                 meTestPulseAmplG12_->Fill( ism, me->getBinContent( chan+1 ) );
01841 
01842               }
01843 
01844             }
01845 
01846           }
01847 
01848         }
01849 
01850       }  // loop on channels
01851 
01852     } // loop on SM
01853 
01854   } // loop on clients
01855 
01856   // The global-summary
01857   int nGlobalErrors = 0;
01858   int nGlobalErrorsEB[36];
01859   int nValidChannels = 0;
01860   int nValidChannelsEB[36];
01861 
01862   for (int i = 0; i < 36; i++) {
01863     nGlobalErrorsEB[i] = 0;
01864     nValidChannelsEB[i] = 0;
01865   }
01866 
01867   for ( int iex = 1; iex <= 170; iex++ ) {
01868     for ( int ipx = 1; ipx <= 360; ipx++ ) {
01869 
01870       if(meIntegrity_ && mePedestalOnline_ && meTiming_ && meStatusFlags_ && meTriggerTowerEmulError_) {
01871 
01872         int ism = (ipx-1)/20 + 1 ;
01873         if ( iex>85 ) ism+=18;
01874 
01875         float xval = 6;
01876         float val_in = meIntegrity_->getBinContent(ipx,iex);
01877         float val_po = mePedestalOnline_->getBinContent(ipx,iex);
01878         float val_tm = meTiming_->getBinContent(ipx,iex);
01879         float val_sf = meStatusFlags_->getBinContent((ipx-1)/5+1,(iex-1)/5+1);
01880         // float val_ee = meTriggerTowerEmulError_->getBinContent((ipx-1)/5+1,(iex-1)/5+1); // removed from the global summary temporarily
01881         float val_ee = 1;
01882 
01883         // combine all the available wavelenghts in unique laser status
01884         // for each laser turn dark color and yellow into bright green
01885         float val_ls_1=2, val_ls_2=2, val_ls_3=2, val_ls_4=2;
01886         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 1) != laserWavelengths_.end() ) {
01887           if ( meLaserL1_ ) val_ls_1 = meLaserL1_->getBinContent(ipx,iex);
01888           if(val_ls_1==2 || val_ls_1==3 || val_ls_1==4 || val_ls_1==5) val_ls_1=1;
01889         }
01890         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 2) != laserWavelengths_.end() ) {
01891           if ( meLaserL2_ ) val_ls_2 = meLaserL2_->getBinContent(ipx,iex);
01892           if(val_ls_2==2 || val_ls_2==3 || val_ls_2==4 || val_ls_2==5) val_ls_2=1;
01893         }
01894         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 3) != laserWavelengths_.end() ) {
01895           if ( meLaserL3_ ) val_ls_3 = meLaserL3_->getBinContent(ipx,iex);
01896           if(val_ls_3==2 || val_ls_3==3 || val_ls_3==4 || val_ls_3==5) val_ls_3=1;
01897         }
01898         if ( find(laserWavelengths_.begin(), laserWavelengths_.end(), 4) != laserWavelengths_.end() ) {
01899           if ( meLaserL4_ ) val_ls_4 = meLaserL4_->getBinContent(ipx,iex);
01900           if(val_ls_4==2 || val_ls_4==3 || val_ls_4==4 || val_ls_4==5) val_ls_4=1;
01901         }
01902 
01903         float val_ls = 1;
01904         if (val_ls_1 == 0 || val_ls_2==0 || val_ls_3==0 || val_ls_4==0) val_ls=0;
01905 
01906         // DO NOT CONSIDER CALIBRATION EVENTS IN THE REPORT SUMMARY UNTIL LHC COLLISIONS
01907         val_ls = 1;
01908 
01909         // turn each dark color (masked channel) to bright green
01910         // for laser & timing & trigger turn also yellow into bright green
01911         // for pedestal online too because is not computed in calibration events
01912 
01913         //  0/3 = red/dark red
01914         //  1/4 = green/dark green
01915         //  2/5 = yellow/dark yellow
01916         //  6   = unknown
01917 
01918         if(             val_in==3 || val_in==4 || val_in==5) val_in=1;
01919         if(val_po==2 || val_po==3 || val_po==4 || val_po==5) val_po=1;
01920         if(val_tm==2 || val_tm==3 || val_tm==4 || val_tm==5) val_tm=1;
01921         if(             val_sf==3 || val_sf==4 || val_sf==5) val_sf=1;
01922         if(val_ee==2 || val_ee==3 || val_ee==4 || val_ee==5) val_ee=1;
01923 
01924         if(val_in==6) xval=6;
01925         else if(val_in==0) xval=0;
01926         else if(val_po==0 || val_ls==0 || val_tm==0 || val_sf==0 || val_ee==0) xval=0;
01927         else if(val_po==2 || val_ls==2 || val_tm==2 || val_sf==2 || val_ee==2) xval=2;
01928         else xval=1;
01929 
01930         // if the SM is entirely not read, the masked channels
01931         // are reverted back to yellow
01932         float iEntries=0;
01933 
01934         if(norm01_ && synch01_) {
01935           float frac_synch_errors = 0.;
01936           float norm = norm01_->GetBinContent(ism);
01937           if(norm > 0) frac_synch_errors = float(synch01_->GetBinContent(ism))/float(norm);
01938           float val_sy = (frac_synch_errors <= synchErrorThreshold_);
01939           if(val_sy==0) xval=0;
01940         }
01941 
01942         std::vector<int>::iterator iter = find(superModules_.begin(), superModules_.end(), ism);
01943         if (iter != superModules_.end()) {
01944           for ( unsigned int i=0; i<clients_.size(); i++ ) {
01945             EBIntegrityClient* ebic = dynamic_cast<EBIntegrityClient*>(clients_[i]);
01946             if ( ebic ) {
01947               TH2F* h2 = ebic->h_[ism-1];
01948               if ( h2 ) {
01949                 iEntries = h2->GetEntries();
01950               }
01951             }
01952           }
01953         }
01954 
01955         if ( iEntries==0 ) {
01956           xval=2;
01957         }
01958 
01959         meGlobalSummary_->setBinContent( ipx, iex, xval );
01960 
01961         if ( xval >= 0 && xval <= 5 ) {
01962           if ( xval != 2 && xval != 5 ) ++nValidChannels;
01963           if ( iex <= 85 ) {
01964             if ( xval != 2 && xval != 5 ) ++nValidChannelsEB[(ipx-1)/20];
01965           } else {
01966             if ( xval != 2 && xval != 5 ) ++nValidChannelsEB[18+(ipx-1)/20];
01967           }
01968           if ( xval == 0 ) ++nGlobalErrors;
01969           if ( iex <= 85 ) {
01970             if ( xval == 0 ) ++nGlobalErrorsEB[(ipx-1)/20];
01971           } else {
01972             if ( xval == 0 ) ++nGlobalErrorsEB[18+(ipx-1)/20];
01973           }
01974         }
01975 
01976       }
01977 
01978     }
01979   }
01980 
01981   MonitorElement* me;
01982 
01983   float reportSummary = -1.0;
01984   if ( nValidChannels != 0 )
01985     reportSummary = 1.0 - float(nGlobalErrors)/float(nValidChannels);
01986   me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummary");
01987   if ( me ) me->Fill(reportSummary);
01988 
01989   char histo[200];
01990 
01991   for (int i = 0; i < 36; i++) {
01992     float reportSummaryEB = -1.0;
01993     if ( nValidChannelsEB[i] != 0 )
01994       reportSummaryEB = 1.0 - float(nGlobalErrorsEB[i])/float(nValidChannelsEB[i]);
01995     sprintf(histo, "EcalBarrel_%s", Numbers::sEB(i+1).c_str());
01996     me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryContents/" + histo);
01997     if ( me ) me->Fill(reportSummaryEB);
01998   }
01999 
02000   me = dqmStore_->get(prefixME_ + "/EventInfo/reportSummaryMap");
02001   if ( me ) {
02002 
02003     int nValidChannelsTT[72][34];
02004     int nGlobalErrorsTT[72][34];
02005     for ( int iettx = 0; iettx < 34; iettx++ ) {
02006       for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
02007         nValidChannelsTT[ipttx][iettx] = 0;
02008         nGlobalErrorsTT[ipttx][iettx] = 0;
02009       }
02010     }
02011 
02012     for ( int iex = 1; iex <= 170; iex++ ) {
02013       for ( int ipx = 1; ipx <= 360; ipx++ ) {
02014 
02015         int iettx = (iex-1)/5+1;
02016         int ipttx = (ipx-1)/5+1;
02017 
02018         float xval = meGlobalSummary_->getBinContent( ipx, iex );
02019 
02020         if ( xval >= 0 && xval <= 5 ) {
02021           if ( xval != 2 && xval != 5 ) ++nValidChannelsTT[ipttx-1][iettx-1];
02022           if ( xval == 0 ) ++nGlobalErrorsTT[ipttx-1][iettx-1];
02023         }
02024 
02025       }
02026     }
02027 
02028     for ( int iettx = 0; iettx < 34; iettx++ ) {
02029       for ( int ipttx = 0; ipttx < 72; ipttx++ ) {
02030 
02031         float xval = -1.0;
02032         if ( nValidChannelsTT[ipttx][iettx] != 0 )
02033           xval = 1.0 - float(nGlobalErrorsTT[ipttx][iettx])/float(nValidChannelsTT[ipttx][iettx]);
02034 
02035         me->setBinContent( ipttx+1, iettx+1, xval );
02036 
02037       }
02038     }
02039 
02040   }
02041 
02042 }
02043