381 if (
debug_>0)
std::cout <<
"<HcalDetDiagLaserClient::htmlOutput> dqmStore object does not exist!"<<std::endl;
384 if(
debug_>2)
std::cout <<
"\t<HcalDetDiagLaserClient::htmlOutput> Preparing html for task: "<<
name_<<std::endl;
394 TH1F *hbheEnergyRMS=0;
395 TH1F *hbheTimingRMS=0;
408 TH2F *Time2Dhbhehf=0;
410 TH2F *Energy2Dhbhehf=0;
412 TH2F *refTime2Dhbhehf=0;
414 TH2F *refEnergy2Dhbhehf=0;
415 TH2F *refEnergy2Dho=0;
416 int HBpresent_=0,HEpresent_=0,HOpresent_=0,HFpresent_=0;
429 if(me!=0) hbheEnergy=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hbheEnergy,
debug_);
else return;
431 if(me!=0) hbheTiming=HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hbheTiming,
debug_);
else return;
432 s=
subdir_+
"Summary Plots/HBHE Laser Energy RMS_div_Energy Distribution"; me=
dqmStore_->
get(s.c_str());
433 if(me!=0) hbheEnergyRMS= HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hbheEnergyRMS,
debug_);
else return;
434 s=
subdir_+
"Summary Plots/HBHE Laser Timing RMS Distribution"; me=
dqmStore_->
get(s.c_str());
435 if(me!=0) hbheTimingRMS= HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hbheTimingRMS,
debug_);
else return;
437 if(me!=0) hoEnergy = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hoEnergy,
debug_);
else return;
439 if(me!=0) hoTiming = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hoTiming,
debug_);
else return;
440 s=
subdir_+
"Summary Plots/HO Laser Energy RMS_div_Energy Distribution"; me=
dqmStore_->
get(s.c_str());
441 if(me!=0) hoEnergyRMS = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hoEnergyRMS,
debug_);
else return;
443 if(me!=0) hoTimingRMS = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hoTimingRMS,
debug_);
else return;
445 if(me!=0) hfEnergy = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hfEnergy,
debug_);
else return;
447 if(me!=0) hfTiming = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hfTiming,
debug_);
else return;
448 s=
subdir_+
"Summary Plots/HF Laser Energy RMS_div_Energy Distribution"; me=
dqmStore_->
get(s.c_str());
449 if(me!=0) hfEnergyRMS = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hfEnergyRMS,
debug_);
else return;
451 if(me!=0) hfTimingRMS = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hfTimingRMS,
debug_);
else return;
454 if(me!=0) hb = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hb,
debug_);
else return;
456 if(me!=0) he = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, he,
debug_);
else return;
458 if(me!=0) ho = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, ho,
debug_);
else return;
460 if(me!=0) hf = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, hf,
debug_);
else return;
463 if(me!=0) Time2Dhbhehf = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Time2Dhbhehf,
debug_);
else return;
465 if(me!=0) Time2Dho = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Time2Dho,
debug_);
else return;
467 if(me!=0) Energy2Dhbhehf= HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Energy2Dhbhehf,
debug_);
else return;
469 if(me!=0) Energy2Dho = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, Energy2Dho,
debug_);
else return;
471 if(me!=0) refTime2Dhbhehf = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, refTime2Dhbhehf,
debug_);
else return;
473 if(me!=0) refTime2Dho = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, refTime2Dho,
debug_);
else return;
475 if(me!=0) refEnergy2Dhbhehf= HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, refEnergy2Dhbhehf,
debug_);
else return;
477 if(me!=0) refEnergy2Dho = HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, refEnergy2Dho,
debug_);
else return;
481 for(
int i=0;
i<56;
i++){
484 if(me!=0) Raddam[
i] = HcalUtilsClient::getHisto<TH1F*>(me,
cloneME_, Raddam[
i],
debug_);
485 Raddam[
i]->SetXTitle(
"TS");
486 Raddam[
i]->SetTitle(str);
489 int ievt_ = -1,runNo=-1;
490 s=
subdir_+
"HcalDetDiagLaserMonitor Event Number";
494 sscanf((s.substr(2,s.length()-2)).c_str(),
"%d", &ievt_);
496 s=
subdir_+
"HcalDetDiagLaserMonitor Run Number";
500 sscanf((s.substr(2,s.length()-2)).c_str(),
"%d", &runNo);
502 s=
subdir_+
"HcalDetDiagLaserMonitor Reference Run";
507 sscanf((s.substr(2,s.length()-2)).c_str(),
"%s", str);
528 TH2F* BadTiming_val[4];
529 TH2F* BadEnergy_val[4];
531 for(
int i=0;
i<4;++
i){
534 string s=
subdir_+
"Plots for client/"+name[
i]+
" Laser Timing difference";
536 if (me!=0) BadTiming_val[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, BadTiming_val[
i],
debug_);
else return;
537 s=
subdir_+
"Plots for client/"+name[
i]+
" Laser Energy difference";
539 if (me!=0) BadEnergy_val[
i]=HcalUtilsClient::getHisto<TH2F*>(me,
cloneME_, BadEnergy_val[
i],
debug_);
else return;
544 badTiming.open((htmlDir+
"bad_timing_table.html").c_str());
547 badEnergy.open((htmlDir+
"bad_energy_table.html").c_str());
550 for(
int d=0;d<4;++d){
551 int etabins=BadTiming_val[d]->GetNbinsX();
552 int phibins=BadTiming_val[d]->GetNbinsY();
555 if(ieta==-9999)
continue;
562 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
565 if(ieta>0){ HBP[0]++;}
else{ HBM[0]++;} badT++;
569 if(ieta>0){ HEP[0]++;}
else{ HEM[0]++;} badT++;
573 if(ieta>0){ HFP[0]++;}
else{ HFM[0]++;} badT++;
581 val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
584 if(ieta>0){ HBP[1]++;}
else{ HBM[1]++;} badE++;
588 if(ieta>0){ HEP[1]++;}
else{ HEM[1]++;} badE++;
592 if(ieta>0){ HFP[1]++;}
else{ HFM[1]++;} badE++;
605 if((HBP[0]+HBM[0])>0){
606 badTiming <<
"<tr><td align=\"center\"><h3>"<<
"HB" <<
"</h3></td></tr>" << endl;
607 for(
int d=0;d<4;++d){
608 int etabins=BadTiming_val[d]->GetNbinsX();
609 int phibins=BadTiming_val[d]->GetNbinsY();
612 if(ieta==-9999)
continue;
614 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
619 sprintf(str,
"Time-Ref=%.2f",val);
625 if((HEP[0]+HEM[0])>0){
626 badTiming <<
"<tr><td align=\"center\"><h3>"<<
"HE" <<
"</h3></td></tr>" << endl;
627 for(
int d=0;d<4;++d){
628 int etabins=BadTiming_val[d]->GetNbinsX();
629 int phibins=BadTiming_val[d]->GetNbinsY();
632 if(ieta==-9999)
continue;
634 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
639 sprintf(str,
"Time-Ref=%.2f",val);
646 badTiming <<
"<tr><td align=\"center\"><h3>"<<
"HO" <<
"</h3></td></tr>" << endl;
647 for(
int d=0;d<4;++d){
648 int etabins=BadTiming_val[d]->GetNbinsX();
649 int phibins=BadTiming_val[d]->GetNbinsY();
652 if(ieta==-9999)
continue;
654 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
659 sprintf(str,
"Time-Ref=%.2f",val);
665 if((HFP[0]+HFM[0])>0){
666 badTiming <<
"<tr><td align=\"center\"><h3>"<<
"HF" <<
"</h3></td></tr>" << endl;
667 for(
int d=0;d<4;++d){
668 int etabins=BadTiming_val[d]->GetNbinsX();
669 int phibins=BadTiming_val[d]->GetNbinsY();
672 if(ieta==-9999)
continue;
674 float val=BadTiming_val[d]->GetBinContent(
eta+1,
phi+1);
679 sprintf(str,
"Time-Ref=%.2f",val);
686 if((HBP[1]+HBM[1])>0){
687 badEnergy <<
"<tr><td align=\"center\"><h3>"<<
"HB" <<
"</h3></td></tr>" << endl;
688 for(
int d=0;d<4;++d){
689 int etabins=BadEnergy_val[d]->GetNbinsX();
690 int phibins=BadEnergy_val[d]->GetNbinsY();
693 if(ieta==-9999)
continue;
695 float val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
700 sprintf(str,
"Energy/Ref=%.2f",val);
706 if((HEP[1]+HEM[1])>0){
707 badEnergy <<
"<tr><td align=\"center\"><h3>"<<
"HE" <<
"</h3></td></tr>" << endl;
708 for(
int d=0;d<4;++d){
709 int etabins=BadEnergy_val[d]->GetNbinsX();
710 int phibins=BadEnergy_val[d]->GetNbinsY();
713 if(ieta==-9999)
continue;
715 float val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
720 sprintf(str,
"Energy/Ref=%.2f",val);
727 badEnergy <<
"<tr><td align=\"center\"><h3>"<<
"HO" <<
"</h3></td></tr>" << endl;
728 for(
int d=0;d<4;++d){
729 int etabins=BadEnergy_val[d]->GetNbinsX();
730 int phibins=BadEnergy_val[d]->GetNbinsY();
733 if(ieta==-9999)
continue;
735 float val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
740 sprintf(str,
"Energy/Ref=%.2f",val);
746 if((HFP[1]+HFM[1])>0){
747 badEnergy <<
"<tr><td align=\"center\"><h3>"<<
"HF" <<
"</h3></td></tr>" << endl;
748 for(
int d=0;d<4;++d){
749 int etabins=BadEnergy_val[d]->GetNbinsX();
750 int phibins=BadEnergy_val[d]->GetNbinsY();
753 if(ieta==-9999)
continue;
755 float val=BadEnergy_val[d]->GetBinContent(
eta+1,
phi+1);
760 sprintf(str,
"Energy/Ref=%.2f",val);
774 htmlFile.open(outfile.c_str());
776 gROOT->SetBatch(
true);
777 gStyle->SetCanvasColor(0);
778 gStyle->SetPadColor(0);
779 gStyle->SetOptStat(111110);
780 gStyle->SetPalette(1);
781 TCanvas *
can=
new TCanvas(
"HcalDetDiagLaserClient",
"HcalDetDiagLaserClient",0,0,500,350);
784 if(Raddam[0]->GetEntries()>0){
786 RADDAM.open((htmlDir +
"RADDAM_"+name_).c_str());
787 RADDAM <<
"</html><html xmlns=\"http://www.w3.org/1999/xhtml\">"<< endl;
788 RADDAM <<
"<head>"<< endl;
789 RADDAM <<
"<meta http-equiv=\"Content-Type\" content=\"text/html\"/>"<< endl;
790 RADDAM <<
"<title>"<<
"RADDAM channels" <<
"</title>"<< endl;
791 RADDAM <<
"<style type=\"text/css\">"<< endl;
792 RADDAM <<
" body,td{ background-color: #FFFFCC; font-family: arial, arial ce, helvetica; font-size: 12px; }"<< endl;
793 RADDAM <<
" td.s0 { font-family: arial, arial ce, helvetica; }"<< endl;
794 RADDAM <<
" td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; text-align: center;}"<< endl;
795 RADDAM <<
" td.s2 { font-family: arial, arial ce, helvetica; background-color: #eeeeee; }"<< endl;
796 RADDAM <<
" td.s3 { font-family: arial, arial ce, helvetica; background-color: #d0d0d0; }"<< endl;
797 RADDAM <<
" td.s4 { font-family: arial, arial ce, helvetica; background-color: #FFC169; }"<< endl;
798 RADDAM <<
"</style>"<< endl;
799 RADDAM <<
"<body>"<< endl;
800 RADDAM <<
"<h2>Run "<< runNo<<
": RADDAM channels event shape </h2>" << endl;
801 RADDAM <<
"<table>"<< endl;
804 for(
int i=0;
i<28;
i++){
805 RADDAM <<
"<tr align=\"left\">" << endl;
808 Raddam[2*
i]->Draw(); sprintf(str,
"%02d",2*
i); can->SaveAs((htmlDir +
"raddam_ch"+str+
".gif").c_str());
809 Raddam[2*
i+1]->Draw(); sprintf(str,
"%02d",2*
i+1); can->SaveAs((htmlDir +
"raddam_ch"+str+
".gif").c_str());
810 sprintf(str,
"raddam_ch%02d.gif",2*
i);
811 RADDAM <<
"<td align=\"center\"><img src=\""<<str<<
"\" alt=\"raddam channel\"> </td>" << endl;
812 sprintf(str,
"raddam_ch%02d.gif",2*
i+1);
813 RADDAM <<
"<td align=\"center\"><img src=\""<<str<<
"\" alt=\"raddam channel\"> </td>" << endl;
814 RADDAM <<
"</tr>" << endl;
817 RADDAM <<
"</table>"<< endl;
818 RADDAM <<
"</body>"<< endl;
819 RADDAM <<
"</html>"<< endl;
823 Time2Dhbhehf->SetXTitle(
"i#eta");
824 Time2Dhbhehf->SetYTitle(
"i#phi");
825 Time2Dho->SetXTitle(
"i#eta");
826 Time2Dho->SetYTitle(
"i#phi");
827 Energy2Dhbhehf->SetXTitle(
"i#eta");
828 Energy2Dhbhehf->SetYTitle(
"i#phi");
829 Energy2Dho->SetXTitle(
"i#eta");
830 Energy2Dho->SetYTitle(
"i#phi");
831 refTime2Dhbhehf->SetXTitle(
"i#eta");
832 refTime2Dhbhehf->SetYTitle(
"i#phi");
833 refTime2Dho->SetXTitle(
"i#eta");
834 refTime2Dho->SetYTitle(
"i#phi");
835 refEnergy2Dhbhehf->SetXTitle(
"i#eta");
836 refEnergy2Dhbhehf->SetYTitle(
"i#phi");
837 refEnergy2Dho->SetXTitle(
"i#eta");
838 refEnergy2Dho->SetYTitle(
"i#phi");
839 refTime2Dhbhehf->SetMinimum(0);
840 refTime2Dhbhehf->SetMaximum(2);
841 refTime2Dho->SetMinimum(0);
842 refTime2Dho->SetMaximum(2);
843 refEnergy2Dhbhehf->SetMinimum(0.5);
844 refEnergy2Dhbhehf->SetMaximum(1.5);
845 refEnergy2Dho->SetMinimum(0.5);
846 refEnergy2Dho->SetMaximum(1.5);
848 Time2Dhbhehf->SetNdivisions(36,
"Y");
849 Time2Dho->SetNdivisions(36,
"Y");
850 Energy2Dhbhehf->SetNdivisions(36,
"Y");
851 Energy2Dho->SetNdivisions(36,
"Y");
852 refTime2Dhbhehf->SetNdivisions(36,
"Y");
853 refTime2Dho->SetNdivisions(36,
"Y");
854 refEnergy2Dhbhehf->SetNdivisions(36,
"Y");
855 refEnergy2Dho->SetNdivisions(36,
"Y");
858 htmlFile <<
"<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"> " << endl;
859 htmlFile <<
"<html> " << endl;
860 htmlFile <<
"<head> " << endl;
861 htmlFile <<
" <meta content=\"text/html; charset=ISO-8859-1\" " << endl;
862 htmlFile <<
" http-equiv=\"content-type\"> " << endl;
863 htmlFile <<
" <title>Detector Diagnostics Laser Monitor</title> " << endl;
864 htmlFile <<
"</head> " << endl;
865 htmlFile <<
"<style type=\"text/css\"> td { font-weight: bold } </style>" << endl;
867 htmlFile <<
"<style type=\"text/css\">"<< endl;
868 htmlFile <<
" td.s0 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FF7700; text-align: center;}"<< endl;
869 htmlFile <<
" td.s1 { font-family: arial, arial ce, helvetica; font-weight: bold; background-color: #FFC169; text-align: center;}"<< endl;
870 htmlFile <<
" td.s2 { font-family: arial, arial ce, helvetica; background-color: red; }"<< endl;
871 htmlFile <<
" td.s3 { font-family: arial, arial ce, helvetica; background-color: yellow; }"<< endl;
872 htmlFile <<
" td.s4 { font-family: arial, arial ce, helvetica; background-color: green; }"<< endl;
873 htmlFile <<
" td.s5 { font-family: arial, arial ce, helvetica; background-color: silver; }"<< endl;
875 "<td class=\"s3\" align=\"center\">",
876 "<td class=\"s4\" align=\"center\">",
877 "<td class=\"s5\" align=\"center\">"};
878 htmlFile <<
"</style>"<< endl;
880 htmlFile <<
"<body> " << endl;
881 htmlFile <<
"<br> " << endl;
882 htmlFile <<
"<h2>Run: " << endl;
883 htmlFile <<
" <span " << endl;
884 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">" << runNo <<
"</span></h2>" << endl;
885 htmlFile <<
"<h2>Monitoring task: <span " << endl;
886 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">Detector Diagnostics Laser Monitor</span></h2> " << endl;
887 htmlFile <<
"<h2>Events processed: <span " << endl;
888 htmlFile <<
" style=\"color: rgb(0, 0, 153);\">" << ievt_ <<
"</span></h2>" << endl;
889 htmlFile <<
"<hr>" << endl;
891 htmlFile <<
"<table width=100% border=1>" << endl;
892 htmlFile <<
"<tr>" << endl;
893 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">SebDet</td>" << endl;
894 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">Bad Timing</td>" << endl;
895 htmlFile <<
"<td class=\"s0\" width=20% align=\"center\">Bad Energy</td>" << endl;
896 htmlFile <<
"</tr><tr>" << endl;
898 htmlFile <<
"<td class=\"s1\" align=\"center\">HB+</td>" << endl;
899 if(HBP[0]==0) ind1=2;
if(HBP[0]>0 && HBP[0]<=12) ind1=1;
if(HBP[0]>12) ind1=0;
900 if(HBP[1]==0) ind2=2;
if(HBP[1]>0 && HBP[1]<=12) ind2=1;
if(HBP[1]>12) ind2=0;
901 if(!HBpresent_) ind1=ind2=3;
902 htmlFile << state[ind1] << HBP[0] <<
"</td>" << endl;
903 htmlFile << state[ind2] << HBP[1] <<
"</td>" << endl;
904 htmlFile <<
"</tr><tr>" << endl;
905 htmlFile <<
"<td class=\"s1\" align=\"center\">HB-</td>" << endl;
906 if(HBM[0]==0) ind1=2;
if(HBM[0]>0 && HBP[0]<=12) ind1=1;
if(HBM[0]>12) ind1=0;
907 if(HBM[1]==0) ind2=2;
if(HBM[1]>0 && HBP[1]<=12) ind2=1;
if(HBM[1]>12) ind2=0;
908 if(!HBpresent_) ind1=ind2=3;
909 htmlFile << state[ind1] << HBM[0] <<
"</td>" << endl;
910 htmlFile << state[ind2] << HBM[1] <<
"</td>" << endl;
911 htmlFile <<
"</tr><tr>" << endl;
912 htmlFile <<
"<td class=\"s1\" align=\"center\">HE+</td>" << endl;
913 if(HEP[0]==0) ind1=2;
if(HEP[0]>0 && HEP[0]<=12) ind1=1;
if(HEP[0]>12) ind1=0;
914 if(HEP[1]==0) ind2=2;
if(HEP[1]>0 && HEP[1]<=12) ind2=1;
if(HEP[1]>12) ind2=0;
915 if(!HEpresent_) ind1=ind2=3;
916 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
917 htmlFile << state[ind1] << HEP[0] <<
"</td>" << endl;
918 htmlFile << state[ind2] << HEP[1] <<
"</td>" << endl;
919 htmlFile <<
"</tr><tr>" << endl;
920 htmlFile <<
"<td class=\"s1\" align=\"center\">HE-</td>" << endl;
921 if(HEM[0]==0) ind1=2;
if(HEM[0]>0 && HEM[0]<=12) ind1=1;
if(HEM[0]>12) ind1=0;
922 if(HEM[1]==0) ind2=2;
if(HEM[1]>0 && HEM[1]<=12) ind2=1;
if(HEM[1]>12) ind2=0;
923 if(!HEpresent_) ind1=ind2=3;
924 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
925 htmlFile << state[ind1] << HEM[0] <<
"</td>" << endl;
926 htmlFile << state[ind2] << HEM[1] <<
"</td>" << endl;
927 htmlFile <<
"</tr><tr>" << endl;
928 htmlFile <<
"<td class=\"s1\" align=\"center\">HF+</td>" << endl;
929 if(HFP[0]==0) ind1=2;
if(HFP[0]>0 && HFP[0]<=12) ind1=1;
if(HFP[0]>12) ind1=0;
930 if(HFP[1]==0) ind2=2;
if(HFP[1]>0 && HFP[1]<=12) ind2=1;
if(HFP[1]>12) ind2=0;
931 if(!HOpresent_) ind1=ind2=3;
932 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
933 htmlFile << state[ind1] << HFP[0] <<
"</td>" << endl;
934 htmlFile << state[ind2] << HFP[1] <<
"</td>" << endl;
935 htmlFile <<
"</tr><tr>" << endl;
936 htmlFile <<
"<td class=\"s1\" align=\"center\">HF-</td>" << endl;
937 if(HFM[0]==0) ind1=2;
if(HFM[0]>0 && HFM[0]<=12) ind1=1;
if(HFM[0]>12) ind1=0;
938 if(HFM[1]==0) ind2=2;
if(HFM[1]>0 && HFM[1]<=12) ind2=1;
if(HFM[1]>12) ind2=0;
939 if(!HFpresent_) ind1=ind2=3;
940 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
941 htmlFile << state[ind1] << HFM[0] <<
"</td>" << endl;
942 htmlFile << state[ind2] << HFM[1] <<
"</td>" << endl;
943 htmlFile <<
"</tr><tr>" << endl;
944 htmlFile <<
"<td class=\"s1\" align=\"center\">HO</td>" << endl;
945 if(HO[0]==0) ind1=2;
if(HO[0]>0 && HO[0]<=12) ind1=1;
if(HO[0]>12) ind1=0;
946 if(HO[1]==0) ind2=2;
if(HO[1]>0 && HO[1]<=12) ind2=1;
if(HO[1]>12) ind2=0;
947 if(!HFpresent_) ind1=ind2=3;
948 if(ind1==0 || ind2==0)
status|=2;
else if(ind1==1 || ind2==1)
status|=1;
949 htmlFile << state[ind1] << HO[0] <<
"</td>" << endl;
950 htmlFile << state[ind2] << HO[1] <<
"</td>" << endl;
952 htmlFile <<
"</tr></table>" << endl;
953 htmlFile <<
"<hr>" << endl;
956 htmlFile <<
"<table width=100% border=1><tr>" << endl;
957 if(badT>0) htmlFile <<
"<td><a href=\"" <<
"bad_timing_table.html" <<
"\">list of bad timing channels</a></td>";
958 if(badE>0) htmlFile <<
"<td><a href=\"" <<
"bad_energy_table.html" <<
"\">list of bad energy channels</a></td>";
959 htmlFile <<
"</tr></table>" << endl;
964 if(Raddam[0]->GetEntries()>0){
965 htmlFile <<
"<h2 align=\"center\"><a href=\"" << (
"RADDAM_"+
name_).c_str() <<
"\">RADDAM channels</a><h2>";
966 htmlFile <<
"<hr>" << endl;
969 htmlFile <<
"<h2 align=\"center\">Stability Laser plots (Reference run "<<ref_run<<
")</h2>" << endl;
970 htmlFile <<
"<table width=100% border=0><tr>" << endl;
975 htmlFile <<
"<tr align=\"left\">" << endl;
976 refTime2Dhbhehf->SetStats(0);
977 refTime2Dho->SetStats(0);
978 refTime2Dhbhehf->Draw(
"COLZ"); can->SaveAs((htmlDir +
"ref_laser_timing_hbhehf.gif").c_str());
979 refTime2Dho->Draw(
"COLZ"); can->SaveAs((htmlDir +
"ref_laser_timing_ho.gif").c_str());
980 htmlFile <<
"<td align=\"center\"><img src=\"ref_laser_timing_hbhehf.gif\" alt=\"ref laser timing distribution\"> </td>" << endl;
981 htmlFile <<
"<td align=\"center\"><img src=\"ref_laser_timing_ho.gif\" alt=\"ref laser timing distribution\"> </td>" << endl;
982 htmlFile <<
"</tr>" << endl;
985 if(hb!=0 && he!=0 && ho!=0 && hf!=0){
986 hb->SetMarkerStyle(22);
987 hb->SetMarkerColor(kRed);
988 hb->GetYaxis()->SetRangeUser(hb->GetMinimum()-1,hb->GetMaximum()+1);
989 hb->GetXaxis()->SetNdivisions(520);
991 he->SetMarkerStyle(22);
992 he->SetMarkerColor(kRed);
993 he->GetYaxis()->SetRangeUser(he->GetMinimum()-1,he->GetMaximum()+1);
994 he->GetXaxis()->SetNdivisions(520);
996 ho->SetMarkerStyle(22);
997 ho->SetMarkerColor(kRed);
998 ho->GetYaxis()->SetRangeUser(ho->GetMinimum()-1,ho->GetMaximum()+1);
999 ho->GetXaxis()->SetNdivisions(520);
1001 hf->SetMarkerStyle(22);
1002 hf->SetMarkerColor(kRed);
1003 hf->GetYaxis()->SetRangeUser(hf->GetMinimum()-1,hf->GetMaximum()+1);
1004 hf->GetXaxis()->SetNdivisions(520);
1011 hb->GetXaxis()->SetBit(TAxis::kLabelsVert);
1012 he->GetXaxis()->SetBit(TAxis::kLabelsVert);
1013 ho->GetXaxis()->SetBit(TAxis::kLabelsVert);
1014 hf->GetXaxis()->SetBit(TAxis::kLabelsVert);
1015 hb->GetXaxis()->SetLabelSize(0.05);
1016 he->GetXaxis()->SetLabelSize(0.05);
1017 ho->GetXaxis()->SetLabelSize(0.05);
1018 hf->GetXaxis()->SetLabelSize(0.05);
1021 htmlFile <<
"<tr align=\"left\">" << endl;
1022 htmlFile <<
"<td align=\"center\"><img src=\"hb_rbx_timing1D.gif\" alt=\"rbx timing\"> </td>" << endl;
1023 htmlFile <<
"<td align=\"center\"><img src=\"he_rbx_timing1D.gif\" alt=\"rbx timing\"> </td>" << endl;
1024 htmlFile <<
"</tr>" << endl;
1025 htmlFile <<
"<tr align=\"left\">" << endl;
1026 htmlFile <<
"<td align=\"center\"><img src=\"ho_rbx_timing1D.gif\" alt=\"rbx timing\"> </td>" << endl;
1027 htmlFile <<
"<td align=\"center\"><img src=\"hf_rbx_timing1D.gif\" alt=\"rbx timing\"> </td>" << endl;
1028 htmlFile <<
"</tr>" << endl;
1029 }
else printf(
"Error\n");
1033 htmlFile <<
"<tr align=\"left\">" << endl;
1034 refEnergy2Dhbhehf->SetStats(0);
1035 refEnergy2Dho->SetStats(0);
1036 refEnergy2Dhbhehf->Draw(
"COLZ"); can->SaveAs((htmlDir +
"ref_laser_energy_hbhehf.gif").c_str());
1037 refEnergy2Dho->Draw(
"COLZ"); can->SaveAs((htmlDir +
"ref_laser_energy_ho.gif").c_str());
1038 htmlFile <<
"<td align=\"center\"><img src=\"ref_laser_energy_hbhehf.gif\" alt=\"ref laser energy distribution\"> </td>" << endl;
1039 htmlFile <<
"<td align=\"center\"><img src=\"ref_laser_energy_ho.gif\" alt=\"ref laser energy distribution\"> </td>" << endl;
1040 htmlFile <<
"</tr>" << endl;
1042 htmlFile <<
"</table>" << endl;
1045 htmlFile <<
"<h2 align=\"center\">Summary Laser plots</h2>" << endl;
1046 htmlFile <<
"<table width=100% border=0><tr>" << endl;
1047 htmlFile <<
"<tr align=\"left\">" << endl;
1048 Time2Dhbhehf->SetStats(0);
1049 Time2Dho->SetStats(0);
1050 Time2Dhbhehf->Draw(
"COLZ"); can->SaveAs((htmlDir +
"laser_timing_hbhehf.gif").c_str());
1051 Time2Dho->Draw(
"COLZ"); can->SaveAs((htmlDir +
"laser_timing_ho.gif").c_str());
1052 htmlFile <<
"<td align=\"center\"><img src=\"laser_timing_hbhehf.gif\" alt=\"laser timing distribution\"> </td>" << endl;
1053 htmlFile <<
"<td align=\"center\"><img src=\"laser_timing_ho.gif\" alt=\"laser timing distribution\"> </td>" << endl;
1054 htmlFile <<
"</tr>" << endl;
1056 htmlFile <<
"<tr align=\"left\">" << endl;
1057 Energy2Dhbhehf->SetStats(0);
1058 Energy2Dho->SetStats(0);
1059 Energy2Dhbhehf->Draw(
"COLZ"); can->SaveAs((htmlDir +
"laser_energy_hbhehf.gif").c_str());
1060 Energy2Dho->Draw(
"COLZ"); can->SaveAs((htmlDir +
"laser_energy_ho.gif").c_str());
1061 htmlFile <<
"<td align=\"center\"><img src=\"laser_energy_hbhehf.gif\" alt=\"laser energy distribution\"> </td>" << endl;
1062 htmlFile <<
"<td align=\"center\"><img src=\"laser_energy_ho.gif\" alt=\"laser energy distribution\"> </td>" << endl;
1063 htmlFile <<
"</tr>" << endl;
1066 htmlFile <<
"<tr align=\"left\">" << endl;
1067 hbheEnergy->Draw(); can->SaveAs((htmlDir +
"hbhe_laser_energy_distribution.gif").c_str());
1068 hbheEnergyRMS->Draw(); can->SaveAs((htmlDir +
"hbhe_laser_energy_rms_distribution.gif").c_str());
1069 htmlFile <<
"<td align=\"center\"><img src=\"hbhe_laser_energy_distribution.gif\" alt=\"hbhe laser energy distribution\"> </td>" << endl;
1070 htmlFile <<
"<td align=\"center\"><img src=\"hbhe_laser_energy_rms_distribution.gif\" alt=\"hbhelaser energy rms distribution\"> </td>" << endl;
1071 htmlFile <<
"</tr>" << endl;
1072 htmlFile <<
"<tr align=\"left\">" << endl;
1073 hbheTiming->Draw(); can->SaveAs((htmlDir +
"hbhe_laser_timing_distribution.gif").c_str());
1074 hbheTimingRMS->Draw(); can->SaveAs((htmlDir +
"hbhe_laser_timing_rms_distribution.gif").c_str());
1075 htmlFile <<
"<td align=\"center\"><img src=\"hbhe_laser_timing_distribution.gif\" alt=\"hbhe laser timing distribution\"> </td>" << endl;
1076 htmlFile <<
"<td align=\"center\"><img src=\"hbhe_laser_timing_rms_distribution.gif\" alt=\"hbhe laser timing rms distribution\"> </td>" << endl;
1077 htmlFile <<
"</tr>" << endl;
1079 htmlFile <<
"<tr align=\"left\">" << endl;
1080 hoEnergy->Draw(); can->SaveAs((htmlDir +
"ho_laser_energy_distribution.gif").c_str());
1081 hoEnergyRMS->Draw(); can->SaveAs((htmlDir +
"ho_laser_energy_rms_distribution.gif").c_str());
1082 htmlFile <<
"<td align=\"center\"><img src=\"ho_laser_energy_distribution.gif\" alt=\"ho laser energy distribution\"> </td>" << endl;
1083 htmlFile <<
"<td align=\"center\"><img src=\"ho_laser_energy_rms_distribution.gif\" alt=\"ho laser energy rms distribution\"> </td>" << endl;
1084 htmlFile <<
"</tr>" << endl;
1085 htmlFile <<
"<tr align=\"left\">" << endl;
1086 hoTiming->Draw(); can->SaveAs((htmlDir +
"ho_laser_timing_distribution.gif").c_str());
1087 hoTimingRMS->Draw(); can->SaveAs((htmlDir +
"ho_laser_timing_rms_distribution.gif").c_str());
1088 htmlFile <<
"<td align=\"center\"><img src=\"ho_laser_timing_distribution.gif\" alt=\"ho laser timing distribution\"> </td>" << endl;
1089 htmlFile <<
"<td align=\"center\"><img src=\"ho_laser_timing_rms_distribution.gif\" alt=\"ho laser timing rms distribution\"> </td>" << endl;
1091 htmlFile <<
"</tr>" << endl;
1092 htmlFile <<
"<tr align=\"left\">" << endl;
1093 hfEnergy->Draw(); can->SaveAs((htmlDir +
"hf_laser_energy_distribution.gif").c_str());
1094 hfEnergyRMS->Draw(); can->SaveAs((htmlDir +
"hf_laser_energy_rms_distribution.gif").c_str());
1095 htmlFile <<
"<td align=\"center\"><img src=\"hf_laser_energy_distribution.gif\" alt=\"hf laser energy distribution\"> </td>" << endl;
1096 htmlFile <<
"<td align=\"center\"><img src=\"hf_laser_energy_rms_distribution.gif\" alt=\"hf laser energy rms distribution\"> </td>" << endl;
1097 htmlFile <<
"</tr>" << endl;
1098 htmlFile <<
"<tr align=\"left\">" << endl;
1099 hfTiming->Draw(); can->SaveAs((htmlDir +
"hf_laser_timing_distribution.gif").c_str());
1100 hfTimingRMS->Draw(); can->SaveAs((htmlDir +
"hf_laser_timing_rms_distribution.gif").c_str());
1101 htmlFile <<
"<td align=\"center\"><img src=\"hf_laser_timing_distribution.gif\" alt=\"hf laser timing distribution\"> </td>" << endl;
1102 htmlFile <<
"<td align=\"center\"><img src=\"hf_laser_timing_rms_distribution.gif\" alt=\"hf laser timing rms distribution\"> </td>" << endl;
1103 htmlFile <<
"</tr>" << endl;
1105 can->SetBottomMargin(0.2);
1106 if(hb->GetEntries()>0)hb->Draw(
"P");
else hb->Draw(); can->SaveAs((htmlDir +
"hb_rbx_timing1D.gif").c_str());
1107 if(he->GetEntries()>0)he->Draw(
"P");
else he->Draw(); can->SaveAs((htmlDir +
"he_rbx_timing1D.gif").c_str());
1108 if(ho->GetEntries()>0)ho->Draw(
"P");
else ho->Draw(); can->SaveAs((htmlDir +
"ho_rbx_timing1D.gif").c_str());
1109 if(hf->GetEntries()>0)hf->Draw(
"P");
else hf->Draw(); can->SaveAs((htmlDir +
"hf_rbx_timing1D.gif").c_str());
1111 htmlFile <<
"</table>" << endl;
1113 htmlFile <<
"</body> " << endl;
1114 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="")
HcalElectronicsMap generateHcalElectronicsMap()
int CalcIeta(int subdet, int eta, int depth)
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)
std::string valueString(void) const
const HcalFrontEndId getHcalFrontEndId(const DetId &)
bool isHF(int etabin, int depth)
int64_t getIntValue(void) const
std::map< HcalDetId, unsigned int > badstatusmap
HcalLogicalMap * logicalMap_
static void printTableTail(ofstream &file)
Readout chain identification for Hcal [31:26] Unused (so far) [25] Trigger-chain id flag [24:20] Read...
const DetId lookup(HcalElectronicsId fId) const
lookup the logical detid associated with the given electronics id