35 if (prefixME_.substr(prefixME_.size()-1,prefixME_.size())!=
"/")
36 prefixME_.append(
"/");
59 if (
debug_>2)
std::cout <<
"\tHcalDetDiagPedestalClient::analyze()"<<std::endl;
65 if (
debug_>2)
std::cout <<
"\t\tHcalDetDiagPedestalClient::calculateProblems()"<<std::endl;
68 int etabins=0, phibins=0, zside=0;
69 double problemvalue=0;
94 TH2F* PedestalsMissing[4];
95 TH2F* PedestalsUnstable[4];
96 TH2F* PedestalsBadMean[4];
97 TH2F* PedestalsBadRMS[4];
102 PedestalsMissing[
i]=0;
103 PedestalsUnstable[
i]=0;
104 PedestalsBadMean[
i]=0;
105 PedestalsBadRMS[
i]=0;
106 std::string
s=
subdir_+name[
i]+
" Problem Missing Channels";
108 if (me!=0) PedestalsMissing[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, PedestalsMissing[
i],
debug_);
112 std::cout <<
"<HcalDetDiagPedestalClient::calcluateProblems> could not get histogram '"<<s<<
"'"<<std::endl;
115 s=
subdir_+name[
i]+
" Problem Unstable Channels";
117 if (me!=0) PedestalsUnstable[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, PedestalsUnstable[
i],
debug_);
118 else if (
debug_>0)
std::cout <<
"<HcalDetDiagPedestalClient::calculateProblems> could not get histogram '"<<s<<
"'"<<std::endl;
119 s=
subdir_+name[
i]+
" Problem Bad Pedestal Value";
121 if (me!=0) PedestalsBadMean[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, PedestalsBadMean[
i],
debug_);
122 else if (
debug_>0)
std::cout <<
"<HcalDetDiagPedestalClient::calculateProblems> could not get histogram '"<<s<<
"'"<<std::endl;
123 s=
subdir_+name[
i]+
" Problem Bad Rms Value";
125 if (me!=0) PedestalsBadRMS[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, PedestalsBadRMS[
i],
debug_);
126 else if (
debug_>0)
std::cout <<
"<HcalDetDiagPedestalClient::calculateProblems> could not get histogram '"<<s<<
"'"<<std::endl;
139 if (PedestalsMissing[d]!=0) totalevents = PedestalsMissing[d]->GetBinContent(0);
140 else if (PedestalsUnstable[d]!=0) totalevents = PedestalsUnstable[d]->GetBinContent(0);
141 else if (PedestalsBadMean[d]!=0) totalevents = PedestalsBadMean[d]->GetBinContent(0);
142 else if (PedestalsBadRMS[d]!=0) totalevents = PedestalsBadRMS[d]->GetBinContent(0);
151 if (ieta==-9999)
continue;
155 if (PedestalsMissing[d]!=0) problemvalue += PedestalsMissing[d]->GetBinContent(
eta+1,
phi+1)*1./totalevents;
156 if (PedestalsUnstable[d]!=0) problemvalue += PedestalsUnstable[d]->GetBinContent(
eta+1,
phi+1)*1./totalevents;
157 if (PedestalsBadMean[d]!=0) problemvalue += PedestalsBadMean[d]->GetBinContent(
eta+1,
phi+1)*1./totalevents;
158 if (PedestalsBadRMS[d]!=0) problemvalue += PedestalsBadRMS[d]->GetBinContent(
eta+1,
phi+1)*1./totalevents;
160 if (problemvalue==0)
continue;
162 problemvalue =
std::min(1.,problemvalue);
166 ieta<0 ? zside = -1 : zside = 1;
190 if (
debug_>0)
std::cout <<
"<HcalDetDiagPedestalClient::analyze> ProblemCells histogram does not exist!"<<std::endl;
216 std::cout <<
"<HcalDetDiagPedestalClient::beginJob()> Displaying dqmStore directory structure:"<<std::endl;
227 if (
debug_>0)
std::cout <<
"<HcalDetDiagPedestalClient::beginRun> dqmStore does not exist!"<<std::endl;
235 " Problem DetDiagPedestal Rate for all HCAL;ieta;iphi",
261 if (
debug_>1)
std::cout <<
"<HcalDetDiagPedestalClient::hasErrors_Temp> ProblemCells histogram does not exist!"<<std::endl;
267 for (
int depth=0;depth<4; ++depth)
271 for (
int hist_eta=0;hist_eta<etabins;++hist_eta)
273 for (
int hist_phi=0; hist_phi<phibins;++hist_phi)
276 if (ieta==-9999)
continue;
286 if (problemcount>0)
return true;
307 file <<
"</html><html xmlns=\"http://www.w3.org/1999/xhtml\">"<< std::endl;
308 file <<
"<head>"<< std::endl;
309 file <<
"<meta http-equiv=\"Content-Type\" content=\"text/html\"/>"<< std::endl;
310 file <<
"<title>"<< header <<
"</title>"<< std::endl;
311 file <<
"<style type=\"text/css\">"<< std::endl;
312 file <<
" body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"<< std::endl;
313 file <<
" td.s0 { font-family: arial, arial ce, helvetica; }"<< std::endl;
314 file <<
" td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; text-align: center;}"<< std::endl;
315 file <<
" td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }"<< std::endl;
316 file <<
" td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }"<< std::endl;
317 file <<
" td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }"<< std::endl;
318 file <<
"</style>"<< std::endl;
319 file <<
"<body>"<< std::endl;
320 file <<
"<table>"<< std::endl;
326 file <<
"<td class=\"s4\" align=\"center\">#</td>" << std::endl;
327 file <<
"<td class=\"s1\" align=\"center\">ETA</td>" << std::endl;
328 file <<
"<td class=\"s1\" align=\"center\">PHI</td>" << std::endl;
329 file <<
"<td class=\"s1\" align=\"center\">DEPTH</td>"<< std::endl;
330 file <<
"<td class=\"s1\" align=\"center\">RBX</td>" << std::endl;
331 file <<
"<td class=\"s1\" align=\"center\">RM</td>" << std::endl;
332 file <<
"<td class=\"s1\" align=\"center\">PIXEL</td>" << std::endl;
333 file <<
"<td class=\"s1\" align=\"center\">RM_FIBER</td>" << std::endl;
334 file <<
"<td class=\"s1\" align=\"center\">FIBER_CH</td>" << std::endl;
335 file <<
"<td class=\"s1\" align=\"center\">QIE</td>" << std::endl;
336 file <<
"<td class=\"s1\" align=\"center\">ADC</td>" << std::endl;
337 file <<
"<td class=\"s1\" align=\"center\">CRATE</td>" << std::endl;
338 file <<
"<td class=\"s1\" align=\"center\">DCC</td>" << std::endl;
339 file <<
"<td class=\"s1\" align=\"center\">SPIGOT</td>" << std::endl;
340 file <<
"<td class=\"s1\" align=\"center\">HTR_FIBER</td>" << std::endl;
341 file <<
"<td class=\"s1\" align=\"center\">HTR_SLOT</td>" << std::endl;
342 file <<
"<td class=\"s1\" align=\"center\">HTR_FPGA</td>" << std::endl;
343 if(
comment[0]!=0) file <<
"<td class=\"s1\" align=\"center\">Comment</td>" << std::endl;
344 file <<
"</tr>" << std::endl;
346 std::string raw_class;
347 file <<
"<tr>"<< std::endl;
349 raw_class=
"<td class=\"s2\" align=\"center\">";
351 raw_class=
"<td class=\"s3\" align=\"center\">";
353 file <<
"<td class=\"s4\" align=\"center\">" << ind+1 <<
"</td>"<< std::endl;
354 file << raw_class<< detid.
ieta()<<
"</td>"<< std::endl;
355 file << raw_class<< detid.
iphi()<<
"</td>"<< std::endl;
356 file << raw_class<< detid.
depth() <<
"</td>"<< std::endl;
357 file << raw_class<< lmap_entry.
rbx()<<
"</td>"<< std::endl;
358 file << raw_class<< lmap_entry.
rm() <<
"</td>"<< std::endl;
359 file << raw_class<< lmap_entry.
pixel()<<
"</td>"<< std::endl;
360 file << raw_class<< lmap_entry.
rmFiber() <<
"</td>"<< std::endl;
361 file << raw_class<< lmap_entry.
fiberChannel()<<
"</td>"<< std::endl;
362 file << raw_class<< lmap_entry.
qieCard() <<
"</td>"<< std::endl;
363 file << raw_class<< lmap_entry.
adc()<<
"</td>"<< std::endl;
365 file << raw_class<< emap_entry.
dccid()<<
"</td>"<< std::endl;
366 file << raw_class<< emap_entry.
spigot()<<
"</td>"<< std::endl;
367 file << raw_class<< emap_entry.
fiberIndex()<<
"</td>"<< std::endl;
368 file << raw_class<< emap_entry.
htrSlot()<<
"</td>"<< std::endl;
369 file << raw_class<< emap_entry.
htrTopBottom()<<
"</td>"<< std::endl;
370 if(
comment[0]!=0) file << raw_class<<
comment<<
"</td>"<< std::endl;
373 file <<
"</table>"<< std::endl;
374 file <<
"</body>"<< std::endl;
375 file <<
"</html>"<< std::endl;
379 std::string
s=
subdir_+
"HcalDetDiagPedestalMonitor Event Number";
384 sscanf((s.substr(2,s.length()-2)).c_str(),
"%d", &
n);
386 if(n<100)
return false;
391 int MissingCnt=0,UnstableCnt=0,BadCnt=0;
392 int HBP[4]={0,0,0,0},HBM[4]={0,0,0,0},HEP[4]={0,0,0,0},HEM[4]={0,0,0,0},HFP[4]={0,0,0,0},HFM[4]={0,0,0,0},HO[4] ={0,0,0,0};
393 int newHBP[4]={0,0,0,0},newHBM[4]={0,0,0,0},newHEP[4]={0,0,0,0},newHEM[4]={0,0,0,0};
394 int newHFP[4]={0,0,0,0},newHFM[4]={0,0,0,0},newHO[4] ={0,0,0,0};
395 if (
debug_>0)
std::cout <<
"<HcalDetDiagPedestalClient::htmlOutput> Preparing html output ..." << std::endl;
401 TH2F *Missing_val[4],*Unstable_val[4],*BadPed_val[4],*BadRMS_val[4];
405 TH1F *PedestalsAve4HB=0;
406 TH1F *PedestalsAve4HE=0;
407 TH1F *PedestalsAve4HO=0;
408 TH1F *PedestalsAve4HF=0;
409 TH1F *PedestalsAve4Simp=0;
411 TH1F *PedestalsAve4HBref=0;
412 TH1F *PedestalsAve4HEref=0;
413 TH1F *PedestalsAve4HOref=0;
414 TH1F *PedestalsAve4HFref=0;
415 TH1F *PedestalsRmsHB=0;
416 TH1F *PedestalsRmsHE=0;
417 TH1F *PedestalsRmsHO=0;
418 TH1F *PedestalsRmsHF=0;
419 TH1F *PedestalsRmsSimp=0;
421 TH1F *PedestalsRmsHBref=0;
422 TH1F *PedestalsRmsHEref=0;
423 TH1F *PedestalsRmsHOref=0;
424 TH1F *PedestalsRmsHFref=0;
426 TH2F *Pedestals2DRmsHBHEHF=0;
427 TH2F *Pedestals2DRmsHO=0;
428 TH2F *Pedestals2DHBHEHF=0;
429 TH2F *Pedestals2DHO=0;
430 TH2F *Pedestals2DErrorHBHEHF=0;
431 TH2F *Pedestals2DErrorHO=0;
433 std::string
s=
subdir_+
"Summary Plots/HB Pedestal Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
434 if(me!=0) PedestalsAve4HB=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4HB,
debug_);
else return;
435 s=
subdir_+
"Summary Plots/HE Pedestal Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
436 if(me!=0) PedestalsAve4HE=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4HE,
debug_);
else return;
437 s=
subdir_+
"Summary Plots/HO Pedestal Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
438 if(me!=0) PedestalsAve4HO=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4HO,
debug_);
else return;
439 s=
subdir_+
"Summary Plots/HF Pedestal Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
440 if(me!=0) PedestalsAve4HF=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4HF,
debug_);
else return;
441 s=
subdir_+
"Summary Plots/SIPM Pedestal Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
442 if(me!=0) PedestalsAve4Simp=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4Simp,
debug_);
else return;
444 s=
subdir_+
"Summary Plots/HB Pedestal-Reference Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
445 if(me!=0) PedestalsAve4HBref=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4HBref,
debug_);
else return;
446 s=
subdir_+
"Summary Plots/HE Pedestal-Reference Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
447 if(me!=0) PedestalsAve4HEref=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4HEref,
debug_);
else return;
448 s=
subdir_+
"Summary Plots/HO Pedestal-Reference Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
449 if(me!=0) PedestalsAve4HOref=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4HOref,
debug_);
else return;
450 s=
subdir_+
"Summary Plots/HF Pedestal-Reference Distribution (average over 4 caps)"; me=
dqmStore_->
get(s.c_str());
451 if(me!=0) PedestalsAve4HFref=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsAve4HFref,
debug_);
else return;
453 s=
subdir_+
"Summary Plots/HB Pedestal RMS Distribution (individual cap)"; me=
dqmStore_->
get(s.c_str());
454 if(me!=0) PedestalsRmsHB=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsHB,
debug_);
else return;
455 s=
subdir_+
"Summary Plots/HE Pedestal RMS Distribution (individual cap)"; me=
dqmStore_->
get(s.c_str());
456 if(me!=0) PedestalsRmsHE=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsHE,
debug_);
else return;
457 s=
subdir_+
"Summary Plots/HO Pedestal RMS Distribution (individual cap)"; me=
dqmStore_->
get(s.c_str());
458 if(me!=0) PedestalsRmsHO=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsHO,
debug_);
else return;
459 s=
subdir_+
"Summary Plots/HF Pedestal RMS Distribution (individual cap)"; me=
dqmStore_->
get(s.c_str());
460 if(me!=0) PedestalsRmsHF=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsHF,
debug_);
else return;
461 s=
subdir_+
"Summary Plots/SIPM Pedestal RMS Distribution (individual cap)"; me=
dqmStore_->
get(s.c_str());
462 if(me!=0) PedestalsRmsSimp=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsSimp,
debug_);
else return;
464 s=
subdir_+
"Summary Plots/HB Pedestal_rms-Reference_rms Distribution"; me=
dqmStore_->
get(s.c_str());
465 if(me!=0) PedestalsRmsHBref=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsHBref,
debug_);
else return;
466 s=
subdir_+
"Summary Plots/HE Pedestal_rms-Reference_rms Distribution"; me=
dqmStore_->
get(s.c_str());
467 if(me!=0) PedestalsRmsHEref=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsHEref,
debug_);
else return;
468 s=
subdir_+
"Summary Plots/HO Pedestal_rms-Reference_rms Distribution"; me=
dqmStore_->
get(s.c_str());
469 if(me!=0) PedestalsRmsHOref=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsHOref,
debug_);
else return;
470 s=
subdir_+
"Summary Plots/HF Pedestal_rms-Reference_rms Distribution"; me=
dqmStore_->
get(s.c_str());
471 if(me!=0) PedestalsRmsHFref=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, PedestalsRmsHFref,
debug_);
else return;
474 if(me!=0) Pedestals2DHBHEHF=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Pedestals2DHBHEHF,
debug_);
else return;
476 if(me!=0) Pedestals2DHO=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Pedestals2DHO,
debug_);
else return;
478 if(me!=0) Pedestals2DRmsHBHEHF=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Pedestals2DRmsHBHEHF,
debug_);
else return;
480 if(me!=0) Pedestals2DRmsHO=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Pedestals2DRmsHO,
debug_);
else return;
482 if(me!=0) Pedestals2DErrorHBHEHF=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Pedestals2DErrorHBHEHF,
debug_);
else return;
484 if(me!=0) Pedestals2DErrorHO=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Pedestals2DErrorHO,
debug_);
else return;
488 for(
int i=0;
i<4;++
i){
489 Missing_val[
i]=Unstable_val[
i]=BadPed_val[
i]=BadRMS_val[
i]=0;
490 std::string s=
subdir_+
"Plots for client/"+name[
i]+
" Missing channels";
492 if (me!=0) Missing_val[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Missing_val[
i],
debug_);
else return;
493 s=
subdir_+
"Plots for client/"+name[
i]+
" Channel instability value";
495 if (me!=0) Unstable_val[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Unstable_val[
i],
debug_);
else return;
496 s=
subdir_+
"Plots for client/"+name[
i]+
" Bad Pedestal-Ref Value";
498 if (me!=0) BadPed_val[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, BadPed_val[
i],
debug_);
else return;
499 s=
subdir_+
"Plots for client/"+name[
i]+
" Bad Rms-ref Value";
501 if (me!=0) BadRMS_val[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, BadRMS_val[
i],
debug_);
else return;
504 for(
int d=0;d<4;++d){
505 int etabins=Missing_val[d]->GetNbinsX();
506 int phibins=Missing_val[d]->GetNbinsY();
509 if(ieta==-9999)
continue;
516 float val=Missing_val[d]->GetBinContent(
eta+1,
phi+1);
519 if(ieta>0){ HBP[0]++;}
else{ HBM[0]++;} MissingCnt++;
523 if(ieta>0){ HEP[0]++;}
else{ HEM[0]++;} MissingCnt++;
527 if(ieta>0){ HFP[0]++;}
else{ HFM[0]++;} MissingCnt++;
531 HO[0]++;MissingCnt++;
535 val=Unstable_val[d]->GetBinContent(
eta+1,
phi+1);
538 if(ieta>0){ HBP[1]++;}
else{ HBM[1]++;} UnstableCnt++;
542 if(ieta>0){ HEP[1]++;}
else{ HEM[1]++;} UnstableCnt++;
546 if(ieta>0){ HFP[1]++;}
else{ HFM[1]++;} UnstableCnt++;
550 HO[1]++;UnstableCnt++;
554 val=BadPed_val[d]->GetBinContent(
eta+1,
phi+1);
557 if(ieta>0){ HBP[2]++;}
else{ HBM[2]++;} BadCnt++;
561 if(ieta>0){ HEP[2]++;}
else{ HEM[2]++;} BadCnt++;
565 if(ieta>0){ HFP[2]++;}
else{ HFM[2]++;} BadCnt++;
573 val=BadRMS_val[d]->GetBinContent(
eta+1,
phi+1);
576 if(ieta>0){ HBP[3]++;}
else{ HBM[3]++;} BadCnt++;
580 if(ieta>0){ HEP[3]++;}
else{ HEM[3]++;} BadCnt++;
584 if(ieta>0){ HFP[3]++;}
else{ HFM[3]++;} BadCnt++;
597 badMissing.open((htmlDir+
"bad_missing_table.html").c_str());
599 ofstream badUnstable;
600 badUnstable.open((htmlDir+
"bad_unstable_table.html").c_str());
603 badPedRMS.open((htmlDir+
"bad_badpedrms_table.html").c_str());
607 if((HBP[0]+HBP[0])>0 && (HBM[0]+HBP[0])!=(1296*2)){
608 badMissing <<
"<tr><td align=\"center\"><h3>"<<
"HB" <<
"</h3></td></tr>" << std::endl;
609 for(
int d=0;d<4;++d){
610 int etabins=Missing_val[d]->GetNbinsX();
611 int phibins=Missing_val[d]->GetNbinsY();
614 if(ieta==-9999)
continue;
616 float val=Missing_val[d]->GetBinContent(
eta+1,
phi+1);
628 if((HEP[0]+HEP[0])>0 && (HEM[0]+HEP[0])!=(1296*2)){
629 badMissing <<
"<tr><td align=\"center\"><h3>"<<
"HE" <<
"</h3></td></tr>" << std::endl;
630 for(
int d=0;d<4;++d){
631 int etabins=Missing_val[d]->GetNbinsX();
632 int phibins=Missing_val[d]->GetNbinsY();
635 if(ieta==-9999)
continue;
637 float val=Missing_val[d]->GetBinContent(
eta+1,
phi+1);
649 if(HO[0]>0 && HO[0]!=2160){
650 badMissing <<
"<tr><td align=\"center\"><h3>"<<
"HO" <<
"</h3></td></tr>" << std::endl;
651 for(
int d=0;d<4;++d){
652 int etabins=Missing_val[d]->GetNbinsX();
653 int phibins=Missing_val[d]->GetNbinsY();
656 if(ieta==-9999)
continue;
658 float val=Missing_val[d]->GetBinContent(
eta+1,
phi+1);
670 if((HFP[0]+HFP[0])>0 && (HFM[0]+HFP[0])!=(864*2)){
671 badMissing <<
"<tr><td align=\"center\"><h3>"<<
"HF" <<
"</h3></td></tr>" << std::endl;
672 for(
int d=0;d<4;++d){
673 int etabins=Missing_val[d]->GetNbinsX();
674 int phibins=Missing_val[d]->GetNbinsY();
677 if(ieta==-9999)
continue;
679 float val=Missing_val[d]->GetBinContent(
eta+1,
phi+1);
692 if((HBP[1]+HBP[1])>0){
693 badUnstable <<
"<tr><td align=\"center\"><h3>"<<
"HB" <<
"</h3></td></tr>" << std::endl;
694 for(
int d=0;d<4;++d){
695 int etabins=Unstable_val[d]->GetNbinsX();
696 int phibins=Unstable_val[d]->GetNbinsY();
699 if(ieta==-9999)
continue;
701 float val=Unstable_val[d]->GetBinContent(
eta+1,
phi+1);
704 char comment[100]; sprintf(comment,
"Missing in %.3f%% of events\n",(1.0-val)*100.0);
714 if((HEP[1]+HEP[1])>0){
715 badUnstable <<
"<tr><td align=\"center\"><h3>"<<
"HE" <<
"</h3></td></tr>" << std::endl;
716 for(
int d=0;d<4;++d){
717 int etabins=Unstable_val[d]->GetNbinsX();
718 int phibins=Unstable_val[d]->GetNbinsY();
721 if(ieta==-9999)
continue;
723 float val=Unstable_val[d]->GetBinContent(
eta+1,
phi+1);
726 char comment[100]; sprintf(comment,
"Missing in %.3f%% of events\n",(1.0-val)*100.0);
737 badUnstable <<
"<tr><td align=\"center\"><h3>"<<
"HO" <<
"</h3></td></tr>" << std::endl;
738 for(
int d=0;d<4;++d){
739 int etabins=Unstable_val[d]->GetNbinsX();
740 int phibins=Unstable_val[d]->GetNbinsY();
743 if(ieta==-9999)
continue;
745 float val=Unstable_val[d]->GetBinContent(
eta+1,
phi+1);
748 char comment[100]; sprintf(comment,
"Missing in %.3f%% of events\n",(1.0-val)*100.0);
758 if((HFP[1]+HFP[1])>0){
759 badUnstable <<
"<tr><td align=\"center\"><h3>"<<
"HF" <<
"</h3></td></tr>" << std::endl;
760 for(
int d=0;d<4;++d){
761 int etabins=Unstable_val[d]->GetNbinsX();
762 int phibins=Unstable_val[d]->GetNbinsY();
765 if(ieta==-9999)
continue;
767 float val=Unstable_val[d]->GetBinContent(
eta+1,
phi+1);
770 char comment[100]; sprintf(comment,
"Missing in %.3f%% of events\n",(1.0-val)*100.0);
781 if((HBP[2]+HBP[2]+HBP[3]+HBP[3])>0){
782 badPedRMS <<
"<tr><td align=\"center\"><h3>"<<
"HB" <<
"</h3></td></tr>" << std::endl;
783 for(
int d=0;d<4;++d){
784 int etabins=BadPed_val[d]->GetNbinsX();
785 int phibins=BadPed_val[d]->GetNbinsY();
788 if(ieta==-9999)
continue;
790 float val1=BadPed_val[d]->GetBinContent(
eta+1,
phi+1);
791 float val2=BadRMS_val[d]->GetBinContent(
eta+1,
phi+1);
792 if(val1==0 && val2==0)
continue;
795 if(val1!=0) sprintf(comment,
"Ped-Ref=%.2f",val1);
796 if(val2!=0) sprintf(comment,
"Rms-Ref=%.2f",val2);
797 if(val1!=0 && val2!=0) sprintf(comment,
"Ped-Ref=%.2f,Rms-Ref=%.2f",val1,val2);
807 if((HEP[2]+HEP[2]+HEP[3]+HEP[3])>0){
808 badPedRMS <<
"<tr><td align=\"center\"><h3>"<<
"HE" <<
"</h3></td></tr>" << std::endl;
809 for(
int d=0;d<4;++d){
810 int etabins=BadPed_val[d]->GetNbinsX();
811 int phibins=BadPed_val[d]->GetNbinsY();
814 if(ieta==-9999)
continue;
816 float val1=BadPed_val[d]->GetBinContent(
eta+1,
phi+1);
817 float val2=BadRMS_val[d]->GetBinContent(
eta+1,
phi+1);
818 if(val1==0 && val2==0)
continue;
821 if(val1!=0) sprintf(comment,
"Ped-Ref=%.2f",val1);
822 if(val2!=0) sprintf(comment,
"Rms-Ref=%.2f",val2);
823 if(val1!=0 && val2!=0) sprintf(comment,
"Ped-Ref=%.2f,Rms-Ref=%.2f",val1,val2);
834 badPedRMS <<
"<tr><td align=\"center\"><h3>"<<
"HO" <<
"</h3></td></tr>" << std::endl;
835 for(
int d=0;d<4;++d){
836 int etabins=BadPed_val[d]->GetNbinsX();
837 int phibins=BadPed_val[d]->GetNbinsY();
840 if(ieta==-9999)
continue;
842 float val1=BadPed_val[d]->GetBinContent(
eta+1,
phi+1);
843 float val2=BadRMS_val[d]->GetBinContent(
eta+1,
phi+1);
844 if(val1==0 && val2==0)
continue;
847 if(val1!=0) sprintf(comment,
"Ped-Ref=%.2f",val1);
848 if(val2!=0) sprintf(comment,
"Rms-Ref=%.2f",val2);
849 if(val1!=0 && val2!=0) sprintf(comment,
"Ped-Ref=%.2f,Rms-Ref=%.2f",val1,val2);
859 if((HFP[2]+HFP[2]+HFP[3]+HFP[3])>0){
860 badPedRMS <<
"<tr><td align=\"center\"><h3>"<<
"HF" <<
"</h3></td></tr>" << std::endl;
861 for(
int d=0;d<4;++d){
862 int etabins=BadPed_val[d]->GetNbinsX();
863 int phibins=BadPed_val[d]->GetNbinsY();
866 if(ieta==-9999)
continue;
868 float val1=BadPed_val[d]->GetBinContent(
eta+1,
phi+1);
869 float val2=BadRMS_val[d]->GetBinContent(
eta+1,
phi+1);
870 if(val1==0 && val2==0)
continue;
873 if(val1!=0) sprintf(comment,
"Ped-Ref=%.2f",val1);
874 if(val2!=0) sprintf(comment,
"Rms-Ref=%.2f",val2);
875 if(val1!=0 && val2!=0) sprintf(comment,
"Ped-Ref=%.2f,Rms-Ref=%.2f",val1,val2);
892 int ievt_ = -1,runNo=-1;
894 s=
subdir_+
"HcalDetDiagPedestalMonitor Event Number";
898 sscanf((s.substr(2,s.length()-2)).c_str(),
"%d", &ievt_);
900 s=
subdir_+
"HcalDetDiagPedestalMonitor Run Number";
904 sscanf((s.substr(2,s.length()-2)).c_str(),
"%d", &runNo);
906 s=
subdir_+
"HcalDetDiagLaserMonitor Reference Run";
911 sscanf((s.substr(2,s.length()-2)).c_str(),
"%s", str);
915 gROOT->SetBatch(
true);
916 gStyle->SetCanvasColor(0);
917 gStyle->SetPadColor(0);
918 gStyle->SetOptStat(111110);
919 gStyle->SetPalette(1);
921 TCanvas *
can=
new TCanvas(
"HcalDetDiagPedestalClient",
"HcalDetDiagPedestalClient",0,0,500,350);
926 htmlFile.open(outfile.c_str());
928 htmlFile <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> " << std::endl;
929 htmlFile <<
"<html> " << std::endl;
930 htmlFile <<
"<head> " << std::endl;
931 htmlFile <<
" <meta content=\"text/html; charset=ISO-8859-1\" " << std::endl;
932 htmlFile <<
" http-equiv=\"content-type\"> " << std::endl;
933 htmlFile <<
" <title>Detector Diagnostics Pedestal Monitor</title> " << std::endl;
934 htmlFile <<
"</head> " << std::endl;
935 htmlFile <<
"<style type=\"text/css\"> td { font-weight: bold } </style>" << std::endl;
936 htmlFile <<
"<style type=\"text/css\">"<< std::endl;
937 htmlFile <<
" td.s0 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FF7700; text-align: center;}"<< std::endl;
938 htmlFile <<
" td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; text-align: center;}"<< std::endl;
939 htmlFile <<
" td.s2 { font-family: arial, arial ce, helvetica; background-color: red; }"<< std::endl;
940 htmlFile <<
" td.s3 { font-family: arial, arial ce, helvetica; background-color: yellow; }"<< std::endl;
941 htmlFile <<
" td.s4 { font-family: arial, arial ce, helvetica; background-color: green; }"<< std::endl;
942 htmlFile <<
" td.s5 { font-family: arial, arial ce, helvetica; background-color: silver; }"<< std::endl;
943 std::string
state[4]={
"<td class=\"s2\" align=\"center\">",
944 "<td class=\"s3\" align=\"center\">",
945 "<td class=\"s4\" align=\"center\">",
946 "<td class=\"s5\" align=\"center\">"};
947 htmlFile <<
"</style>"<< std::endl;
948 htmlFile <<
"<body> " << std::endl;
949 htmlFile <<
"<br> " << std::endl;
950 htmlFile <<
"<h2>Run: " << std::endl;
951 htmlFile <<
" <span " << std::endl;
952 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">" << runNo <<
"</span></h2>" << std::endl;
953 htmlFile <<
"<h2>Monitoring task: <span " << std::endl;
954 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">Detector Diagnostics Pedestal Monitor</span></h2> " << std::endl;
955 htmlFile <<
"<h2>Events processed: <span " << std::endl;
956 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">" << ievt_ <<
"</span></h2>" << std::endl;
957 htmlFile <<
"<hr>" << std::endl;
959 htmlFile <<
"<table width=100% border=1>" << std::endl;
960 htmlFile <<
"<tr>" << std::endl;
961 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">SebDet</td>" << std::endl;
962 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">Missing</td>" << std::endl;
963 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">Unstable</td>" << std::endl;
964 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">Bad |Ped-Ref|</td>" << std::endl;
965 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">Bad |Rms-Ref|</td>" << std::endl;
966 htmlFile <<
"</tr><tr>" << std::endl;
967 int ind1=0,ind2=0,ind3=0,ind4=0;
968 htmlFile <<
"<td class=\"s1\" align=\"center\">HB+</td>" << std::endl;
969 ind1=3;
if(newHBP[0]==0) ind1=2;
if(newHBP[0]>0 && newHBP[0]<=12) ind1=1;
if(newHBP[0]>=12 && newHBP[0]<1296) ind1=0;
970 ind2=3;
if(newHBP[1]==0) ind2=2;
if(newHBP[1]>0) ind2=1;
if(newHBP[1]>21) ind2=0;
971 ind3=3;
if(newHBP[2]==0) ind3=2;
if(newHBP[2]>0) ind3=1;
if(newHBP[2]>21) ind3=0;
972 ind4=3;
if(newHBP[3]==0) ind4=2;
if(newHBP[3]>0) ind4=1;
if(newHBP[3]>21) ind4=0;
973 if(ind1==3) ind2=ind3=ind4=3;
974 if(ind1==0 || ind2==0 || ind3==0 || ind4==0)
status|=2;
else if(ind1==1 || ind2==1 || ind3==1 || ind4==1)
status|=1;
975 htmlFile << state[ind1] << HBP[0] <<
" (1296)</td>" << std::endl;
976 htmlFile << state[ind2] << HBP[1] <<
"</td>" << std::endl;
977 htmlFile << state[ind3] << HBP[2] <<
"</td>" << std::endl;
978 htmlFile << state[ind4] << HBP[3] <<
"</td>" << std::endl;
980 htmlFile <<
"</tr><tr>" << std::endl;
981 htmlFile <<
"<td class=\"s1\" align=\"center\">HB-</td>" << std::endl;
982 ind1=3;
if(newHBM[0]==0) ind1=2;
if(newHBM[0]>0 && newHBM[0]<=12) ind1=1;
if(newHBM[0]>=12 && newHBM[0]<1296) ind1=0;
983 ind2=3;
if(newHBM[1]==0) ind2=2;
if(newHBM[1]>0) ind2=1;
if(newHBM[1]>21) ind2=0;
984 ind3=3;
if(newHBM[2]==0) ind3=2;
if(newHBM[2]>0) ind3=1;
if(newHBM[2]>21) ind3=0;
985 ind4=3;
if(newHBM[3]==0) ind4=2;
if(newHBM[3]>0) ind4=1;
if(newHBM[3]>21) ind4=0;
986 if(ind1==3) ind2=ind3=ind4=3;
987 if(ind1==0 || ind2==0 || ind3==0 || ind4==0)
status|=2;
else if(ind1==1 || ind2==1 || ind3==1 || ind4==1)
status|=1;
988 htmlFile << state[ind1] << HBM[0] <<
" (1296)</td>" << std::endl;
989 htmlFile << state[ind2] << HBM[1] <<
"</td>" << std::endl;
990 htmlFile << state[ind3] << HBM[2] <<
"</td>" << std::endl;
991 htmlFile << state[ind4] << HBM[3] <<
"</td>" << std::endl;
993 htmlFile <<
"</tr><tr>" << std::endl;
994 htmlFile <<
"<td class=\"s1\" align=\"center\">HE+</td>" << std::endl;
995 ind1=3;
if(newHEP[0]==0) ind1=2;
if(newHEP[0]>0 && newHEP[0]<=12) ind1=1;
if(newHEP[0]>=12 && newHEP[0]<1296) ind1=0;
996 ind2=3;
if(newHEP[1]==0) ind2=2;
if(newHEP[1]>0) ind2=1;
if(newHEP[1]>21) ind2=0;
997 ind3=3;
if(newHEP[2]==0) ind3=2;
if(newHEP[2]>0) ind3=1;
if(newHEP[2]>21) ind3=0;
998 ind4=3;
if(newHEP[3]==0) ind4=2;
if(newHEP[3]>0) ind4=1;
if(newHEP[3]>21) ind4=0;
999 if(ind1==3) ind2=ind3=ind4=3;
1000 if(ind1==0 || ind2==0 || ind3==0 || ind4==0)
status|=2;
else if(ind1==1 || ind2==1 || ind3==1 || ind4==1)
status|=1;
1001 htmlFile << state[ind1] << HEP[0] <<
" (1296)</td>" << std::endl;
1002 htmlFile << state[ind2] << HEP[1] <<
"</td>" << std::endl;
1003 htmlFile << state[ind3] << HEP[2] <<
"</td>" << std::endl;
1004 htmlFile << state[ind4] << HEP[3] <<
"</td>" << std::endl;
1006 htmlFile <<
"</tr><tr>" << std::endl;
1007 htmlFile <<
"<td class=\"s1\" align=\"center\">HE-</td>" << std::endl;
1008 ind1=3;
if(newHEM[0]==0) ind1=2;
if(newHEM[0]>0 && newHEM[0]<=12) ind1=1;
if(newHEM[0]>=12 && newHEM[0]<1296) ind1=0;
1009 ind2=3;
if(newHEM[1]==0) ind2=2;
if(newHEM[1]>0) ind2=1;
if(newHEM[1]>21) ind2=0;
1010 ind3=3;
if(newHEM[2]==0) ind3=2;
if(newHEM[2]>0) ind3=1;
if(newHEM[2]>21) ind3=0;
1011 ind4=3;
if(newHEM[3]==0) ind4=2;
if(newHEM[3]>0) ind4=1;
if(newHEM[3]>21) ind4=0;
1012 if(ind1==3) ind2=ind3=ind4=3;
1013 if(ind1==0 || ind2==0 || ind3==0 || ind4==0)
status|=2;
else if(ind1==1 || ind2==1 || ind3==1 || ind4==1)
status|=1;
1014 htmlFile << state[ind1] << HEM[0] <<
" (1296)</td>" << std::endl;
1015 htmlFile << state[ind2] << HEM[1] <<
"</td>" << std::endl;
1016 htmlFile << state[ind3] << HEM[2] <<
"</td>" << std::endl;
1017 htmlFile << state[ind4] << HEM[3] <<
"</td>" << std::endl;
1019 htmlFile <<
"</tr><tr>" << std::endl;
1020 htmlFile <<
"<td class=\"s1\" align=\"center\">HF+</td>" << std::endl;
1021 ind1=3;
if(newHFP[0]==0) ind1=2;
if(newHFP[0]>0 && newHFP[0]<=12) ind1=1;
if(newHFP[0]>=12 && newHFP[0]<864) ind1=0;
1022 ind2=3;
if(newHFP[1]==0) ind2=2;
if(newHFP[1]>0) ind2=1;
if(newHFP[1]>21) ind2=0;
1023 ind3=3;
if(newHFP[2]==0) ind3=2;
if(newHFP[2]>0) ind3=1;
if(newHFP[2]>21) ind3=0;
1024 ind4=3;
if(newHFP[3]==0) ind4=2;
if(newHFP[3]>0) ind4=1;
if(newHFP[3]>21) ind4=0;
1025 if(ind1==3) ind2=ind3=ind4=3;
1026 if(ind1==0 || ind2==0 || ind3==0 || ind4==0)
status|=2;
else if(ind1==1 || ind2==1 || ind3==1 || ind4==1)
status|=1;
1027 htmlFile << state[ind1] << HFP[0] <<
" (864)</td>" << std::endl;
1028 htmlFile << state[ind2] << HFP[1] <<
"</td>" << std::endl;
1029 htmlFile << state[ind3] << HFP[2] <<
"</td>" << std::endl;
1030 htmlFile << state[ind4] << HFP[3] <<
"</td>" << std::endl;
1032 htmlFile <<
"</tr><tr>" << std::endl;
1033 htmlFile <<
"<td class=\"s1\" align=\"center\">HF-</td>" << std::endl;
1034 ind1=3;
if(newHFM[0]==0) ind1=2;
if(newHFM[0]>0 && newHFM[0]<=12) ind1=1;
if(newHFM[0]>=12 && newHFM[0]<864) ind1=0;
1035 ind2=3;
if(newHFM[1]==0) ind2=2;
if(newHFM[1]>0) ind2=1;
if(newHFM[1]>21) ind2=0;
1036 ind3=3;
if(newHFM[2]==0) ind3=2;
if(newHFM[2]>0) ind3=1;
if(newHFM[2]>21) ind3=0;
1037 ind4=3;
if(newHFM[3]==0) ind4=2;
if(newHFM[3]>0) ind4=1;
if(newHFM[3]>21) ind4=0;
1038 if(ind1==3) ind2=ind3=ind4=3;
1039 if(ind1==0 || ind2==0 || ind3==0 || ind4==0)
status|=2;
else if(ind1==1 || ind2==1 || ind3==1 || ind4==1)
status|=1;
1040 htmlFile << state[ind1] << HFM[0] <<
" (864)</td>" << std::endl;
1041 htmlFile << state[ind2] << HFM[1] <<
"</td>" << std::endl;
1042 htmlFile << state[ind3] << HFM[2] <<
"</td>" << std::endl;
1043 htmlFile << state[ind4] << HFM[3] <<
"</td>" << std::endl;
1045 htmlFile <<
"</tr><tr>" << std::endl;
1046 htmlFile <<
"<td class=\"s1\" align=\"center\">HO</td>" << std::endl;
1047 ind1=3;
if(newHO[0]==0) ind1=2;
if(newHO[0]>0 && newHO[0]<=12) ind1=1;
if(newHO[0]>=12 && newHO[0]<2160) ind1=0;
1048 ind2=3;
if(newHO[1]==0) ind2=2;
if(newHO[1]>0) ind2=1;
if(newHO[1]>21) ind2=0;
1049 ind3=3;
if(newHO[2]==0) ind3=2;
if(newHO[2]>0) ind3=1;
if(newHO[2]>21) ind3=0;
1050 ind4=3;
if(newHO[3]==0) ind4=2;
if(newHO[3]>0) ind4=1;
if(newHO[3]>21) ind4=0;
1051 if(ind1==3) ind2=ind3=ind4=3;
1052 if(ind1==0 || ind2==0 || ind3==0 || ind4==0)
status|=2;
else if(ind1==1 || ind2==1 || ind3==1 || ind4==1)
status|=1;
1053 htmlFile << state[ind1] << HO[0] <<
" (2160)</td>" << std::endl;
1054 htmlFile << state[ind2] << HO[1] <<
"</td>" << std::endl;
1055 htmlFile << state[ind3] << HO[2] <<
"</td>" << std::endl;
1056 htmlFile << state[ind4] << HO[3] <<
"</td>" << std::endl;
1058 htmlFile <<
"</tr></table>" << std::endl;
1059 htmlFile <<
"<hr>" << std::endl;
1061 if((MissingCnt+UnstableCnt+BadCnt)>0){
1062 htmlFile <<
"<table width=100% border=1><tr>" << std::endl;
1063 if(MissingCnt>0) htmlFile <<
"<td><a href=\"" <<
"bad_missing_table.html" <<
"\">list of missing channels</a></td>";
1064 if(UnstableCnt>0) htmlFile <<
"<td><a href=\"" <<
"bad_unstable_table.html" <<
"\">list of unstable channels</a></td>";
1065 if(BadCnt>0) htmlFile <<
"<td><a href=\"" <<
"bad_badpedrms_table.html" <<
"\">list of bad pedestal/rms channels</a></td>";
1066 htmlFile <<
"</tr></table>" << std::endl;
1075 htmlFile <<
"<h2 align=\"center\">Summary plots</h2>" << std::endl;
1076 htmlFile <<
"<table width=100% border=0><tr>" << std::endl;
1077 htmlFile <<
"<tr align=\"left\">" << std::endl;
1078 Pedestals2DHBHEHF->SetStats(0);
1079 Pedestals2DHBHEHF->SetMaximum(5);
1080 Pedestals2DHBHEHF->SetNdivisions(36,
"Y");
1081 Pedestals2DHBHEHF->Draw(
"COLZ");
1082 can->SaveAs((htmlDir +
"hbhehf_pedestal_map.gif").c_str());
1083 htmlFile <<
"<td><img src=\"hbhehf_pedestal_map.gif\" alt=\"hbhehf pedestal mean map\"> </td>" << std::endl;
1084 Pedestals2DHO->SetStats(0);
1085 Pedestals2DHO->SetMaximum(5);
1086 Pedestals2DHO->SetNdivisions(36,
"Y");
1087 Pedestals2DHO->Draw(
"COLZ");
1088 can->SaveAs((htmlDir +
"ho_pedestal_map.gif").c_str());
1089 htmlFile <<
"<td><img src=\"ho_pedestal_map.gif\" alt=\"ho pedestal mean map\"> </td>" << std::endl;
1090 htmlFile <<
"</tr>" << std::endl;
1092 htmlFile <<
"<tr align=\"left\">" << std::endl;
1093 Pedestals2DRmsHBHEHF->SetStats(0);
1094 Pedestals2DRmsHBHEHF->SetMaximum(2);
1095 Pedestals2DRmsHBHEHF->SetNdivisions(36,
"Y");
1096 Pedestals2DRmsHBHEHF->Draw(
"COLZ");
1097 can->SaveAs((htmlDir +
"hbhehf_rms_map.gif").c_str());
1098 htmlFile <<
"<td><img src=\"hbhehf_rms_map.gif\" alt=\"hbhehf pedestal rms map\"> </td>" << std::endl;
1099 Pedestals2DRmsHO->SetStats(0);
1100 Pedestals2DRmsHO->SetMaximum(2);
1101 Pedestals2DRmsHO->SetNdivisions(36,
"Y");
1102 Pedestals2DRmsHO->Draw(
"COLZ");
1103 can->SaveAs((htmlDir +
"ho_rms_map.gif").c_str());
1104 htmlFile <<
"<td><img src=\"ho_rms_map.gif\" alt=\"ho pedestal rms map\"> </td>" << std::endl;
1105 htmlFile <<
"</tr>" << std::endl;
1107 htmlFile <<
"<tr align=\"left\">" << std::endl;
1108 Pedestals2DErrorHBHEHF->SetStats(0);
1109 Pedestals2DErrorHBHEHF->SetNdivisions(36,
"Y");
1110 Pedestals2DErrorHBHEHF->Draw(
"COLZ");
1111 can->SaveAs((htmlDir +
"hbhehf_error_map.gif").c_str());
1112 htmlFile <<
"<td><img src=\"hbhehf_error_map.gif\" alt=\"hbhehf pedestal error map\"> </td>" << std::endl;
1113 Pedestals2DErrorHO->SetStats(0);
1114 Pedestals2DErrorHO->SetNdivisions(36,
"Y");
1115 Pedestals2DErrorHO->Draw(
"COLZ");
1116 can->SaveAs((htmlDir +
"ho_error_map.gif").c_str());
1117 htmlFile <<
"<td><img src=\"ho_error_map.gif\" alt=\"ho pedestal error map\"> </td>" << std::endl;
1118 htmlFile <<
"</tr>" << std::endl;
1119 htmlFile <<
"</table>" << std::endl;
1120 htmlFile <<
"<hr>" << std::endl;
1123 htmlFile <<
"<h2 align=\"center\">HB Pedestal plots (Reference run "<<ref_run<<
")</h2>" << std::endl;
1124 htmlFile <<
"<table width=100% border=0><tr>" << std::endl;
1125 htmlFile <<
"<tr align=\"left\">" << std::endl;
1126 if(PedestalsAve4HB->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1127 PedestalsAve4HB->Draw();
1128 can->SaveAs((htmlDir +
"hb_pedestal_distribution.gif").c_str());
1129 htmlFile <<
"<td><img src=\"hb_pedestal_distribution.gif\" alt=\"hb pedestal mean\"> </td>" << std::endl;
1130 if(PedestalsRmsHB->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1131 PedestalsRmsHB->Draw();
1132 can->SaveAs((htmlDir +
"hb_pedestal_rms_distribution.gif").c_str());
1133 htmlFile <<
"<td><img src=\"hb_pedestal_rms_distribution.gif\" alt=\"hb pedestal rms mean\"> </td>" << std::endl;
1134 htmlFile <<
"</tr>" << std::endl;
1136 htmlFile <<
"<tr align=\"left\">" << std::endl;
1137 if(PedestalsAve4HBref->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1138 PedestalsAve4HBref->Draw();
1139 can->SaveAs((htmlDir +
"hb_pedestal_ref_distribution.gif").c_str());
1140 htmlFile <<
"<td><img src=\"hb_pedestal_ref_distribution.gif\" alt=\"hb pedestal-reference mean\"> </td>" << std::endl;
1141 if(PedestalsRmsHBref->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1142 PedestalsRmsHBref->Draw();
1143 can->SaveAs((htmlDir +
"hb_pedestal_rms_ref_distribution.gif").c_str());
1144 htmlFile <<
"<td><img src=\"hb_pedestal_rms_ref_distribution.gif\" alt=\"hb pedestal rms-reference mean\"> </td>" << std::endl;
1145 htmlFile <<
"</tr>" << std::endl;
1146 htmlFile <<
"</table>" << std::endl;
1148 htmlFile <<
"<h2 align=\"center\">HE Pedestal plots (Reference run "<<ref_run<<
")</h2>" << std::endl;
1149 htmlFile <<
"<table width=100% border=0><tr>" << std::endl;
1150 htmlFile <<
"<tr align=\"left\">" << std::endl;
1151 if(PedestalsAve4HE->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1152 PedestalsAve4HE->Draw();
1153 can->SaveAs((htmlDir +
"he_pedestal_distribution.gif").c_str());
1154 htmlFile <<
"<td><img src=\"he_pedestal_distribution.gif\" alt=\"he pedestal mean\"> </td>" << std::endl;
1155 if(PedestalsRmsHE->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1156 PedestalsRmsHE->Draw();
1157 can->SaveAs((htmlDir +
"he_pedestal_rms_distribution.gif").c_str());
1158 htmlFile <<
"<td><img src=\"he_pedestal_rms_distribution.gif\" alt=\"he pedestal rms mean\"> </td>" << std::endl;
1159 htmlFile <<
"</tr>" << std::endl;
1161 htmlFile <<
"<tr align=\"left\">" << std::endl;
1162 if(PedestalsAve4HEref->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1163 PedestalsAve4HEref->Draw();
1164 can->SaveAs((htmlDir +
"he_pedestal_ref_distribution.gif").c_str());
1165 htmlFile <<
"<td><img src=\"he_pedestal_ref_distribution.gif\" alt=\"he pedestal-reference mean\"> </td>" << std::endl;
1166 if(PedestalsRmsHEref->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1167 PedestalsRmsHEref->Draw();
1168 can->SaveAs((htmlDir +
"he_pedestal_rms_ref_distribution.gif").c_str());
1169 htmlFile <<
"<td><img src=\"he_pedestal_rms_ref_distribution.gif\" alt=\"he pedestal rms-reference mean\"> </td>" << std::endl;
1170 htmlFile <<
"</tr>" << std::endl;
1171 htmlFile <<
"</table>" << std::endl;
1173 htmlFile <<
"<h2 align=\"center\">HO Pedestal plots (Reference run "<<ref_run<<
")</h2>" << std::endl;
1174 htmlFile <<
"<table width=100% border=0><tr>" << std::endl;
1175 htmlFile <<
"<tr align=\"left\">" << std::endl;
1176 if(PedestalsAve4HO->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1177 PedestalsAve4HO->Draw();
1178 can->SaveAs((htmlDir +
"ho_pedestal_distribution.gif").c_str());
1179 htmlFile <<
"<td><img src=\"ho_pedestal_distribution.gif\" alt=\"ho pedestal mean\"> </td>" << std::endl;
1180 if(PedestalsRmsHO->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1181 PedestalsRmsHO->Draw();
1182 can->SaveAs((htmlDir +
"ho_pedestal_rms_distribution.gif").c_str());
1183 htmlFile <<
"<td><img src=\"ho_pedestal_rms_distribution.gif\" alt=\"ho pedestal rms mean\"> </td>" << std::endl;
1184 htmlFile <<
"</tr>" << std::endl;
1186 htmlFile <<
"<tr align=\"left\">" << std::endl;
1187 if(PedestalsAve4Simp->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1188 PedestalsAve4Simp->Draw();
1189 can->SaveAs((htmlDir +
"sipm_pedestal_distribution.gif").c_str());
1190 htmlFile <<
"<td><img src=\"sipm_pedestal_distribution.gif\" alt=\"sipm pedestal mean\"> </td>" << std::endl;
1191 if(PedestalsRmsSimp->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1192 PedestalsRmsSimp->Draw();
1193 can->SaveAs((htmlDir +
"simp_pedestal_rms_distribution.gif").c_str());
1194 htmlFile <<
"<td><img src=\"simp_pedestal_rms_distribution.gif\" alt=\"sipm pedestal rms mean\"> </td>" << std::endl;
1195 htmlFile <<
"</tr>" << std::endl;
1197 htmlFile <<
"<tr align=\"left\">" << std::endl;
1198 if(PedestalsAve4HOref->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1199 PedestalsAve4HOref->Draw();
1200 can->SaveAs((htmlDir +
"ho_pedestal_ref_distribution.gif").c_str());
1201 htmlFile <<
"<td><img src=\"ho_pedestal_ref_distribution.gif\" alt=\"ho pedestal-reference mean\"> </td>" << std::endl;
1202 if(PedestalsRmsHOref->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1203 PedestalsRmsHOref->Draw();
1204 can->SaveAs((htmlDir +
"ho_pedestal_rms_ref_distribution.gif").c_str());
1205 htmlFile <<
"<td><img src=\"ho_pedestal_rms_ref_distribution.gif\" alt=\"ho pedestal rms-reference mean\"> </td>" << std::endl;
1206 htmlFile <<
"</tr>" << std::endl;
1207 htmlFile <<
"</table>" << std::endl;
1210 htmlFile <<
"<h2 align=\"center\">HF Pedestal plots (Reference run "<<ref_run<<
")</h2>" << std::endl;
1211 htmlFile <<
"<table width=100% border=0><tr>" << std::endl;
1212 htmlFile <<
"<tr align=\"left\">" << std::endl;
1213 if(PedestalsAve4HF->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1214 PedestalsAve4HF->Draw();
1215 can->SaveAs((htmlDir +
"hf_pedestal_distribution.gif").c_str());
1216 htmlFile <<
"<td><img src=\"hf_pedestal_distribution.gif\" alt=\"hf pedestal mean\"> </td>" << std::endl;
1217 if(PedestalsRmsHF->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1218 PedestalsRmsHF->Draw();
1219 can->SaveAs((htmlDir +
"hf_pedestal_rms_distribution.gif").c_str());
1220 htmlFile <<
"<td><img src=\"hf_pedestal_rms_distribution.gif\" alt=\"hf pedestal rms mean\"> </td>" << std::endl;
1221 htmlFile <<
"</tr>" << std::endl;
1223 htmlFile <<
"<tr align=\"left\">" << std::endl;
1224 if(PedestalsAve4HFref->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1225 PedestalsAve4HFref->Draw();
1226 can->SaveAs((htmlDir +
"hf_pedestal_ref_distribution.gif").c_str());
1227 htmlFile <<
"<td><img src=\"hf_pedestal_ref_distribution.gif\" alt=\"hf pedestal-reference mean\"> </td>" << std::endl;
1228 if(PedestalsRmsHFref->GetMaximum()>0) can->SetLogy(1);
else can->SetLogy(0);
1229 PedestalsRmsHFref->Draw();
1230 can->SaveAs((htmlDir +
"hf_pedestal_rms_ref_distribution.gif").c_str());
1231 htmlFile <<
"<td><img src=\"hf_pedestal_rms_ref_distribution.gif\" alt=\"hf pedestal rms-reference mean\"> </td>" << std::endl;
1232 htmlFile <<
"</tr>" << std::endl;
1233 htmlFile <<
"</table>" << std::endl;
1236 htmlFile <<
"</body> " << std::endl;
1237 htmlFile <<
"</html> " << std::endl;
bool isHO(int etabin, int depth)
T getUntrackedParameter(std::string const &, T const &) const
const std::string & getName(void) const
get name of ME
MonitorElement * ProblemCells
int fiberIndex() const
get the fiber index [1-8] (which of eight fibers carried by a spigot) (valid only for non-trigger-cha...
void setBinContent(int binx, double content)
set content of bin (1-D)
bool hasErrors_Temp(void)
HcalLogicalMap createMap(unsigned int mapIOV=5)
void calculateProblems(void)
std::vector< std::string > HcalEtaPhiHistNames()
int htrSlot() const
get the htr slot
void setup(DQMStore *&m_dbe, std::string Name, std::string Units="")
bool isHE(int etabin, int depth)
int readoutVMECrateId() const
get the readout VME crate number
int depth() const
get the tower depth
std::vector< MonitorElement * > depth
int CalcIeta(int subdet, int eta, int depth)
static void printTableTail(ofstream &file)
int htrTopBottom() const
get the htr top/bottom (1=top/0=bottom)
std::vector< std::string > problemnames_
EtaPhiHists * ProblemCellsByDepth
int ieta() const
get the cell ieta
int dccid() const
get the (Hcal local) DCC id
MonitorElement * get(const std::string &path) const
get ME from full pathname (e.g. "my/long/dir/my_histo")
bool isHB(int etabin, int depth)
int spigot() const
get the spigot (input number on DCC)
std::string valueString(void) const
int iphi() const
get the cell iphi
HcalDetDiagPedestalClient()
Constructors.
bool isHF(int etabin, int depth)
std::map< HcalDetId, unsigned int > badstatusmap
void FillUnphysicalHEHFBins(std::vector< TH2F > &hh)
double getBinContent(int binx) const
get content of bin (1-D)
~HcalDetDiagPedestalClient()
Destructor.
static void printTableHeader(ofstream &file, std::string header)
static void printTableLine(ofstream &file, int ind, HcalDetId &detid, HcalFrontEndId &lmap_entry, HcalElectronicsId &emap_entry, std::string comment="")
void showDirStructure(void) const
int badChannelStatusMask_
bool hasWarnings_Temp(void)
TH2F * getTH2F(void) const
void updateChannelStatus(std::map< HcalDetId, unsigned int > &myqual)
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
void htmlOutput(std::string)
void Reset(void)
reset ME (ie. contents, errors, etc)
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
void setCurrentFolder(const std::string &fullpath)