378 if (
debug_>0)
std::cout <<
"<HcalDetDiagLaserClient::htmlOutput> dqmStore object does not exist!"<<std::endl;
381 if(
debug_>2)
std::cout <<
"\t<HcalDetDiagLaserClient::htmlOutput> Preparing html for task: "<<
name_<<std::endl;
393 TH1F *hbheEnergyRMS=0;
394 TH1F *hbheTimingRMS=0;
407 TH2F *Time2Dhbhehf=0;
409 TH2F *Energy2Dhbhehf=0;
411 TH2F *refTime2Dhbhehf=0;
413 TH2F *refEnergy2Dhbhehf=0;
414 TH2F *refEnergy2Dho=0;
415 int HBpresent_=0,HEpresent_=0,HOpresent_=0,HFpresent_=0;
428 if(me!=0) hbheEnergy=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hbheEnergy,
debug_);
else return;
430 if(me!=0) hbheTiming=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hbheTiming,
debug_);
else return;
431 s=
subdir_+
"Summary Plots/HBHE Laser Energy RMS_div_Energy Distribution"; me=
dqmStore_->
get(s.c_str());
432 if(me!=0) hbheEnergyRMS= HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hbheEnergyRMS,
debug_);
else return;
433 s=
subdir_+
"Summary Plots/HBHE Laser Timing RMS Distribution"; me=
dqmStore_->
get(s.c_str());
434 if(me!=0) hbheTimingRMS= HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hbheTimingRMS,
debug_);
else return;
436 if(me!=0) hoEnergy = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hoEnergy,
debug_);
else return;
438 if(me!=0) hoTiming = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hoTiming,
debug_);
else return;
439 s=
subdir_+
"Summary Plots/HO Laser Energy RMS_div_Energy Distribution"; me=
dqmStore_->
get(s.c_str());
440 if(me!=0) hoEnergyRMS = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hoEnergyRMS,
debug_);
else return;
442 if(me!=0) hoTimingRMS = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hoTimingRMS,
debug_);
else return;
444 if(me!=0) hfEnergy = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hfEnergy,
debug_);
else return;
446 if(me!=0) hfTiming = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hfTiming,
debug_);
else return;
447 s=
subdir_+
"Summary Plots/HF Laser Energy RMS_div_Energy Distribution"; me=
dqmStore_->
get(s.c_str());
448 if(me!=0) hfEnergyRMS = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hfEnergyRMS,
debug_);
else return;
450 if(me!=0) hfTimingRMS = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hfTimingRMS,
debug_);
else return;
453 if(me!=0) hb = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hb,
debug_);
else return;
455 if(me!=0) he = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, he,
debug_);
else return;
457 if(me!=0) ho = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, ho,
debug_);
else return;
459 if(me!=0) hf = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hf,
debug_);
else return;
462 if(me!=0) Time2Dhbhehf = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Time2Dhbhehf,
debug_);
else return;
464 if(me!=0) Time2Dho = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Time2Dho,
debug_);
else return;
466 if(me!=0) Energy2Dhbhehf= HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Energy2Dhbhehf,
debug_);
else return;
468 if(me!=0) Energy2Dho = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Energy2Dho,
debug_);
else return;
470 if(me!=0) refTime2Dhbhehf = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, refTime2Dhbhehf,
debug_);
else return;
472 if(me!=0) refTime2Dho = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, refTime2Dho,
debug_);
else return;
474 if(me!=0) refEnergy2Dhbhehf= HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, refEnergy2Dhbhehf,
debug_);
else return;
476 if(me!=0) refEnergy2Dho = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, refEnergy2Dho,
debug_);
else return;
480 for(
int i=0;
i<56;
i++){
483 if(me!=0) Raddam[
i] = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, Raddam[
i],
debug_);
484 Raddam[
i]->SetXTitle(
"TS");
485 Raddam[
i]->SetTitle(str);
488 int ievt_ = -1,runNo=-1;
489 s=
subdir_+
"HcalDetDiagLaserMonitor Event Number";
493 sscanf((s.substr(2,s.length()-2)).c_str(),
"%d", &ievt_);
495 s=
subdir_+
"HcalDetDiagLaserMonitor Run Number";
499 sscanf((s.substr(2,s.length()-2)).c_str(),
"%d", &runNo);
501 s=
subdir_+
"HcalDetDiagLaserMonitor Reference Run";
506 sscanf((s.substr(2,s.length()-2)).c_str(),
"%s", str);
527 TH2F* BadTiming_val[4];
528 TH2F* BadEnergy_val[4];
530 for(
int i=0;
i<4;++
i){
533 string s=
subdir_+
"Plots for client/"+name[
i]+
" Laser Timing difference";
535 if (me!=0) BadTiming_val[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, BadTiming_val[
i],
debug_);
else return;
536 s=
subdir_+
"Plots for client/"+name[
i]+
" Laser Energy difference";
538 if (me!=0) BadEnergy_val[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, BadEnergy_val[
i],
debug_);
else return;
543 badTiming.open((htmlDir+
"bad_timing_table.html").c_str());
546 badEnergy.open((htmlDir+
"bad_energy_table.html").c_str());
549 for(
int d=0;d<4;++d){
550 int etabins=BadTiming_val[d]->GetNbinsX();
551 int phibins=BadTiming_val[d]->GetNbinsY();
554 if(ieta==-9999)
continue;
561 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
564 if(ieta>0){ HBP[0]++;}
else{ HBM[0]++;} badT++;
568 if(ieta>0){ HEP[0]++;}
else{ HEM[0]++;} badT++;
572 if(ieta>0){ HFP[0]++;}
else{ HFM[0]++;} badT++;
580 val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
583 if(ieta>0){ HBP[1]++;}
else{ HBM[1]++;} badE++;
587 if(ieta>0){ HEP[1]++;}
else{ HEM[1]++;} badE++;
591 if(ieta>0){ HFP[1]++;}
else{ HFM[1]++;} badE++;
604 if((HBP[0]+HBM[0])>0){
605 badTiming <<
"<tr><td align=\"center\"><h3>"<<
"HB" <<
"</h3></td></tr>" << endl;
606 for(
int d=0;d<4;++d){
607 int etabins=BadTiming_val[d]->GetNbinsX();
608 int phibins=BadTiming_val[d]->GetNbinsY();
611 if(ieta==-9999)
continue;
613 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
618 sprintf(str,
"Time-Ref=%.2f",val);
624 if((HEP[0]+HEM[0])>0){
625 badTiming <<
"<tr><td align=\"center\"><h3>"<<
"HE" <<
"</h3></td></tr>" << endl;
626 for(
int d=0;d<4;++d){
627 int etabins=BadTiming_val[d]->GetNbinsX();
628 int phibins=BadTiming_val[d]->GetNbinsY();
631 if(ieta==-9999)
continue;
633 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
638 sprintf(str,
"Time-Ref=%.2f",val);
645 badTiming <<
"<tr><td align=\"center\"><h3>"<<
"HO" <<
"</h3></td></tr>" << endl;
646 for(
int d=0;d<4;++d){
647 int etabins=BadTiming_val[d]->GetNbinsX();
648 int phibins=BadTiming_val[d]->GetNbinsY();
651 if(ieta==-9999)
continue;
653 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
658 sprintf(str,
"Time-Ref=%.2f",val);
664 if((HFP[0]+HFM[0])>0){
665 badTiming <<
"<tr><td align=\"center\"><h3>"<<
"HF" <<
"</h3></td></tr>" << endl;
666 for(
int d=0;d<4;++d){
667 int etabins=BadTiming_val[d]->GetNbinsX();
668 int phibins=BadTiming_val[d]->GetNbinsY();
671 if(ieta==-9999)
continue;
673 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
678 sprintf(str,
"Time-Ref=%.2f",val);
685 if((HBP[1]+HBM[1])>0){
686 badEnergy <<
"<tr><td align=\"center\"><h3>"<<
"HB" <<
"</h3></td></tr>" << endl;
687 for(
int d=0;d<4;++d){
688 int etabins=BadEnergy_val[d]->GetNbinsX();
689 int phibins=BadEnergy_val[d]->GetNbinsY();
692 if(ieta==-9999)
continue;
694 float val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
699 sprintf(str,
"Energy/Ref=%.2f",val);
705 if((HEP[1]+HEM[1])>0){
706 badEnergy <<
"<tr><td align=\"center\"><h3>"<<
"HE" <<
"</h3></td></tr>" << endl;
707 for(
int d=0;d<4;++d){
708 int etabins=BadEnergy_val[d]->GetNbinsX();
709 int phibins=BadEnergy_val[d]->GetNbinsY();
712 if(ieta==-9999)
continue;
714 float val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
719 sprintf(str,
"Energy/Ref=%.2f",val);
726 badEnergy <<
"<tr><td align=\"center\"><h3>"<<
"HO" <<
"</h3></td></tr>" << endl;
727 for(
int d=0;d<4;++d){
728 int etabins=BadEnergy_val[d]->GetNbinsX();
729 int phibins=BadEnergy_val[d]->GetNbinsY();
732 if(ieta==-9999)
continue;
734 float val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
739 sprintf(str,
"Energy/Ref=%.2f",val);
745 if((HFP[1]+HFM[1])>0){
746 badEnergy <<
"<tr><td align=\"center\"><h3>"<<
"HF" <<
"</h3></td></tr>" << endl;
747 for(
int d=0;d<4;++d){
748 int etabins=BadEnergy_val[d]->GetNbinsX();
749 int phibins=BadEnergy_val[d]->GetNbinsY();
752 if(ieta==-9999)
continue;
754 float val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
759 sprintf(str,
"Energy/Ref=%.2f",val);
773 htmlFile.open(outfile.c_str());
775 gROOT->SetBatch(
true);
776 gStyle->SetCanvasColor(0);
777 gStyle->SetPadColor(0);
778 gStyle->SetOptStat(111110);
779 gStyle->SetPalette(1);
780 TCanvas *can=
new TCanvas(
"HcalDetDiagLaserClient",
"HcalDetDiagLaserClient",0,0,500,350);
783 if(Raddam[0]->GetEntries()>0){
785 RADDAM.open((htmlDir +
"RADDAM_"+name_).c_str());
786 RADDAM <<
"</html><html xmlns=\"http://www.w3.org/1999/xhtml\">"<< endl;
787 RADDAM <<
"<head>"<< endl;
788 RADDAM <<
"<meta http-equiv=\"Content-Type\" content=\"text/html\"/>"<< endl;
789 RADDAM <<
"<title>"<<
"RADDAM channels" <<
"</title>"<< endl;
790 RADDAM <<
"<style type=\"text/css\">"<< endl;
791 RADDAM <<
" body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"<< endl;
792 RADDAM <<
" td.s0 { font-family: arial, arial ce, helvetica; }"<< endl;
793 RADDAM <<
" td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; text-align: center;}"<< endl;
794 RADDAM <<
" td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }"<< endl;
795 RADDAM <<
" td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }"<< endl;
796 RADDAM <<
" td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }"<< endl;
797 RADDAM <<
"</style>"<< endl;
798 RADDAM <<
"<body>"<< endl;
799 RADDAM <<
"<h2>Run "<< runNo<<
": RADDAM channels event shape </h2>" << endl;
800 RADDAM <<
"<table>"<< endl;
803 for(
int i=0;
i<28;
i++){
804 RADDAM <<
"<tr align=\"left\">" << endl;
807 Raddam[2*
i]->Draw(); sprintf(str,
"%02d",2*
i); can->SaveAs((htmlDir +
"raddam_ch"+str+
".gif").c_str());
808 Raddam[2*
i+1]->Draw(); sprintf(str,
"%02d",2*
i+1); can->SaveAs((htmlDir +
"raddam_ch"+str+
".gif").c_str());
809 sprintf(str,
"raddam_ch%02d.gif",2*
i);
810 RADDAM <<
"<td align=\"center\"><img src=\""<<str<<
"\" alt=\"raddam channel\"> </td>" << endl;
811 sprintf(str,
"raddam_ch%02d.gif",2*
i+1);
812 RADDAM <<
"<td align=\"center\"><img src=\""<<str<<
"\" alt=\"raddam channel\"> </td>" << endl;
813 RADDAM <<
"</tr>" << endl;
816 RADDAM <<
"</table>"<< endl;
817 RADDAM <<
"</body>"<< endl;
818 RADDAM <<
"</html>"<< endl;
822 Time2Dhbhehf->SetXTitle(
"i#eta");
823 Time2Dhbhehf->SetYTitle(
"i#phi");
824 Time2Dho->SetXTitle(
"i#eta");
825 Time2Dho->SetYTitle(
"i#phi");
826 Energy2Dhbhehf->SetXTitle(
"i#eta");
827 Energy2Dhbhehf->SetYTitle(
"i#phi");
828 Energy2Dho->SetXTitle(
"i#eta");
829 Energy2Dho->SetYTitle(
"i#phi");
830 refTime2Dhbhehf->SetXTitle(
"i#eta");
831 refTime2Dhbhehf->SetYTitle(
"i#phi");
832 refTime2Dho->SetXTitle(
"i#eta");
833 refTime2Dho->SetYTitle(
"i#phi");
834 refEnergy2Dhbhehf->SetXTitle(
"i#eta");
835 refEnergy2Dhbhehf->SetYTitle(
"i#phi");
836 refEnergy2Dho->SetXTitle(
"i#eta");
837 refEnergy2Dho->SetYTitle(
"i#phi");
838 refTime2Dhbhehf->SetMinimum(0);
839 refTime2Dhbhehf->SetMaximum(2);
840 refTime2Dho->SetMinimum(0);
841 refTime2Dho->SetMaximum(2);
842 refEnergy2Dhbhehf->SetMinimum(0.5);
843 refEnergy2Dhbhehf->SetMaximum(1.5);
844 refEnergy2Dho->SetMinimum(0.5);
845 refEnergy2Dho->SetMaximum(1.5);
847 Time2Dhbhehf->SetNdivisions(36,
"Y");
848 Time2Dho->SetNdivisions(36,
"Y");
849 Energy2Dhbhehf->SetNdivisions(36,
"Y");
850 Energy2Dho->SetNdivisions(36,
"Y");
851 refTime2Dhbhehf->SetNdivisions(36,
"Y");
852 refTime2Dho->SetNdivisions(36,
"Y");
853 refEnergy2Dhbhehf->SetNdivisions(36,
"Y");
854 refEnergy2Dho->SetNdivisions(36,
"Y");
857 htmlFile <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> " << endl;
858 htmlFile <<
"<html> " << endl;
859 htmlFile <<
"<head> " << endl;
860 htmlFile <<
" <meta content=\"text/html; charset=ISO-8859-1\" " << endl;
861 htmlFile <<
" http-equiv=\"content-type\"> " << endl;
862 htmlFile <<
" <title>Detector Diagnostics Laser Monitor</title> " << endl;
863 htmlFile <<
"</head> " << endl;
864 htmlFile <<
"<style type=\"text/css\"> td { font-weight: bold } </style>" << endl;
866 htmlFile <<
"<style type=\"text/css\">"<< endl;
867 htmlFile <<
" td.s0 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FF7700; text-align: center;}"<< endl;
868 htmlFile <<
" td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; text-align: center;}"<< endl;
869 htmlFile <<
" td.s2 { font-family: arial, arial ce, helvetica; background-color: red; }"<< endl;
870 htmlFile <<
" td.s3 { font-family: arial, arial ce, helvetica; background-color: yellow; }"<< endl;
871 htmlFile <<
" td.s4 { font-family: arial, arial ce, helvetica; background-color: green; }"<< endl;
872 htmlFile <<
" td.s5 { font-family: arial, arial ce, helvetica; background-color: silver; }"<< endl;
873 std::string
state[4]={
"<td class=\"s2\" align=\"center\">",
874 "<td class=\"s3\" align=\"center\">",
875 "<td class=\"s4\" align=\"center\">",
876 "<td class=\"s5\" align=\"center\">"};
877 htmlFile <<
"</style>"<< endl;
879 htmlFile <<
"<body> " << endl;
880 htmlFile <<
"<br> " << endl;
881 htmlFile <<
"<h2>Run: " << endl;
882 htmlFile <<
" <span " << endl;
883 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">" << runNo <<
"</span></h2>" << endl;
884 htmlFile <<
"<h2>Monitoring task: <span " << endl;
885 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">Detector Diagnostics Laser Monitor</span></h2> " << endl;
886 htmlFile <<
"<h2>Events processed: <span " << endl;
887 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">" << ievt_ <<
"</span></h2>" << endl;
888 htmlFile <<
"<hr>" << endl;
890 htmlFile <<
"<table width=100% border=1>" << endl;
891 htmlFile <<
"<tr>" << endl;
892 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">SebDet</td>" << endl;
893 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">Bad Timing</td>" << endl;
894 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">Bad Energy</td>" << endl;
895 htmlFile <<
"</tr><tr>" << endl;
897 htmlFile <<
"<td class=\"s1\" align=\"center\">HB+</td>" << endl;
898 if(HBP[0]==0) ind1=2;
if(HBP[0]>0 && HBP[0]<=12) ind1=1;
if(HBP[0]>12) ind1=0;
899 if(HBP[1]==0) ind2=2;
if(HBP[1]>0 && HBP[1]<=12) ind2=1;
if(HBP[1]>12) ind2=0;
900 if(!HBpresent_) ind1=ind2=3;
901 htmlFile << state[ind1] << HBP[0] <<
"</td>" << endl;
902 htmlFile << state[ind2] << HBP[1] <<
"</td>" << endl;
903 htmlFile <<
"</tr><tr>" << endl;
904 htmlFile <<
"<td class=\"s1\" align=\"center\">HB-</td>" << endl;
905 if(HBM[0]==0) ind1=2;
if(HBM[0]>0 && HBP[0]<=12) ind1=1;
if(HBM[0]>12) ind1=0;
906 if(HBM[1]==0) ind2=2;
if(HBM[1]>0 && HBP[1]<=12) ind2=1;
if(HBM[1]>12) ind2=0;
907 if(!HBpresent_) ind1=ind2=3;
908 htmlFile << state[ind1] << HBM[0] <<
"</td>" << endl;
909 htmlFile << state[ind2] << HBM[1] <<
"</td>" << endl;
910 htmlFile <<
"</tr><tr>" << endl;
911 htmlFile <<
"<td class=\"s1\" align=\"center\">HE+</td>" << endl;
912 if(HEP[0]==0) ind1=2;
if(HEP[0]>0 && HEP[0]<=12) ind1=1;
if(HEP[0]>12) ind1=0;
913 if(HEP[1]==0) ind2=2;
if(HEP[1]>0 && HEP[1]<=12) ind2=1;
if(HEP[1]>12) ind2=0;
914 if(!HEpresent_) ind1=ind2=3;
915 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
916 htmlFile << state[ind1] << HEP[0] <<
"</td>" << endl;
917 htmlFile << state[ind2] << HEP[1] <<
"</td>" << endl;
918 htmlFile <<
"</tr><tr>" << endl;
919 htmlFile <<
"<td class=\"s1\" align=\"center\">HE-</td>" << endl;
920 if(HEM[0]==0) ind1=2;
if(HEM[0]>0 && HEM[0]<=12) ind1=1;
if(HEM[0]>12) ind1=0;
921 if(HEM[1]==0) ind2=2;
if(HEM[1]>0 && HEM[1]<=12) ind2=1;
if(HEM[1]>12) ind2=0;
922 if(!HEpresent_) ind1=ind2=3;
923 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
924 htmlFile << state[ind1] << HEM[0] <<
"</td>" << endl;
925 htmlFile << state[ind2] << HEM[1] <<
"</td>" << endl;
926 htmlFile <<
"</tr><tr>" << endl;
927 htmlFile <<
"<td class=\"s1\" align=\"center\">HF+</td>" << endl;
928 if(HFP[0]==0) ind1=2;
if(HFP[0]>0 && HFP[0]<=12) ind1=1;
if(HFP[0]>12) ind1=0;
929 if(HFP[1]==0) ind2=2;
if(HFP[1]>0 && HFP[1]<=12) ind2=1;
if(HFP[1]>12) ind2=0;
930 if(!HOpresent_) ind1=ind2=3;
931 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
932 htmlFile << state[ind1] << HFP[0] <<
"</td>" << endl;
933 htmlFile << state[ind2] << HFP[1] <<
"</td>" << endl;
934 htmlFile <<
"</tr><tr>" << endl;
935 htmlFile <<
"<td class=\"s1\" align=\"center\">HF-</td>" << endl;
936 if(HFM[0]==0) ind1=2;
if(HFM[0]>0 && HFM[0]<=12) ind1=1;
if(HFM[0]>12) ind1=0;
937 if(HFM[1]==0) ind2=2;
if(HFM[1]>0 && HFM[1]<=12) ind2=1;
if(HFM[1]>12) ind2=0;
938 if(!HFpresent_) ind1=ind2=3;
939 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
940 htmlFile << state[ind1] << HFM[0] <<
"</td>" << endl;
941 htmlFile << state[ind2] << HFM[1] <<
"</td>" << endl;
942 htmlFile <<
"</tr><tr>" << endl;
943 htmlFile <<
"<td class=\"s1\" align=\"center\">HO</td>" << endl;
944 if(HO[0]==0) ind1=2;
if(HO[0]>0 && HO[0]<=12) ind1=1;
if(HO[0]>12) ind1=0;
945 if(HO[1]==0) ind2=2;
if(HO[1]>0 && HO[1]<=12) ind2=1;
if(HO[1]>12) ind2=0;
946 if(!HFpresent_) ind1=ind2=3;
947 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
948 htmlFile << state[ind1] << HO[0] <<
"</td>" << endl;
949 htmlFile << state[ind2] << HO[1] <<
"</td>" << endl;
951 htmlFile <<
"</tr></table>" << endl;
952 htmlFile <<
"<hr>" << endl;
955 htmlFile <<
"<table width=100% border=1><tr>" << endl;
956 if(badT>0) htmlFile <<
"<td><a href=\"" <<
"bad_timing_table.html" <<
"\">list of bad timing channels</a></td>";
957 if(badE>0) htmlFile <<
"<td><a href=\"" <<
"bad_energy_table.html" <<
"\">list of bad energy channels</a></td>";
958 htmlFile <<
"</tr></table>" << endl;
963 if(Raddam[0]->GetEntries()>0){
964 htmlFile <<
"<h2 align=\"center\"><a href=\"" << (
"RADDAM_"+
name_).c_str() <<
"\">RADDAM channels</a><h2>";
965 htmlFile <<
"<hr>" << endl;
968 htmlFile <<
"<h2 align=\"center\">Stability Laser plots (Reference run "<<ref_run<<
")</h2>" << endl;
969 htmlFile <<
"<table width=100% border=0><tr>" << endl;
974 htmlFile <<
"<tr align=\"left\">" << endl;
975 refTime2Dhbhehf->SetStats(0);
976 refTime2Dho->SetStats(0);
977 refTime2Dhbhehf->Draw(
"COLZ"); can->SaveAs((htmlDir +
"ref_laser_timing_hbhehf.gif").c_str());
978 refTime2Dho->Draw(
"COLZ"); can->SaveAs((htmlDir +
"ref_laser_timing_ho.gif").c_str());
979 htmlFile <<
"<td align=\"center\"><img src=\"ref_laser_timing_hbhehf.gif\" alt=\"ref laser timing distribution\"> </td>" << endl;
980 htmlFile <<
"<td align=\"center\"><img src=\"ref_laser_timing_ho.gif\" alt=\"ref laser timing distribution\"> </td>" << endl;
981 htmlFile <<
"</tr>" << endl;
984 if(hb!=0 && he!=0 && ho!=0 && hf!=0){
985 hb->SetMarkerStyle(22);
986 hb->SetMarkerColor(kRed);
987 hb->GetYaxis()->SetRangeUser(hb->GetMinimum()-1,hb->GetMaximum()+1);
988 hb->GetXaxis()->SetNdivisions(520);
990 he->SetMarkerStyle(22);
991 he->SetMarkerColor(kRed);
992 he->GetYaxis()->SetRangeUser(he->GetMinimum()-1,he->GetMaximum()+1);
993 he->GetXaxis()->SetNdivisions(520);
995 ho->SetMarkerStyle(22);
996 ho->SetMarkerColor(kRed);
997 ho->GetYaxis()->SetRangeUser(ho->GetMinimum()-1,ho->GetMaximum()+1);
998 ho->GetXaxis()->SetNdivisions(520);
1000 hf->SetMarkerStyle(22);
1001 hf->SetMarkerColor(kRed);
1002 hf->GetYaxis()->SetRangeUser(hf->GetMinimum()-1,hf->GetMaximum()+1);
1003 hf->GetXaxis()->SetNdivisions(520);
1010 hb->GetXaxis()->SetBit(TAxis::kLabelsVert);
1011 he->GetXaxis()->SetBit(TAxis::kLabelsVert);
1012 ho->GetXaxis()->SetBit(TAxis::kLabelsVert);
1013 hf->GetXaxis()->SetBit(TAxis::kLabelsVert);
1014 hb->GetXaxis()->SetLabelSize(0.05);
1015 he->GetXaxis()->SetLabelSize(0.05);
1016 ho->GetXaxis()->SetLabelSize(0.05);
1017 hf->GetXaxis()->SetLabelSize(0.05);
1020 htmlFile <<
"<tr align=\"left\">" << endl;
1021 htmlFile <<
"<td align=\"center\"><img src=\"hb_rbx_timing1D.gif\" alt=\"rbx timing\"> </td>" << endl;
1022 htmlFile <<
"<td align=\"center\"><img src=\"he_rbx_timing1D.gif\" alt=\"rbx timing\"> </td>" << endl;
1023 htmlFile <<
"</tr>" << endl;
1024 htmlFile <<
"<tr align=\"left\">" << endl;
1025 htmlFile <<
"<td align=\"center\"><img src=\"ho_rbx_timing1D.gif\" alt=\"rbx timing\"> </td>" << endl;
1026 htmlFile <<
"<td align=\"center\"><img src=\"hf_rbx_timing1D.gif\" alt=\"rbx timing\"> </td>" << endl;
1027 htmlFile <<
"</tr>" << endl;
1028 }
else printf(
"Error\n");
1032 htmlFile <<
"<tr align=\"left\">" << endl;
1033 refEnergy2Dhbhehf->SetStats(0);
1034 refEnergy2Dho->SetStats(0);
1035 refEnergy2Dhbhehf->Draw(
"COLZ"); can->SaveAs((htmlDir +
"ref_laser_energy_hbhehf.gif").c_str());
1036 refEnergy2Dho->Draw(
"COLZ"); can->SaveAs((htmlDir +
"ref_laser_energy_ho.gif").c_str());
1037 htmlFile <<
"<td align=\"center\"><img src=\"ref_laser_energy_hbhehf.gif\" alt=\"ref laser energy distribution\"> </td>" << endl;
1038 htmlFile <<
"<td align=\"center\"><img src=\"ref_laser_energy_ho.gif\" alt=\"ref laser energy distribution\"> </td>" << endl;
1039 htmlFile <<
"</tr>" << endl;
1041 htmlFile <<
"</table>" << endl;
1044 htmlFile <<
"<h2 align=\"center\">Summary Laser plots</h2>" << endl;
1045 htmlFile <<
"<table width=100% border=0><tr>" << endl;
1046 htmlFile <<
"<tr align=\"left\">" << endl;
1047 Time2Dhbhehf->SetStats(0);
1048 Time2Dho->SetStats(0);
1049 Time2Dhbhehf->Draw(
"COLZ"); can->SaveAs((htmlDir +
"laser_timing_hbhehf.gif").c_str());
1050 Time2Dho->Draw(
"COLZ"); can->SaveAs((htmlDir +
"laser_timing_ho.gif").c_str());
1051 htmlFile <<
"<td align=\"center\"><img src=\"laser_timing_hbhehf.gif\" alt=\"laser timing distribution\"> </td>" << endl;
1052 htmlFile <<
"<td align=\"center\"><img src=\"laser_timing_ho.gif\" alt=\"laser timing distribution\"> </td>" << endl;
1053 htmlFile <<
"</tr>" << endl;
1055 htmlFile <<
"<tr align=\"left\">" << endl;
1056 Energy2Dhbhehf->SetStats(0);
1057 Energy2Dho->SetStats(0);
1058 Energy2Dhbhehf->Draw(
"COLZ"); can->SaveAs((htmlDir +
"laser_energy_hbhehf.gif").c_str());
1059 Energy2Dho->Draw(
"COLZ"); can->SaveAs((htmlDir +
"laser_energy_ho.gif").c_str());
1060 htmlFile <<
"<td align=\"center\"><img src=\"laser_energy_hbhehf.gif\" alt=\"laser energy distribution\"> </td>" << endl;
1061 htmlFile <<
"<td align=\"center\"><img src=\"laser_energy_ho.gif\" alt=\"laser energy distribution\"> </td>" << endl;
1062 htmlFile <<
"</tr>" << endl;
1065 htmlFile <<
"<tr align=\"left\">" << endl;
1066 hbheEnergy->Draw(); can->SaveAs((htmlDir +
"hbhe_laser_energy_distribution.gif").c_str());
1067 hbheEnergyRMS->Draw(); can->SaveAs((htmlDir +
"hbhe_laser_energy_rms_distribution.gif").c_str());
1068 htmlFile <<
"<td align=\"center\"><img src=\"hbhe_laser_energy_distribution.gif\" alt=\"hbhe laser energy distribution\"> </td>" << endl;
1069 htmlFile <<
"<td align=\"center\"><img src=\"hbhe_laser_energy_rms_distribution.gif\" alt=\"hbhelaser energy rms distribution\"> </td>" << endl;
1070 htmlFile <<
"</tr>" << endl;
1071 htmlFile <<
"<tr align=\"left\">" << endl;
1072 hbheTiming->Draw(); can->SaveAs((htmlDir +
"hbhe_laser_timing_distribution.gif").c_str());
1073 hbheTimingRMS->Draw(); can->SaveAs((htmlDir +
"hbhe_laser_timing_rms_distribution.gif").c_str());
1074 htmlFile <<
"<td align=\"center\"><img src=\"hbhe_laser_timing_distribution.gif\" alt=\"hbhe laser timing distribution\"> </td>" << endl;
1075 htmlFile <<
"<td align=\"center\"><img src=\"hbhe_laser_timing_rms_distribution.gif\" alt=\"hbhe laser timing rms distribution\"> </td>" << endl;
1076 htmlFile <<
"</tr>" << endl;
1078 htmlFile <<
"<tr align=\"left\">" << endl;
1079 hoEnergy->Draw(); can->SaveAs((htmlDir +
"ho_laser_energy_distribution.gif").c_str());
1080 hoEnergyRMS->Draw(); can->SaveAs((htmlDir +
"ho_laser_energy_rms_distribution.gif").c_str());
1081 htmlFile <<
"<td align=\"center\"><img src=\"ho_laser_energy_distribution.gif\" alt=\"ho laser energy distribution\"> </td>" << endl;
1082 htmlFile <<
"<td align=\"center\"><img src=\"ho_laser_energy_rms_distribution.gif\" alt=\"ho laser energy rms distribution\"> </td>" << endl;
1083 htmlFile <<
"</tr>" << endl;
1084 htmlFile <<
"<tr align=\"left\">" << endl;
1085 hoTiming->Draw(); can->SaveAs((htmlDir +
"ho_laser_timing_distribution.gif").c_str());
1086 hoTimingRMS->Draw(); can->SaveAs((htmlDir +
"ho_laser_timing_rms_distribution.gif").c_str());
1087 htmlFile <<
"<td align=\"center\"><img src=\"ho_laser_timing_distribution.gif\" alt=\"ho laser timing distribution\"> </td>" << endl;
1088 htmlFile <<
"<td align=\"center\"><img src=\"ho_laser_timing_rms_distribution.gif\" alt=\"ho laser timing rms distribution\"> </td>" << endl;
1090 htmlFile <<
"</tr>" << endl;
1091 htmlFile <<
"<tr align=\"left\">" << endl;
1092 hfEnergy->Draw(); can->SaveAs((htmlDir +
"hf_laser_energy_distribution.gif").c_str());
1093 hfEnergyRMS->Draw(); can->SaveAs((htmlDir +
"hf_laser_energy_rms_distribution.gif").c_str());
1094 htmlFile <<
"<td align=\"center\"><img src=\"hf_laser_energy_distribution.gif\" alt=\"hf laser energy distribution\"> </td>" << endl;
1095 htmlFile <<
"<td align=\"center\"><img src=\"hf_laser_energy_rms_distribution.gif\" alt=\"hf laser energy rms distribution\"> </td>" << endl;
1096 htmlFile <<
"</tr>" << endl;
1097 htmlFile <<
"<tr align=\"left\">" << endl;
1098 hfTiming->Draw(); can->SaveAs((htmlDir +
"hf_laser_timing_distribution.gif").c_str());
1099 hfTimingRMS->Draw(); can->SaveAs((htmlDir +
"hf_laser_timing_rms_distribution.gif").c_str());
1100 htmlFile <<
"<td align=\"center\"><img src=\"hf_laser_timing_distribution.gif\" alt=\"hf laser timing distribution\"> </td>" << endl;
1101 htmlFile <<
"<td align=\"center\"><img src=\"hf_laser_timing_rms_distribution.gif\" alt=\"hf laser timing rms distribution\"> </td>" << endl;
1102 htmlFile <<
"</tr>" << endl;
1104 can->SetBottomMargin(0.2);
1105 if(hb->GetEntries()>0)hb->Draw(
"P");
else hb->Draw(); can->SaveAs((htmlDir +
"hb_rbx_timing1D.gif").c_str());
1106 if(he->GetEntries()>0)he->Draw(
"P");
else he->Draw(); can->SaveAs((htmlDir +
"he_rbx_timing1D.gif").c_str());
1107 if(ho->GetEntries()>0)ho->Draw(
"P");
else ho->Draw(); can->SaveAs((htmlDir +
"ho_rbx_timing1D.gif").c_str());
1108 if(hf->GetEntries()>0)hf->Draw(
"P");
else hf->Draw(); can->SaveAs((htmlDir +
"hf_rbx_timing1D.gif").c_str());
1110 htmlFile <<
"</table>" << endl;
1112 htmlFile <<
"</body> " << endl;
1113 htmlFile <<
"</html> " << endl;
bool isHO(int etabin, int depth)
static void printTableHeader(ofstream &file, std::string header)
std::vector< std::string > HcalEtaPhiHistNames()
bool isHE(int etabin, int depth)
static void printTableLine(ofstream &file, int ind, HcalDetId &detid, HcalFrontEndId &lmap_entry, HcalElectronicsId &emap_entry, std::string comment="")
HcalLogicalMap createMap(unsigned int mapIOV=4)
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 CalcIeta(int subdet, int eta, int depth)
std::string valueString(void) const
bool isHF(int etabin, int depth)
int64_t getIntValue(void) const
std::map< HcalDetId, unsigned int > badstatusmap
static void printTableTail(ofstream &file)
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...