CMS 3D CMS Logo

EBLaserClient.cc

Go to the documentation of this file.
00001 /*
00002  * \file EBLaserClient.cc
00003  *
00004  * $Date: 2008/10/07 18:34:22 $
00005  * $Revision: 1.242 $
00006  * \author G. Della Ricca
00007  * \author G. Franzoni
00008  *
00009 */
00010 
00011 #include <memory>
00012 #include <iostream>
00013 #include <fstream>
00014 #include <iomanip>
00015 #include <math.h>
00016 
00017 #include "TCanvas.h"
00018 #include "TStyle.h"
00019 
00020 #include "DQMServices/Core/interface/DQMStore.h"
00021 
00022 #include "OnlineDB/EcalCondDB/interface/MonLaserBlueDat.h"
00023 #include "OnlineDB/EcalCondDB/interface/MonLaserGreenDat.h"
00024 #include "OnlineDB/EcalCondDB/interface/MonLaserIRedDat.h"
00025 #include "OnlineDB/EcalCondDB/interface/MonLaserRedDat.h"
00026 #include "OnlineDB/EcalCondDB/interface/MonPNBlueDat.h"
00027 #include "OnlineDB/EcalCondDB/interface/MonPNGreenDat.h"
00028 #include "OnlineDB/EcalCondDB/interface/MonPNIRedDat.h"
00029 #include "OnlineDB/EcalCondDB/interface/MonPNRedDat.h"
00030 #include "OnlineDB/EcalCondDB/interface/MonTimingLaserBlueCrystalDat.h"
00031 #include "OnlineDB/EcalCondDB/interface/MonTimingLaserGreenCrystalDat.h"
00032 #include "OnlineDB/EcalCondDB/interface/MonTimingLaserIRedCrystalDat.h"
00033 #include "OnlineDB/EcalCondDB/interface/MonTimingLaserRedCrystalDat.h"
00034 #include "OnlineDB/EcalCondDB/interface/RunCrystalErrorsDat.h"
00035 #include "OnlineDB/EcalCondDB/interface/RunTTErrorsDat.h"
00036 #include "OnlineDB/EcalCondDB/interface/RunPNErrorsDat.h"
00037 
00038 #include "OnlineDB/EcalCondDB/interface/EcalCondDBInterface.h"
00039 
00040 #include "CondTools/Ecal/interface/EcalErrorDictionary.h"
00041 
00042 #include "DQM/EcalCommon/interface/EcalErrorMask.h"
00043 #include "DQM/EcalCommon/interface/UtilsClient.h"
00044 #include "DQM/EcalCommon/interface/LogicID.h"
00045 #include "DQM/EcalCommon/interface/Numbers.h"
00046 
00047 #include <DQM/EcalBarrelMonitorClient/interface/EBLaserClient.h>
00048 
00049 using namespace cms;
00050 using namespace edm;
00051 using namespace std;
00052 
00053 EBLaserClient::EBLaserClient(const ParameterSet& ps) {
00054 
00055   // cloneME switch
00056   cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
00057 
00058   // verbose switch
00059   verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
00060 
00061   // debug switch
00062   debug_ = ps.getUntrackedParameter<bool>("debug", false);
00063 
00064   // prefixME path
00065   prefixME_ = ps.getUntrackedParameter<string>("prefixME", "");
00066 
00067   // enableCleanup_ switch
00068   enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
00069 
00070   // vector of selected Super Modules (Defaults to all 36).
00071   superModules_.reserve(36);
00072   for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
00073   superModules_ = ps.getUntrackedParameter<vector<int> >("superModules", superModules_);
00074 
00075   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00076 
00077     int ism = superModules_[i];
00078 
00079     h01_[ism-1] = 0;
00080     h02_[ism-1] = 0;
00081     h03_[ism-1] = 0;
00082     h04_[ism-1] = 0;
00083     h05_[ism-1] = 0;
00084     h06_[ism-1] = 0;
00085     h07_[ism-1] = 0;
00086     h08_[ism-1] = 0;
00087 
00088     h09_[ism-1] = 0;
00089     h10_[ism-1] = 0;
00090     h11_[ism-1] = 0;
00091     h12_[ism-1] = 0;
00092 
00093     h13_[ism-1] = 0;
00094     h14_[ism-1] = 0;
00095     h15_[ism-1] = 0;
00096     h16_[ism-1] = 0;
00097     h17_[ism-1] = 0;
00098     h18_[ism-1] = 0;
00099     h19_[ism-1] = 0;
00100     h20_[ism-1] = 0;
00101 
00102     h21_[ism-1] = 0;
00103     h22_[ism-1] = 0;
00104     h23_[ism-1] = 0;
00105     h24_[ism-1] = 0;
00106 
00107     hs01_[ism-1] = 0;
00108     hs02_[ism-1] = 0;
00109     hs03_[ism-1] = 0;
00110     hs04_[ism-1] = 0;
00111 
00112     hs05_[ism-1] = 0;
00113     hs06_[ism-1] = 0;
00114     hs07_[ism-1] = 0;
00115     hs08_[ism-1] = 0;
00116 
00117     i01_[ism-1] = 0;
00118     i02_[ism-1] = 0;
00119     i03_[ism-1] = 0;
00120     i04_[ism-1] = 0;
00121     i05_[ism-1] = 0;
00122     i06_[ism-1] = 0;
00123     i07_[ism-1] = 0;
00124     i08_[ism-1] = 0;
00125 
00126     i09_[ism-1] = 0;
00127     i10_[ism-1] = 0;
00128     i11_[ism-1] = 0;
00129     i12_[ism-1] = 0;
00130     i13_[ism-1] = 0;
00131     i14_[ism-1] = 0;
00132     i15_[ism-1] = 0;
00133     i16_[ism-1] = 0;
00134 
00135   }
00136 
00137   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00138 
00139     int ism = superModules_[i];
00140 
00141     meg01_[ism-1] = 0;
00142     meg02_[ism-1] = 0;
00143     meg03_[ism-1] = 0;
00144     meg04_[ism-1] = 0;
00145 
00146     meg05_[ism-1] = 0;
00147     meg06_[ism-1] = 0;
00148     meg07_[ism-1] = 0;
00149     meg08_[ism-1] = 0;
00150     meg09_[ism-1] = 0;
00151     meg10_[ism-1] = 0;
00152     meg11_[ism-1] = 0;
00153     meg12_[ism-1] = 0;
00154 
00155     mea01_[ism-1] = 0;
00156     mea02_[ism-1] = 0;
00157     mea03_[ism-1] = 0;
00158     mea04_[ism-1] = 0;
00159     mea05_[ism-1] = 0;
00160     mea06_[ism-1] = 0;
00161     mea07_[ism-1] = 0;
00162     mea08_[ism-1] = 0;
00163 
00164     met01_[ism-1] = 0;
00165     met02_[ism-1] = 0;
00166     met03_[ism-1] = 0;
00167     met04_[ism-1] = 0;
00168     met05_[ism-1] = 0;
00169     met06_[ism-1] = 0;
00170     met07_[ism-1] = 0;
00171     met08_[ism-1] = 0;
00172 
00173     metav01_[ism-1] = 0;
00174     metav02_[ism-1] = 0;
00175     metav03_[ism-1] = 0;
00176     metav04_[ism-1] = 0;
00177     metav05_[ism-1] = 0;
00178     metav06_[ism-1] = 0;
00179     metav07_[ism-1] = 0;
00180     metav08_[ism-1] = 0;
00181 
00182     metrms01_[ism-1] = 0;
00183     metrms02_[ism-1] = 0;
00184     metrms03_[ism-1] = 0;
00185     metrms04_[ism-1] = 0;
00186     metrms05_[ism-1] = 0;
00187     metrms06_[ism-1] = 0;
00188     metrms07_[ism-1] = 0;
00189     metrms08_[ism-1] = 0;
00190 
00191     meaopn01_[ism-1] = 0;
00192     meaopn02_[ism-1] = 0;
00193     meaopn03_[ism-1] = 0;
00194     meaopn04_[ism-1] = 0;
00195     meaopn05_[ism-1] = 0;
00196     meaopn06_[ism-1] = 0;
00197     meaopn07_[ism-1] = 0;
00198     meaopn08_[ism-1] = 0;
00199 
00200     mepnprms01_[ism-1] = 0;
00201     mepnprms02_[ism-1] = 0;
00202     mepnprms03_[ism-1] = 0;
00203     mepnprms04_[ism-1] = 0;
00204     mepnprms05_[ism-1] = 0;
00205     mepnprms06_[ism-1] = 0;
00206     mepnprms07_[ism-1] = 0;
00207     mepnprms08_[ism-1] = 0;
00208 
00209     me_hs01_[ism-1] = 0;
00210     me_hs02_[ism-1] = 0;
00211     me_hs03_[ism-1] = 0;
00212     me_hs04_[ism-1] = 0;
00213     me_hs05_[ism-1] = 0;
00214     me_hs06_[ism-1] = 0;
00215     me_hs07_[ism-1] = 0;
00216     me_hs08_[ism-1] = 0;
00217 
00218   }
00219 
00220   percentVariation_ = 0.4;
00221 
00222   amplitudeThreshold_ = 100.;
00223 
00224   amplitudeThresholdPnG01_ = 50.;
00225   amplitudeThresholdPnG16_ = 50.;
00226 
00227   pedPnExpectedMean_[0] = 750.0;
00228   pedPnExpectedMean_[1] = 750.0;
00229 
00230   pedPnDiscrepancyMean_[0] = 100.0;
00231   pedPnDiscrepancyMean_[1] = 100.0;
00232 
00233   pedPnRMSThreshold_[0] = 1.0; // value at h4; expected nominal: 0.5
00234   pedPnRMSThreshold_[1] = 3.0; // value at h4; expected nominal: 1.6
00235 
00236 }
00237 
00238 EBLaserClient::~EBLaserClient() {
00239 
00240 }
00241 
00242 void EBLaserClient::beginJob(DQMStore* dqmStore) {
00243 
00244   dqmStore_ = dqmStore;
00245 
00246   if ( debug_ ) cout << "EBLaserClient: beginJob" << endl;
00247 
00248   ievt_ = 0;
00249   jevt_ = 0;
00250 
00251 }
00252 
00253 void EBLaserClient::beginRun(void) {
00254 
00255   if ( debug_ ) cout << "EBLaserClient: beginRun" << endl;
00256 
00257   jevt_ = 0;
00258 
00259   this->setup();
00260 
00261 }
00262 
00263 void EBLaserClient::endJob(void) {
00264 
00265   if ( debug_ ) cout << "EBLaserClient: endJob, ievt = " << ievt_ << endl;
00266 
00267   this->cleanup();
00268 
00269 }
00270 
00271 void EBLaserClient::endRun(void) {
00272 
00273   if ( debug_ ) cout << "EBLaserClient: endRun, jevt = " << jevt_ << endl;
00274 
00275   this->cleanup();
00276 
00277 }
00278 
00279 void EBLaserClient::setup(void) {
00280 
00281   char histo[200];
00282 
00283   dqmStore_->setCurrentFolder( prefixME_ + "/EBLaserClient" );
00284 
00285   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00286 
00287     int ism = superModules_[i];
00288 
00289     if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
00290     sprintf(histo, "EBLT laser quality L1 %s", Numbers::sEB(ism).c_str());
00291     meg01_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
00292     meg01_[ism-1]->setAxisTitle("ieta", 1);
00293     meg01_[ism-1]->setAxisTitle("iphi", 2);
00294     if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
00295     sprintf(histo, "EBLT laser quality L2 %s", Numbers::sEB(ism).c_str());
00296     meg02_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
00297     meg02_[ism-1]->setAxisTitle("ieta", 1);
00298     meg02_[ism-1]->setAxisTitle("iphi", 2);
00299     if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() );
00300     sprintf(histo, "EBLT laser quality L3 %s", Numbers::sEB(ism).c_str());
00301     meg03_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
00302     meg03_[ism-1]->setAxisTitle("ieta", 1);
00303     meg03_[ism-1]->setAxisTitle("iphi", 2);
00304     if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() );
00305     sprintf(histo, "EBLT laser quality L4 %s", Numbers::sEB(ism).c_str());
00306     meg04_[ism-1] = dqmStore_->book2D(histo, histo, 85, 0., 85., 20, 0., 20.);
00307     meg04_[ism-1]->setAxisTitle("ieta", 1);
00308     meg04_[ism-1]->setAxisTitle("iphi", 2);
00309 
00310     if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
00311     sprintf(histo, "EBLT laser quality L1 PNs G01 %s", Numbers::sEB(ism).c_str());
00312     meg05_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
00313     meg05_[ism-1]->setAxisTitle("pseudo-strip", 1);
00314     meg05_[ism-1]->setAxisTitle("channel", 2);
00315     if ( meg06_[ism-1] ) dqmStore_->removeElement( meg06_[ism-1]->getName() );
00316     sprintf(histo, "EBLT laser quality L2 PNs G01 %s", Numbers::sEB(ism).c_str());
00317     meg06_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
00318     meg06_[ism-1]->setAxisTitle("pseudo-strip", 1);
00319     meg06_[ism-1]->setAxisTitle("channel", 2);
00320     if ( meg07_[ism-1] ) dqmStore_->removeElement( meg07_[ism-1]->getName() );
00321     sprintf(histo, "EBLT laser quality L3 PNs G01 %s", Numbers::sEB(ism).c_str());
00322     meg07_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
00323     meg07_[ism-1]->setAxisTitle("pseudo-strip", 1);
00324     meg07_[ism-1]->setAxisTitle("channel", 2);
00325     if ( meg08_[ism-1] ) dqmStore_->removeElement( meg08_[ism-1]->getName() );
00326     sprintf(histo, "EBLT laser quality L4 PNs G01 %s", Numbers::sEB(ism).c_str());
00327     meg08_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
00328     meg08_[ism-1]->setAxisTitle("pseudo-strip", 1);
00329     meg08_[ism-1]->setAxisTitle("channel", 2);
00330     if ( meg09_[ism-1] ) dqmStore_->removeElement( meg09_[ism-1]->getName() );
00331     sprintf(histo, "EBLT laser quality L1 PNs G16 %s", Numbers::sEB(ism).c_str());
00332     meg09_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
00333     meg09_[ism-1]->setAxisTitle("pseudo-strip", 1);
00334     meg09_[ism-1]->setAxisTitle("channel", 2);
00335     if ( meg10_[ism-1] ) dqmStore_->removeElement( meg10_[ism-1]->getName() );
00336     sprintf(histo, "EBLT laser quality L2 PNs G16 %s", Numbers::sEB(ism).c_str());
00337     meg10_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
00338     meg10_[ism-1]->setAxisTitle("pseudo-strip", 1);
00339     meg10_[ism-1]->setAxisTitle("channel", 2);
00340     if ( meg11_[ism-1] ) dqmStore_->removeElement( meg11_[ism-1]->getName() );
00341     sprintf(histo, "EBLT laser quality L3 PNs G16 %s", Numbers::sEB(ism).c_str());
00342     meg11_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
00343     meg11_[ism-1]->setAxisTitle("pseudo-strip", 1);
00344     meg11_[ism-1]->setAxisTitle("channel", 2);
00345     if ( meg12_[ism-1] ) dqmStore_->removeElement( meg12_[ism-1]->getName() );
00346     sprintf(histo, "EBLT laser quality L4 PNs G16 %s", Numbers::sEB(ism).c_str());
00347     meg12_[ism-1] = dqmStore_->book2D(histo, histo, 10, 0., 10., 1, 0., 5.);
00348     meg12_[ism-1]->setAxisTitle("pseudo-strip", 1);
00349     meg12_[ism-1]->setAxisTitle("channel", 2);
00350 
00351     if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() );;
00352     sprintf(histo, "EBLT amplitude L1A %s", Numbers::sEB(ism).c_str());
00353     mea01_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00354     mea01_[ism-1]->setAxisTitle("channel", 1);
00355     mea01_[ism-1]->setAxisTitle("amplitude", 2);
00356     if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() );
00357     sprintf(histo, "EBLT amplitude L2A %s", Numbers::sEB(ism).c_str());
00358     mea02_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00359     mea02_[ism-1]->setAxisTitle("channel", 1);
00360     mea02_[ism-1]->setAxisTitle("amplitude", 2);
00361     if ( mea03_[ism-1] ) dqmStore_->removeElement( mea03_[ism-1]->getName() );
00362     sprintf(histo, "EBLT amplitude L3A %s", Numbers::sEB(ism).c_str());
00363     mea03_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00364     mea03_[ism-1]->setAxisTitle("channel", 1);
00365     mea03_[ism-1]->setAxisTitle("amplitude", 2);
00366     if ( mea04_[ism-1] ) dqmStore_->removeElement( mea04_[ism-1]->getName() );
00367     sprintf(histo, "EBLT amplitude L4A %s", Numbers::sEB(ism).c_str());
00368     mea04_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00369     mea04_[ism-1]->setAxisTitle("channel", 1);
00370     mea04_[ism-1]->setAxisTitle("amplitude", 2);
00371     if ( mea05_[ism-1] ) dqmStore_->removeElement( mea05_[ism-1]->getName() );;
00372     sprintf(histo, "EBLT amplitude L1B %s", Numbers::sEB(ism).c_str());
00373     mea05_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00374     mea05_[ism-1]->setAxisTitle("channel", 1);
00375     mea05_[ism-1]->setAxisTitle("amplitude", 2);
00376     if ( mea06_[ism-1] ) dqmStore_->removeElement( mea06_[ism-1]->getName() );
00377     sprintf(histo, "EBLT amplitude L2B %s", Numbers::sEB(ism).c_str());
00378     mea06_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00379     mea06_[ism-1]->setAxisTitle("channel", 1);
00380     mea06_[ism-1]->setAxisTitle("amplitude", 2);
00381     if ( mea07_[ism-1] ) dqmStore_->removeElement( mea07_[ism-1]->getName() );
00382     sprintf(histo, "EBLT amplitude L3B %s", Numbers::sEB(ism).c_str());
00383     mea07_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00384     mea07_[ism-1]->setAxisTitle("channel", 1);
00385     mea07_[ism-1]->setAxisTitle("amplitude", 2);
00386     if ( mea08_[ism-1] ) dqmStore_->removeElement( mea08_[ism-1]->getName() );
00387     sprintf(histo, "EBLT amplitude L4B %s", Numbers::sEB(ism).c_str());
00388     mea08_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00389     mea08_[ism-1]->setAxisTitle("channel", 1);
00390     mea08_[ism-1]->setAxisTitle("amplitude", 2);
00391 
00392     if ( met01_[ism-1] ) dqmStore_->removeElement( met01_[ism-1]->getName() );
00393     sprintf(histo, "EBLT laser timing L1A %s", Numbers::sEB(ism).c_str());
00394     met01_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00395     met01_[ism-1]->setAxisTitle("channel", 1);
00396     met01_[ism-1]->setAxisTitle("jitter", 2);
00397     if ( met02_[ism-1] ) dqmStore_->removeElement( met02_[ism-1]->getName() );
00398     sprintf(histo, "EBLT laser timing L2A %s", Numbers::sEB(ism).c_str());
00399     met02_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00400     met02_[ism-1]->setAxisTitle("channel", 1);
00401     met02_[ism-1]->setAxisTitle("jitter", 2);
00402     if ( met03_[ism-1] ) dqmStore_->removeElement( met03_[ism-1]->getName() );
00403     sprintf(histo, "EBLT laser timing L3A %s", Numbers::sEB(ism).c_str());
00404     met03_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00405     met03_[ism-1]->setAxisTitle("channel", 1);
00406     met03_[ism-1]->setAxisTitle("jitter", 2);
00407     if ( met04_[ism-1] ) dqmStore_->removeElement( met04_[ism-1]->getName() );
00408     sprintf(histo, "EBLT laser timing L4A %s", Numbers::sEB(ism).c_str());
00409     met04_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00410     met04_[ism-1]->setAxisTitle("channel", 1);
00411     met04_[ism-1]->setAxisTitle("jitter", 2);
00412     if ( met05_[ism-1] ) dqmStore_->removeElement( met05_[ism-1]->getName() );
00413     sprintf(histo, "EBLT laser timing L1B %s", Numbers::sEB(ism).c_str());
00414     met05_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00415     met05_[ism-1]->setAxisTitle("channel", 1);
00416     met05_[ism-1]->setAxisTitle("jitter", 2);
00417     if ( met06_[ism-1] ) dqmStore_->removeElement( met06_[ism-1]->getName() );
00418     sprintf(histo, "EBLT laser timing L2B %s", Numbers::sEB(ism).c_str());
00419     met06_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00420     met06_[ism-1]->setAxisTitle("channel", 1);
00421     met06_[ism-1]->setAxisTitle("jitter", 2);
00422     if ( met07_[ism-1] ) dqmStore_->removeElement( met07_[ism-1]->getName() );
00423     sprintf(histo, "EBLT laser timing L3B %s", Numbers::sEB(ism).c_str());
00424     met07_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00425     met07_[ism-1]->setAxisTitle("channel", 1);
00426     met07_[ism-1]->setAxisTitle("jitter", 2);
00427     if ( met08_[ism-1] ) dqmStore_->removeElement( met08_[ism-1]->getName() );
00428     sprintf(histo, "EBLT laser timing L4B %s", Numbers::sEB(ism).c_str());
00429     met08_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00430     met08_[ism-1]->setAxisTitle("channel", 1);
00431     met08_[ism-1]->setAxisTitle("jitter", 2);
00432 
00433     if ( metav01_[ism-1] ) dqmStore_->removeElement( metav01_[ism-1]->getName() );
00434     sprintf(histo, "EBLT laser timing mean L1A %s", Numbers::sEB(ism).c_str());
00435     metav01_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00436     metav01_[ism-1]->setAxisTitle("mean", 1);
00437     if ( metav02_[ism-1] ) dqmStore_->removeElement( metav02_[ism-1]->getName() );
00438     sprintf(histo, "EBLT laser timing mean L2A %s", Numbers::sEB(ism).c_str());
00439     metav02_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00440     metav02_[ism-1]->setAxisTitle("mean", 1);
00441     if ( metav03_[ism-1] ) dqmStore_->removeElement( metav03_[ism-1]->getName() );
00442     sprintf(histo, "EBLT laser timing mean L3A %s", Numbers::sEB(ism).c_str());
00443     metav03_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00444     metav03_[ism-1]->setAxisTitle("mean", 1);
00445     if ( metav04_[ism-1] ) dqmStore_->removeElement( metav04_[ism-1]->getName() );
00446     sprintf(histo, "EBLT laser timing mean L4A %s", Numbers::sEB(ism).c_str());
00447     metav04_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00448     metav04_[ism-1]->setAxisTitle("mean", 1);
00449     if ( metav05_[ism-1] ) dqmStore_->removeElement( metav05_[ism-1]->getName() );
00450     sprintf(histo, "EBLT laser timing mean L1B %s", Numbers::sEB(ism).c_str());
00451     metav05_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00452     metav05_[ism-1]->setAxisTitle("mean", 1);
00453     if ( metav06_[ism-1] ) dqmStore_->removeElement( metav06_[ism-1]->getName() );
00454     sprintf(histo, "EBLT laser timing mean L2B %s", Numbers::sEB(ism).c_str());
00455     metav06_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00456     metav06_[ism-1]->setAxisTitle("mean", 1);
00457     if ( metav07_[ism-1] ) dqmStore_->removeElement( metav07_[ism-1]->getName() );
00458     sprintf(histo, "EBLT laser timing mean L3B %s", Numbers::sEB(ism).c_str());
00459     metav07_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00460     metav07_[ism-1]->setAxisTitle("mean", 1);
00461     if ( metav08_[ism-1] ) dqmStore_->removeElement( metav08_[ism-1]->getName() );
00462     sprintf(histo, "EBLT laser timing mean L4B %s", Numbers::sEB(ism).c_str());
00463     metav08_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00464     metav08_[ism-1]->setAxisTitle("mean", 1);
00465 
00466     if ( metrms01_[ism-1] ) dqmStore_->removeElement( metrms01_[ism-1]->getName() );
00467     sprintf(histo, "EBLT laser timing rms L1A %s", Numbers::sEB(ism).c_str());
00468     metrms01_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 0.5);
00469     metrms01_[ism-1]->setAxisTitle("rms", 1);
00470     if ( metrms02_[ism-1] ) dqmStore_->removeElement( metrms02_[ism-1]->getName() );
00471     sprintf(histo, "EBLT laser timing rms L2A %s", Numbers::sEB(ism).c_str());
00472     metrms02_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 0.5);
00473     metrms02_[ism-1]->setAxisTitle("rms", 1);
00474     if ( metrms03_[ism-1] ) dqmStore_->removeElement( metrms03_[ism-1]->getName() );
00475     sprintf(histo, "EBLT laser timing rms L3A %s", Numbers::sEB(ism).c_str());
00476     metrms03_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 0.5);
00477     metrms03_[ism-1]->setAxisTitle("rms", 1);
00478     if ( metrms04_[ism-1] ) dqmStore_->removeElement( metrms04_[ism-1]->getName() );
00479     sprintf(histo, "EBLT laser timing rms L4A %s", Numbers::sEB(ism).c_str());
00480     metrms04_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 0.5);
00481     metrms04_[ism-1]->setAxisTitle("rms", 1);
00482     if ( metrms05_[ism-1] ) dqmStore_->removeElement( metrms05_[ism-1]->getName() );
00483     sprintf(histo, "EBLT laser timing rms L1B %s", Numbers::sEB(ism).c_str());
00484     metrms05_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 0.5);
00485     metrms05_[ism-1]->setAxisTitle("rms", 1);
00486     if ( metrms06_[ism-1] ) dqmStore_->removeElement( metrms06_[ism-1]->getName() );
00487     sprintf(histo, "EBLT laser timing rms L2B %s", Numbers::sEB(ism).c_str());
00488     metrms06_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 0.5);
00489     metrms06_[ism-1]->setAxisTitle("rms", 1);
00490     if ( metrms07_[ism-1] ) dqmStore_->removeElement( metrms07_[ism-1]->getName() );
00491     sprintf(histo, "EBLT laser timing rms L3B %s", Numbers::sEB(ism).c_str());
00492     metrms07_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 0.5);
00493     metrms07_[ism-1]->setAxisTitle("rms", 1);
00494     if ( metrms08_[ism-1] ) dqmStore_->removeElement( metrms08_[ism-1]->getName() );
00495     sprintf(histo, "EBLT laser timing rms L4B %s", Numbers::sEB(ism).c_str());
00496     metrms08_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 0.5);
00497     metrms08_[ism-1]->setAxisTitle("rms", 1);
00498 
00499     if ( meaopn01_[ism-1] ) dqmStore_->removeElement( meaopn01_[ism-1]->getName() );
00500     sprintf(histo, "EBLT amplitude over PN L1A %s", Numbers::sEB(ism).c_str());
00501     meaopn01_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00502     meaopn01_[ism-1]->setAxisTitle("channel", 1);
00503     meaopn01_[ism-1]->setAxisTitle("amplitude/PN", 2);
00504     if ( meaopn02_[ism-1] ) dqmStore_->removeElement( meaopn02_[ism-1]->getName() );
00505     sprintf(histo, "EBLT amplitude over PN L2A %s", Numbers::sEB(ism).c_str());
00506     meaopn02_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00507     meaopn02_[ism-1]->setAxisTitle("channel", 1);
00508     meaopn02_[ism-1]->setAxisTitle("amplitude/PN", 2);
00509     if ( meaopn03_[ism-1] ) dqmStore_->removeElement( meaopn03_[ism-1]->getName() );
00510     sprintf(histo, "EBLT amplitude over PN L3A %s", Numbers::sEB(ism).c_str());
00511     meaopn03_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00512     meaopn03_[ism-1]->setAxisTitle("channel", 1);
00513     meaopn03_[ism-1]->setAxisTitle("amplitude/PN", 2);
00514     if ( meaopn04_[ism-1] ) dqmStore_->removeElement( meaopn04_[ism-1]->getName() );
00515     sprintf(histo, "EBLT amplitude over PN L4A %s", Numbers::sEB(ism).c_str());
00516     meaopn04_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00517     meaopn04_[ism-1]->setAxisTitle("channel", 1);
00518     meaopn04_[ism-1]->setAxisTitle("amplitude/PN", 2);
00519     if ( meaopn05_[ism-1] ) dqmStore_->removeElement( meaopn05_[ism-1]->getName() );
00520     sprintf(histo, "EBLT amplitude over PN L1B %s", Numbers::sEB(ism).c_str());
00521     meaopn05_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00522     meaopn05_[ism-1]->setAxisTitle("channel", 1);
00523     meaopn05_[ism-1]->setAxisTitle("amplitude/PN", 2);
00524     if ( meaopn06_[ism-1] ) dqmStore_->removeElement( meaopn06_[ism-1]->getName() );
00525     sprintf(histo, "EBLT amplitude over PN L2B %s", Numbers::sEB(ism).c_str());
00526     meaopn06_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00527     meaopn06_[ism-1]->setAxisTitle("channel", 1);
00528     meaopn06_[ism-1]->setAxisTitle("amplitude/PN", 2);
00529     if ( meaopn07_[ism-1] ) dqmStore_->removeElement( meaopn07_[ism-1]->getName() );
00530     sprintf(histo, "EBLT amplitude over PN L3B %s", Numbers::sEB(ism).c_str());
00531     meaopn07_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00532     meaopn07_[ism-1]->setAxisTitle("channel", 1);
00533     meaopn07_[ism-1]->setAxisTitle("amplitude/PN", 2);
00534     if ( meaopn08_[ism-1] ) dqmStore_->removeElement( meaopn08_[ism-1]->getName() );
00535     sprintf(histo, "EBLT amplitude over PN L4B %s", Numbers::sEB(ism).c_str());
00536     meaopn08_[ism-1] = dqmStore_->book1D(histo, histo, 1700, 0., 1700.);
00537     meaopn08_[ism-1]->setAxisTitle("channel", 1);
00538     meaopn08_[ism-1]->setAxisTitle("amplitude/PN", 2);
00539 
00540     if ( mepnprms01_[ism-1] ) dqmStore_->removeElement( mepnprms01_[ism-1]->getName() );
00541     sprintf(histo, "EBPDT PNs pedestal rms %s G01 L1", Numbers::sEB(ism).c_str());
00542     mepnprms01_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00543     mepnprms01_[ism-1]->setAxisTitle("rms", 1);
00544     if ( mepnprms02_[ism-1] ) dqmStore_->removeElement( mepnprms02_[ism-1]->getName() );
00545     sprintf(histo, "EBPDT PNs pedestal rms %s G01 L2", Numbers::sEB(ism).c_str());
00546     mepnprms02_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00547     mepnprms02_[ism-1]->setAxisTitle("rms", 1);
00548     if ( mepnprms03_[ism-1] ) dqmStore_->removeElement( mepnprms03_[ism-1]->getName() );
00549     sprintf(histo, "EBPDT PNs pedestal rms %s G01 L3", Numbers::sEB(ism).c_str());
00550     mepnprms03_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00551     mepnprms03_[ism-1]->setAxisTitle("rms", 1);
00552     if ( mepnprms04_[ism-1] ) dqmStore_->removeElement( mepnprms04_[ism-1]->getName() );
00553     sprintf(histo, "EBPDT PNs pedestal rms %s G01 L4", Numbers::sEB(ism).c_str());
00554     mepnprms04_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00555     mepnprms04_[ism-1]->setAxisTitle("rms", 1);
00556     if ( mepnprms05_[ism-1] ) dqmStore_->removeElement( mepnprms05_[ism-1]->getName() );
00557     sprintf(histo, "EBPDT PNs pedestal rms %s G16 L1", Numbers::sEB(ism).c_str());
00558     mepnprms05_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00559     mepnprms05_[ism-1]->setAxisTitle("rms", 1);
00560     if ( mepnprms06_[ism-1] ) dqmStore_->removeElement( mepnprms06_[ism-1]->getName() );
00561     sprintf(histo, "EBPDT PNs pedestal rms %s G16 L2", Numbers::sEB(ism).c_str());
00562     mepnprms06_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00563     mepnprms06_[ism-1]->setAxisTitle("rms", 1);
00564     if ( mepnprms07_[ism-1] ) dqmStore_->removeElement( mepnprms07_[ism-1]->getName() );
00565     sprintf(histo, "EBPDT PNs pedestal rms %s G16 L3", Numbers::sEB(ism).c_str());
00566     mepnprms07_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00567     mepnprms07_[ism-1]->setAxisTitle("rms", 1);
00568     if ( mepnprms08_[ism-1] ) dqmStore_->removeElement( mepnprms08_[ism-1]->getName() );
00569     sprintf(histo, "EBPDT PNs pedestal rms %s G16 L4", Numbers::sEB(ism).c_str());
00570     mepnprms08_[ism-1] = dqmStore_->book1D(histo, histo, 100, 0., 10.);
00571     mepnprms08_[ism-1]->setAxisTitle("rms", 1);
00572 
00573     if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() );
00574     sprintf(histo, "EBLT laser shape L1A %s", Numbers::sEB(ism).c_str());
00575     me_hs01_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.);
00576     me_hs01_[ism-1]->setAxisTitle("sample", 1);
00577     me_hs01_[ism-1]->setAxisTitle("amplitude", 2);
00578     if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() );
00579     sprintf(histo, "EBLT laser shape L2A %s", Numbers::sEB(ism).c_str());
00580     me_hs02_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.);
00581     me_hs02_[ism-1]->setAxisTitle("sample", 1);
00582     me_hs02_[ism-1]->setAxisTitle("amplitude", 2);
00583     if ( me_hs03_[ism-1] ) dqmStore_->removeElement( me_hs03_[ism-1]->getName() );
00584     sprintf(histo, "EBLT laser shape L3A %s", Numbers::sEB(ism).c_str());
00585     me_hs03_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.);
00586     me_hs03_[ism-1]->setAxisTitle("sample", 1);
00587     me_hs03_[ism-1]->setAxisTitle("amplitude", 2);
00588     if ( me_hs04_[ism-1] ) dqmStore_->removeElement( me_hs04_[ism-1]->getName() );
00589     sprintf(histo, "EBLT laser shape L4A %s", Numbers::sEB(ism).c_str());
00590     me_hs04_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.);
00591     me_hs04_[ism-1]->setAxisTitle("sample", 1);
00592     me_hs04_[ism-1]->setAxisTitle("amplitude", 2);
00593     if ( me_hs05_[ism-1] ) dqmStore_->removeElement( me_hs05_[ism-1]->getName() );
00594     sprintf(histo, "EBLT laser shape L1B %s", Numbers::sEB(ism).c_str());
00595     me_hs05_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.);
00596     me_hs05_[ism-1]->setAxisTitle("sample", 1);
00597     me_hs05_[ism-1]->setAxisTitle("amplitude", 2);
00598     if ( me_hs06_[ism-1] ) dqmStore_->removeElement( me_hs06_[ism-1]->getName() );
00599     sprintf(histo, "EBLT laser shape L2B %s", Numbers::sEB(ism).c_str());
00600     me_hs06_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.);
00601     me_hs06_[ism-1]->setAxisTitle("sample", 1);
00602     me_hs06_[ism-1]->setAxisTitle("amplitude", 2);
00603     if ( me_hs07_[ism-1] ) dqmStore_->removeElement( me_hs07_[ism-1]->getName() );
00604     sprintf(histo, "EBLT laser shape L3B %s", Numbers::sEB(ism).c_str());
00605     me_hs07_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.);
00606     me_hs07_[ism-1]->setAxisTitle("sample", 1);
00607     me_hs07_[ism-1]->setAxisTitle("amplitude", 2);
00608     if ( me_hs08_[ism-1] ) dqmStore_->removeElement( me_hs08_[ism-1]->getName() );
00609     sprintf(histo, "EBLT laser shape L4B %s", Numbers::sEB(ism).c_str());
00610     me_hs08_[ism-1] = dqmStore_->book1D(histo, histo, 10, 0., 10.);
00611     me_hs08_[ism-1]->setAxisTitle("sample", 1);
00612     me_hs08_[ism-1]->setAxisTitle("amplitude", 2);
00613 
00614   }
00615 
00616   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00617 
00618     int ism = superModules_[i];
00619 
00620     if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
00621     if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
00622     if ( meg03_[ism-1] ) meg03_[ism-1]->Reset();
00623     if ( meg04_[ism-1] ) meg04_[ism-1]->Reset();
00624 
00625     if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
00626     if ( meg06_[ism-1] ) meg06_[ism-1]->Reset();
00627     if ( meg07_[ism-1] ) meg07_[ism-1]->Reset();
00628     if ( meg08_[ism-1] ) meg08_[ism-1]->Reset();
00629     if ( meg09_[ism-1] ) meg09_[ism-1]->Reset();
00630     if ( meg10_[ism-1] ) meg10_[ism-1]->Reset();
00631     if ( meg11_[ism-1] ) meg11_[ism-1]->Reset();
00632     if ( meg12_[ism-1] ) meg12_[ism-1]->Reset();
00633 
00634     for ( int ie = 1; ie <= 85; ie++ ) {
00635       for ( int ip = 1; ip <= 20; ip++ ) {
00636 
00637         if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2. );
00638         if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2. );
00639         if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2. );
00640         if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( ie, ip, 2. );
00641 
00642       }
00643     }
00644 
00645     for ( int i = 1; i <= 10; i++ ) {
00646 
00647         if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
00648         if ( meg06_[ism-1] ) meg06_[ism-1]->setBinContent( i, 1, 2. );
00649         if ( meg07_[ism-1] ) meg07_[ism-1]->setBinContent( i, 1, 2. );
00650         if ( meg08_[ism-1] ) meg08_[ism-1]->setBinContent( i, 1, 2. );
00651         if ( meg09_[ism-1] ) meg09_[ism-1]->setBinContent( i, 1, 2. );
00652         if ( meg10_[ism-1] ) meg10_[ism-1]->setBinContent( i, 1, 2. );
00653         if ( meg11_[ism-1] ) meg11_[ism-1]->setBinContent( i, 1, 2. );
00654         if ( meg12_[ism-1] ) meg12_[ism-1]->setBinContent( i, 1, 2. );
00655 
00656     }
00657 
00658     if ( mea01_[ism-1] ) mea01_[ism-1]->Reset();
00659     if ( mea02_[ism-1] ) mea02_[ism-1]->Reset();
00660     if ( mea03_[ism-1] ) mea03_[ism-1]->Reset();
00661     if ( mea04_[ism-1] ) mea04_[ism-1]->Reset();
00662     if ( mea05_[ism-1] ) mea05_[ism-1]->Reset();
00663     if ( mea06_[ism-1] ) mea06_[ism-1]->Reset();
00664     if ( mea07_[ism-1] ) mea07_[ism-1]->Reset();
00665     if ( mea08_[ism-1] ) mea08_[ism-1]->Reset();
00666 
00667     if ( met01_[ism-1] ) met01_[ism-1]->Reset();
00668     if ( met02_[ism-1] ) met02_[ism-1]->Reset();
00669     if ( met03_[ism-1] ) met03_[ism-1]->Reset();
00670     if ( met04_[ism-1] ) met04_[ism-1]->Reset();
00671     if ( met05_[ism-1] ) met05_[ism-1]->Reset();
00672     if ( met06_[ism-1] ) met06_[ism-1]->Reset();
00673     if ( met07_[ism-1] ) met07_[ism-1]->Reset();
00674     if ( met08_[ism-1] ) met08_[ism-1]->Reset();
00675 
00676     if ( metav01_[ism-1] ) metav01_[ism-1]->Reset();
00677     if ( metav02_[ism-1] ) metav02_[ism-1]->Reset();
00678     if ( metav03_[ism-1] ) metav03_[ism-1]->Reset();
00679     if ( metav04_[ism-1] ) metav04_[ism-1]->Reset();
00680     if ( metav05_[ism-1] ) metav05_[ism-1]->Reset();
00681     if ( metav06_[ism-1] ) metav06_[ism-1]->Reset();
00682     if ( metav07_[ism-1] ) metav07_[ism-1]->Reset();
00683     if ( metav08_[ism-1] ) metav08_[ism-1]->Reset();
00684 
00685     if ( metrms01_[ism-1] ) metrms01_[ism-1]->Reset();
00686     if ( metrms02_[ism-1] ) metrms02_[ism-1]->Reset();
00687     if ( metrms03_[ism-1] ) metrms03_[ism-1]->Reset();
00688     if ( metrms04_[ism-1] ) metrms04_[ism-1]->Reset();
00689     if ( metrms05_[ism-1] ) metrms05_[ism-1]->Reset();
00690     if ( metrms06_[ism-1] ) metrms06_[ism-1]->Reset();
00691     if ( metrms07_[ism-1] ) metrms07_[ism-1]->Reset();
00692     if ( metrms08_[ism-1] ) metrms08_[ism-1]->Reset();
00693 
00694     if ( meaopn01_[ism-1] ) meaopn01_[ism-1]->Reset();
00695     if ( meaopn02_[ism-1] ) meaopn02_[ism-1]->Reset();
00696     if ( meaopn03_[ism-1] ) meaopn03_[ism-1]->Reset();
00697     if ( meaopn04_[ism-1] ) meaopn04_[ism-1]->Reset();
00698     if ( meaopn05_[ism-1] ) meaopn05_[ism-1]->Reset();
00699     if ( meaopn06_[ism-1] ) meaopn06_[ism-1]->Reset();
00700     if ( meaopn07_[ism-1] ) meaopn07_[ism-1]->Reset();
00701     if ( meaopn08_[ism-1] ) meaopn08_[ism-1]->Reset();
00702 
00703     if ( mepnprms01_[ism-1] ) mepnprms01_[ism-1]->Reset();
00704     if ( mepnprms02_[ism-1] ) mepnprms02_[ism-1]->Reset();
00705     if ( mepnprms03_[ism-1] ) mepnprms03_[ism-1]->Reset();
00706     if ( mepnprms04_[ism-1] ) mepnprms04_[ism-1]->Reset();
00707     if ( mepnprms05_[ism-1] ) mepnprms05_[ism-1]->Reset();
00708     if ( mepnprms06_[ism-1] ) mepnprms06_[ism-1]->Reset();
00709     if ( mepnprms07_[ism-1] ) mepnprms07_[ism-1]->Reset();
00710     if ( mepnprms08_[ism-1] ) mepnprms08_[ism-1]->Reset();
00711 
00712     if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset();
00713     if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset();
00714     if ( me_hs03_[ism-1] ) me_hs03_[ism-1]->Reset();
00715     if ( me_hs04_[ism-1] ) me_hs04_[ism-1]->Reset();
00716     if ( me_hs05_[ism-1] ) me_hs05_[ism-1]->Reset();
00717     if ( me_hs06_[ism-1] ) me_hs06_[ism-1]->Reset();
00718     if ( me_hs07_[ism-1] ) me_hs07_[ism-1]->Reset();
00719     if ( me_hs08_[ism-1] ) me_hs08_[ism-1]->Reset();
00720 
00721   }
00722 
00723 }
00724 
00725 void EBLaserClient::cleanup(void) {
00726 
00727   if ( ! enableCleanup_ ) return;
00728 
00729   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00730 
00731     int ism = superModules_[i];
00732 
00733     if ( cloneME_ ) {
00734       if ( h01_[ism-1] ) delete h01_[ism-1];
00735       if ( h02_[ism-1] ) delete h02_[ism-1];
00736       if ( h03_[ism-1] ) delete h03_[ism-1];
00737       if ( h04_[ism-1] ) delete h04_[ism-1];
00738       if ( h05_[ism-1] ) delete h05_[ism-1];
00739       if ( h06_[ism-1] ) delete h06_[ism-1];
00740       if ( h07_[ism-1] ) delete h07_[ism-1];
00741       if ( h08_[ism-1] ) delete h08_[ism-1];
00742 
00743       if ( h09_[ism-1] ) delete h09_[ism-1];
00744       if ( h10_[ism-1] ) delete h10_[ism-1];
00745       if ( h11_[ism-1] ) delete h11_[ism-1];
00746       if ( h12_[ism-1] ) delete h12_[ism-1];
00747 
00748       if ( h13_[ism-1] ) delete h13_[ism-1];
00749       if ( h14_[ism-1] ) delete h14_[ism-1];
00750       if ( h15_[ism-1] ) delete h15_[ism-1];
00751       if ( h16_[ism-1] ) delete h16_[ism-1];
00752       if ( h17_[ism-1] ) delete h17_[ism-1];
00753       if ( h18_[ism-1] ) delete h18_[ism-1];
00754       if ( h19_[ism-1] ) delete h19_[ism-1];
00755       if ( h20_[ism-1] ) delete h20_[ism-1];
00756 
00757       if ( h21_[ism-1] ) delete h21_[ism-1];
00758       if ( h22_[ism-1] ) delete h22_[ism-1];
00759       if ( h23_[ism-1] ) delete h23_[ism-1];
00760       if ( h24_[ism-1] ) delete h24_[ism-1];
00761 
00762       if ( hs01_[ism-1] ) delete hs01_[ism-1];
00763       if ( hs02_[ism-1] ) delete hs02_[ism-1];
00764       if ( hs03_[ism-1] ) delete hs03_[ism-1];
00765       if ( hs04_[ism-1] ) delete hs04_[ism-1];
00766 
00767       if ( hs05_[ism-1] ) delete hs05_[ism-1];
00768       if ( hs06_[ism-1] ) delete hs06_[ism-1];
00769       if ( hs07_[ism-1] ) delete hs07_[ism-1];
00770       if ( hs08_[ism-1] ) delete hs08_[ism-1];
00771 
00772       if ( i01_[ism-1] ) delete i01_[ism-1];
00773       if ( i02_[ism-1] ) delete i02_[ism-1];
00774       if ( i03_[ism-1] ) delete i03_[ism-1];
00775       if ( i04_[ism-1] ) delete i04_[ism-1];
00776       if ( i05_[ism-1] ) delete i05_[ism-1];
00777       if ( i06_[ism-1] ) delete i06_[ism-1];
00778       if ( i07_[ism-1] ) delete i07_[ism-1];
00779       if ( i08_[ism-1] ) delete i08_[ism-1];
00780 
00781       if ( i09_[ism-1] ) delete i09_[ism-1];
00782       if ( i10_[ism-1] ) delete i10_[ism-1];
00783       if ( i11_[ism-1] ) delete i11_[ism-1];
00784       if ( i12_[ism-1] ) delete i12_[ism-1];
00785       if ( i13_[ism-1] ) delete i13_[ism-1];
00786       if ( i14_[ism-1] ) delete i14_[ism-1];
00787       if ( i15_[ism-1] ) delete i15_[ism-1];
00788       if ( i16_[ism-1] ) delete i16_[ism-1];
00789     }
00790 
00791     h01_[ism-1] = 0;
00792     h02_[ism-1] = 0;
00793     h03_[ism-1] = 0;
00794     h04_[ism-1] = 0;
00795     h05_[ism-1] = 0;
00796     h06_[ism-1] = 0;
00797     h07_[ism-1] = 0;
00798     h08_[ism-1] = 0;
00799 
00800     h09_[ism-1] = 0;
00801     h10_[ism-1] = 0;
00802     h11_[ism-1] = 0;
00803     h12_[ism-1] = 0;
00804 
00805     h13_[ism-1] = 0;
00806     h14_[ism-1] = 0;
00807     h15_[ism-1] = 0;
00808     h16_[ism-1] = 0;
00809     h17_[ism-1] = 0;
00810     h18_[ism-1] = 0;
00811     h19_[ism-1] = 0;
00812     h20_[ism-1] = 0;
00813 
00814     h21_[ism-1] = 0;
00815     h22_[ism-1] = 0;
00816     h23_[ism-1] = 0;
00817     h24_[ism-1] = 0;
00818 
00819     hs01_[ism-1] = 0;
00820     hs02_[ism-1] = 0;
00821     hs03_[ism-1] = 0;
00822     hs04_[ism-1] = 0;
00823 
00824     hs05_[ism-1] = 0;
00825     hs06_[ism-1] = 0;
00826     hs07_[ism-1] = 0;
00827     hs08_[ism-1] = 0;
00828 
00829     i01_[ism-1] = 0;
00830     i02_[ism-1] = 0;
00831     i03_[ism-1] = 0;
00832     i04_[ism-1] = 0;
00833     i05_[ism-1] = 0;
00834     i06_[ism-1] = 0;
00835     i07_[ism-1] = 0;
00836     i08_[ism-1] = 0;
00837 
00838     i09_[ism-1] = 0;
00839     i10_[ism-1] = 0;
00840     i11_[ism-1] = 0;
00841     i12_[ism-1] = 0;
00842     i13_[ism-1] = 0;
00843     i14_[ism-1] = 0;
00844     i15_[ism-1] = 0;
00845     i16_[ism-1] = 0;
00846 
00847   }
00848 
00849   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
00850 
00851     int ism = superModules_[i];
00852 
00853     dqmStore_->setCurrentFolder( prefixME_ + "/EBLaserClient" );
00854 
00855     if ( meg01_[ism-1] ) dqmStore_->removeElement( meg01_[ism-1]->getName() );
00856     meg01_[ism-1] = 0;
00857     if ( meg02_[ism-1] ) dqmStore_->removeElement( meg02_[ism-1]->getName() );
00858     meg02_[ism-1] = 0;
00859     if ( meg03_[ism-1] ) dqmStore_->removeElement( meg03_[ism-1]->getName() );
00860     meg03_[ism-1] = 0;
00861     if ( meg04_[ism-1] ) dqmStore_->removeElement( meg04_[ism-1]->getName() );
00862     meg04_[ism-1] = 0;
00863 
00864     if ( meg05_[ism-1] ) dqmStore_->removeElement( meg05_[ism-1]->getName() );
00865     meg05_[ism-1] = 0;
00866     if ( meg06_[ism-1] ) dqmStore_->removeElement( meg06_[ism-1]->getName() );
00867     meg06_[ism-1] = 0;
00868     if ( meg07_[ism-1] ) dqmStore_->removeElement( meg07_[ism-1]->getName() );
00869     meg07_[ism-1] = 0;
00870     if ( meg08_[ism-1] ) dqmStore_->removeElement( meg08_[ism-1]->getName() );
00871     meg08_[ism-1] = 0;
00872     if ( meg09_[ism-1] ) dqmStore_->removeElement( meg09_[ism-1]->getName() );
00873     meg09_[ism-1] = 0;
00874     if ( meg10_[ism-1] ) dqmStore_->removeElement( meg10_[ism-1]->getName() );
00875     meg10_[ism-1] = 0;
00876     if ( meg11_[ism-1] ) dqmStore_->removeElement( meg11_[ism-1]->getName() );
00877     meg11_[ism-1] = 0;
00878     if ( meg12_[ism-1] ) dqmStore_->removeElement( meg12_[ism-1]->getName() );
00879     meg12_[ism-1] = 0;
00880 
00881     if ( mea01_[ism-1] ) dqmStore_->removeElement( mea01_[ism-1]->getName() );
00882     mea01_[ism-1] = 0;
00883     if ( mea02_[ism-1] ) dqmStore_->removeElement( mea02_[ism-1]->getName() );
00884     mea02_[ism-1] = 0;
00885     if ( mea03_[ism-1] ) dqmStore_->removeElement( mea03_[ism-1]->getName() );
00886     mea03_[ism-1] = 0;
00887     if ( mea04_[ism-1] ) dqmStore_->removeElement( mea04_[ism-1]->getName() );
00888     mea04_[ism-1] = 0;
00889     if ( mea05_[ism-1] ) dqmStore_->removeElement( mea05_[ism-1]->getName() );
00890     mea05_[ism-1] = 0;
00891     if ( mea06_[ism-1] ) dqmStore_->removeElement( mea06_[ism-1]->getName() );
00892     mea06_[ism-1] = 0;
00893     if ( mea07_[ism-1] ) dqmStore_->removeElement( mea07_[ism-1]->getName() );
00894     mea07_[ism-1] = 0;
00895     if ( mea08_[ism-1] ) dqmStore_->removeElement( mea08_[ism-1]->getName() );
00896     mea08_[ism-1] = 0;
00897 
00898     if ( met01_[ism-1] ) dqmStore_->removeElement( met01_[ism-1]->getName() );
00899     met01_[ism-1] = 0;
00900     if ( met02_[ism-1] ) dqmStore_->removeElement( met02_[ism-1]->getName() );
00901     met02_[ism-1] = 0;
00902     if ( met03_[ism-1] ) dqmStore_->removeElement( met03_[ism-1]->getName() );
00903     met03_[ism-1] = 0;
00904     if ( met04_[ism-1] ) dqmStore_->removeElement( met04_[ism-1]->getName() );
00905     met04_[ism-1] = 0;
00906     if ( met05_[ism-1] ) dqmStore_->removeElement( met05_[ism-1]->getName() );
00907     met05_[ism-1] = 0;
00908     if ( met06_[ism-1] ) dqmStore_->removeElement( met06_[ism-1]->getName() );
00909     met06_[ism-1] = 0;
00910     if ( met07_[ism-1] ) dqmStore_->removeElement( met07_[ism-1]->getName() );
00911     met07_[ism-1] = 0;
00912     if ( met08_[ism-1] ) dqmStore_->removeElement( met08_[ism-1]->getName() );
00913     met08_[ism-1] = 0;
00914 
00915     if ( metav01_[ism-1] ) dqmStore_->removeElement( metav01_[ism-1]->getName() );
00916     metav01_[ism-1] = 0;
00917     if ( metav02_[ism-1] ) dqmStore_->removeElement( metav02_[ism-1]->getName() );
00918     metav02_[ism-1] = 0;
00919     if ( metav03_[ism-1] ) dqmStore_->removeElement( metav03_[ism-1]->getName() );
00920     metav03_[ism-1] = 0;
00921     if ( metav04_[ism-1] ) dqmStore_->removeElement( metav04_[ism-1]->getName() );
00922     metav04_[ism-1] = 0;
00923     if ( metav05_[ism-1] ) dqmStore_->removeElement( metav05_[ism-1]->getName() );
00924     metav05_[ism-1] = 0;
00925     if ( metav06_[ism-1] ) dqmStore_->removeElement( metav06_[ism-1]->getName() );
00926     metav06_[ism-1] = 0;
00927     if ( metav07_[ism-1] ) dqmStore_->removeElement( metav07_[ism-1]->getName() );
00928     metav07_[ism-1] = 0;
00929     if ( metav08_[ism-1] ) dqmStore_->removeElement( metav08_[ism-1]->getName() );
00930     metav08_[ism-1] = 0;
00931 
00932     if ( metrms01_[ism-1] ) dqmStore_->removeElement( metrms01_[ism-1]->getName() );
00933     metrms01_[ism-1] = 0;
00934     if ( metrms02_[ism-1] ) dqmStore_->removeElement( metrms02_[ism-1]->getName() );
00935     metrms02_[ism-1] = 0;
00936     if ( metrms03_[ism-1] ) dqmStore_->removeElement( metrms03_[ism-1]->getName() );
00937     metrms03_[ism-1] = 0;
00938     if ( metrms04_[ism-1] ) dqmStore_->removeElement( metrms04_[ism-1]->getName() );
00939     metrms04_[ism-1] = 0;
00940     if ( metrms05_[ism-1] ) dqmStore_->removeElement( metrms05_[ism-1]->getName() );
00941     metrms05_[ism-1] = 0;
00942     if ( metrms06_[ism-1] ) dqmStore_->removeElement( metrms06_[ism-1]->getName() );
00943     metrms06_[ism-1] = 0;
00944     if ( metrms07_[ism-1] ) dqmStore_->removeElement( metrms07_[ism-1]->getName() );
00945     metrms07_[ism-1] = 0;
00946     if ( metrms08_[ism-1] ) dqmStore_->removeElement( metrms08_[ism-1]->getName() );
00947     metrms08_[ism-1] = 0;
00948 
00949     if ( meaopn01_[ism-1] ) dqmStore_->removeElement( meaopn01_[ism-1]->getName() );
00950     meaopn01_[ism-1] = 0;
00951     if ( meaopn02_[ism-1] ) dqmStore_->removeElement( meaopn02_[ism-1]->getName() );
00952     meaopn02_[ism-1] = 0;
00953     if ( meaopn03_[ism-1] ) dqmStore_->removeElement( meaopn03_[ism-1]->getName() );
00954     meaopn03_[ism-1] = 0;
00955     if ( meaopn04_[ism-1] ) dqmStore_->removeElement( meaopn04_[ism-1]->getName() );
00956     meaopn04_[ism-1] = 0;
00957     if ( meaopn05_[ism-1] ) dqmStore_->removeElement( meaopn05_[ism-1]->getName() );
00958     meaopn05_[ism-1] = 0;
00959     if ( meaopn06_[ism-1] ) dqmStore_->removeElement( meaopn06_[ism-1]->getName() );
00960     meaopn06_[ism-1] = 0;
00961     if ( meaopn07_[ism-1] ) dqmStore_->removeElement( meaopn07_[ism-1]->getName() );
00962     meaopn07_[ism-1] = 0;
00963     if ( meaopn08_[ism-1] ) dqmStore_->removeElement( meaopn08_[ism-1]->getName() );
00964     meaopn08_[ism-1] = 0;
00965 
00966     if ( mepnprms01_[ism-1] ) dqmStore_->removeElement( mepnprms01_[ism-1]->getName() );
00967     mepnprms01_[ism-1] = 0;
00968     if ( mepnprms02_[ism-1] ) dqmStore_->removeElement( mepnprms02_[ism-1]->getName() );
00969     mepnprms02_[ism-1] = 0;
00970     if ( mepnprms03_[ism-1] ) dqmStore_->removeElement( mepnprms03_[ism-1]->getName() );
00971     mepnprms03_[ism-1] = 0;
00972     if ( mepnprms04_[ism-1] ) dqmStore_->removeElement( mepnprms04_[ism-1]->getName() );
00973     mepnprms04_[ism-1] = 0;
00974     if ( mepnprms05_[ism-1] ) dqmStore_->removeElement( mepnprms05_[ism-1]->getName() );
00975     mepnprms05_[ism-1] = 0;
00976     if ( mepnprms06_[ism-1] ) dqmStore_->removeElement( mepnprms06_[ism-1]->getName() );
00977     mepnprms06_[ism-1] = 0;
00978     if ( mepnprms07_[ism-1] ) dqmStore_->removeElement( mepnprms07_[ism-1]->getName() );
00979     mepnprms07_[ism-1] = 0;
00980     if ( mepnprms08_[ism-1] ) dqmStore_->removeElement( mepnprms08_[ism-1]->getName() );
00981     mepnprms08_[ism-1] = 0;
00982 
00983     if ( me_hs01_[ism-1] ) dqmStore_->removeElement( me_hs01_[ism-1]->getName() );
00984     me_hs01_[ism-1] = 0;
00985     if ( me_hs02_[ism-1] ) dqmStore_->removeElement( me_hs02_[ism-1]->getName() );
00986     me_hs02_[ism-1] = 0;
00987     if ( me_hs03_[ism-1] ) dqmStore_->removeElement( me_hs03_[ism-1]->getName() );
00988     me_hs03_[ism-1] = 0;
00989     if ( me_hs04_[ism-1] ) dqmStore_->removeElement( me_hs04_[ism-1]->getName() );
00990     me_hs04_[ism-1] = 0;
00991     if ( me_hs05_[ism-1] ) dqmStore_->removeElement( me_hs05_[ism-1]->getName() );
00992     me_hs05_[ism-1] = 0;
00993     if ( me_hs06_[ism-1] ) dqmStore_->removeElement( me_hs06_[ism-1]->getName() );
00994     me_hs06_[ism-1] = 0;
00995     if ( me_hs07_[ism-1] ) dqmStore_->removeElement( me_hs07_[ism-1]->getName() );
00996     me_hs07_[ism-1] = 0;
00997     if ( me_hs08_[ism-1] ) dqmStore_->removeElement( me_hs08_[ism-1]->getName() );
00998     me_hs08_[ism-1] = 0;
00999 
01000   }
01001 
01002 }
01003 
01004 bool EBLaserClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status, bool flag) {
01005 
01006   status = true;
01007 
01008   if ( ! flag ) return false;
01009 
01010   EcalLogicID ecid;
01011 
01012   MonLaserBlueDat apd_bl;
01013   map<EcalLogicID, MonLaserBlueDat> dataset1_bl;
01014   MonLaserGreenDat apd_gr;
01015   map<EcalLogicID, MonLaserGreenDat> dataset1_gr;
01016   MonLaserIRedDat apd_ir;
01017   map<EcalLogicID, MonLaserIRedDat> dataset1_ir;
01018   MonLaserRedDat apd_rd;
01019   map<EcalLogicID, MonLaserRedDat> dataset1_rd;
01020 
01021   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
01022 
01023     int ism = superModules_[i];
01024 
01025     if ( verbose_ ) {
01026       cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01027       cout << endl;
01028       UtilsClient::printBadChannels(meg01_[ism-1], h01_[ism-1]);
01029       UtilsClient::printBadChannels(meg01_[ism-1], h13_[ism-1]);
01030       UtilsClient::printBadChannels(meg02_[ism-1], h03_[ism-1]);
01031       UtilsClient::printBadChannels(meg02_[ism-1], h15_[ism-1]);
01032       UtilsClient::printBadChannels(meg03_[ism-1], h05_[ism-1]);
01033       UtilsClient::printBadChannels(meg03_[ism-1], h17_[ism-1]);
01034       UtilsClient::printBadChannels(meg04_[ism-1], h07_[ism-1]);
01035       UtilsClient::printBadChannels(meg04_[ism-1], h19_[ism-1]);
01036     }
01037 
01038     for ( int ie = 1; ie <= 85; ie++ ) {
01039       for ( int ip = 1; ip <= 20; ip++ ) {
01040 
01041         bool update01;
01042         bool update02;
01043         bool update03;
01044         bool update04;
01045         bool update05;
01046         bool update06;
01047         bool update07;
01048         bool update08;
01049 
01050         bool update09;
01051         bool update10;
01052         bool update11;
01053         bool update12;
01054         bool update13;
01055         bool update14;
01056         bool update15;
01057         bool update16;
01058 
01059         float num01, num02, num03, num04, num05, num06, num07, num08;
01060         float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
01061         float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
01062 
01063         float num09, num10, num11, num12, num13, num14, num15, num16;
01064         float mean09, mean10, mean11, mean12, mean13, mean14, mean15, mean16;
01065         float rms09, rms10, rms11, rms12, rms13, rms14, rms15, rms16;
01066 
01067         update01 = UtilsClient::getBinStatistics(h01_[ism-1], ie, ip, num01, mean01, rms01);
01068         update02 = UtilsClient::getBinStatistics(h02_[ism-1], ie, ip, num02, mean02, rms02);
01069         update03 = UtilsClient::getBinStatistics(h03_[ism-1], ie, ip, num03, mean03, rms03);
01070         update04 = UtilsClient::getBinStatistics(h04_[ism-1], ie, ip, num04, mean04, rms04);
01071         update05 = UtilsClient::getBinStatistics(h05_[ism-1], ie, ip, num05, mean05, rms05);
01072         update06 = UtilsClient::getBinStatistics(h06_[ism-1], ie, ip, num06, mean06, rms06);
01073         update07 = UtilsClient::getBinStatistics(h07_[ism-1], ie, ip, num07, mean07, rms07);
01074         update08 = UtilsClient::getBinStatistics(h08_[ism-1], ie, ip, num08, mean08, rms08);
01075 
01076         update09 = UtilsClient::getBinStatistics(h13_[ism-1], ie, ip, num09, mean09, rms09);
01077         update10 = UtilsClient::getBinStatistics(h14_[ism-1], ie, ip, num10, mean10, rms10);
01078         update11 = UtilsClient::getBinStatistics(h15_[ism-1], ie, ip, num11, mean11, rms11);
01079         update12 = UtilsClient::getBinStatistics(h16_[ism-1], ie, ip, num12, mean12, rms12);
01080         update13 = UtilsClient::getBinStatistics(h17_[ism-1], ie, ip, num13, mean13, rms13);
01081         update14 = UtilsClient::getBinStatistics(h18_[ism-1], ie, ip, num14, mean14, rms14);
01082         update15 = UtilsClient::getBinStatistics(h19_[ism-1], ie, ip, num15, mean15, rms15);
01083         update16 = UtilsClient::getBinStatistics(h20_[ism-1], ie, ip, num16, mean16, rms16);
01084 
01085         if ( update01 || update02 ) {
01086 
01087           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01088 
01089             if ( verbose_ ) {
01090               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01091               cout << "L1A (" << ie << "," << ip << ") " << num01 << " " << mean01 << " " << rms01 << endl;
01092               cout << endl;
01093             }
01094 
01095           }
01096 
01097           apd_bl.setAPDMean(mean01);
01098           apd_bl.setAPDRMS(rms01);
01099 
01100           apd_bl.setAPDOverPNMean(mean02);
01101           apd_bl.setAPDOverPNRMS(rms02);
01102 
01103           if ( UtilsClient::getBinStatus(meg01_[ism-1], ie, ip) ) {
01104             apd_bl.setTaskStatus(true);
01105           } else {
01106             apd_bl.setTaskStatus(false);
01107           }
01108 
01109           status = status && UtilsClient::getBinQuality(meg01_[ism-1], ie, ip);
01110 
01111           int ic = Numbers::indexEB(ism, ie, ip);
01112 
01113           if ( econn ) {
01114             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01115             dataset1_bl[ecid] = apd_bl;
01116           }
01117 
01118         }
01119 
01120         if ( update09 || update10 ) {
01121 
01122           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01123 
01124             if ( verbose_ ) {
01125               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01126               cout << "L1B (" << ie << "," << ip << ") " << num09 << " " << mean09 << " " << rms09 << endl;
01127               cout << endl;
01128             }
01129 
01130           }
01131 
01132           apd_bl.setAPDMean(mean09);
01133           apd_bl.setAPDRMS(rms09);
01134 
01135           apd_bl.setAPDOverPNMean(mean10);
01136           apd_bl.setAPDOverPNRMS(rms10);
01137 
01138           if ( UtilsClient::getBinStatus(meg01_[ism-1], ie, ip) ) {
01139             apd_bl.setTaskStatus(true);
01140           } else {
01141             apd_bl.setTaskStatus(false);
01142           }
01143 
01144           status = status && UtilsClient::getBinQuality(meg01_[ism-1], ie, ip);
01145 
01146           int ic = Numbers::indexEB(ism, ie, ip);
01147 
01148           if ( econn ) {
01149             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01150             dataset1_bl[ecid] = apd_bl;
01151           }
01152 
01153         }
01154 
01155         if ( update03 || update04 ) {
01156 
01157           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01158 
01159             if ( verbose_ ) {
01160               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01161               cout << "L2A (" << ie << "," << ip << ") " << num03 << " " << mean03 << " " << rms03 << endl;
01162               cout << endl;
01163             }
01164 
01165           }
01166 
01167           apd_ir.setAPDMean(mean03);
01168           apd_ir.setAPDRMS(rms03);
01169 
01170           apd_ir.setAPDOverPNMean(mean04);
01171           apd_ir.setAPDOverPNRMS(rms04);
01172 
01173           if ( UtilsClient::getBinStatus(meg02_[ism-1], ie, ip) ) {
01174             apd_ir.setTaskStatus(true);
01175           } else {
01176             apd_ir.setTaskStatus(false);
01177           }
01178 
01179           status = status && UtilsClient::getBinQuality(meg02_[ism-1], ie, ip);
01180 
01181           int ic = Numbers::indexEB(ism, ie, ip);
01182 
01183           if ( econn ) {
01184             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01185             dataset1_ir[ecid] = apd_ir;
01186           }
01187 
01188         }
01189 
01190         if ( update11 || update12 ) {
01191 
01192           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01193 
01194             if ( verbose_ ) {
01195               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01196               cout << "L2B (" << ie << "," << ip << ") " << num11 << " " << mean11 << " " << rms11 << endl;
01197               cout << endl;
01198             }
01199 
01200           }
01201 
01202           apd_ir.setAPDMean(mean11);
01203           apd_ir.setAPDRMS(rms11);
01204 
01205           apd_ir.setAPDOverPNMean(mean12);
01206           apd_ir.setAPDOverPNRMS(rms12);
01207 
01208           if ( UtilsClient::getBinStatus(meg02_[ism-1], ie, ip) ) {
01209             apd_ir.setTaskStatus(true);
01210           } else {
01211             apd_ir.setTaskStatus(false);
01212           }
01213 
01214           status = status && UtilsClient::getBinQuality(meg02_[ism-1], ie, ip);
01215 
01216           int ic = Numbers::indexEB(ism, ie, ip);
01217 
01218           if ( econn ) {
01219             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01220             dataset1_ir[ecid] = apd_ir;
01221           }
01222 
01223         }
01224 
01225         if ( update05 || update06 ) {
01226 
01227           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01228 
01229             if ( verbose_ ) {
01230               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01231               cout << "L3A (" << ie << "," << ip << ") " << num05 << " " << mean05 << " " << rms05 << endl;
01232               cout << endl;
01233             }
01234 
01235           }
01236 
01237           apd_gr.setAPDMean(mean05);
01238           apd_gr.setAPDRMS(rms05);
01239 
01240           apd_gr.setAPDOverPNMean(mean06);
01241           apd_gr.setAPDOverPNRMS(rms06);
01242 
01243           if ( UtilsClient::getBinStatus(meg03_[ism-1], ie, ip) ) {
01244             apd_gr.setTaskStatus(true);
01245           } else {
01246             apd_gr.setTaskStatus(false);
01247           }
01248 
01249           status = status && UtilsClient::getBinQuality(meg03_[ism-1], ie, ip);
01250 
01251           int ic = Numbers::indexEB(ism, ie, ip);
01252 
01253           if ( econn ) {
01254             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01255             dataset1_gr[ecid] = apd_gr;
01256           }
01257 
01258         }
01259 
01260         if ( update13 || update14 ) {
01261 
01262           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01263 
01264             if ( verbose_ ) {
01265               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01266               cout << "L3B (" << ie << "," << ip << ") " << num13 << " " << mean13 << " " << rms13 << endl;
01267               cout << endl;
01268             }
01269 
01270           }
01271 
01272           apd_gr.setAPDMean(mean13);
01273           apd_gr.setAPDRMS(rms13);
01274 
01275           apd_gr.setAPDOverPNMean(mean14);
01276           apd_gr.setAPDOverPNRMS(rms14);
01277 
01278           if ( UtilsClient::getBinStatus(meg03_[ism-1], ie, ip) ) {
01279             apd_gr.setTaskStatus(true);
01280           } else {
01281             apd_gr.setTaskStatus(false);
01282           }
01283 
01284           status = status && UtilsClient::getBinQuality(meg03_[ism-1], ie, ip);
01285 
01286           int ic = Numbers::indexEB(ism, ie, ip);
01287 
01288           if ( econn ) {
01289             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01290             dataset1_gr[ecid] = apd_gr;
01291           }
01292 
01293         }
01294 
01295         if ( update07 || update08 ) {
01296 
01297           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01298 
01299             if ( verbose_ ) {
01300               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01301               cout << "L4A (" << ie << "," << ip << ") " << num07 << " " << mean07 << " " << rms07 << endl;
01302               cout << endl;
01303             }
01304 
01305           }
01306 
01307           apd_rd.setAPDMean(mean07);
01308           apd_rd.setAPDRMS(rms07);
01309 
01310           apd_rd.setAPDOverPNMean(mean08);
01311           apd_rd.setAPDOverPNRMS(rms08);
01312 
01313           if ( UtilsClient::getBinStatus(meg04_[ism-1], ie, ip) ) {
01314             apd_rd.setTaskStatus(true);
01315           } else {
01316             apd_rd.setTaskStatus(false);
01317           }
01318 
01319           status = status && UtilsClient::getBinQuality(meg04_[ism-1], ie, ip);
01320 
01321           int ic = Numbers::indexEB(ism, ie, ip);
01322 
01323           if ( econn ) {
01324             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01325             dataset1_rd[ecid] = apd_rd;
01326           }
01327 
01328         }
01329 
01330         if ( update15 || update16 ) {
01331 
01332           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01333 
01334             if ( verbose_ ) {
01335               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01336               cout << "L4B (" << ie << "," << ip << ") " << num15 << " " << mean15 << " " << rms15 << endl;
01337               cout << endl;
01338             }
01339 
01340           }
01341 
01342           apd_rd.setAPDMean(mean15);
01343           apd_rd.setAPDRMS(rms15);
01344 
01345           apd_rd.setAPDOverPNMean(mean16);
01346           apd_rd.setAPDOverPNRMS(rms16);
01347 
01348           if ( UtilsClient::getBinStatus(meg04_[ism-1], ie, ip) ) {
01349             apd_rd.setTaskStatus(true);
01350           } else {
01351             apd_rd.setTaskStatus(false);
01352           }
01353 
01354           status = status && UtilsClient::getBinQuality(meg04_[ism-1], ie, ip);
01355 
01356           int ic = Numbers::indexEB(ism, ie, ip);
01357 
01358           if ( econn ) {
01359             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01360             dataset1_rd[ecid] = apd_rd;
01361           }
01362 
01363         }
01364 
01365       }
01366     }
01367 
01368   }
01369 
01370   if ( econn ) {
01371     try {
01372       if ( verbose_ ) cout << "Inserting MonLaserDat ..." << endl;
01373       if ( dataset1_bl.size() != 0 ) econn->insertDataArraySet(&dataset1_bl, moniov);
01374       if ( dataset1_ir.size() != 0 ) econn->insertDataArraySet(&dataset1_ir, moniov);
01375       if ( dataset1_gr.size() != 0 ) econn->insertDataArraySet(&dataset1_gr, moniov);
01376       if ( dataset1_rd.size() != 0 ) econn->insertDataArraySet(&dataset1_rd, moniov);
01377       if ( verbose_ ) cout << "done." << endl;
01378     } catch (runtime_error &e) {
01379       cerr << e.what() << endl;
01380     }
01381   }
01382 
01383   if ( verbose_ ) cout << endl;
01384 
01385   MonPNBlueDat pn_bl;
01386   map<EcalLogicID, MonPNBlueDat> dataset2_bl;
01387   MonPNGreenDat pn_gr;
01388   map<EcalLogicID, MonPNGreenDat> dataset2_gr;
01389   MonPNIRedDat pn_ir;
01390   map<EcalLogicID, MonPNIRedDat> dataset2_ir;
01391   MonPNRedDat pn_rd;
01392   map<EcalLogicID, MonPNRedDat> dataset2_rd;
01393 
01394   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
01395 
01396     int ism = superModules_[i];
01397 
01398     if ( verbose_ ) {
01399       cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01400       cout << endl;
01401       UtilsClient::printBadChannels(meg05_[ism-1], i01_[ism-1]);
01402       UtilsClient::printBadChannels(meg05_[ism-1], i05_[ism-1]);
01403       UtilsClient::printBadChannels(meg06_[ism-1], i02_[ism-1]);
01404       UtilsClient::printBadChannels(meg06_[ism-1], i06_[ism-1]);
01405       UtilsClient::printBadChannels(meg07_[ism-1], i03_[ism-1]);
01406       UtilsClient::printBadChannels(meg07_[ism-1], i07_[ism-1]);
01407       UtilsClient::printBadChannels(meg08_[ism-1], i04_[ism-1]);
01408       UtilsClient::printBadChannels(meg08_[ism-1], i08_[ism-1]);
01409       UtilsClient::printBadChannels(meg09_[ism-1], i09_[ism-1]);
01410       UtilsClient::printBadChannels(meg09_[ism-1], i13_[ism-1]);
01411       UtilsClient::printBadChannels(meg10_[ism-1], i10_[ism-1]);
01412       UtilsClient::printBadChannels(meg10_[ism-1], i14_[ism-1]);
01413       UtilsClient::printBadChannels(meg11_[ism-1], i11_[ism-1]);
01414       UtilsClient::printBadChannels(meg11_[ism-1], i15_[ism-1]);
01415       UtilsClient::printBadChannels(meg12_[ism-1], i12_[ism-1]);
01416       UtilsClient::printBadChannels(meg12_[ism-1], i16_[ism-1]);
01417     }
01418 
01419     for ( int i = 1; i <= 10; i++ ) {
01420 
01421       bool update01;
01422       bool update02;
01423       bool update03;
01424       bool update04;
01425       bool update05;
01426       bool update06;
01427       bool update07;
01428       bool update08;
01429       bool update09;
01430       bool update10;
01431       bool update11;
01432       bool update12;
01433       bool update13;
01434       bool update14;
01435       bool update15;
01436       bool update16;
01437 
01438       float num01, num02, num03, num04, num05, num06, num07, num08;
01439       float num09, num10, num11, num12, num13, num14, num15, num16;
01440       float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
01441       float mean09, mean10, mean11, mean12, mean13, mean14, mean15, mean16;
01442       float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
01443       float rms09, rms10, rms11, rms12, rms13, rms14, rms15, rms16;
01444 
01445       update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
01446       update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
01447       update03 = UtilsClient::getBinStatistics(i03_[ism-1], i, 0, num03, mean03, rms03);
01448       update04 = UtilsClient::getBinStatistics(i04_[ism-1], i, 0, num04, mean04, rms04);
01449       update05 = UtilsClient::getBinStatistics(i05_[ism-1], i, 0, num05, mean05, rms05);
01450       update06 = UtilsClient::getBinStatistics(i06_[ism-1], i, 0, num06, mean06, rms06);
01451       update07 = UtilsClient::getBinStatistics(i07_[ism-1], i, 0, num07, mean07, rms07);
01452       update08 = UtilsClient::getBinStatistics(i08_[ism-1], i, 0, num08, mean08, rms08);
01453       update09 = UtilsClient::getBinStatistics(i09_[ism-1], i, 0, num09, mean09, rms09);
01454       update10 = UtilsClient::getBinStatistics(i10_[ism-1], i, 0, num10, mean10, rms10);
01455       update11 = UtilsClient::getBinStatistics(i11_[ism-1], i, 0, num11, mean11, rms11);
01456       update12 = UtilsClient::getBinStatistics(i12_[ism-1], i, 0, num12, mean12, rms12);
01457       update13 = UtilsClient::getBinStatistics(i13_[ism-1], i, 0, num13, mean13, rms13);
01458       update14 = UtilsClient::getBinStatistics(i14_[ism-1], i, 0, num14, mean14, rms14);
01459       update15 = UtilsClient::getBinStatistics(i15_[ism-1], i, 0, num15, mean15, rms15);
01460       update16 = UtilsClient::getBinStatistics(i16_[ism-1], i, 0, num16, mean16, rms16);
01461 
01462       if ( update01 || update05 || update09 || update13 ) {
01463 
01464         if ( i == 1 ) {
01465 
01466           if ( verbose_ ) {
01467             cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01468             cout << "PNs (" << i << ") L1 G01 " << num01  << " " << mean01 << " " << rms01  << endl;
01469             cout << "PNs (" << i << ") L1 G16 " << num09  << " " << mean09 << " " << rms09  << endl;
01470             cout << endl;
01471           }
01472 
01473         }
01474 
01475         pn_bl.setADCMeanG1(mean01);
01476         pn_bl.setADCRMSG1(rms01);
01477 
01478         pn_bl.setPedMeanG1(mean05);
01479         pn_bl.setPedRMSG1(rms05);
01480 
01481         pn_bl.setADCMeanG16(mean09);
01482         pn_bl.setADCRMSG16(rms09);
01483 
01484         pn_bl.setPedMeanG16(mean13);
01485         pn_bl.setPedRMSG16(rms13);
01486 
01487         if ( UtilsClient::getBinStatus(meg05_[ism-1], i, 1) ||
01488              UtilsClient::getBinStatus(meg09_[ism-1], i, 1) ) {
01489           pn_bl.setTaskStatus(true);
01490         } else {
01491           pn_bl.setTaskStatus(false);
01492         }
01493 
01494         status = status && ( UtilsClient::getBinQuality(meg05_[ism-1], i, 1) ||
01495                              UtilsClient::getBinQuality(meg09_[ism-1], i, 1) );
01496 
01497         if ( econn ) {
01498           ecid = LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1);
01499           dataset2_bl[ecid] = pn_bl;
01500         }
01501 
01502       }
01503 
01504       if ( update02 || update06 || update10 || update14 ) {
01505 
01506         if ( i == 1 ) {
01507 
01508           if ( verbose_ ) {
01509             cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01510             cout << "PNs (" << i << ") L2 G01 " << num02  << " " << mean02 << " " << rms02  << endl;
01511             cout << "PNs (" << i << ") L2 G16 " << num10  << " " << mean10 << " " << rms10  << endl;
01512             cout << endl;
01513           }
01514 
01515         }
01516 
01517         pn_ir.setADCMeanG1(mean02);
01518         pn_ir.setADCRMSG1(rms02);
01519 
01520         pn_ir.setPedMeanG1(mean06);
01521         pn_ir.setPedRMSG1(rms06);
01522 
01523         pn_ir.setADCMeanG16(mean10);
01524         pn_ir.setADCRMSG16(rms10);
01525 
01526         pn_ir.setPedMeanG16(mean14);
01527         pn_ir.setPedRMSG16(rms14);
01528 
01529         if ( UtilsClient::getBinStatus(meg06_[ism-1], i, 1) ||
01530              UtilsClient::getBinStatus(meg10_[ism-1], i, 1) ) {
01531           pn_ir.setTaskStatus(true);
01532         } else {
01533           pn_ir.setTaskStatus(false);
01534         }
01535 
01536         status = status && ( UtilsClient::getBinQuality(meg06_[ism-1], i, 1) ||
01537                              UtilsClient::getBinQuality(meg10_[ism-1], i, 1) );
01538 
01539         if ( econn ) {
01540           ecid = LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1);
01541           dataset2_ir[ecid] = pn_ir;
01542         }
01543 
01544       }
01545 
01546       if ( update03 || update07 || update11 || update15 ) {
01547 
01548         if ( i == 1 ) {
01549 
01550           if ( verbose_ ) {
01551             cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01552             cout << "PNs (" << i << ") L3 G01 " << num03  << " " << mean03 << " " << rms03  << endl;
01553             cout << "PNs (" << i << ") L3 G16 " << num11  << " " << mean11 << " " << rms11  << endl;
01554             cout << endl;
01555           }
01556 
01557         }
01558 
01559         pn_gr.setADCMeanG1(mean03);
01560         pn_gr.setADCRMSG1(rms03);
01561 
01562         pn_gr.setPedMeanG1(mean07);
01563         pn_gr.setPedRMSG1(rms07);
01564 
01565         pn_gr.setADCMeanG16(mean11);
01566         pn_gr.setADCRMSG16(rms11);
01567 
01568         pn_gr.setPedMeanG16(mean15);
01569         pn_gr.setPedRMSG16(rms15);
01570 
01571         if ( UtilsClient::getBinStatus(meg07_[ism-1], i, 1) ||
01572              UtilsClient::getBinStatus(meg11_[ism-1], i, 1) ) {
01573           pn_gr.setTaskStatus(true);
01574         } else {
01575           pn_gr.setTaskStatus(false);
01576         }
01577 
01578         status = status && ( UtilsClient::getBinQuality(meg07_[ism-1], i, 1) ||
01579                              UtilsClient::getBinQuality(meg11_[ism-1], i, 1) );
01580 
01581         if ( econn ) {
01582           ecid = LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1);
01583           dataset2_gr[ecid] = pn_gr;
01584         }
01585 
01586       }
01587 
01588       if ( update04 || update08 || update12 || update16 ) {
01589 
01590         if ( i == 1 ) {
01591 
01592           if ( verbose_ ) {
01593             cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01594             cout << "PNs (" << i << ") L4 G01 " << num04  << " " << mean04 << " " << rms04  << endl;
01595             cout << "PNs (" << i << ") L4 G16 " << num12  << " " << mean12 << " " << rms12  << endl;
01596             cout << endl;
01597           }
01598 
01599         }
01600 
01601         pn_rd.setADCMeanG1(mean04);
01602         pn_rd.setADCRMSG1(rms04);
01603 
01604         pn_rd.setPedMeanG1(mean08);
01605         pn_rd.setPedRMSG1(mean08);
01606 
01607         pn_rd.setADCMeanG16(mean12);
01608         pn_rd.setADCRMSG16(rms12);
01609 
01610         pn_rd.setPedMeanG16(mean16);
01611         pn_rd.setPedRMSG16(rms16);
01612 
01613         if ( UtilsClient::getBinStatus(meg08_[ism-1], i, 1) ||
01614              UtilsClient::getBinStatus(meg12_[ism-1], i, 1) ) {
01615           pn_rd.setTaskStatus(true);
01616         } else {
01617           pn_rd.setTaskStatus(false);
01618         }
01619 
01620         status = status && ( UtilsClient::getBinQuality(meg08_[ism-1], i, 1) ||
01621                              UtilsClient::getBinQuality(meg12_[ism-1], i, 1) );
01622 
01623         if ( econn ) {
01624           ecid = LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1);
01625           dataset2_rd[ecid] = pn_rd;
01626         }
01627 
01628       }
01629 
01630     }
01631 
01632   }
01633 
01634   if ( econn ) {
01635     try {
01636       if ( verbose_ ) cout << "Inserting MonPnDat ..." << endl;
01637       if ( dataset2_bl.size() != 0 ) econn->insertDataArraySet(&dataset2_bl, moniov);
01638       if ( dataset2_ir.size() != 0 ) econn->insertDataArraySet(&dataset2_ir, moniov);
01639       if ( dataset2_gr.size() != 0 ) econn->insertDataArraySet(&dataset2_gr, moniov);
01640       if ( dataset2_rd.size() != 0 ) econn->insertDataArraySet(&dataset2_rd, moniov);
01641       if ( verbose_ ) cout << "done." << endl;
01642     } catch (runtime_error &e) {
01643       cerr << e.what() << endl;
01644     }
01645   }
01646 
01647   if ( verbose_ ) cout << endl;
01648 
01649   MonTimingLaserBlueCrystalDat t_bl;
01650   map<EcalLogicID, MonTimingLaserBlueCrystalDat> dataset3_bl;
01651   MonTimingLaserGreenCrystalDat t_gr;
01652   map<EcalLogicID, MonTimingLaserGreenCrystalDat> dataset3_gr;
01653   MonTimingLaserIRedCrystalDat t_ir;
01654   map<EcalLogicID, MonTimingLaserIRedCrystalDat> dataset3_ir;
01655   MonTimingLaserRedCrystalDat t_rd;
01656   map<EcalLogicID, MonTimingLaserRedCrystalDat> dataset3_rd;
01657 
01658   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
01659 
01660     int ism = superModules_[i];
01661 
01662     if ( verbose_ ) {
01663       cout << " " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01664       cout << endl;
01665     }
01666 
01667     for ( int ie = 1; ie <= 85; ie++ ) {
01668       for ( int ip = 1; ip <= 20; ip++ ) {
01669 
01670         bool update01;
01671         bool update02;
01672         bool update03;
01673         bool update04;
01674         bool update05;
01675         bool update06;
01676         bool update07;
01677         bool update08;
01678 
01679         float num01, num02, num03, num04, num05, num06, num07, num08;
01680         float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
01681         float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
01682 
01683         update01 = UtilsClient::getBinStatistics(h09_[ism-1], ie, ip, num01, mean01, rms01);
01684         update02 = UtilsClient::getBinStatistics(h10_[ism-1], ie, ip, num02, mean02, rms02);
01685         update03 = UtilsClient::getBinStatistics(h11_[ism-1], ie, ip, num03, mean03, rms03);
01686         update04 = UtilsClient::getBinStatistics(h12_[ism-1], ie, ip, num04, mean04, rms04);
01687         update05 = UtilsClient::getBinStatistics(h21_[ism-1], ie, ip, num05, mean05, rms05);
01688         update06 = UtilsClient::getBinStatistics(h22_[ism-1], ie, ip, num06, mean06, rms06);
01689         update07 = UtilsClient::getBinStatistics(h23_[ism-1], ie, ip, num07, mean07, rms07);
01690         update08 = UtilsClient::getBinStatistics(h24_[ism-1], ie, ip, num08, mean08, rms08);
01691 
01692         if ( update01 ) {
01693 
01694           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01695 
01696             if ( verbose_ ) {
01697               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01698               cout << "L1A crystal (" << ie << "," << ip << ") " << num01  << " " << mean01 << " " << rms01  << endl;
01699               cout << endl;
01700             }
01701 
01702           }
01703 
01704           t_bl.setTimingMean(mean01);
01705           t_bl.setTimingRMS(rms01);
01706 
01707           if ( UtilsClient::getBinStatus(meg01_[ism-1], ie, ip) ) {
01708             t_bl.setTaskStatus(true);
01709           } else {
01710             t_bl.setTaskStatus(false);
01711           }
01712 
01713           status = status && UtilsClient::getBinQuality(meg01_[ism-1], ie, ip);
01714 
01715           int ic = Numbers::indexEB(ism, ie, ip);
01716 
01717           if ( econn ) {
01718             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01719             dataset3_bl[ecid] = t_bl;
01720           }
01721 
01722         }
01723 
01724         if ( update05 ) {
01725 
01726           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01727 
01728             if ( verbose_ ) {
01729               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01730               cout << "L1B crystal (" << ie << "," << ip << ") " << num05  << " " << mean05 << " " << rms05  << endl;
01731               cout << endl;
01732             }
01733 
01734           }
01735 
01736           t_bl.setTimingMean(mean05);
01737           t_bl.setTimingRMS(rms05);
01738 
01739           if ( UtilsClient::getBinStatus(meg01_[ism-1], ie, ip) ) {
01740             t_bl.setTaskStatus(true);
01741           } else {
01742             t_bl.setTaskStatus(false);
01743           }
01744 
01745           status = status && UtilsClient::getBinQuality(meg01_[ism-1], ie, ip);
01746 
01747           int ic = Numbers::indexEB(ism, ie, ip);
01748 
01749           if ( econn ) {
01750             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01751             dataset3_bl[ecid] = t_bl;
01752           }
01753 
01754         }
01755 
01756         if ( update02 ) {
01757 
01758           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01759 
01760             if ( verbose_ ) {
01761               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01762               cout << "L2A crystal (" << ie << "," << ip << ") " << num02  << " " << mean02 << " " << rms02  << endl;
01763               cout << endl;
01764             }
01765 
01766           }
01767 
01768           t_gr.setTimingMean(mean02);
01769           t_gr.setTimingRMS(rms02);
01770 
01771           if ( UtilsClient::getBinStatus(meg02_[ism-1], ie, ip) ) {
01772             t_gr.setTaskStatus(true);
01773           } else {
01774             t_gr.setTaskStatus(false);
01775           }
01776 
01777           status = status && UtilsClient::getBinQuality(meg02_[ism-1], ie, ip);
01778 
01779           int ic = Numbers::indexEB(ism, ie, ip);
01780 
01781           if ( econn ) {
01782             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01783             dataset3_gr[ecid] = t_gr;
01784           }
01785 
01786         }
01787 
01788         if ( update06 ) {
01789 
01790           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01791 
01792             if ( verbose_ ) {
01793               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01794               cout << "L2B crystal (" << ie << "," << ip << ") " << num06  << " " << mean06 << " " << rms06  << endl;
01795               cout << endl;
01796             }
01797 
01798           }
01799 
01800           t_gr.setTimingMean(mean06);
01801           t_gr.setTimingRMS(rms06);
01802 
01803           if ( UtilsClient::getBinStatus(meg02_[ism-1], ie, ip) ) {
01804             t_gr.setTaskStatus(true);
01805           } else {
01806             t_gr.setTaskStatus(false);
01807           }
01808 
01809           status = status && UtilsClient::getBinQuality(meg02_[ism-1], ie, ip);
01810 
01811           int ic = Numbers::indexEB(ism, ie, ip);
01812 
01813           if ( econn ) {
01814             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01815             dataset3_gr[ecid] = t_gr;
01816           }
01817 
01818         }
01819 
01820         if ( update03 ) {
01821 
01822           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01823 
01824             if ( verbose_ ) {
01825               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01826               cout << "L3A crystal (" << ie << "," << ip << ") " << num03  << " " << mean03 << " " << rms03  << endl;
01827               cout << endl;
01828             }
01829 
01830           }
01831 
01832           t_ir.setTimingMean(mean03);
01833           t_ir.setTimingRMS(rms03);
01834 
01835           if ( UtilsClient::getBinStatus(meg03_[ism-1], ie, ip) ) {
01836             t_ir.setTaskStatus(true);
01837           } else {
01838             t_ir.setTaskStatus(false);
01839           }
01840 
01841           status = status && UtilsClient::getBinQuality(meg03_[ism-1], ie, ip);
01842 
01843           int ic = Numbers::indexEB(ism, ie, ip);
01844 
01845           if ( econn ) {
01846             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01847             dataset3_ir[ecid] = t_ir;
01848           }
01849 
01850         }
01851 
01852         if ( update07 ) {
01853 
01854           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01855 
01856             if ( verbose_ ) {
01857               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01858               cout << "L3B crystal (" << ie << "," << ip << ") " << num07  << " " << mean07 << " " << rms07  << endl;
01859               cout << endl;
01860             }
01861 
01862           }
01863 
01864           t_ir.setTimingMean(mean07);
01865           t_ir.setTimingRMS(rms07);
01866 
01867           if ( UtilsClient::getBinStatus(meg03_[ism-1], ie, ip) ) {
01868             t_ir.setTaskStatus(true);
01869           } else {
01870             t_ir.setTaskStatus(false);
01871           }
01872 
01873           status = status && UtilsClient::getBinQuality(meg03_[ism-1], ie, ip);
01874 
01875           int ic = Numbers::indexEB(ism, ie, ip);
01876 
01877           if ( econn ) {
01878             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01879             dataset3_ir[ecid] = t_ir;
01880           }
01881 
01882         }
01883 
01884         if ( update04 ) {
01885 
01886           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01887 
01888             if ( verbose_ ) {
01889               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01890               cout << "L4A crystal (" << ie << "," << ip << ") " << num04  << " " << mean04 << " " << rms04  << endl;
01891               cout << endl;
01892             }
01893 
01894           }
01895 
01896           t_rd.setTimingMean(mean04);
01897           t_rd.setTimingRMS(rms04);
01898 
01899           if ( UtilsClient::getBinStatus(meg04_[ism-1], ie, ip) ) {
01900             t_rd.setTaskStatus(true);
01901           } else {
01902             t_rd.setTaskStatus(false);
01903           }
01904 
01905           status = status && UtilsClient::getBinQuality(meg04_[ism-1], ie, ip);
01906 
01907           int ic = Numbers::indexEB(ism, ie, ip);
01908 
01909           if ( econn ) {
01910             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01911             dataset3_rd[ecid] = t_rd;
01912           }
01913 
01914         }
01915 
01916         if ( update08 ) {
01917 
01918           if ( Numbers::icEB(ism, ie, ip) == 1 ) {
01919 
01920             if ( verbose_ ) {
01921               cout << "Preparing dataset for " << Numbers::sEB(ism) << " (ism=" << ism << ")" << endl;
01922               cout << "L4B crystal (" << ie << "," << ip << ") " << num08  << " " << mean08 << " " << rms08  << endl;
01923               cout << endl;
01924             }
01925 
01926           }
01927 
01928           t_bl.setTimingMean(mean08);
01929           t_bl.setTimingRMS(rms08);
01930 
01931           if ( UtilsClient::getBinStatus(meg04_[ism-1], ie, ip) ) {
01932             t_rd.setTaskStatus(true);
01933           } else {
01934             t_rd.setTaskStatus(false);
01935           }
01936 
01937           status = status && UtilsClient::getBinQuality(meg04_[ism-1], ie, ip);
01938 
01939           int ic = Numbers::indexEB(ism, ie, ip);
01940 
01941           if ( econn ) {
01942             ecid = LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic);
01943             dataset3_rd[ecid] = t_rd;
01944           }
01945 
01946         }
01947 
01948       }
01949     }
01950 
01951   }
01952 
01953   if ( econn ) {
01954     try {
01955       if ( verbose_ ) cout << "Inserting MonTimingLaserCrystalDat ..." << endl;
01956       if ( dataset3_bl.size() != 0 ) econn->insertDataArraySet(&dataset3_bl, moniov);
01957       if ( dataset3_ir.size() != 0 ) econn->insertDataArraySet(&dataset3_ir, moniov);
01958       if ( dataset3_gr.size() != 0 ) econn->insertDataArraySet(&dataset3_gr, moniov);
01959       if ( dataset3_rd.size() != 0 ) econn->insertDataArraySet(&dataset3_rd, moniov);
01960       if ( verbose_ ) cout << "done." << endl;
01961     } catch (runtime_error &e) {
01962       cerr << e.what() << endl;
01963     }
01964   }
01965 
01966   return true;
01967 
01968 }
01969 
01970 void EBLaserClient::analyze(void) {
01971 
01972   ievt_++;
01973   jevt_++;
01974   if ( ievt_ % 10 == 0 ) {
01975     if ( debug_ ) cout << "EBLaserClient: ievt/jevt = " << ievt_ << "/" << jevt_ << endl;
01976   }
01977 
01978   uint64_t bits01 = 0;
01979   bits01 |= EcalErrorDictionary::getMask("LASER_MEAN_WARNING");
01980   bits01 |= EcalErrorDictionary::getMask("LASER_RMS_WARNING");
01981   bits01 |= EcalErrorDictionary::getMask("LASER_MEAN_OVER_PN_WARNING");
01982   bits01 |= EcalErrorDictionary::getMask("LASER_RMS_OVER_PN_WARNING");
01983 
01984   uint64_t bits02 = 0;
01985   bits02 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_MEAN_WARNING");
01986   bits02 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_RMS_WARNING");
01987   bits02 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_MEAN_ERROR");
01988   bits02 |= EcalErrorDictionary::getMask("PEDESTAL_LOW_GAIN_RMS_ERROR");
01989 
01990   uint64_t bits03 = 0;
01991   bits03 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_MEAN_WARNING");
01992   bits03 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_RMS_WARNING");
01993   bits03 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_MEAN_ERROR");
01994   bits03 |= EcalErrorDictionary::getMask("PEDESTAL_MIDDLE_GAIN_RMS_ERROR");
01995 
01996   uint64_t bits04 = 0;
01997   bits04 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_MEAN_WARNING");
01998   bits04 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_RMS_WARNING");
01999   bits04 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_MEAN_ERROR");
02000   bits04 |= EcalErrorDictionary::getMask("PEDESTAL_HIGH_GAIN_RMS_ERROR");
02001 
02002   map<EcalLogicID, RunCrystalErrorsDat> mask1;
02003   map<EcalLogicID, RunPNErrorsDat> mask2;
02004   map<EcalLogicID, RunTTErrorsDat> mask3;
02005 
02006   EcalErrorMask::fetchDataSet(&mask1);
02007   EcalErrorMask::fetchDataSet(&mask2);
02008   EcalErrorMask::fetchDataSet(&mask3);
02009 
02010   char histo[200];
02011 
02012   MonitorElement* me;
02013 
02014   for ( unsigned int i=0; i<superModules_.size(); i++ ) {
02015 
02016     int ism = superModules_[i];
02017 
02018     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/EBLT amplitude %s L1A").c_str(), Numbers::sEB(ism).c_str());
02019     me = dqmStore_->get(histo);
02020     h01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h01_[ism-1] );
02021 
02022     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/EBLT amplitude over PN %s L1A").c_str(), Numbers::sEB(ism).c_str());
02023     me = dqmStore_->get(histo);
02024     h02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h02_[ism-1] );
02025 
02026     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/EBLT amplitude %s L2A").c_str(), Numbers::sEB(ism).c_str());
02027     me = dqmStore_->get(histo);
02028     h03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h03_[ism-1] );
02029 
02030     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/EBLT amplitude over PN %s L2A").c_str(), Numbers::sEB(ism).c_str());
02031     me = dqmStore_->get(histo);
02032     h04_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h04_[ism-1] );
02033 
02034     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/EBLT amplitude %s L3A").c_str(), Numbers::sEB(ism).c_str());
02035     me = dqmStore_->get(histo);
02036     h05_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h05_[ism-1] );
02037 
02038     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/EBLT amplitude over PN %s L3A").c_str(), Numbers::sEB(ism).c_str());
02039     me = dqmStore_->get(histo);
02040     h06_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h06_[ism-1] );
02041 
02042     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/EBLT amplitude %s L4A").c_str(), Numbers::sEB(ism).c_str());
02043     me = dqmStore_->get(histo);
02044     h07_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h07_[ism-1] );
02045 
02046     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/EBLT amplitude over PN %s L4A").c_str(), Numbers::sEB(ism).c_str());
02047     me = dqmStore_->get(histo);
02048     h08_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h08_[ism-1] );
02049 
02050     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/EBLT timing %s L1A").c_str(), Numbers::sEB(ism).c_str());
02051     me = dqmStore_->get(histo);
02052     h09_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h09_[ism-1] );
02053 
02054     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/EBLT timing %s L2A").c_str(), Numbers::sEB(ism).c_str());
02055     me = dqmStore_->get(histo);
02056     h10_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h10_[ism-1] );
02057 
02058     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/EBLT timing %s L3A").c_str(), Numbers::sEB(ism).c_str());
02059     me = dqmStore_->get(histo);
02060     h11_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h11_[ism-1] );
02061 
02062     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/EBLT timing %s L4A").c_str(), Numbers::sEB(ism).c_str());
02063     me = dqmStore_->get(histo);
02064     h12_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h12_[ism-1] );
02065 
02066     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/EBLT amplitude %s L1B").c_str(), Numbers::sEB(ism).c_str());
02067     me = dqmStore_->get(histo);
02068     h13_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h13_[ism-1] );
02069 
02070     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/EBLT amplitude over PN %s L1B").c_str(), Numbers::sEB(ism).c_str());
02071     me = dqmStore_->get(histo);
02072     h14_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h14_[ism-1] );
02073 
02074     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/EBLT amplitude %s L2B").c_str(), Numbers::sEB(ism).c_str());
02075     me = dqmStore_->get(histo);
02076     h15_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h15_[ism-1] );
02077 
02078     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/EBLT amplitude over PN %s L2B").c_str(), Numbers::sEB(ism).c_str());
02079     me = dqmStore_->get(histo);
02080     h16_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h16_[ism-1] );
02081 
02082     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/EBLT amplitude %s L3B").c_str(), Numbers::sEB(ism).c_str());
02083     me = dqmStore_->get(histo);
02084     h17_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h17_[ism-1] );
02085 
02086     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/EBLT amplitude over PN %s L3B").c_str(), Numbers::sEB(ism).c_str());
02087     me = dqmStore_->get(histo);
02088     h18_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h18_[ism-1] );
02089 
02090     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/EBLT amplitude %s L4B").c_str(), Numbers::sEB(ism).c_str());
02091     me = dqmStore_->get(histo);
02092     h19_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h19_[ism-1] );
02093 
02094     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/EBLT amplitude over PN %s L4B").c_str(), Numbers::sEB(ism).c_str());
02095     me = dqmStore_->get(histo);
02096     h20_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h20_[ism-1] );
02097 
02098     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/EBLT timing %s L1B").c_str(), Numbers::sEB(ism).c_str());
02099     me = dqmStore_->get(histo);
02100     h21_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h21_[ism-1] );
02101 
02102     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/EBLT timing %s L2B").c_str(), Numbers::sEB(ism).c_str());
02103     me = dqmStore_->get(histo);
02104     h22_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h22_[ism-1] );
02105 
02106     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/EBLT timing %s L3B").c_str(), Numbers::sEB(ism).c_str());
02107     me = dqmStore_->get(histo);
02108     h23_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h23_[ism-1] );
02109 
02110     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/EBLT timing %s L4B").c_str(), Numbers::sEB(ism).c_str());
02111     me = dqmStore_->get(histo);
02112     h24_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h24_[ism-1] );
02113 
02114     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/EBLT shape %s L1A").c_str(), Numbers::sEB(ism).c_str());
02115     me = dqmStore_->get(histo);
02116     hs01_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs01_[ism-1] );
02117 
02118     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/EBLT shape %s L2A").c_str(), Numbers::sEB(ism).c_str());
02119     me = dqmStore_->get(histo);
02120     hs02_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs02_[ism-1] );
02121 
02122     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/EBLT shape %s L3A").c_str(), Numbers::sEB(ism).c_str());
02123     me = dqmStore_->get(histo);
02124     hs03_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs03_[ism-1] );
02125 
02126     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/EBLT shape %s L4A").c_str(), Numbers::sEB(ism).c_str());
02127     me = dqmStore_->get(histo);
02128     hs04_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs04_[ism-1] );
02129 
02130     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/EBLT shape %s L1B").c_str(), Numbers::sEB(ism).c_str());
02131     me = dqmStore_->get(histo);
02132     hs05_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs05_[ism-1] );
02133 
02134     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/EBLT shape %s L2B").c_str(), Numbers::sEB(ism).c_str());
02135     me = dqmStore_->get(histo);
02136     hs06_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs06_[ism-1] );
02137 
02138     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/EBLT shape %s L3B").c_str(), Numbers::sEB(ism).c_str());
02139     me = dqmStore_->get(histo);
02140     hs07_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs07_[ism-1] );
02141 
02142     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/EBLT shape %s L4B").c_str(), Numbers::sEB(ism).c_str());
02143     me = dqmStore_->get(histo);
02144     hs08_[ism-1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, hs08_[ism-1] );
02145 
02146     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/PN/Gain01/EBPDT PNs amplitude %s G01 L1").c_str(), Numbers::sEB(ism).c_str());
02147     me = dqmStore_->get(histo);
02148     i01_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i01_[ism-1] );
02149 
02150     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/PN/Gain01/EBPDT PNs amplitude %s G01 L2").c_str(), Numbers::sEB(ism).c_str());
02151     me = dqmStore_->get(histo);
02152     i02_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i02_[ism-1] );
02153 
02154     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/PN/Gain01/EBPDT PNs amplitude %s G01 L3").c_str(), Numbers::sEB(ism).c_str());
02155     me = dqmStore_->get(histo);
02156     i03_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i03_[ism-1] );
02157 
02158     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/PN/Gain01/EBPDT PNs amplitude %s G01 L4").c_str(), Numbers::sEB(ism).c_str());
02159     me = dqmStore_->get(histo);
02160     i04_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i04_[ism-1] );
02161 
02162     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/PN/Gain01/EBPDT PNs pedestal %s G01 L1").c_str(), Numbers::sEB(ism).c_str());
02163     me = dqmStore_->get(histo);
02164     i05_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i05_[ism-1] );
02165 
02166     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/PN/Gain01/EBPDT PNs pedestal %s G01 L2").c_str(), Numbers::sEB(ism).c_str());
02167     me = dqmStore_->get(histo);
02168     i06_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i06_[ism-1] );
02169 
02170     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/PN/Gain01/EBPDT PNs pedestal %s G01 L3").c_str(), Numbers::sEB(ism).c_str());
02171     me = dqmStore_->get(histo);
02172     i07_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i07_[ism-1] );
02173 
02174     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/PN/Gain01/EBPDT PNs pedestal %s G01 L4").c_str(), Numbers::sEB(ism).c_str());
02175     me = dqmStore_->get(histo);
02176     i08_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i08_[ism-1] );
02177 
02178     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/PN/Gain16/EBPDT PNs amplitude %s G16 L1").c_str(), Numbers::sEB(ism).c_str());
02179     me = dqmStore_->get(histo);
02180     i09_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i09_[ism-1] );
02181 
02182     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/PN/Gain16/EBPDT PNs amplitude %s G16 L2").c_str(), Numbers::sEB(ism).c_str());
02183     me = dqmStore_->get(histo);
02184     i10_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i10_[ism-1] );
02185 
02186     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/PN/Gain16/EBPDT PNs amplitude %s G16 L3").c_str(), Numbers::sEB(ism).c_str());
02187     me = dqmStore_->get(histo);
02188     i11_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i11_[ism-1] );
02189 
02190     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/PN/Gain16/EBPDT PNs amplitude %s G16 L4").c_str(), Numbers::sEB(ism).c_str());
02191     me = dqmStore_->get(histo);
02192     i12_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i12_[ism-1] );
02193 
02194     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser1/PN/Gain16/EBPDT PNs pedestal %s G16 L1").c_str(), Numbers::sEB(ism).c_str());
02195     me = dqmStore_->get(histo);
02196     i13_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i13_[ism-1] );
02197 
02198     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser2/PN/Gain16/EBPDT PNs pedestal %s G16 L2").c_str(), Numbers::sEB(ism).c_str());
02199     me = dqmStore_->get(histo);
02200     i14_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i14_[ism-1] );
02201 
02202     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser3/PN/Gain16/EBPDT PNs pedestal %s G16 L3").c_str(), Numbers::sEB(ism).c_str());
02203     me = dqmStore_->get(histo);
02204     i15_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i15_[ism-1] );
02205 
02206     sprintf(histo, (prefixME_ + "/EBLaserTask/Laser4/PN/Gain16/EBPDT PNs pedestal %s G16 L4").c_str(), Numbers::sEB(ism).c_str());
02207     me = dqmStore_->get(histo);
02208     i16_[ism-1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, i16_[ism-1] );
02209 
02210     if ( meg01_[ism-1] ) meg01_[ism-1]->Reset();
02211     if ( meg02_[ism-1] ) meg02_[ism-1]->Reset();
02212     if ( meg03_[ism-1] ) meg03_[ism-1]->Reset();
02213     if ( meg04_[ism-1] ) meg04_[ism-1]->Reset();
02214 
02215     if ( meg05_[ism-1] ) meg05_[ism-1]->Reset();
02216     if ( meg06_[ism-1] ) meg06_[ism-1]->Reset();
02217     if ( meg07_[ism-1] ) meg07_[ism-1]->Reset();
02218     if ( meg08_[ism-1] ) meg08_[ism-1]->Reset();
02219     if ( meg09_[ism-1] ) meg09_[ism-1]->Reset();
02220     if ( meg10_[ism-1] ) meg10_[ism-1]->Reset();
02221     if ( meg11_[ism-1] ) meg11_[ism-1]->Reset();
02222     if ( meg12_[ism-1] ) meg12_[ism-1]->Reset();
02223 
02224     if ( mea01_[ism-1] ) mea01_[ism-1]->Reset();
02225     if ( mea02_[ism-1] ) mea02_[ism-1]->Reset();
02226     if ( mea03_[ism-1] ) mea03_[ism-1]->Reset();
02227     if ( mea04_[ism-1] ) mea04_[ism-1]->Reset();
02228     if ( mea05_[ism-1] ) mea05_[ism-1]->Reset();
02229     if ( mea06_[ism-1] ) mea06_[ism-1]->Reset();
02230     if ( mea07_[ism-1] ) mea07_[ism-1]->Reset();
02231     if ( mea08_[ism-1] ) mea08_[ism-1]->Reset();
02232 
02233     if ( met01_[ism-1] ) met01_[ism-1]->Reset();
02234     if ( met02_[ism-1] ) met02_[ism-1]->Reset();
02235     if ( met03_[ism-1] ) met03_[ism-1]->Reset();
02236     if ( met04_[ism-1] ) met04_[ism-1]->Reset();
02237     if ( met05_[ism-1] ) met05_[ism-1]->Reset();
02238     if ( met06_[ism-1] ) met06_[ism-1]->Reset();
02239     if ( met07_[ism-1] ) met07_[ism-1]->Reset();
02240     if ( met08_[ism-1] ) met08_[ism-1]->Reset();
02241 
02242     if ( metav01_[ism-1] ) metav01_[ism-1]->Reset();
02243     if ( metav02_[ism-1] ) metav02_[ism-1]->Reset();
02244     if ( metav03_[ism-1] ) metav03_[ism-1]->Reset();
02245     if ( metav04_[ism-1] ) metav04_[ism-1]->Reset();
02246     if ( metav05_[ism-1] ) metav05_[ism-1]->Reset();
02247     if ( metav06_[ism-1] ) metav06_[ism-1]->Reset();
02248     if ( metav07_[ism-1] ) metav07_[ism-1]->Reset();
02249     if ( metav08_[ism-1] ) metav08_[ism-1]->Reset();
02250 
02251     if ( metrms01_[ism-1] ) metrms01_[ism-1]->Reset();
02252     if ( metrms02_[ism-1] ) metrms02_[ism-1]->Reset();
02253     if ( metrms03_[ism-1] ) metrms03_[ism-1]->Reset();
02254     if ( metrms04_[ism-1] ) metrms04_[ism-1]->Reset();
02255     if ( metrms05_[ism-1] ) metrms05_[ism-1]->Reset();
02256     if ( metrms06_[ism-1] ) metrms06_[ism-1]->Reset();
02257     if ( metrms07_[ism-1] ) metrms07_[ism-1]->Reset();
02258     if ( metrms08_[ism-1] ) metrms08_[ism-1]->Reset();
02259 
02260     if ( meaopn01_[ism-1] ) meaopn01_[ism-1]->Reset();
02261     if ( meaopn02_[ism-1] ) meaopn02_[ism-1]->Reset();
02262     if ( meaopn03_[ism-1] ) meaopn03_[ism-1]->Reset();
02263     if ( meaopn04_[ism-1] ) meaopn04_[ism-1]->Reset();
02264     if ( meaopn05_[ism-1] ) meaopn05_[ism-1]->Reset();
02265     if ( meaopn06_[ism-1] ) meaopn06_[ism-1]->Reset();
02266     if ( meaopn07_[ism-1] ) meaopn07_[ism-1]->Reset();
02267     if ( meaopn08_[ism-1] ) meaopn08_[ism-1]->Reset();
02268 
02269     if ( mepnprms01_[ism-1] ) mepnprms01_[ism-1]->Reset();
02270     if ( mepnprms02_[ism-1] ) mepnprms02_[ism-1]->Reset();
02271     if ( mepnprms03_[ism-1] ) mepnprms03_[ism-1]->Reset();
02272     if ( mepnprms04_[ism-1] ) mepnprms04_[ism-1]->Reset();
02273     if ( mepnprms05_[ism-1] ) mepnprms05_[ism-1]->Reset();
02274     if ( mepnprms06_[ism-1] ) mepnprms06_[ism-1]->Reset();
02275     if ( mepnprms07_[ism-1] ) mepnprms07_[ism-1]->Reset();
02276     if ( mepnprms08_[ism-1] ) mepnprms08_[ism-1]->Reset();
02277 
02278     if ( me_hs01_[ism-1] ) me_hs01_[ism-1]->Reset();
02279     if ( me_hs02_[ism-1] ) me_hs02_[ism-1]->Reset();
02280     if ( me_hs03_[ism-1] ) me_hs03_[ism-1]->Reset();
02281     if ( me_hs04_[ism-1] ) me_hs04_[ism-1]->Reset();
02282     if ( me_hs05_[ism-1] ) me_hs05_[ism-1]->Reset();
02283     if ( me_hs06_[ism-1] ) me_hs06_[ism-1]->Reset();
02284     if ( me_hs07_[ism-1] ) me_hs07_[ism-1]->Reset();
02285     if ( me_hs08_[ism-1] ) me_hs08_[ism-1]->Reset();
02286 
02287     float meanAmplL1A, meanAmplL2A, meanAmplL3A, meanAmplL4A;
02288     float meanAmplL1B, meanAmplL2B, meanAmplL3B, meanAmplL4B;
02289 
02290     int nCryL1A, nCryL2A, nCryL3A, nCryL4A;
02291     int nCryL1B, nCryL2B, nCryL3B, nCryL4B;
02292 
02293     meanAmplL1A = meanAmplL2A = meanAmplL3A = meanAmplL4A = 0.;
02294     meanAmplL1B = meanAmplL2B = meanAmplL3B = meanAmplL4B = 0.;
02295 
02296     nCryL1A = nCryL2A = nCryL3A = nCryL4A = 0;
02297     nCryL1B = nCryL2B = nCryL3B = nCryL4B = 0;
02298 
02299     for ( int ie = 1; ie <= 85; ie++ ) {
02300       for ( int ip = 1; ip <= 20; ip++ ) {
02301 
02302         bool update01;
02303         bool update02;
02304         bool update03;
02305         bool update04;
02306         bool update05;
02307         bool update06;
02308         bool update07;
02309         bool update08;
02310 
02311         float num01, num02, num03, num04, num05, num06, num07, num08;
02312         float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
02313         float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
02314 
02315         update01 = UtilsClient::getBinStatistics(h01_[ism-1], ie, ip, num01, mean01, rms01);
02316         update02 = UtilsClient::getBinStatistics(h03_[ism-1], ie, ip, num02, mean02, rms02);
02317         update03 = UtilsClient::getBinStatistics(h05_[ism-1], ie, ip, num03, mean03, rms03);
02318         update04 = UtilsClient::getBinStatistics(h07_[ism-1], ie, ip, num04, mean04, rms04);
02319         update05 = UtilsClient::getBinStatistics(h13_[ism-1], ie, ip, num05, mean05, rms05);
02320         update06 = UtilsClient::getBinStatistics(h15_[ism-1], ie, ip, num06, mean06, rms06);
02321         update07 = UtilsClient::getBinStatistics(h17_[ism-1], ie, ip, num07, mean07, rms07);
02322         update08 = UtilsClient::getBinStatistics(h19_[ism-1], ie, ip, num08, mean08, rms08);
02323 
02324         if ( update01 ) {
02325           meanAmplL1A += mean01;
02326           nCryL1A++;
02327         }
02328 
02329         if ( update02 ) {
02330           meanAmplL2A += mean02;
02331           nCryL2A++;
02332         }
02333 
02334         if ( update03 ) {
02335           meanAmplL3A += mean03;
02336           nCryL3A++;
02337         }
02338 
02339         if ( update04 ) {
02340           meanAmplL4A += mean04;
02341           nCryL4A++;
02342         }
02343 
02344         if ( update05 ) {
02345           meanAmplL1B += mean05;
02346           nCryL1B++;
02347         }
02348 
02349         if ( update06 ) {
02350           meanAmplL2B += mean06;
02351           nCryL2B++;
02352         }
02353 
02354         if ( update07 ) {
02355           meanAmplL3B += mean07;
02356           nCryL3B++;
02357         }
02358 
02359         if ( update08 ) {
02360           meanAmplL4B += mean08;
02361           nCryL4B++;
02362         }
02363 
02364       }
02365     }
02366 
02367     if ( nCryL1A > 0 ) meanAmplL1A /= float (nCryL1A);
02368     if ( nCryL2A > 0 ) meanAmplL2A /= float (nCryL2A);
02369     if ( nCryL3A > 0 ) meanAmplL3A /= float (nCryL3A);
02370     if ( nCryL4A > 0 ) meanAmplL4A /= float (nCryL4A);
02371     if ( nCryL1B > 0 ) meanAmplL1B /= float (nCryL1B);
02372     if ( nCryL2B > 0 ) meanAmplL2B /= float (nCryL2B);
02373     if ( nCryL3B > 0 ) meanAmplL3B /= float (nCryL3B);
02374     if ( nCryL4B > 0 ) meanAmplL4B /= float (nCryL4B);
02375 
02376     for ( int ie = 1; ie <= 85; ie++ ) {
02377       for ( int ip = 1; ip <= 20; ip++ ) {
02378 
02379         if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, 2.);
02380         if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, 2.);
02381         if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, 2.);
02382         if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( ie, ip, 2.);
02383 
02384         bool update01;
02385         bool update02;
02386         bool update03;
02387         bool update04;
02388         bool update05;
02389         bool update06;
02390         bool update07;
02391         bool update08;
02392         bool update09;
02393         bool update10;
02394         bool update11;
02395         bool update12;
02396 
02397         bool update13;
02398         bool update14;
02399         bool update15;
02400         bool update16;
02401         bool update17;
02402         bool update18;
02403         bool update19;
02404         bool update20;
02405         bool update21;
02406         bool update22;
02407         bool update23;
02408         bool update24;
02409 
02410         float num01, num02, num03, num04, num05, num06, num07, num08;
02411         float num09, num10, num11, num12;
02412         float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
02413         float mean09, mean10, mean11, mean12;
02414         float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
02415         float rms09, rms10, rms11, rms12;
02416 
02417         float num13, num14, num15, num16, num17, num18, num19, num20;
02418         float num21, num22, num23, num24;
02419         float mean13, mean14, mean15, mean16, mean17, mean18, mean19, mean20;
02420         float mean21, mean22, mean23, mean24;
02421         float rms13, rms14, rms15, rms16, rms17, rms18, rms19, rms20;
02422         float rms21, rms22, rms23, rms24;
02423 
02424         update01 = UtilsClient::getBinStatistics(h01_[ism-1], ie, ip, num01, mean01, rms01);
02425         update02 = UtilsClient::getBinStatistics(h02_[ism-1], ie, ip, num02, mean02, rms02);
02426         update03 = UtilsClient::getBinStatistics(h03_[ism-1], ie, ip, num03, mean03, rms03);
02427         update04 = UtilsClient::getBinStatistics(h04_[ism-1], ie, ip, num04, mean04, rms04);
02428         update05 = UtilsClient::getBinStatistics(h05_[ism-1], ie, ip, num05, mean05, rms05);
02429         update06 = UtilsClient::getBinStatistics(h06_[ism-1], ie, ip, num06, mean06, rms06);
02430         update07 = UtilsClient::getBinStatistics(h07_[ism-1], ie, ip, num07, mean07, rms07);
02431         update08 = UtilsClient::getBinStatistics(h08_[ism-1], ie, ip, num08, mean08, rms08);
02432         update09 = UtilsClient::getBinStatistics(h09_[ism-1], ie, ip, num09, mean09, rms09);
02433         update10 = UtilsClient::getBinStatistics(h10_[ism-1], ie, ip, num10, mean10, rms10);
02434         update11 = UtilsClient::getBinStatistics(h11_[ism-1], ie, ip, num11, mean11, rms11);
02435         update12 = UtilsClient::getBinStatistics(h12_[ism-1], ie, ip, num12, mean12, rms12);
02436 
02437         // other SM half
02438 
02439         update13 = UtilsClient::getBinStatistics(h13_[ism-1], ie, ip, num13, mean13, rms13);
02440         update14 = UtilsClient::getBinStatistics(h14_[ism-1], ie, ip, num14, mean14, rms14);
02441         update15 = UtilsClient::getBinStatistics(h15_[ism-1], ie, ip, num15, mean15, rms15);
02442         update16 = UtilsClient::getBinStatistics(h16_[ism-1], ie, ip, num16, mean16, rms16);
02443         update17 = UtilsClient::getBinStatistics(h17_[ism-1], ie, ip, num17, mean17, rms17);
02444         update18 = UtilsClient::getBinStatistics(h18_[ism-1], ie, ip, num18, mean18, rms18);
02445         update19 = UtilsClient::getBinStatistics(h19_[ism-1], ie, ip, num19, mean19, rms19);
02446         update20 = UtilsClient::getBinStatistics(h20_[ism-1], ie, ip, num20, mean20, rms20);
02447         update21 = UtilsClient::getBinStatistics(h21_[ism-1], ie, ip, num21, mean21, rms21);
02448         update22 = UtilsClient::getBinStatistics(h22_[ism-1], ie, ip, num22, mean22, rms22);
02449         update23 = UtilsClient::getBinStatistics(h23_[ism-1], ie, ip, num23, mean23, rms23);
02450         update24 = UtilsClient::getBinStatistics(h24_[ism-1], ie, ip, num24, mean24, rms24);
02451 
02452         if ( update01 ) {
02453 
02454           float val;
02455 
02456           val = 1.;
02457           if ( fabs(mean01 - meanAmplL1A) > fabs(percentVariation_ * meanAmplL1A) || mean01 < amplitudeThreshold_ )
02458             val = 0.;
02459           if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, val );
02460 
02461           int ic = Numbers::icEB(ism, ie, ip);
02462 
02463           if ( mea01_[ism-1] ) {
02464             if ( mean01 > 0. ) {
02465               mea01_[ism-1]->setBinContent( ic, mean01 );
02466               mea01_[ism-1]->setBinError( ic, rms01 );
02467             } else {
02468               mea01_[ism-1]->setEntries( 1.+mea01_[ism-1]->getEntries() );
02469             }
02470           }
02471 
02472         }
02473 
02474         if ( update13 ) {
02475 
02476           float val;
02477 
02478           val = 1.;
02479           if ( fabs(mean13 - meanAmplL1B) > fabs(percentVariation_ * meanAmplL1B) || mean13 < amplitudeThreshold_ )
02480             val = 0.;
02481           if ( meg01_[ism-1] ) meg01_[ism-1]->setBinContent( ie, ip, val );
02482 
02483           int ic = Numbers::icEB(ism, ie, ip);
02484 
02485           if ( mea05_[ism-1] ) {
02486             if ( mean13 > 0. ) {
02487               mea05_[ism-1]->setBinContent( ic, mean13 );
02488               mea05_[ism-1]->setBinError( ic, rms13 );
02489             } else {
02490               mea05_[ism-1]->setEntries( 1.+mea05_[ism-1]->getEntries() );
02491             }
02492           }
02493 
02494         }
02495 
02496         if ( update03 ) {
02497 
02498           float val;
02499 
02500           val = 1.;
02501           if ( fabs(mean03 - meanAmplL2A) > fabs(percentVariation_ * meanAmplL2A) || mean03 < amplitudeThreshold_ )
02502             val = 0.;
02503           if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, val);
02504 
02505           int ic = Numbers::icEB(ism, ie, ip);
02506 
02507           if ( mea02_[ism-1] ) {
02508             if ( mean03 > 0. ) {
02509               mea02_[ism-1]->setBinContent( ic, mean03 );
02510               mea02_[ism-1]->setBinError( ic, rms03 );
02511             } else {
02512               mea02_[ism-1]->setEntries( 1.+mea02_[ism-1]->getEntries() );
02513             }
02514           }
02515 
02516         }
02517 
02518         if ( update15 ) {
02519 
02520           float val;
02521 
02522           val = 1.;
02523           if ( fabs(mean15 - meanAmplL2B) > fabs(percentVariation_ * meanAmplL2B) || mean15 < amplitudeThreshold_ )
02524             val = 0.;
02525           if ( meg02_[ism-1] ) meg02_[ism-1]->setBinContent( ie, ip, val);
02526 
02527           int ic = Numbers::icEB(ism, ie, ip);
02528 
02529           if ( mea06_[ism-1] ) {
02530             if ( mean15 > 0. ) {
02531               mea06_[ism-1]->setBinContent( ic, mean15 );
02532               mea06_[ism-1]->setBinError( ic, rms15 );
02533             } else {
02534               mea06_[ism-1]->setEntries( 1.+mea06_[ism-1]->getEntries() );
02535             }
02536           }
02537 
02538         }
02539 
02540         if ( update05 ) {
02541 
02542           float val;
02543 
02544           val = 1.;
02545           if ( fabs(mean05 - meanAmplL3A) > fabs(percentVariation_ * meanAmplL3A) || mean05 < amplitudeThreshold_ )
02546             val = 0.;
02547           if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, val );
02548 
02549           int ic = Numbers::icEB(ism, ie, ip);
02550 
02551           if ( mea03_[ism-1] ) {
02552             if ( mean05 > 0. ) {
02553               mea03_[ism-1]->setBinContent( ic, mean05 );
02554               mea03_[ism-1]->setBinError( ic, rms05 );
02555             } else {
02556               mea03_[ism-1]->setEntries( 1.+mea03_[ism-1]->getEntries() );
02557             }
02558           }
02559 
02560         }
02561 
02562         if ( update17 ) {
02563 
02564           float val;
02565 
02566           val = 1.;
02567           if ( fabs(mean17 - meanAmplL3B) > fabs(percentVariation_ * meanAmplL3B) || mean17 < amplitudeThreshold_ )
02568             val = 0.;
02569           if ( meg03_[ism-1] ) meg03_[ism-1]->setBinContent( ie, ip, val );
02570 
02571           int ic = Numbers::icEB(ism, ie, ip);
02572 
02573           if ( mea07_[ism-1] ) {
02574             if ( mean17 > 0. ) {
02575               mea07_[ism-1]->setBinContent( ic, mean17 );
02576               mea07_[ism-1]->setBinError( ic, rms17 );
02577             } else {
02578               mea07_[ism-1]->setEntries( 1.+mea07_[ism-1]->getEntries() );
02579             }
02580           }
02581 
02582         }
02583 
02584         if ( update07 ) {
02585 
02586           float val;
02587 
02588           val = 1.;
02589           if ( fabs(mean07 - meanAmplL4A) > fabs(percentVariation_ * meanAmplL4A) || mean07 < amplitudeThreshold_ )
02590             val = 0.;
02591           if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( ie, ip, val );
02592 
02593           int ic = Numbers::icEB(ism, ie, ip);
02594 
02595           if ( mea04_[ism-1] ) {
02596             if ( mean07 > 0. ) {
02597               mea04_[ism-1]->setBinContent( ic, mean07 );
02598               mea04_[ism-1]->setBinError( ic, rms07 );
02599             } else {
02600               mea04_[ism-1]->setEntries( 1.+mea04_[ism-1]->getEntries() );
02601             }
02602           }
02603 
02604         }
02605 
02606         if ( update19 ) {
02607 
02608           float val;
02609 
02610           val = 1.;
02611           if ( fabs(mean19 - meanAmplL4B) > fabs(percentVariation_ * meanAmplL4B) || mean19 < amplitudeThreshold_ )
02612             val = 0.;
02613           if ( meg04_[ism-1] ) meg04_[ism-1]->setBinContent( ie, ip, val );
02614 
02615           int ic = Numbers::icEB(ism, ie, ip);
02616 
02617           if ( mea08_[ism-1] ) {
02618             if ( mean19 > 0. ) {
02619               mea08_[ism-1]->setBinContent( ic, mean19 );
02620               mea08_[ism-1]->setBinError( ic, rms19 );
02621             } else {
02622               mea08_[ism-1]->setEntries( 1.+mea08_[ism-1]->getEntries() );
02623             }
02624           }
02625 
02626         }
02627 
02628         if ( update02 ) {
02629 
02630           int ic = Numbers::icEB(ism, ie, ip);
02631 
02632           if ( meaopn01_[ism-1] ) {
02633             if ( mean02 > 0. ) {
02634               meaopn01_[ism-1]->setBinContent( ic, mean02 );
02635               meaopn01_[ism-1]->setBinError( ic, rms02 );
02636             } else {
02637               meaopn01_[ism-1]->setEntries( 1.+meaopn01_[ism-1]->getEntries() );
02638             }
02639           }
02640 
02641         }
02642 
02643         if ( update14 ) {
02644 
02645           int ic = Numbers::icEB(ism, ie, ip);
02646 
02647           if ( meaopn05_[ism-1] ) {
02648             if ( mean14 > 0. ) {
02649               meaopn05_[ism-1]->setBinContent( ic, mean14 );
02650               meaopn05_[ism-1]->setBinError( ic, rms14 );
02651             } else {
02652               meaopn05_[ism-1]->setEntries( 1.+meaopn05_[ism-1]->getEntries() );
02653             }
02654           }
02655 
02656         }
02657 
02658         if ( update04 ) {
02659 
02660           int ic = Numbers::icEB(ism, ie, ip);
02661 
02662           if ( meaopn02_[ism-1] ) {
02663             if ( mean04 > 0. ) {
02664               meaopn02_[ism-1]->setBinContent( ic, mean04 );
02665               meaopn02_[ism-1]->setBinError( ic, rms04 );
02666             } else {
02667               meaopn02_[ism-1]->setEntries( 1.+meaopn02_[ism-1]->getEntries() );
02668             }
02669           }
02670 
02671         }
02672 
02673         if ( update16 ) {
02674 
02675           int ic = Numbers::icEB(ism, ie, ip);
02676 
02677           if ( meaopn06_[ism-1] ) {
02678             if ( mean16 > 0. ) {
02679               meaopn06_[ism-1]->setBinContent( ic, mean16 );
02680               meaopn06_[ism-1]->setBinError( ic, rms16 );
02681             } else {
02682               meaopn06_[ism-1]->setEntries( 1.+meaopn06_[ism-1]->getEntries() );
02683             }
02684           }
02685 
02686         }
02687 
02688         if ( update06 ) {
02689 
02690           int ic = Numbers::icEB(ism, ie, ip);
02691 
02692           if ( meaopn03_[ism-1] ) {
02693             if ( mean06 > 0. ) {
02694               meaopn03_[ism-1]->setBinContent( ic, mean06 );
02695               meaopn03_[ism-1]->setBinError( ic, rms06 );
02696             } else {
02697               meaopn03_[ism-1]->setEntries( 1.+meaopn03_[ism-1]->getEntries() );
02698             }
02699           }
02700 
02701         }
02702 
02703         if ( update18 ) {
02704 
02705           int ic = Numbers::icEB(ism, ie, ip);
02706 
02707           if ( meaopn07_[ism-1] ) {
02708             if ( mean18 > 0. ) {
02709               meaopn07_[ism-1]->setBinContent( ic, mean18 );
02710               meaopn07_[ism-1]->setBinError( ic, rms18 );
02711             } else {
02712               meaopn07_[ism-1]->setEntries( 1.+meaopn07_[ism-1]->getEntries() );
02713             }
02714           }
02715 
02716         }
02717 
02718         if ( update08 ) {
02719 
02720           int ic = Numbers::icEB(ism, ie, ip);
02721 
02722           if ( meaopn04_[ism-1] ) {
02723             if ( mean08 > 0. ) {
02724               meaopn04_[ism-1]->setBinContent( ic, mean08 );
02725               meaopn04_[ism-1]->setBinError( ic, rms08 );
02726             } else {
02727               meaopn04_[ism-1]->setEntries( 1.+meaopn04_[ism-1]->getEntries() );
02728             }
02729           }
02730 
02731         }
02732 
02733         if ( update20 ) {
02734 
02735           int ic = Numbers::icEB(ism, ie, ip);
02736 
02737           if ( meaopn08_[ism-1] ) {
02738             if ( mean20 > 0. ) {
02739               meaopn08_[ism-1]->setBinContent( ic, mean20 );
02740               meaopn08_[ism-1]->setBinError( ic, rms20 );
02741             } else {
02742               meaopn08_[ism-1]->setEntries( 1.+meaopn08_[ism-1]->getEntries() );
02743             }
02744           }
02745 
02746         }
02747 
02748         if ( update09 ) {
02749 
02750           int ic = Numbers::icEB(ism, ie, ip);
02751 
02752           if ( met01_[ism-1] ) {
02753             if ( mean09 > 0. ) {
02754               met01_[ism-1]->setBinContent( ic, mean09 );
02755               met01_[ism-1]->setBinError( ic, rms09 );
02756             } else {
02757               met01_[ism-1]->setEntries(1.+met01_[ism-1]->getEntries());
02758             }
02759           }
02760 
02761           if ( metav01_[ism-1] ) metav01_[ism-1] ->Fill(mean09);
02762           if ( metrms01_[ism-1] ) metrms01_[ism-1]->Fill(rms09);
02763 
02764         }
02765 
02766         if ( update21 ) {
02767 
02768           int ic = Numbers::icEB(ism, ie, ip);
02769 
02770           if ( met05_[ism-1] ) {
02771             if ( mean21 > 0. ) {
02772               met05_[ism-1]->setBinContent( ic, mean21 );
02773               met05_[ism-1]->setBinError( ic, rms21 );
02774             } else {
02775               met05_[ism-1]->setEntries(1.+met05_[ism-1]->getEntries());
02776             }
02777           }
02778 
02779           if ( metav05_[ism-1] ) metav05_[ism-1] ->Fill(mean21);
02780           if ( metrms05_[ism-1] ) metrms05_[ism-1]->Fill(rms21);
02781 
02782         }
02783 
02784         if ( update10 ) {
02785 
02786           int ic = Numbers::icEB(ism, ie, ip);
02787 
02788           if ( met02_[ism-1] ) {
02789             if ( mean10 > 0. ) {
02790               met02_[ism-1]->setBinContent( ic, mean10 );
02791               met02_[ism-1]->setBinError( ic, rms10 );
02792             } else {
02793               met02_[ism-1]->setEntries(1.+met02_[ism-1]->getEntries());
02794             }
02795           }
02796 
02797           if ( metav02_[ism-1] ) metav02_[ism-1] ->Fill(mean10);
02798           if ( metrms02_[ism-1] ) metrms02_[ism-1]->Fill(rms10);
02799 
02800         }
02801 
02802         if ( update22 ) {
02803 
02804           int ic = Numbers::icEB(ism, ie, ip);
02805 
02806           if ( met06_[ism-1] ) {
02807             if ( mean22 > 0. ) {
02808               met06_[ism-1]->setBinContent( ic, mean22 );
02809               met06_[ism-1]->setBinError( ic, rms22 );
02810             } else {
02811               met06_[ism-1]->setEntries(1.+met06_[ism-1]->getEntries());
02812             }
02813           }
02814 
02815           if ( metav06_[ism-1] ) metav06_[ism-1] ->Fill(mean22);
02816           if ( metrms06_[ism-1] ) metrms06_[ism-1]->Fill(rms22);
02817 
02818         }
02819 
02820         if ( update11 ) {
02821 
02822           int ic = Numbers::icEB(ism, ie, ip);
02823 
02824           if ( met03_[ism-1] ) {
02825             if ( mean11 > 0. ) {
02826               met03_[ism-1]->setBinContent( ic, mean11 );
02827               met03_[ism-1]->setBinError( ic, rms11 );
02828             } else {
02829               met03_[ism-1]->setEntries(1.+met03_[ism-1]->getEntries());
02830             }
02831           }
02832 
02833           if ( metav03_[ism-1] ) metav03_[ism-1] ->Fill(mean11);
02834           if ( metrms03_[ism-1] ) metrms03_[ism-1]->Fill(rms11);
02835 
02836         }
02837 
02838         if ( update23 ) {
02839 
02840           int ic = Numbers::icEB(ism, ie, ip);
02841 
02842           if ( met07_[ism-1] ) {
02843             if ( mean23 > 0. ) {
02844               met07_[ism-1]->setBinContent( ic, mean23 );
02845               met07_[ism-1]->setBinError( ic, rms23 );
02846             } else {
02847               met07_[ism-1]->setEntries(1.+met07_[ism-1]->getEntries());
02848             }
02849           }
02850 
02851           if ( metav07_[ism-1] ) metav07_[ism-1] ->Fill(mean23);
02852           if ( metrms07_[ism-1] ) metrms07_[ism-1]->Fill(rms23);
02853 
02854         }
02855 
02856         if ( update12 ) {
02857 
02858           int ic = Numbers::icEB(ism, ie, ip);
02859 
02860           if ( met04_[ism-1] ) {
02861             if ( mean12 > 0. ) {
02862               met04_[ism-1]->setBinContent( ic, mean12 );
02863               met04_[ism-1]->setBinError( ic, rms12 );
02864             } else {
02865               met04_[ism-1]->setEntries(1.+met04_[ism-1]->getEntries());
02866             }
02867           }
02868 
02869           if ( metav04_[ism-1] ) metav04_[ism-1] ->Fill(mean12);
02870           if ( metrms04_[ism-1] ) metrms04_[ism-1]->Fill(rms12);
02871 
02872         }
02873 
02874         if ( update24 ) {
02875 
02876           int ic = Numbers::icEB(ism, ie, ip);
02877 
02878           if ( met08_[ism-1] ) {
02879             if ( mean24 > 0. ) {
02880               met08_[ism-1]->setBinContent( ic, mean24 );
02881               met08_[ism-1]->setBinError( ic, rms24 );
02882             } else {
02883               met08_[ism-1]->setEntries(1.+met08_[ism-1]->getEntries());
02884             }
02885           }
02886 
02887           if ( metav08_[ism-1] ) metav08_[ism-1] ->Fill(mean24);
02888           if ( metrms08_[ism-1] ) metrms08_[ism-1]->Fill(rms24);
02889 
02890         }
02891 
02892         // masking
02893 
02894         if ( mask1.size() != 0 ) {
02895           map<EcalLogicID, RunCrystalErrorsDat>::const_iterator m;
02896           for (m = mask1.begin(); m != mask1.end(); m++) {
02897 
02898             EcalLogicID ecid = m->first;
02899 
02900             int ic = Numbers::indexEB(ism, ie, ip);
02901 
02902             if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_crystal_number", Numbers::iSM(ism, EcalBarrel), ic).getLogicID() ) {
02903               if ( (m->second).getErrorBits() & bits01 ) {
02904                 UtilsClient::maskBinContent( meg01_[ism-1], ie, ip );
02905                 UtilsClient::maskBinContent( meg02_[ism-1], ie, ip );
02906                 UtilsClient::maskBinContent( meg03_[ism-1], ie, ip );
02907                 UtilsClient::maskBinContent( meg04_[ism-1], ie, ip );
02908               }
02909             }
02910 
02911           }
02912         }
02913 
02914         // TT masking
02915 
02916         if ( mask3.size() != 0 ) {
02917           map<EcalLogicID, RunTTErrorsDat>::const_iterator m;
02918           for (m = mask3.begin(); m != mask3.end(); m++) {
02919 
02920             EcalLogicID ecid = m->first;
02921 
02922             int itt = Numbers::iTT(ism, EcalBarrel, ie, ip);
02923 
02924             if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_trigger_tower", Numbers::iSM(ism, EcalBarrel), itt).getLogicID() ) {
02925               if ( (m->second).getErrorBits() & bits01 ) {
02926                 UtilsClient::maskBinContent( meg01_[ism-1], ie, ip );
02927                 UtilsClient::maskBinContent( meg02_[ism-1], ie, ip );
02928                 UtilsClient::maskBinContent( meg03_[ism-1], ie, ip );
02929                 UtilsClient::maskBinContent( meg04_[ism-1], ie, ip );
02930               }
02931             }
02932 
02933           }
02934         }
02935 
02936       }
02937     }
02938 
02939     for ( int i = 1; i <= 10; i++ ) {
02940 
02941       if ( meg05_[ism-1] ) meg05_[ism-1]->setBinContent( i, 1, 2. );
02942       if ( meg06_[ism-1] ) meg06_[ism-1]->setBinContent( i, 1, 2. );
02943       if ( meg07_[ism-1] ) meg07_[ism-1]->setBinContent( i, 1, 2. );
02944       if ( meg08_[ism-1] ) meg08_[ism-1]->setBinContent( i, 1, 2. );
02945       if ( meg09_[ism-1] ) meg09_[ism-1]->setBinContent( i, 1, 2. );
02946       if ( meg10_[ism-1] ) meg10_[ism-1]->setBinContent( i, 1, 2. );
02947       if ( meg11_[ism-1] ) meg11_[ism-1]->setBinContent( i, 1, 2. );
02948       if ( meg12_[ism-1] ) meg12_[ism-1]->setBinContent( i, 1, 2. );
02949 
02950       bool update01;
02951       bool update02;
02952       bool update03;
02953       bool update04;
02954       bool update05;
02955       bool update06;
02956       bool update07;
02957       bool update08;
02958       bool update09;
02959       bool update10;
02960       bool update11;
02961       bool update12;
02962       bool update13;
02963       bool update14;
02964       bool update15;
02965       bool update16;
02966 
02967       float num01, num02, num03, num04, num05, num06, num07, num08;
02968       float num09, num10, num11, num12, num13, num14, num15, num16;
02969       float mean01, mean02, mean03, mean04, mean05, mean06, mean07, mean08;
02970       float mean09, mean10, mean11, mean12, mean13, mean14, mean15, mean16;
02971       float rms01, rms02, rms03, rms04, rms05, rms06, rms07, rms08;
02972       float rms09, rms10, rms11, rms12, rms13, rms14, rms15, rms16;
02973 
02974       update01 = UtilsClient::getBinStatistics(i01_[ism-1], i, 0, num01, mean01, rms01);
02975       update02 = UtilsClient::getBinStatistics(i02_[ism-1], i, 0, num02, mean02, rms02);
02976       update03 = UtilsClient::getBinStatistics(i03_[ism-1], i, 0, num03, mean03, rms03);
02977       update04 = UtilsClient::getBinStatistics(i04_[ism-1], i, 0, num04, mean04, rms04);
02978       update05 = UtilsClient::getBinStatistics(i05_[ism-1], i, 0, num05, mean05, rms05);
02979       update06 = UtilsClient::getBinStatistics(i06_[ism-1], i, 0, num06, mean06, rms06);
02980       update07 = UtilsClient::getBinStatistics(i07_[ism-1], i, 0, num07, mean07, rms07);
02981       update08 = UtilsClient::getBinStatistics(i08_[ism-1], i, 0, num08, mean08, rms08);
02982       update09 = UtilsClient::getBinStatistics(i09_[ism-1], i, 0, num09, mean09, rms09);
02983       update10 = UtilsClient::getBinStatistics(i10_[ism-1], i, 0, num10, mean10, rms10);
02984       update11 = UtilsClient::getBinStatistics(i11_[ism-1], i, 0, num11, mean11, rms11);
02985       update12 = UtilsClient::getBinStatistics(i12_[ism-1], i, 0, num12, mean12, rms12);
02986       update13 = UtilsClient::getBinStatistics(i13_[ism-1], i, 0, num13, mean13, rms13);
02987       update14 = UtilsClient::getBinStatistics(i14_[ism-1], i, 0, num14, mean14, rms14);
02988       update15 = UtilsClient::getBinStatistics(i15_[ism-1], i, 0, num15, mean15, rms15);
02989       update16 = UtilsClient::getBinStatistics(i16_[ism-1], i, 0, num16, mean16, rms16);
02990 
02991       if ( update01 && update05 ) {
02992 
02993         float val;
02994 
02995         val = 1.;
02996         if ( mean01 < amplitudeThresholdPnG01_ )
02997           val = 0.;
02998         if ( mean05 <  pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] ||
02999              pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean05)
03000           val = 0.;
03001         if ( rms05 > pedPnRMSThreshold_[0] )
03002           val = 0.;
03003 
03004         if ( meg05_[ism-1] )           meg05_[ism-1]->setBinContent(i, 1, val);
03005         if ( mepnprms01_[ism-1] ) mepnprms01_[ism-1]->Fill(rms05);
03006 
03007       }
03008 
03009       if ( update02 && update06 ) {
03010 
03011        float val;
03012 
03013         val = 1.;
03014         if ( mean02 < amplitudeThresholdPnG01_ )
03015           val = 0.;
03016         if ( mean06 <  pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] ||
03017              pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean06)
03018           val = 0.;
03019         if ( rms06 > pedPnRMSThreshold_[0] )
03020           val = 0.;
03021 
03022         if ( meg06_[ism-1] )           meg06_[ism-1]->setBinContent(i, 1, val);
03023         if ( mepnprms02_[ism-1] ) mepnprms02_[ism-1]->Fill(rms06);
03024       }
03025 
03026       if ( update03 && update07 ) {
03027 
03028         float val;
03029 
03030         val = 1.;
03031         if ( mean03 < amplitudeThresholdPnG01_ )
03032           val = 0.;
03033         if ( mean07 <  pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] ||
03034              pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean07)
03035           val = 0.;
03036         if ( rms07 > pedPnRMSThreshold_[0] )
03037           val = 0.;
03038 
03039         if ( meg07_[ism-1] )           meg07_[ism-1]->setBinContent(i, 1, val);
03040         if ( mepnprms03_[ism-1] ) mepnprms03_[ism-1]->Fill(rms07);
03041       }
03042 
03043       if ( update04 && update08 ) {
03044 
03045         float val;
03046 
03047         val = 1.;
03048         if ( mean04 < amplitudeThresholdPnG01_ )
03049           val = 0.;
03050         if ( mean08 <  pedPnExpectedMean_[0] - pedPnDiscrepancyMean_[0] ||
03051              pedPnExpectedMean_[0] + pedPnDiscrepancyMean_[0] < mean08)
03052           val = 0.;
03053         if ( rms08 > pedPnRMSThreshold_[0] )
03054           val = 0.;
03055 
03056         if ( meg08_[ism-1] )           meg08_[ism-1]->setBinContent(i, 1, val);
03057         if ( mepnprms04_[ism-1] ) mepnprms04_[ism-1]->Fill(rms08);
03058       }
03059 
03060       if ( update09 && update13 ) {
03061 
03062         float val;
03063 
03064         val = 1.;
03065         if ( mean09 < amplitudeThresholdPnG16_ )
03066           val = 0.;
03067         if ( mean13 <  pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] ||
03068              pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean13)
03069           val = 0.;
03070         if ( rms13 > pedPnRMSThreshold_[1] )
03071           val = 0.;
03072 
03073         if ( meg09_[ism-1] )           meg09_[ism-1]->setBinContent(i, 1, val);
03074         if ( mepnprms05_[ism-1] ) mepnprms05_[ism-1]->Fill(rms13);
03075       }
03076 
03077       if ( update10 && update14 ) {
03078 
03079         float val;
03080 
03081         val = 1.;
03082         if ( mean10 < amplitudeThresholdPnG16_ )
03083           val = 0.;
03084         if ( mean14 <  pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] ||
03085              pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean14)
03086           val = 0.;
03087         if ( rms14 > pedPnRMSThreshold_[1] )
03088           val = 0.;
03089 
03090         if ( meg10_[ism-1] )           meg10_[ism-1]->setBinContent(i, 1, val);
03091         if ( mepnprms06_[ism-1] ) mepnprms06_[ism-1]->Fill(rms14);
03092       }
03093 
03094       if ( update11 && update15 ) {
03095 
03096         float val;
03097 
03098         val = 1.;
03099         if ( mean11 < amplitudeThresholdPnG16_ )
03100           val = 0.;
03101         if ( mean15 <  pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] ||
03102              pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean15)
03103           val = 0.;
03104         if ( rms15 > pedPnRMSThreshold_[1] )
03105           val = 0.;
03106 
03107         if ( meg11_[ism-1] )           meg11_[ism-1]->setBinContent(i, 1, val);
03108         if ( mepnprms07_[ism-1] ) mepnprms07_[ism-1]->Fill(rms15);
03109       }
03110 
03111       if ( update12 && update16 ) {
03112 
03113         float val;
03114 
03115         val = 1.;
03116         if ( mean12 < amplitudeThresholdPnG16_ )
03117           val = 0.;
03118         if ( mean16 <  pedPnExpectedMean_[1] - pedPnDiscrepancyMean_[1] ||
03119              pedPnExpectedMean_[1] + pedPnDiscrepancyMean_[1] < mean16)
03120           val = 0.;
03121         if ( rms16 > pedPnRMSThreshold_[1] )
03122           val = 0.;
03123 
03124         if ( meg12_[ism-1] )           meg12_[ism-1]->setBinContent(i, 1, val);
03125         if ( mepnprms08_[ism-1] ) mepnprms08_[ism-1]->Fill(rms16);
03126       }
03127 
03128       // masking
03129 
03130       if ( mask2.size() != 0 ) {
03131         map<EcalLogicID, RunPNErrorsDat>::const_iterator m;
03132         for (m = mask2.begin(); m != mask2.end(); m++) {
03133 
03134           EcalLogicID ecid = m->first;
03135 
03136           if ( ecid.getLogicID() == LogicID::getEcalLogicID("EB_LM_PN", Numbers::iSM(ism, EcalBarrel), i-1).getLogicID() ) {
03137             if ( (m->second).getErrorBits() & (bits01|bits02) ) {
03138               UtilsClient::maskBinContent( meg05_[ism-1], i, 1 );
03139               UtilsClient::maskBinContent( meg06_[ism-1], i, 1 );
03140               UtilsClient::maskBinContent( meg07_[ism-1], i, 1 );
03141               UtilsClient::maskBinContent( meg08_[ism-1], i, 1 );
03142             }
03143             if ( (m->second).getErrorBits() & (bits01|bits04) ) {
03144               UtilsClient::maskBinContent( meg09_[ism-1], i, 1 );
03145               UtilsClient::maskBinContent( meg10_[ism-1], i, 1 );
03146               UtilsClient::maskBinContent( meg11_[ism-1], i, 1 );
03147               UtilsClient::maskBinContent( meg12_[ism-1], i, 1 );
03148             }
03149           }
03150 
03151         }
03152       }
03153 
03154     }
03155 
03156     for ( int i = 1; i <= 10; i++ ) {
03157 
03158       if ( hs01_[ism-1] ) {
03159         int ic = UtilsClient::getFirstNonEmptyChannel( hs01_[ism-1] );
03160         if ( me_hs01_[ism-1] ) {
03161           me_hs01_[ism-1]->setBinContent( i, hs01_[ism-1]->GetBinContent(ic, i) );
03162           me_hs01_[ism-1]->setBinError( i, hs01_[ism-1]->GetBinError(ic, i) );
03163         }
03164       }
03165 
03166       if ( hs02_[ism-1] ) {
03167         int ic = UtilsClient::getFirstNonEmptyChannel( hs02_[ism-1] );
03168         if ( me_hs02_[ism-1] ) {
03169           me_hs02_[ism-1]->setBinContent( i, hs02_[ism-1]->GetBinContent(ic, i) );
03170           me_hs02_[ism-1]->setBinError( i, hs02_[ism-1]->GetBinError(ic, i) );
03171         }
03172       }
03173 
03174       if ( hs03_[ism-1] ) {
03175         int ic = UtilsClient::getFirstNonEmptyChannel( hs03_[ism-1] );
03176         if ( me_hs03_[ism-1] ) {
03177           me_hs03_[ism-1]->setBinContent( i, hs03_[ism-1]->GetBinContent(ic, i) );
03178           me_hs03_[ism-1]->setBinError( i, hs03_[ism-1]->GetBinError(ic, i) );
03179         }
03180       }
03181 
03182       if ( hs04_[ism-1] ) {
03183         int ic = UtilsClient::getFirstNonEmptyChannel( hs04_[ism-1] );
03184         if ( me_hs04_[ism-1] ) {
03185           me_hs04_[ism-1]->setBinContent( i, hs04_[ism-1]->GetBinContent(ic, i) );
03186           me_hs04_[ism-1]->setBinError( i, hs04_[ism-1]->GetBinError(ic, i) );
03187         }
03188       }
03189 
03190       if ( hs05_[ism-1] ) {
03191         int ic = UtilsClient::getFirstNonEmptyChannel( hs05_[ism-1] );
03192         if ( me_hs05_[ism-1] ) {
03193           me_hs05_[ism-1]->setBinContent( i, hs05_[ism-1]->GetBinContent(ic, i) );
03194           me_hs05_[ism-1]->setBinError( i, hs05_[ism-1]->GetBinError(ic, i) );
03195         }
03196       }
03197 
03198       if ( hs06_[ism-1] ) {
03199         int ic = UtilsClient::getFirstNonEmptyChannel( hs06_[ism-1] );
03200         if ( me_hs06_[ism-1] ) {
03201           me_hs06_[ism-1]->setBinContent( i, hs06_[ism-1]->GetBinContent(ic, i) );
03202           me_hs06_[ism-1]->setBinError( i, hs06_[ism-1]->GetBinError(ic, i) );
03203         }
03204       }
03205 
03206       if ( hs07_[ism-1] ) {
03207         int ic = UtilsClient::getFirstNonEmptyChannel( hs07_[ism-1] );
03208         if ( me_hs07_[ism-1] ) {
03209           me_hs07_[ism-1]->setBinContent( i, hs07_[ism-1]->GetBinContent(ic, i) );
03210           me_hs07_[ism-1]->setBinError( i, hs07_[ism-1]->GetBinError(ic, i) );
03211         }
03212       }
03213 
03214       if ( hs08_[ism-1] ) {
03215         int ic = UtilsClient::getFirstNonEmptyChannel( hs08_[ism-1] );
03216         if ( me_hs08_[ism-1] ) {
03217           me_hs08_[ism-1]->setBinContent( i, hs08_[ism-1]->GetBinContent(ic, i) );
03218           me_hs08_[ism-1]->setBinError( i, hs08_[ism-1]->GetBinError(ic, i) );
03219         }
03220       }
03221 
03222     }
03223 
03224   }
03225 
03226 }
03227 
03228 void EBLaserClient::softReset(bool flag) {
03229 
03230 }
03231 
03232 void EBLaserClient::htmlOutput(int run, string& htmlDir, string& htmlName) {
03233 
03234   if ( verbose_ ) cout << "Preparing EBLaserClient html output ..." << endl;
03235 
03236   ofstream htmlFile;
03237 
03238   htmlFile.open((htmlDir + htmlName).c_str());
03239 
03240   // html page header
03241   htmlFile << "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">  " << endl;
03242   htmlFile << "<html>  " << endl;
03243   htmlFile << "<head>  " << endl;
03244   htmlFile << "  <meta content=\"text/html; charset=ISO-8859-1\"  " << endl;
03245   htmlFile << " https-equiv=\"content-type\">  " << endl;
03246   htmlFile << "  <title>Monitor:LaserTask output</title> " << endl;
03247   htmlFile << "</head>  " << endl;
03248   htmlFile << "<style type=\"text/css\"> td { font-weight: bold } </style>" << endl;
03249   htmlFile << "<body>  " << endl;
03250   //htmlFile << "<br>  " << endl;
03251   htmlFile << "<a name=""top""></a>" << endl;
03252   htmlFile << "<h2>Run:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" << endl;
03253   htmlFile << "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span " << endl;
03254   htmlFile << " style=\"color: rgb(0, 0, 153);\">" << run << "</span></h2>" << endl;
03255   htmlFile << "<h2>Monitoring task:&nbsp;&nbsp;&nbsp;&nbsp; <span " << endl;
03256   htmlFile << " style=\"color: rgb(0, 0, 153);\">LASER</span></h2> " << endl;
03257   htmlFile << "<hr>" << endl;
03258   htmlFile << "<table border=1><tr><td bgcolor=red>channel has problems in this task</td>" << endl;
03259   htmlFile << "<td bgcolor=lime>channel has NO problems</td>" << endl;
03260   htmlFile << "<td bgcolor=yellow>channel is missing</td></table>" << endl;
03261   htmlFile << "<hr>" << endl;
03262   //   htmlFile << "<table border=1><tr><td>L1 = blu laser</td>" << endl;
03263   //   htmlFile << "<td>L2 = green laser</td>" << endl;
03264   //   htmlFile << "<td>L3 = red laser</td>" << endl;
03265   //   htmlFile << "<td>L4 = infrared laser</td></table>" << endl;
03266   htmlFile << "<table style=\"width: 600px;\" border=\"0\">" << endl;
03267   htmlFile << "<tbody>" << endl;
03268   htmlFile << "<tr>" << endl;
03269   htmlFile << "<td style=\"text-align: center;\">" << endl;
03270   htmlFile << "<div style=\"text-align: center;\"> </div>" << endl;
03271   htmlFile << "<table style=\"width: 482px; height: 35px;\" border=\"1\">" << endl;
03272   htmlFile << "<tbody>" << endl;
03273   htmlFile << "<tr>" << endl;
03274   htmlFile << "<td style=\"text-align: center;\">L1 = blue laser </td>" << endl;
03275   htmlFile << "<td style=\"vertical-align: top; text-align: center;\">L2 = green laser </td>" << endl;
03276   htmlFile << "<td style=\"vertical-align: top; text-align: center;\">L3 = red laser </td>" << endl;
03277   htmlFile << "<td style=\"vertical-align: top; text-align: center;\">L4 = infrared laser </td>" << endl;
03278   htmlFile << "</tr>" << endl;
03279   htmlFile << "</tbody>" << endl;
03280   htmlFile << "</table>" << endl;
03281   htmlFile << "</td>" << endl;
03282   htmlFile << "<td align=\"center\">" << endl;
03283   htmlFile << "<div style=\"text-align: center;\"> </div>" << endl;
03284   htmlFile << "<table style=\"width: 255px; height: 35px;\" border=\"1\">" << endl;
03285   htmlFile << "<tbody>" << endl;
03286   htmlFile << "<tr>" << endl;
03287   htmlFile << "<td style=\"text-align: center;\">A=L-shaped half</td>" << endl;
03288   htmlFile << "<td style=\"vertical-align: top; text-align: center;\">B=notL-shaped half<br>" << endl;
03289   htmlFile << "</td>" << endl;
03290   htmlFile << "</tr>" << endl;
03291   htmlFile << "</tbody>" << endl;
03292   htmlFile << "</table>" << endl;
03293   htmlFile << "</td>" << endl;
03294   htmlFile << "</tr>" << endl;
03295   htmlFile << "</tbody>" << endl;
03296   htmlFile << "</table>" << endl;
03297   htmlFile << "<br>" << endl;
03298   htmlFile << "<table border=1>" << std::endl;
03299   for ( unsigned int i=0; i<superModules_.size(); i ++ ) {
03300     htmlFile << "<td bgcolor=white><a href=""#"
03301              << Numbers::sEB(superModules_[i]) << ">"
03302              << setfill( '0' ) << setw(2) << superModules_[i] << "</a></td>";
03303   }
03304   htmlFile << std::endl << "</table>" << std::endl;
03305 
03306   // Produce the plots to be shown as .png files from existing histograms
03307 
03308   const int csize = 250;
03309 
03310   const double histMax = 1.e15;
03311 
03312   int pCol3[7] = { 301, 302, 303, 304, 305, 306, 307 };
03313 
03314   TH2C dummy( "dummy", "dummy for sm", 85, 0., 85., 20, 0., 20. );
03315   for ( int i = 0; i < 68; i++ ) {
03316     int a = 2 + ( i/4 ) * 5;
03317     int b = 2 + ( i%4 ) * 5;
03318     dummy.Fill( a, b, i+1 );
03319   }
03320   dummy.SetMarkerSize(2);
03321   dummy.SetMinimum(0.1);
03322 
03323   TH2C dummy1( "dummy1", "dummy1 for sm mem", 10, 0, 10, 5, 0, 5 );
03324   for ( short i=0; i<2; i++ ) {
03325     int a = 2 + i*5;
03326     int b = 2;
03327     dummy1.Fill( a, b, i+1+68 );
03328   }
03329   dummy1.SetMarkerSize(2);
03330   dummy1.SetMinimum(0.1);
03331 
03332   string imgNameQual[8], imgNameAmp[8], imgNameTim[8], imgNameTimav[8], imgNameTimrms[8], imgNameShape[8], imgNameAmpoPN[8], imgNameMEPnQualG01[8], imgNameMEPnG01[8], imgNameMEPnPedG01[8], imgNameMEPnRmsPedG01[8], imgNameMEPnQualG16[8], imgNameMEPnG16[8], imgNameMEPnPedG16[8], imgNameMEPnRmsPedG16[8], imgName, meName;
03333 
03334   TCanvas* cQual   = new TCanvas("cQual", "Temp", 3*csize, csize);
03335   TCanvas* cAmp    = new TCanvas("cAmp", "Temp", csize, csize);
03336   TCanvas* cTim    = new TCanvas("cTim", "Temp", csize, csize);
03337   TCanvas* cTimav  = new TCanvas("cTimav", "Temp", csize, csize);
03338   TCanvas* cTimrms = new TCanvas("cTimrms", "Temp", csize, csize);
03339   TCanvas* cShape  = new TCanvas("cShape", "Temp", csize, csize);
03340   TCanvas* cAmpoPN = new TCanvas("cAmpoPN", "Temp", csize, csize);
03341   TCanvas* cPed    = new TCanvas("cPed", "Temp", csize, csize);
03342 
03343   TH2F* obj2f;
03344   TH1F* obj1f;
03345   TProfile* objp;
03346 
03347   // Loop on barrel supermodules
03348 
03349   for ( unsigned int i=0; i<superModules_.size(); i ++ ) {
03350 
03351     int ism = superModules_[i];
03352 
03353     // Loop on wavelength times 2 'sides'
03354 
03355     for ( int iCanvas = 1 ; iCanvas <= 4 * 2 ; iCanvas++ ) {
03356 
03357       // skip unused wavelengths
03358       if ( iCanvas == 2 || iCanvas == 3 ) continue;
03359       if ( iCanvas == 4+2 || iCanvas == 4+3 ) continue;
03360 
03361       // Quality plots
03362 
03363       imgNameQual[iCanvas-1] = "";
03364 
03365       obj2f = 0;
03366       switch ( iCanvas ) {
03367         case 1:
03368           obj2f = UtilsClient::getHisto<TH2F*>( meg01_[ism-1] );
03369           break;
03370         case 2:
03371           obj2f = UtilsClient::getHisto<TH2F*>( meg02_[ism-1] );
03372           break;
03373         case 3:
03374           obj2f = UtilsClient::getHisto<TH2F*>( meg03_[ism-1] );
03375           break;
03376         case 4:
03377           obj2f = UtilsClient::getHisto<TH2F*>( meg04_[ism-1] );
03378           break;
03379         case 5:
03380         case 6:
03381         case 7:
03382         case 8:
03383           obj2f = 0;
03384           break;
03385         default:
03386          break;
03387       }
03388 
03389       if ( obj2f ) {
03390 
03391         meName = obj2f->GetName();
03392 
03393         replace(meName.begin(), meName.end(), ' ', '_');
03394         imgNameQual[iCanvas-1] = meName + ".png";
03395         imgName = htmlDir + imgNameQual[iCanvas-1];
03396 
03397         cQual->cd();
03398         gStyle->SetOptStat(" ");
03399         gStyle->SetPalette(7, pCol3);
03400         obj2f->GetXaxis()->SetNdivisions(17);
03401         obj2f->GetYaxis()->SetNdivisions(4);
03402         cQual->SetGridx();
03403         cQual->SetGridy();
03404         obj2f->SetMinimum(-0.00000001);
03405         obj2f->SetMaximum(7.0);
03406         obj2f->Draw("col");
03407         dummy.Draw("text,same");
03408         cQual->Update();
03409         cQual->SaveAs(imgName.c_str());
03410 
03411       }
03412 
03413       // Amplitude distributions
03414 
03415       imgNameAmp[iCanvas-1] = "";
03416 
03417       obj1f = 0;
03418       switch ( iCanvas ) {
03419         case 1:
03420           obj1f = UtilsClient::getHisto<TH1F*>( mea01_[ism-1] );
03421           break;
03422         case 2:
03423           obj1f = UtilsClient::getHisto<TH1F*>( mea02_[ism-1] );
03424           break;
03425         case 3:
03426           obj1f = UtilsClient::getHisto<TH1F*>( mea03_[ism-1] );
03427           break;
03428         case 4:
03429           obj1f = UtilsClient::getHisto<TH1F*>( mea04_[ism-1] );
03430           break;
03431         case 5:
03432           obj1f = UtilsClient::getHisto<TH1F*>( mea05_[ism-1] );
03433           break;
03434         case 6:
03435           obj1f = UtilsClient::getHisto<TH1F*>( mea06_[ism-1] );
03436           break;
03437         case 7:
03438           obj1f = UtilsClient::getHisto<TH1F*>( mea07_[ism-1] );
03439           break;
03440         case 8:
03441           obj1f = UtilsClient::getHisto<TH1F*>( mea08_[ism-1] );
03442           break;
03443         default:
03444           break;
03445       }
03446 
03447       if ( obj1f ) {
03448 
03449         meName = obj1f->GetName();
03450 
03451         replace(meName.begin(), meName.end(), ' ', '_');
03452         imgNameAmp[iCanvas-1] = meName + ".png";
03453         imgName = htmlDir + imgNameAmp[iCanvas-1];
03454 
03455         cAmp->cd();
03456         gStyle->SetOptStat("euo");
03457         obj1f->SetStats(kTRUE);
03458 //        if ( obj1f->GetMaximum(histMax) > 0. ) {
03459 //          gPad->SetLogy(kTRUE);
03460 //        } else {
03461 //          gPad->SetLogy(kFALSE);
03462 //        }
03463         obj1f->SetMinimum(0.0);
03464         obj1f->Draw();
03465         cAmp->Update();
03466         cAmp->SaveAs(imgName.c_str());
03467         gPad->SetLogy(kFALSE);
03468 
03469       }
03470 
03471       // Timing distributions
03472 
03473       imgNameTim[iCanvas-1] = "";
03474 
03475       obj1f = 0;
03476       switch ( iCanvas ) {
03477         case 1:
03478           obj1f = UtilsClient::getHisto<TH1F*>( met01_[ism-1] );
03479           break;
03480         case 2:
03481           obj1f = UtilsClient::getHisto<TH1F*>( met02_[ism-1] );
03482           break;
03483         case 3:
03484           obj1f = UtilsClient::getHisto<TH1F*>( met03_[ism-1] );
03485           break;
03486         case 4:
03487           obj1f = UtilsClient::getHisto<TH1F*>( met04_[ism-1] );
03488           break;
03489         case 5:
03490           obj1f = UtilsClient::getHisto<TH1F*>( met05_[ism-1] );
03491           break;
03492         case 6:
03493           obj1f = UtilsClient::getHisto<TH1F*>( met06_[ism-1] );
03494           break;
03495         case 7:
03496           obj1f = UtilsClient::getHisto<TH1F*>( met07_[ism-1] );
03497           break;
03498         case 8:
03499           obj1f = UtilsClient::getHisto<TH1F*>( met08_[ism-1] );
03500           break;
03501         default:
03502           break;
03503       }
03504 
03505       if ( obj1f ) {
03506 
03507         meName = obj1f->GetName();
03508 
03509         replace(meName.begin(), meName.end(), ' ', '_');
03510         imgNameTim[iCanvas-1] = meName + ".png";
03511         imgName = htmlDir + imgNameTim[iCanvas-1];
03512 
03513         cTim->cd();
03514         gStyle->SetOptStat("euo");
03515         obj1f->SetStats(kTRUE);
03516         obj1f->SetMinimum(0.0);
03517         obj1f->SetMaximum(10.0);
03518         obj1f->Draw();
03519         cTim->Update();
03520         cTim->SaveAs(imgName.c_str());
03521         gPad->SetLogy(kFALSE);
03522 
03523       }
03524 
03525       // Timing mean distributions
03526 
03527       imgNameTimav[iCanvas-1] = "";
03528 
03529       obj1f = 0;
03530       switch ( iCanvas ) {
03531         case 1:
03532           obj1f = UtilsClient::getHisto<TH1F*>( metav01_[ism-1] );
03533           break;
03534         case 2:
03535           obj1f = UtilsClient::getHisto<TH1F*>( metav02_[ism-1] );
03536           break;
03537         case 3:
03538           obj1f = UtilsClient::getHisto<TH1F*>( metav03_[ism-1] );
03539           break;
03540         case 4:
03541           obj1f = UtilsClient::getHisto<TH1F*>( metav04_[ism-1] );
03542           break;
03543         case 5:
03544           obj1f = UtilsClient::getHisto<TH1F*>( metav05_[ism-1] );
03545           break;
03546         case 6:
03547           obj1f = UtilsClient::getHisto<TH1F*>( metav06_[ism-1] );
03548           break;
03549         case 7:
03550           obj1f = UtilsClient::getHisto<TH1F*>( metav07_[ism-1] );
03551           break;
03552         case 8:
03553           obj1f = UtilsClient::getHisto<TH1F*>( metav08_[ism-1] );
03554           break;
03555         default:
03556           break;
03557       }
03558 
03559       if ( obj1f ) {
03560 
03561         meName = obj1f->GetName();
03562 
03563         replace(meName.begin(), meName.end(), ' ', '_');
03564         imgNameTimav[iCanvas-1] = meName + ".png";
03565         imgName = htmlDir + imgNameTimav[iCanvas-1];
03566 
03567         cTimav->cd();
03568         gStyle->SetOptStat("euomr");
03569         obj1f->SetStats(kTRUE);
03570         if ( obj1f->GetMaximum(histMax) > 0. ) {
03571           gPad->SetLogy(kTRUE);
03572         } else {
03573           gPad->SetLogy(kFALSE);
03574         }
03575         obj1f->Draw();
03576         cTimav->Update();
03577         cTimav->SaveAs(imgName.c_str());
03578         gPad->SetLogy(kFALSE);
03579 
03580       }
03581 
03582       // Timing rms distributions
03583 
03584       imgNameTimrms[iCanvas-1] = "";
03585 
03586       obj1f = 0;
03587       switch ( iCanvas ) {
03588         case 1:
03589           obj1f = UtilsClient::getHisto<TH1F*>( metrms01_[ism-1] );
03590           break;
03591         case 2:
03592           obj1f = UtilsClient::getHisto<TH1F*>( metrms02_[ism-1] );
03593           break;
03594         case 3:
03595           obj1f = UtilsClient::getHisto<TH1F*>( metrms03_[ism-1] );
03596           break;
03597         case 4:
03598           obj1f = UtilsClient::getHisto<TH1F*>( metrms04_[ism-1] );
03599           break;
03600         case 5:
03601           obj1f = UtilsClient::getHisto<TH1F*>( metrms05_[ism-1] );
03602           break;
03603         case 6:
03604           obj1f = UtilsClient::getHisto<TH1F*>( metrms06_[ism-1] );
03605           break;
03606         case 7:
03607           obj1f = UtilsClient::getHisto<TH1F*>( metrms07_[ism-1] );
03608           break;
03609         case 8:
03610           obj1f = UtilsClient::getHisto<TH1F*>( metrms08_[ism-1] );
03611           break;
03612         default:
03613           break;
03614       }
03615 
03616       if ( obj1f ) {
03617 
03618         meName = obj1f->GetName();
03619 
03620         replace(meName.begin(), meName.end(), ' ', '_');
03621         imgNameTimrms[iCanvas-1] = meName + ".png";
03622         imgName = htmlDir + imgNameTimrms[iCanvas-1];
03623 
03624         cTimrms->cd();
03625         gStyle->SetOptStat("euomr");
03626         obj1f->SetStats(kTRUE);
03627         if ( obj1f->GetMaximum(histMax) > 0. ) {
03628           gPad->SetLogy(kTRUE);
03629         } else {
03630           gPad->SetLogy(kFALSE);
03631         }
03632         obj1f->Draw();
03633         cTimrms->Update();
03634         cTimrms->SaveAs(imgName.c_str());
03635         gPad->SetLogy(kFALSE);
03636 
03637       }
03638 
03639       // Shape distributions
03640 
03641       imgNameShape[iCanvas-1] = "";
03642 
03643       obj1f = 0;
03644       switch ( iCanvas ) {
03645         case 1:
03646           obj1f = UtilsClient::getHisto<TH1F*>( me_hs01_[ism-1] );
03647           break;
03648         case 2:
03649           obj1f = UtilsClient::getHisto<TH1F*>( me_hs02_[ism-1] );
03650           break;
03651         case 3:
03652           obj1f = UtilsClient::getHisto<TH1F*>( me_hs03_[ism-1] );
03653           break;
03654         case 4:
03655           obj1f = UtilsClient::getHisto<TH1F*>( me_hs04_[ism-1] );
03656           break;
03657         case 5:
03658           obj1f = UtilsClient::getHisto<TH1F*>( me_hs05_[ism-1] );
03659           break;
03660         case 6:
03661           obj1f = UtilsClient::getHisto<TH1F*>( me_hs06_[ism-1] );
03662           break;
03663         case 7:
03664           obj1f = UtilsClient::getHisto<TH1F*>( me_hs07_[ism-1] );
03665           break;
03666         case 8:
03667           obj1f = UtilsClient::getHisto<TH1F*>( me_hs08_[ism-1] );
03668           break;
03669         default:
03670           break;
03671       }
03672 
03673       if ( obj1f ) {
03674         meName = obj1f->GetName();
03675 
03676         replace(meName.begin(), meName.end(), ' ', '_');
03677         imgNameShape[iCanvas-1] = meName + ".png";
03678         imgName = htmlDir + imgNameShape[iCanvas-1];
03679 
03680         cShape->cd();
03681         gStyle->SetOptStat("euo");
03682         obj1f->SetStats(kTRUE);
03683 //        if ( obj1f->GetMaximum(histMax) > 0. ) {
03684 //          gPad->SetLogy(kTRUE);
03685 //        } else {
03686 //          gPad->SetLogy(kFALSE);
03687 //        }
03688         obj1f->Draw();
03689         cShape->Update();
03690         cShape->SaveAs(imgName.c_str());
03691         gPad->SetLogy(kFALSE);
03692 
03693       }
03694 
03695       // Amplitude over PN distributions
03696 
03697       imgNameAmpoPN[iCanvas-1] = "";
03698 
03699       obj1f = 0;
03700       switch ( iCanvas ) {
03701         case 1:
03702           obj1f = UtilsClient::getHisto<TH1F*>( meaopn01_[ism-1] );
03703           break;
03704         case 2:
03705           obj1f = UtilsClient::getHisto<TH1F*>( meaopn02_[ism-1] );
03706           break;
03707         case 3:
03708           obj1f = UtilsClient::getHisto<TH1F*>( meaopn03_[ism-1] );
03709           break;
03710         case 4:
03711           obj1f = UtilsClient::getHisto<TH1F*>( meaopn04_[ism-1] );
03712           break;
03713         case 5:
03714           obj1f = UtilsClient::getHisto<TH1F*>( meaopn05_[ism-1] );
03715           break;
03716         case 6:
03717           obj1f = UtilsClient::getHisto<TH1F*>( meaopn06_[ism-1] );
03718           break;
03719         case 7:
03720           obj1f = UtilsClient::getHisto<TH1F*>( meaopn07_[ism-1] );
03721           break;
03722         case 8:
03723           obj1f = UtilsClient::getHisto<TH1F*>( meaopn08_[ism-1] );
03724           break;
03725         default:
03726           break;
03727       }
03728 
03729       if ( obj1f ) {
03730 
03731         meName = obj1f->GetName();
03732 
03733         replace(meName.begin(), meName.end(), ' ', '_');
03734         imgNameAmpoPN[iCanvas-1] = meName + ".png";
03735         imgName = htmlDir + imgNameAmpoPN[iCanvas-1];
03736 
03737         cAmpoPN->cd();
03738         gStyle->SetOptStat("euo");
03739         obj1f->SetStats(kTRUE);
03740 //        if ( obj1f->GetMaximum(histMax) > 0. ) {
03741 //          gPad->SetLogy(kTRUE);
03742 //        } else {
03743 //          gPad->SetLogy(kFALSE);
03744 //        }
03745         obj1f->SetMinimum(0.0);
03746         obj1f->SetMaximum(20.0);
03747         obj1f->Draw();
03748         cAmpoPN->Update();
03749         cAmpoPN->SaveAs(imgName.c_str());
03750         gPad->SetLogy(kFALSE);
03751 
03752       }
03753 
03754       // Monitoring elements plots
03755 
03756       imgNameMEPnQualG01[iCanvas-1] = "";
03757 
03758       obj2f = 0;
03759       switch ( iCanvas ) {
03760       case 1:
03761         obj2f = UtilsClient::getHisto<TH2F*>( meg05_[ism-1] );
03762         break;
03763       case 2:
03764         obj2f = UtilsClient::getHisto<TH2F*>( meg06_[ism-1] );
03765         break;
03766       case 3:
03767         obj2f = UtilsClient::getHisto<TH2F*>( meg07_[ism-1] );
03768         break;
03769       case 4:
03770         obj2f = UtilsClient::getHisto<TH2F*>( meg08_[ism-1] );
03771         break;
03772         case 5:
03773         case 6:
03774         case 7:
03775         case 8:
03776           obj2f = 0;
03777           break;
03778       default:
03779         break;
03780       }
03781 
03782       if ( obj2f ) {
03783 
03784         meName = obj2f->GetName();
03785 
03786         replace(meName.begin(), meName.end(), ' ', '_');
03787         imgNameMEPnQualG01[iCanvas-1] = meName + ".png";
03788         imgName = htmlDir + imgNameMEPnQualG01[iCanvas-1];
03789 
03790         cQual->cd();
03791         gStyle->SetOptStat(" ");
03792         gStyle->SetPalette(7, pCol3);
03793         obj2f->GetXaxis()->SetNdivisions(10);
03794         obj2f->GetYaxis()->SetNdivisions(5);
03795         cQual->SetGridx();
03796         cQual->SetGridy(0);
03797         obj2f->SetMinimum(-0.00000001);
03798         obj2f->SetMaximum(7.0);
03799         obj2f->Draw("col");
03800         dummy1.Draw("text,same");
03801         cQual->Update();
03802         cQual->SaveAs(imgName.c_str());
03803 
03804       }
03805 
03806       imgNameMEPnQualG16[iCanvas-1] = "";
03807 
03808       obj2f = 0;
03809       switch ( iCanvas ) {
03810       case 1:
03811         obj2f = UtilsClient::getHisto<TH2F*>( meg09_[ism-1] );
03812         break;
03813       case 2:
03814         obj2f = UtilsClient::getHisto<TH2F*>( meg10_[ism-1] );
03815         break;
03816       case 3:
03817         obj2f = UtilsClient::getHisto<TH2F*>( meg11_[ism-1] );
03818         break;
03819       case 4:
03820         obj2f = UtilsClient::getHisto<TH2F*>( meg12_[ism-1] );
03821         break;
03822         case 5:
03823         case 6:
03824         case 7:
03825         case 8:
03826           obj2f = 0;
03827           break;
03828       default:
03829         break;
03830       }
03831 
03832       if ( obj2f ) {
03833 
03834         meName = obj2f->GetName();
03835 
03836         replace(meName.begin(), meName.end(), ' ', '_');
03837         imgNameMEPnQualG16[iCanvas-1] = meName + ".png";
03838         imgName = htmlDir + imgNameMEPnQualG16[iCanvas-1];
03839 
03840         cQual->cd();
03841         gStyle->SetOptStat(" ");
03842         gStyle->SetPalette(7, pCol3);
03843         obj2f->GetXaxis()->SetNdivisions(10);
03844         obj2f->GetYaxis()->SetNdivisions(5);
03845         cQual->SetGridx();
03846         cQual->SetGridy(0);
03847         obj2f->SetMinimum(-0.00000001);
03848         obj2f->SetMaximum(7.0);
03849         obj2f->Draw("col");
03850         dummy1.Draw("text,same");
03851         cQual->Update();
03852         cQual->SaveAs(imgName.c_str());
03853 
03854       }
03855 
03856       imgNameMEPnG01[iCanvas-1] = "";
03857 
03858       objp = 0;
03859       switch ( iCanvas ) {
03860         case 1:
03861           objp = i01_[ism-1];
03862           break;
03863         case 2:
03864           objp = i02_[ism-1];
03865           break;
03866         case 3:
03867           objp = i03_[ism-1];
03868           break;
03869         case 4:
03870           objp = i04_[ism-1];
03871           break;
03872         case 5:
03873         case 6:
03874         case 7:
03875         case 8:
03876           objp = 0;
03877           break;
03878         default:
03879           break;
03880       }
03881 
03882       if ( objp ) {
03883 
03884         meName = objp->GetName();
03885 
03886         replace(meName.begin(), meName.end(), ' ', '_');
03887         imgNameMEPnG01[iCanvas-1] = meName + ".png";
03888         imgName = htmlDir + imgNameMEPnG01[iCanvas-1];
03889 
03890         cAmp->cd();
03891         gStyle->SetOptStat("euo");
03892         objp->SetStats(kTRUE);
03893 //        if ( objp->GetMaximum(histMax) > 0. ) {
03894 //          gPad->SetLogy(kTRUE);
03895 //        } else {
03896 //          gPad->SetLogy(kFALSE);
03897 //        }
03898         objp->SetMinimum(0.0);
03899         objp->Draw();
03900         cAmp->Update();
03901         cAmp->SaveAs(imgName.c_str());
03902         gPad->SetLogy(kFALSE);
03903 
03904       }
03905 
03906       imgNameMEPnG16[iCanvas-1] = "";
03907 
03908       objp = 0;
03909       switch ( iCanvas ) {
03910         case 1:
03911           objp = i09_[ism-1];
03912           break;
03913         case 2:
03914           objp = i10_[ism-1];
03915           break;
03916         case 3:
03917           objp = i11_[ism-1];
03918           break;
03919         case 4:
03920           objp = i12_[ism-1];
03921           break;
03922         case 5:
03923         case 6:
03924         case 7:
03925         case 8:
03926           objp = 0;
03927           break;
03928         default:
03929           break;
03930       }
03931 
03932       if ( objp ) {
03933 
03934         meName = objp->GetName();
03935 
03936         replace(meName.begin(), meName.end(), ' ', '_');
03937         imgNameMEPnG16[iCanvas-1] = meName + ".png";
03938         imgName = htmlDir + imgNameMEPnG16[iCanvas-1];
03939 
03940         cAmp->cd();
03941         gStyle->SetOptStat("euo");
03942         objp->SetStats(kTRUE);
03943 //        if ( objp->GetMaximum(histMax) > 0. ) {
03944 //          gPad->SetLogy(kTRUE);
03945 //        } else {
03946 //          gPad->SetLogy(kFALSE);
03947 //        }
03948         objp->SetMinimum(0.0);
03949         objp->Draw();
03950         cAmp->Update();
03951         cAmp->SaveAs(imgName.c_str());
03952         gPad->SetLogy(kFALSE);
03953 
03954       }
03955 
03956       // Monitoring elements plots
03957 
03958       imgNameMEPnPedG01[iCanvas-1] = "";
03959 
03960       objp = 0;
03961       switch ( iCanvas ) {
03962         case 1:
03963           objp = i05_[ism-1];
03964           break;
03965         case 2:
03966           objp = i06_[ism-1];
03967           break;
03968         case 3:
03969           objp = i07_[ism-1];
03970           break;
03971         case 4:
03972           objp = i08_[ism-1];
03973           break;
03974         case 5:
03975         case 6:
03976         case 7:
03977         case 8:
03978           objp = 0;
03979           break;
03980         default:
03981           break;
03982       }
03983 
03984       if ( objp ) {
03985 
03986         meName = objp->GetName();
03987 
03988         replace(meName.begin(), meName.end(), ' ', '_');
03989         imgNameMEPnPedG01[iCanvas-1] = meName + ".png";
03990         imgName = htmlDir + imgNameMEPnPedG01[iCanvas-1];
03991 
03992         cPed->cd();
03993         gStyle->SetOptStat("euo");
03994         objp->SetStats(kTRUE);
03995 //        if ( objp->GetMaximum(histMax) > 0. ) {
03996 //          gPad->SetLogy(kTRUE);
03997 //        } else {
03998 //          gPad->SetLogy(kFALSE);
03999 //        }
04000         objp->SetMinimum(0.0);
04001         objp->Draw();
04002         cPed->Update();
04003         cPed->SaveAs(imgName.c_str());
04004         gPad->SetLogy(kFALSE);
04005 
04006       }
04007 
04008       imgNameMEPnPedG16[iCanvas-1] = "";
04009 
04010       objp = 0;
04011       switch ( iCanvas ) {
04012         case 1:
04013           objp = i13_[ism-1];
04014           break;
04015         case 2:
04016           objp = i14_[ism-1];
04017           break;
04018         case 3:
04019           objp = i15_[ism-1];
04020           break;
04021         case 4:
04022           objp = i16_[ism-1];
04023           break;
04024         case 5:
04025         case 6:
04026         case 7:
04027         case 8:
04028           objp = 0;
04029           break;
04030         default:
04031           break;
04032       }
04033 
04034       if ( objp ) {
04035 
04036         meName = objp->GetName();
04037 
04038         replace(meName.begin(), meName.end(), ' ', '_');
04039         imgNameMEPnPedG16[iCanvas-1] = meName + ".png";
04040         imgName = htmlDir + imgNameMEPnPedG16[iCanvas-1];
04041 
04042         cPed->cd();
04043         gStyle->SetOptStat("euo");
04044         objp->SetStats(kTRUE);
04045 //        if ( objp->GetMaximum(histMax) > 0. ) {
04046 //          gPad->SetLogy(kTRUE);
04047 //        } else {
04048 //          gPad->SetLogy(kFALSE);
04049 //        }
04050         objp->SetMinimum(0.0);
04051         objp->Draw();
04052         cPed->Update();
04053         cPed->SaveAs(imgName.c_str());
04054         gPad->SetLogy(kFALSE);
04055 
04056       }
04057 
04058       imgNameMEPnRmsPedG01[iCanvas-1] = "";
04059 
04060       obj1f = 0;
04061       switch ( iCanvas ) {
04062         case 1:
04063           if ( mepnprms01_[ism-1] ) obj1f =  UtilsClient::getHisto<TH1F*>(mepnprms01_[ism-1]);
04064           break;
04065         case 2:
04066           if ( mepnprms02_[ism-1] ) obj1f =  UtilsClient::getHisto<TH1F*>(mepnprms02_[ism-1]);
04067           break;
04068         case 3:
04069           if ( mepnprms03_[ism-1] ) obj1f =  UtilsClient::getHisto<TH1F*>(mepnprms03_[ism-1]);
04070           break;
04071         case 4:
04072           if ( mepnprms04_[ism-1] ) obj1f =  UtilsClient::getHisto<TH1F*>(mepnprms04_[ism-1]);
04073           break;
04074         case 5:
04075         case 6:
04076         case 7:
04077         case 8:
04078           obj1f = 0;
04079           break;
04080         default:
04081           break;
04082       }
04083 
04084       if ( obj1f ) {
04085 
04086         meName = obj1f->GetName();
04087 
04088         replace(meName.begin(), meName.end(), ' ', '_');
04089         imgNameMEPnRmsPedG01[iCanvas-1] = meName + ".png";
04090         imgName = htmlDir + imgNameMEPnRmsPedG01[iCanvas-1];
04091 
04092         cPed->cd();
04093         gStyle->SetOptStat("euomr");
04094         obj1f->SetStats(kTRUE);
04095 //        if ( obj1f->GetMaximum(histMax) > 0. ) {
04096 //          gPad->SetLogy(kTRUE);
04097 //        } else {
04098 //          gPad->SetLogy(kFALSE);
04099 //        }
04100         obj1f->SetMinimum(0.0);
04101         obj1f->Draw();
04102         cPed->Update();
04103         cPed->SaveAs(imgName.c_str());
04104         gPad->SetLogy(kFALSE);
04105 
04106       }
04107 
04108       imgNameMEPnRmsPedG16[iCanvas-1] = "";
04109 
04110       obj1f = 0;
04111       switch ( iCanvas ) {
04112         case 1:
04113           if ( mepnprms05_[ism-1] ) obj1f =  UtilsClient::getHisto<TH1F*>(mepnprms05_[ism-1]);
04114           break;
04115         case 2:
04116           if ( mepnprms06_[ism-1] ) obj1f =  UtilsClient::getHisto<TH1F*>(mepnprms06_[ism-1]);
04117           break;
04118         case 3:
04119           if ( mepnprms07_[ism-1] ) obj1f =  UtilsClient::getHisto<TH1F*>(mepnprms07_[ism-1]);
04120           break;
04121         case 4:
04122           if ( mepnprms08_[ism-1] ) obj1f =  UtilsClient::getHisto<TH1F*>(mepnprms08_[ism-1]);
04123           break;
04124         case 5:
04125         case 6:
04126         case 7:
04127         case 8:
04128           obj1f = 0;
04129           break;
04130         default:
04131           break;
04132       }
04133 
04134       if ( obj1f ) {
04135 
04136         meName = obj1f->GetName();
04137 
04138         replace(meName.begin(), meName.end(), ' ', '_');
04139         imgNameMEPnRmsPedG16[iCanvas-1] = meName + ".png";
04140         imgName = htmlDir + imgNameMEPnRmsPedG16[iCanvas-1];
04141 
04142         cPed->cd();
04143         gStyle->SetOptStat("euomr");
04144         obj1f->SetStats(kTRUE);
04145 //        if ( obj1f->GetMaximum(histMax) > 0. ) {
04146 //          gPad->SetLogy(kTRUE);
04147 //        } else {
04148 //          gPad->SetLogy(kFALSE);
04149 //        }
04150         obj1f->SetMinimum(0.0);
04151         obj1f->Draw();
04152         cPed->Update();
04153         cPed->SaveAs(imgName.c_str());
04154         gPad->SetLogy(kFALSE);
04155 
04156       }
04157 
04158     }
04159 
04160     if( i>0 ) htmlFile << "<a href=""#top"">Top</a>" << std::endl;
04161     htmlFile << "<hr>" << std::endl;
04162     htmlFile << "<h3><a name="""
04163              << Numbers::sEB(ism) << """></a><strong>"
04164              << Numbers::sEB(ism) << "</strong></h3>" << endl;
04165     htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
04166     htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
04167     htmlFile << "<tr align=\"center\">" << endl;
04168 
04169     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04170 
04171       // skip unused wavelengths
04172       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04173 
04174       if ( imgNameQual[iCanvas-1].size() != 0 )
04175         htmlFile << "<td colspan=\"2\"><img src=\"" << imgNameQual[iCanvas-1] << "\"></td>" << endl;
04176       else
04177         htmlFile << "<td colspan=\"2\"><img src=\"" << " " << "\"></td>" << endl;
04178 
04179     }
04180 
04181     htmlFile << "</tr>" << endl;
04182 
04183     htmlFile << "<tr>" << endl;
04184 
04185     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04186 
04187       // skip unused wavelengths
04188       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04189 
04190       if ( imgNameAmp[iCanvas-1].size() != 0 )
04191         htmlFile << "<td><img src=\"" << imgNameAmp[iCanvas-1] << "\"></td>" << endl;
04192       else
04193         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04194 
04195       if ( imgNameAmpoPN[iCanvas-1].size() != 0 )
04196         htmlFile << "<td><img src=\"" << imgNameAmpoPN[iCanvas-1] << "\"></td>" << endl;
04197       else
04198         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04199 
04200     }
04201 
04202     htmlFile << "</tr>" << endl;
04203 
04204     htmlFile << "<tr>" << endl;
04205 
04206     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04207 
04208       // skip unused wavelengths
04209       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04210 
04211       if ( imgNameAmp[4+iCanvas-1].size() != 0 )
04212         htmlFile << "<td><img src=\"" << imgNameAmp[4+iCanvas-1] << "\"></td>" << endl;
04213       else
04214         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04215 
04216       if ( imgNameAmpoPN[4+iCanvas-1].size() != 0 )
04217         htmlFile << "<td><img src=\"" << imgNameAmpoPN[4+iCanvas-1] << "\"></td>" << endl;
04218       else
04219         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04220 
04221     }
04222 
04223     htmlFile << "</tr>" << endl;
04224 
04225     htmlFile << "<tr>" << endl;
04226 
04227     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04228 
04229       // skip unused wavelengths
04230       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04231 
04232       if ( imgNameTim[iCanvas-1].size() != 0 )
04233         htmlFile << "<td><img src=\"" << imgNameTim[iCanvas-1] << "\"></td>" << endl;
04234       else
04235         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04236 
04237       if ( imgNameShape[iCanvas-1].size() != 0 )
04238         htmlFile << "<td><img src=\"" << imgNameShape[iCanvas-1] << "\"></td>" << endl;
04239       else
04240         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04241 
04242     }
04243 
04244     htmlFile << "</tr>" << endl;
04245 
04246     htmlFile << "<tr>" << endl;
04247 
04248     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04249 
04250       // skip unused wavelengths
04251       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04252 
04253       if ( imgNameTimav[iCanvas-1].size() != 0 )
04254         htmlFile << "<td><img src=\"" << imgNameTimav[iCanvas-1] << "\"></td>" << endl;
04255       else
04256         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04257 
04258       if ( imgNameTimrms[iCanvas-1].size() != 0 )
04259         htmlFile << "<td><img src=\"" << imgNameTimrms[iCanvas-1] << "\"></td>" << endl;
04260       else
04261         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04262 
04263     }
04264 
04265     htmlFile << "</tr>" << endl;
04266 
04267     htmlFile << "<tr>" << endl;
04268 
04269     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04270 
04271       // skip unused wavelengths
04272       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04273 
04274       if ( imgNameTim[4+iCanvas-1].size() != 0 )
04275         htmlFile << "<td><img src=\"" << imgNameTim[4+iCanvas-1] << "\"></td>" << endl;
04276       else
04277         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04278 
04279       if ( imgNameShape[4+iCanvas-1].size() != 0 )
04280         htmlFile << "<td><img src=\"" << imgNameShape[4+iCanvas-1] << "\"></td>" << endl;
04281       else
04282         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04283 
04284     }
04285 
04286     htmlFile << "</tr>" << endl;
04287 
04288     htmlFile << "<tr>" << endl;
04289 
04290     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04291 
04292       // skip unused wavelengths
04293       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04294 
04295       if ( imgNameTimav[4+iCanvas-1].size() != 0 )
04296         htmlFile << "<td><img src=\"" << imgNameTimav[4+iCanvas-1] << "\"></td>" << endl;
04297       else
04298         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04299 
04300       if ( imgNameTimrms[4+iCanvas-1].size() != 0 )
04301         htmlFile << "<td><img src=\"" << imgNameTimrms[4+iCanvas-1] << "\"></td>" << endl;
04302       else
04303         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04304 
04305     }
04306 
04307     htmlFile << "</tr>" << endl;
04308 
04309     htmlFile << "<tr align=\"center\">" << endl;
04310 
04311     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04312 
04313       // skip unused wavelengths
04314       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04315 
04316       htmlFile << "<td colspan=\"2\">Laser " << iCanvas << "</td>" << endl;
04317 
04318     }
04319 
04320     htmlFile << "</tr>" << endl;
04321     htmlFile << "</table>" << endl;
04322     htmlFile << "<br>" << endl;
04323 
04324     htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
04325     htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
04326     htmlFile << "<tr align=\"center\">" << endl;
04327 
04328     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04329 
04330       // skip unused wavelengths
04331       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04332 
04333       if ( imgNameMEPnQualG01[iCanvas-1].size() != 0 )
04334         htmlFile << "<td colspan=\"2\"><img src=\"" << imgNameMEPnQualG01[iCanvas-1] << "\"></td>" << endl;
04335       else
04336         htmlFile << "<td colspan=\"2\"><img src=\"" << " " << "\"></td>" << endl;
04337 
04338     }
04339 
04340     htmlFile << "</tr>" << endl;
04341 
04342     htmlFile << "<tr>" << endl;
04343 
04344     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04345 
04346       // skip unused wavelengths
04347       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04348 
04349       if ( imgNameMEPnPedG01[iCanvas-1].size() != 0 )
04350         htmlFile << "<td><img src=\"" << imgNameMEPnPedG01[iCanvas-1] << "\"></td>" << endl;
04351       else
04352         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04353 
04354       if ( imgNameMEPnRmsPedG01[iCanvas-1].size() != 0 )
04355         htmlFile << "<td><img src=\"" << imgNameMEPnRmsPedG01[iCanvas-1] << "\"></td>" << endl;
04356       else
04357         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04358 
04359       if ( imgNameMEPnG01[iCanvas-1].size() != 0 )
04360         htmlFile << "<td><img src=\"" << imgNameMEPnG01[iCanvas-1] << "\"></td>" << endl;
04361       else
04362         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04363 
04364     }
04365 
04366     htmlFile << "</tr>" << endl;
04367 
04368     htmlFile << "<tr align=\"center\">" << endl;
04369 
04370     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04371 
04372       // skip unused wavelengths
04373       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04374 
04375       htmlFile << "<td colspan=\"1\"> </td> <td colspan=\"1\">Laser " << iCanvas << " - PN Gain 1</td> <td colspan=\"1\">" << endl;
04376 
04377     }
04378 
04379     htmlFile << "</tr>" << endl;
04380 
04381     htmlFile << "<tr align=\"center\">" << endl;
04382 
04383     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04384 
04385       // skip unused wavelengths
04386       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04387 
04388       if ( imgNameMEPnQualG16[iCanvas-1].size() != 0 )
04389         htmlFile << "<td colspan=\"2\"><img src=\"" << imgNameMEPnQualG16[iCanvas-1] << "\"></td>" << endl;
04390       else
04391         htmlFile << "<td colspan=\"2\"><img src=\"" << " " << "\"></td>" << endl;
04392 
04393     }
04394 
04395     htmlFile << "</tr>" << endl;
04396 
04397     htmlFile << "<tr>" << endl;
04398 
04399     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04400 
04401       // skip unused wavelengths
04402       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04403 
04404       if ( imgNameMEPnPedG16[iCanvas-1].size() != 0 )
04405         htmlFile << "<td><img src=\"" << imgNameMEPnPedG16[iCanvas-1] << "\"></td>" << endl;
04406       else
04407         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04408 
04409       if ( imgNameMEPnRmsPedG16[iCanvas-1].size() != 0 )
04410         htmlFile << "<td><img src=\"" << imgNameMEPnRmsPedG16[iCanvas-1] << "\"></td>" << endl;
04411       else
04412         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04413 
04414       if ( imgNameMEPnG16[iCanvas-1].size() != 0 )
04415         htmlFile << "<td><img src=\"" << imgNameMEPnG16[iCanvas-1] << "\"></td>" << endl;
04416       else
04417         htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
04418 
04419     }
04420 
04421     htmlFile << "<tr align=\"center\">" << endl;
04422 
04423     for ( int iCanvas = 1 ; iCanvas <= 4 ; iCanvas++ ) {
04424 
04425       // skip unused wavelengths
04426       if ( iCanvas == 2 || iCanvas == 3 ) continue;
04427 
04428       htmlFile << "<td colspan=\"1\"> </td> <td colspan=\"1\">Laser " << iCanvas << " - PN Gain 16</td> <td colspan=\"1\"> </td>" << endl;
04429 
04430     }
04431 
04432     htmlFile << "</tr>" << endl;
04433 
04434     htmlFile << "</tr>" << endl;
04435     htmlFile << "</table>" << endl;
04436 
04437     htmlFile << "<br>" << endl;
04438 
04439   }
04440 
04441   delete cQual;
04442   delete cAmp;
04443   delete cTim;
04444   delete cTimav;
04445   delete cTimrms;
04446   delete cShape;
04447   delete cAmpoPN;
04448   delete cPed;
04449 
04450   // html page footer
04451   htmlFile << "</body> " << endl;
04452   htmlFile << "</html> " << endl;
04453 
04454   htmlFile.close();
04455 
04456 }
04457 

Generated on Tue Jun 9 17:32:43 2009 for CMSSW by  doxygen 1.5.4