00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include <memory>
00013 #include <iostream>
00014 #include <fstream>
00015 #include <math.h>
00016
00017 #include "TCanvas.h"
00018 #include "TStyle.h"
00019 #include "TGaxis.h"
00020
00021 #include "DQMServices/Core/interface/DQMStore.h"
00022
00023 #include "DQM/EcalCommon/interface/UtilsClient.h"
00024
00025 #include <DQM/EcalBarrelMonitorClient/interface/EBClusterClient.h>
00026
00027 using namespace cms;
00028 using namespace edm;
00029 using namespace std;
00030
00031 EBClusterClient::EBClusterClient(const ParameterSet& ps) {
00032
00033
00034 cloneME_ = ps.getUntrackedParameter<bool>("cloneME", true);
00035
00036
00037 verbose_ = ps.getUntrackedParameter<bool>("verbose", true);
00038
00039
00040 debug_ = ps.getUntrackedParameter<bool>("debug", false);
00041
00042
00043 prefixME_ = ps.getUntrackedParameter<string>("prefixME", "");
00044
00045
00046 enableCleanup_ = ps.getUntrackedParameter<bool>("enableCleanup", false);
00047
00048
00049 superModules_.reserve(36);
00050 for ( unsigned int i = 1; i <= 36; i++ ) superModules_.push_back(i);
00051 superModules_ = ps.getUntrackedParameter<vector<int> >("superModules", superModules_);
00052
00053 h01_[0] = 0;
00054 h01_[1] = 0;
00055 h01_[2] = 0;
00056
00057 h02_[0] = 0;
00058 h02ProjEta_[0] = 0;
00059 h02ProjPhi_[0] = 0;
00060 h02_[1] = 0;
00061 h02ProjEta_[1] = 0;
00062 h02ProjPhi_[1] = 0;
00063
00064 h03_ = 0;
00065 h03ProjEta_ = 0;
00066 h03ProjPhi_ = 0;
00067
00068 h04_ = 0;
00069 h04ProjEta_ = 0;
00070 h04ProjPhi_ = 0;
00071
00072 i01_[0] = 0;
00073 i01_[1] = 0;
00074 i01_[2] = 0;
00075
00076 s01_[0] = 0;
00077 s01_[1] = 0;
00078 s01_[2] = 0;
00079
00080 }
00081
00082 EBClusterClient::~EBClusterClient() {
00083
00084 }
00085
00086 void EBClusterClient::beginJob(DQMStore* dqmStore) {
00087
00088 dqmStore_ = dqmStore;
00089
00090 if ( debug_ ) cout << "EBClusterClient: beginJob" << endl;
00091
00092 ievt_ = 0;
00093 jevt_ = 0;
00094
00095 }
00096
00097 void EBClusterClient::beginRun(void) {
00098
00099 if ( debug_ ) cout << "EBClusterClient: beginRun" << endl;
00100
00101 jevt_ = 0;
00102
00103 this->setup();
00104
00105 }
00106
00107 void EBClusterClient::endJob(void) {
00108
00109 if ( debug_ ) cout << "EBClusterClient: endJob, ievt = " << ievt_ << endl;
00110
00111 this->cleanup();
00112
00113 }
00114
00115 void EBClusterClient::endRun(void) {
00116
00117 if ( debug_ ) cout << "EBClusterClient: endRun, jevt = " << jevt_ << endl;
00118
00119 this->cleanup();
00120
00121 }
00122
00123 void EBClusterClient::setup(void) {
00124
00125 dqmStore_->setCurrentFolder( prefixME_ + "/EBClusterClient" );
00126
00127 }
00128
00129 void EBClusterClient::cleanup(void) {
00130
00131 if ( ! enableCleanup_ ) return;
00132
00133 if ( cloneME_ ) {
00134 if ( h01_[0] ) delete h01_[0];
00135 if ( h01_[1] ) delete h01_[1];
00136 if ( h01_[2] ) delete h01_[2];
00137
00138 if ( h02_[0] ) delete h02_[0];
00139 if ( h02ProjEta_[0] ) delete h02ProjEta_[0];
00140 if ( h02ProjPhi_[0] ) delete h02ProjPhi_[0];
00141 if ( h02_[1] ) delete h02_[1];
00142 if ( h02ProjEta_[1] ) delete h02ProjEta_[1];
00143 if ( h02ProjPhi_[1] ) delete h02ProjPhi_[1];
00144
00145 if ( h03_ ) delete h03_;
00146 if ( h03ProjEta_ ) delete h03ProjEta_;
00147 if ( h03ProjPhi_ ) delete h03ProjPhi_;
00148 if ( h04_ ) delete h04_;
00149 if ( h04ProjEta_ ) delete h04ProjEta_;
00150 if ( h04ProjPhi_ ) delete h04ProjPhi_;
00151
00152 if ( i01_[0] ) delete i01_[0];
00153 if ( i01_[1] ) delete i01_[1];
00154 if ( i01_[2] ) delete i01_[2];
00155
00156 if ( s01_[0] ) delete s01_[0];
00157 if ( s01_[1] ) delete s01_[1];
00158 if ( s01_[2] ) delete s01_[2];
00159
00160 }
00161
00162 h01_[0] = 0;
00163 h01_[1] = 0;
00164 h01_[2] = 0;
00165
00166 h02_[0] = 0;
00167 h02ProjEta_[0] = 0;
00168 h02ProjPhi_[0] = 0;
00169 h02_[1] = 0;
00170 h02ProjEta_[1] = 0;
00171 h02ProjPhi_[1] = 0;
00172
00173 h03_ = 0;
00174 h03ProjEta_ = 0;
00175 h03ProjPhi_ = 0;
00176 h04_ = 0;
00177 h04ProjEta_ = 0;
00178 h04ProjPhi_ = 0;
00179
00180 i01_[0] = 0;
00181 i01_[1] = 0;
00182 i01_[2] = 0;
00183
00184 s01_[0] = 0;
00185 s01_[1] = 0;
00186 s01_[2] = 0;
00187
00188 }
00189
00190 bool EBClusterClient::writeDb(EcalCondDBInterface* econn, RunIOV* runiov, MonRunIOV* moniov, bool& status, bool flag) {
00191
00192 status = true;
00193
00194 if ( ! flag ) return false;
00195
00196 return true;
00197
00198 }
00199
00200 void EBClusterClient::analyze(void) {
00201
00202 ievt_++;
00203 jevt_++;
00204 if ( ievt_ % 10 == 0 ) {
00205 if ( debug_ ) cout << "EBClusterClient: ievt/jevt = " << ievt_ << "/" << jevt_ << endl;
00206 }
00207
00208 char histo[200];
00209
00210 MonitorElement* me;
00211
00212 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC energy").c_str());
00213 me = dqmStore_->get(histo);
00214 h01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, h01_[0] );
00215
00216 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC size").c_str());
00217 me = dqmStore_->get(histo);
00218 h01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, h01_[1] );
00219
00220 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC number").c_str());
00221 me = dqmStore_->get(histo);
00222 h01_[2] = UtilsClient::getHisto<TH1F*>( me, cloneME_, h01_[2] );
00223
00224 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC energy map").c_str());
00225 me = dqmStore_->get(histo);
00226 h02_[0] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h02_[0] );
00227
00228 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC ET map").c_str());
00229 me = dqmStore_->get(histo);
00230 h02_[1] = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h02_[1] );
00231
00232 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC number map").c_str());
00233 me = dqmStore_->get(histo);
00234 h03_ = UtilsClient::getHisto<TH2F*>( me, cloneME_, h03_ );
00235
00236 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC size map").c_str());
00237 me = dqmStore_->get(histo);
00238 h04_ = UtilsClient::getHisto<TProfile2D*>( me, cloneME_, h04_ );
00239
00240 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC energy projection eta").c_str());
00241 me = dqmStore_->get(histo);
00242 h02ProjEta_[0] = UtilsClient::getHisto<TProfile*>( me, cloneME_, h02ProjEta_[0] );
00243
00244 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC energy projection phi").c_str());
00245 me = dqmStore_->get(histo);
00246 h02ProjPhi_[0] = UtilsClient::getHisto<TProfile*>( me, cloneME_, h02ProjPhi_[0] );
00247
00248 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC ET projection eta").c_str());
00249 me = dqmStore_->get(histo);
00250 h02ProjEta_[1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, h02ProjEta_[1] );
00251
00252 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC ET projection phi").c_str());
00253 me = dqmStore_->get(histo);
00254 h02ProjPhi_[1] = UtilsClient::getHisto<TProfile*>( me, cloneME_, h02ProjPhi_[1] );
00255
00256 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC number projection eta").c_str());
00257 me = dqmStore_->get(histo);
00258 h03ProjEta_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, h03ProjEta_ );
00259
00260 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC number projection phi").c_str());
00261 me = dqmStore_->get(histo);
00262 h03ProjPhi_ = UtilsClient::getHisto<TH1F*>( me, cloneME_, h03ProjPhi_ );
00263
00264 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC size projection eta").c_str());
00265 me = dqmStore_->get(histo);
00266 h04ProjEta_ = UtilsClient::getHisto<TProfile*>( me, cloneME_, h04ProjEta_ );
00267
00268 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT BC size projection phi").c_str());
00269 me = dqmStore_->get(histo);
00270 h04ProjPhi_ = UtilsClient::getHisto<TProfile*>( me, cloneME_, h04ProjPhi_ );
00271
00272 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT SC energy").c_str());
00273 me = dqmStore_->get(histo);
00274 i01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, i01_[0] );
00275
00276 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT SC size").c_str());
00277 me = dqmStore_->get(histo);
00278 i01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, i01_[1] );
00279
00280 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT SC number").c_str());
00281 me = dqmStore_->get(histo);
00282 i01_[2] = UtilsClient::getHisto<TH1F*>( me, cloneME_, i01_[2] );
00283
00284 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT s1s9").c_str());
00285 me = dqmStore_->get(histo);
00286 s01_[0] = UtilsClient::getHisto<TH1F*>( me, cloneME_, s01_[0] );
00287
00288 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT s9s25").c_str());
00289 me = dqmStore_->get(histo);
00290 s01_[1] = UtilsClient::getHisto<TH1F*>( me, cloneME_, s01_[1] );
00291
00292 sprintf(histo, (prefixME_ + "/EBClusterTask/EBCLT dicluster invariant mass Pi0").c_str());
00293 me = dqmStore_->get(histo);
00294 s01_[2] = UtilsClient::getHisto<TH1F*>( me, cloneME_, s01_[2] );
00295
00296 }
00297
00298 void EBClusterClient::softReset(bool flag) {
00299
00300 }
00301
00302 void EBClusterClient::htmlOutput(int run, string& htmlDir, string& htmlName) {
00303
00304 if ( verbose_ ) cout << "Preparing EBClusterClient html output ..." << endl;
00305
00306 ofstream htmlFile;
00307
00308 htmlFile.open((htmlDir + htmlName).c_str());
00309
00310
00311 htmlFile << "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> " << endl;
00312 htmlFile << "<html> " << endl;
00313 htmlFile << "<head> " << endl;
00314 htmlFile << " <meta content=\"text/html; charset=ISO-8859-1\" " << endl;
00315 htmlFile << " https-equiv=\"content-type\"> " << endl;
00316 htmlFile << " <title>Monitor:ClusterTask output</title> " << endl;
00317 htmlFile << "</head> " << endl;
00318 htmlFile << "<style type=\"text/css\"> td { font-weight: bold } </style>" << endl;
00319 htmlFile << "<body> " << endl;
00320 htmlFile << "<br> " << endl;
00321 htmlFile << "<h2>Run: " << endl;
00322 htmlFile << " <span " << endl;
00323 htmlFile << " style=\"color: rgb(0, 0, 153);\">" << run << "</span></h2>" << endl;
00324 htmlFile << "<h2>Monitoring task: <span " << endl;
00325 htmlFile << " style=\"color: rgb(0, 0, 153);\">CLUSTER</span></h2> " << endl;
00326 htmlFile << "<hr>" << endl;
00327
00328 htmlFile << "<a href=\"#bc_plots\"> Basic Clusters plots </a>" << endl;
00329 htmlFile << "<p>" << endl;
00330 htmlFile << "<a href=\"#sc_plots\"> Super Clusters plots </a>" << endl;
00331 htmlFile << "<p>" << endl;
00332 htmlFile << "<a href=\"#hl_plots\"> Higher Level Quantities plots </a>" << endl;
00333 htmlFile << "<p>" << endl;
00334
00335 htmlFile << "<hr>" << endl;
00336 htmlFile << "<p>" << endl;
00337
00338
00339
00340 const int csize1D = 250;
00341 const int csize2D = 300;
00342
00343 const double histMax = 1.e15;
00344
00345 int pCol4[10];
00346 for ( int i = 0; i < 10; i++ ) pCol4[i] = 401+i;
00347
00348
00349 TH2C labelGrid("labelGrid","label grid for SM", 18, -M_PI*(9+1.5)/9, M_PI*(9-1.5)/9, 2, -1.479, 1.479);
00350 for ( short sm=0; sm<36; sm++ ) {
00351 int x = 1 + sm%18;
00352 int y = 2 - sm/18;
00353 int z = x + 8;
00354 if ( z > 18 ) z = z - 18;
00355 if ( y == 1 ) {
00356 labelGrid.SetBinContent(x, y, -z);
00357 } else {
00358 labelGrid.SetBinContent(x, y, +z);
00359 }
00360 }
00361 labelGrid.SetMarkerSize(2);
00362 labelGrid.SetMinimum(-18.01);
00363
00364 TGaxis Xaxis(-M_PI*(9+1.5)/9, -1.479, M_PI*(9-1.5)/9, -1.479, -M_PI*(9+1.5)/9, M_PI*(9-1.5)/9, 40306, "N");
00365
00366 string imgNameB[3], imgNameBMap[4], imgNameS[3];
00367 string imgNameBXproj[4], imgNameBYproj[4];
00368 string imgNameHL[3], imgName, meName;
00369
00370 TCanvas* cEne = new TCanvas("cEne", "Temp", csize1D, csize1D);
00371 TCanvas* cMap = new TCanvas("cMap", "Temp", int(360./170.*csize2D), csize2D);
00372
00373 TH1F* obj1f;
00374 TProfile2D* objp;
00375 TH2F* obj2f;
00376 TProfile* obj1pX;
00377 TProfile* obj1pY;
00378 TH1F* obj1fX;
00379 TH1F* obj1fY;
00380
00381 gStyle->SetPaintTextFormat("+g");
00382
00383
00384
00385
00386
00387 for ( int iCanvas = 1; iCanvas <= 3; iCanvas++ ) {
00388
00389 imgNameB[iCanvas-1] = "";
00390
00391 obj1f = h01_[iCanvas-1];
00392
00393 if ( obj1f ) {
00394
00395 meName = obj1f->GetName();
00396
00397 replace(meName.begin(), meName.end(), ' ', '_');
00398 imgNameB[iCanvas-1] = meName + ".png";
00399 imgName = htmlDir + imgNameB[iCanvas-1];
00400
00401 cEne->cd();
00402 gStyle->SetOptStat("euomr");
00403 obj1f->SetStats(kTRUE);
00404 if ( obj1f->GetMaximum(histMax) > 0. ) {
00405 gPad->SetLogy(kTRUE);
00406 } else {
00407 gPad->SetLogy(kFALSE);
00408 }
00409 obj1f->Draw();
00410 cEne->Update();
00411 cEne->SaveAs(imgName.c_str());
00412 gPad->SetLogy(kFALSE);
00413 }
00414 }
00415
00417 htmlFile << "<br>" << endl;
00418 htmlFile << "<a name=\"bc_plots\"> <B> Basic Clusters plots </B> </a> " << endl;
00419 htmlFile << "</br>" << endl;
00421
00422 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00423 htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
00424 htmlFile << "<tr align=\"center\">" << endl;
00425
00426 for ( int iCanvas = 1; iCanvas <= 3; iCanvas++ ) {
00427
00428 if ( imgNameB[iCanvas-1].size() != 0 )
00429 htmlFile << "<td><img src=\"" << imgNameB[iCanvas-1] << "\"></td>" << endl;
00430 else
00431 htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
00432
00433 }
00434
00435 htmlFile << "</tr>" << endl;
00436 htmlFile << "</table>" << endl;
00437 htmlFile << "<br>" << endl;
00438
00439 for ( int iCanvas = 1; iCanvas <= 3; iCanvas++ ) {
00440
00441 imgNameBMap[iCanvas-1] = "";
00442
00443 objp = (iCanvas!=3) ? h02_[iCanvas-1] : h04_;
00444
00445 if ( objp ) {
00446
00447 meName = objp->GetName();
00448
00449 replace(meName.begin(), meName.end(), ' ', '_');
00450 imgNameBMap[iCanvas-1] = meName + ".png";
00451 imgName = htmlDir + imgNameBMap[iCanvas-1];
00452
00453 cMap->cd();
00454 gStyle->SetOptStat(" ");
00455 gStyle->SetPalette(10, pCol4);
00456 objp->GetXaxis()->SetNdivisions( 40118, kFALSE);
00457 objp->GetYaxis()->SetNdivisions(170102, kFALSE);
00458 cMap->SetGridx();
00459 cMap->SetGridy();
00460 objp->Draw("colz");
00461 labelGrid.Draw("text,same");
00462 Xaxis.Draw();
00463 cMap->Update();
00464 objp->GetXaxis()->SetLabelColor(0);
00465 cMap->SaveAs(imgName.c_str());
00466 objp->GetXaxis()->SetLabelColor(1);
00467
00468 char projXName[100];
00469 char projYName[100];
00470 sprintf(projXName,"%s_px",meName.c_str());
00471 imgNameBXproj[iCanvas-1] = string(projXName) + ".png";
00472 sprintf(projYName,"%s_py",meName.c_str());
00473 imgNameBYproj[iCanvas-1] = string(projYName) + ".png";
00474
00475 obj1pX = (iCanvas!=3) ? h02ProjEta_[iCanvas-1] : h04ProjEta_;
00476 obj1pY = (iCanvas!=3) ? h02ProjPhi_[iCanvas-1] : h04ProjPhi_;
00477
00478 if (obj1pX && obj1pY) {
00479 cEne->cd();
00480 gStyle->SetOptStat("emr");
00481 obj1pX->GetXaxis()->SetNdivisions(40306, kFALSE);
00482 obj1pY->GetXaxis()->SetNdivisions(6, kFALSE);
00483
00484 imgName = htmlDir + imgNameBXproj[iCanvas-1];
00485 obj1pX->SetStats(kTRUE);
00486 obj1pX->Draw("pe");
00487 cEne->Update();
00488 cEne->SaveAs(imgName.c_str());
00489
00490 imgName = htmlDir + imgNameBYproj[iCanvas-1];
00491 obj1pY->SetStats(kTRUE);
00492 obj1pY->Draw("pe");
00493 cEne->Update();
00494 cEne->SaveAs(imgName.c_str());
00495 }
00496 }
00497 }
00498
00499 imgNameBMap[3] = "";
00500
00501 obj2f = h03_;
00502
00503 if ( obj2f ) {
00504
00505 meName = obj2f->GetName();
00506
00507 replace(meName.begin(), meName.end(), ' ', '_');
00508 imgNameBMap[3] = meName + ".png";
00509 imgName = htmlDir + imgNameBMap[3];
00510
00511 cMap->cd();
00512 gStyle->SetOptStat(" ");
00513 gStyle->SetPalette(10, pCol4);
00514 obj2f->GetXaxis()->SetNdivisions( 40118, kFALSE);
00515 obj2f->GetYaxis()->SetNdivisions(170102, kFALSE);
00516 cMap->SetGridx();
00517 cMap->SetGridy();
00518 obj2f->Draw("colz");
00519 labelGrid.Draw("text,same");
00520 Xaxis.Draw();
00521 cMap->Update();
00522 obj2f->GetXaxis()->SetLabelColor(0);
00523 cMap->SaveAs(imgName.c_str());
00524 obj2f->GetXaxis()->SetLabelColor(1);
00525
00526 char projXName[100];
00527 char projYName[100];
00528 sprintf(projXName,"%s_px",meName.c_str());
00529 imgNameBXproj[3] = string(projXName) + ".png";
00530 sprintf(projYName,"%s_py",meName.c_str());
00531 imgNameBYproj[3] = string(projYName) + ".png";
00532
00533 obj1fX = h03ProjEta_;
00534 obj1fY = h03ProjPhi_;
00535
00536 if(obj1fX && obj1fY) {
00537 cEne->cd();
00538 gStyle->SetOptStat("emr");
00539 obj1fX->GetXaxis()->SetNdivisions(40306, kFALSE);
00540 obj1fY->GetXaxis()->SetNdivisions(6, kFALSE);
00541
00542 imgName = htmlDir + imgNameBXproj[3];
00543 obj1fX->SetStats(kTRUE);
00544 obj1fX->Draw("pe");
00545 cEne->Update();
00546 cEne->SaveAs(imgName.c_str());
00547
00548 imgName = htmlDir + imgNameBYproj[3];
00549 obj1fY->SetStats(kTRUE);
00550 obj1fY->Draw("pe");
00551 cEne->Update();
00552 cEne->SaveAs(imgName.c_str());
00553 }
00554 }
00555
00556 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00557 htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
00558 htmlFile << "<tr align=\"center\">" << endl;
00559
00560 for ( int iCanvas = 1; iCanvas <= 2; iCanvas++ ) {
00561
00562 if ( imgNameBMap[iCanvas-1].size() != 0 )
00563 htmlFile << "<td><img src=\"" << imgNameBMap[iCanvas-1] << "\"></td>" << endl;
00564 else
00565 htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
00566
00567 }
00568
00569 htmlFile << "</tr>" << endl;
00570 htmlFile << "</table>" << endl;
00571 htmlFile << "<br>" << endl;
00572
00573 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00574 htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
00575 htmlFile << "<tr align=\"center\">" << endl;
00576
00577 for ( int iCanvas = 3; iCanvas <= 4; iCanvas++ ) {
00578
00579 if ( imgNameBMap[iCanvas-1].size() != 0 )
00580 htmlFile << "<td><img src=\"" << imgNameBMap[iCanvas-1] << "\"></td>" << endl;
00581 else
00582 htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
00583
00584 }
00585
00586 htmlFile << "</tr>" << endl;
00587 htmlFile << "</table>" << endl;
00588 htmlFile << "<br>" << endl;
00589
00590
00591 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00592 htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
00593 htmlFile << "<tr align=\"center\">" << endl;
00594
00595 for ( int iCanvas = 1; iCanvas <= 4; iCanvas++ ) {
00596
00597 if ( imgNameBXproj[iCanvas-1].size() != 0 )
00598 htmlFile << "<td><img src=\"" << imgNameBXproj[iCanvas-1] << "\"></td>" << endl;
00599 else
00600 htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
00601
00602 }
00603
00604 htmlFile << "</tr>" << endl;
00605 htmlFile << "</table>" << endl;
00606 htmlFile << "<br>" << endl;
00607
00608
00609 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00610 htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
00611 htmlFile << "<tr align=\"center\">" << endl;
00612
00613 for ( int iCanvas = 1; iCanvas <= 4; iCanvas++ ) {
00614
00615 if ( imgNameBYproj[iCanvas-1].size() != 0 )
00616 htmlFile << "<td><img src=\"" << imgNameBYproj[iCanvas-1] << "\"></td>" << endl;
00617 else
00618 htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
00619
00620 }
00621
00622 htmlFile << "</tr>" << endl;
00623 htmlFile << "</table>" << endl;
00624 htmlFile << "<br>" << endl;
00625
00626
00627
00628 for ( int iCanvas = 1; iCanvas <= 3; iCanvas++ ) {
00629
00630 imgNameS[iCanvas-1] = "";
00631
00632 obj1f = i01_[iCanvas-1];
00633
00634 if ( obj1f ) {
00635
00636 meName = obj1f->GetName();
00637
00638 replace(meName.begin(), meName.end(), ' ', '_');
00639 imgNameS[iCanvas-1] = meName + ".png";
00640 imgName = htmlDir + imgNameS[iCanvas-1];
00641
00642 cEne->cd();
00643 gStyle->SetOptStat("euomr");
00644 obj1f->SetStats(kTRUE);
00645 if ( obj1f->GetMaximum(histMax) > 0. ) {
00646 gPad->SetLogy(kTRUE);
00647 } else {
00648 gPad->SetLogy(kFALSE);
00649 }
00650 obj1f->Draw();
00651 cEne->Update();
00652 cEne->SaveAs(imgName.c_str());
00653 gPad->SetLogy(kFALSE);
00654 }
00655 }
00656
00658 htmlFile << "<br>" << endl;
00659 htmlFile << "<a name=\"sc_plots\"> <B> Super Clusters plots </B> </a> " << endl;
00660 htmlFile << "</br>" << endl;
00662
00663 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00664 htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
00665 htmlFile << "<tr align=\"center\">" << endl;
00666
00667
00668 for ( int iCanvas = 1; iCanvas <= 3; iCanvas++ ) {
00669
00670 if ( imgNameS[iCanvas-1].size() != 0 )
00671 htmlFile << "<td><img src=\"" << imgNameS[iCanvas-1] << "\"></td>" << endl;
00672 else
00673 htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
00674
00675 }
00676
00677 htmlFile << "</tr>" << endl;
00678 htmlFile << "</table>" << endl;
00679 htmlFile << "<br>" << endl;
00680
00681
00682
00683
00684
00685 for( int iCanvas = 1; iCanvas <= 3; iCanvas++ ) {
00686
00687 imgNameHL[iCanvas-1] = "";
00688
00689 obj1f = s01_[iCanvas-1];
00690
00691 if ( obj1f ) {
00692
00693 meName = obj1f->GetName();
00694
00695 replace(meName.begin(), meName.end(), ' ', '_');
00696 imgNameHL[iCanvas-1] = meName + ".png";
00697 imgName = htmlDir + imgNameHL[iCanvas-1];
00698
00699 cEne->cd();
00700 gStyle->SetOptStat("euomr");
00701 obj1f->SetStats(kTRUE);
00702
00703 if ( obj1f->GetMaximum(histMax) > 0. ) {
00704 gPad->SetLogy(kTRUE);
00705 } else {
00706 gPad->SetLogy(kFALSE);
00707 }
00708
00709 obj1f->Draw();
00710 cEne->Update();
00711 cEne->SaveAs(imgName.c_str());
00712 gPad->SetLogy(kFALSE);
00713 }
00714 }
00715
00717 htmlFile << "<br>" << endl;
00718 htmlFile << "<a name=\"hl_plots\"> <B> Higher Level Quantities plots </B> </a> " << endl;
00719 htmlFile << "</br>" << endl;
00721
00722 htmlFile << "<table border=\"0\" cellspacing=\"0\" " << endl;
00723 htmlFile << "cellpadding=\"10\" align=\"center\"> " << endl;
00724 htmlFile << "<tr align=\"center\">" << endl;
00725
00726
00727 for ( int iCanvas = 1; iCanvas <= 3; iCanvas++ ) {
00728
00729 if ( imgNameHL[iCanvas-1].size() != 0 )
00730 htmlFile << "<td><img src=\"" << imgNameHL[iCanvas-1] << "\"></td>" << endl;
00731 else
00732 htmlFile << "<td><img src=\"" << " " << "\"></td>" << endl;
00733 }
00734
00735 htmlFile << "</tr>" << endl;
00736 htmlFile << "</table>" << endl;
00737 htmlFile << "<br>" << endl;
00738
00739 delete cEne;
00740 delete cMap;
00741
00742 gStyle->SetPaintTextFormat();
00743
00744
00745 htmlFile << "</body> " << endl;
00746 htmlFile << "</html> " << endl;
00747
00748 htmlFile.close();
00749
00750 }
00751