Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:10:25

0001 #!/bin/tcsh
0002 
0003 set file = `ls $1`
0004 set picExt = "gif"
0005 set Run = $2
0006 set LS = $3
0007 set OutputDir = "/cms/mon/data/dqm/lumi/dqmhtml/$Run/$LS"
0008 set OutputHTMLDirectory = "http://cmsmon.cern.ch/lumi/dqmhtml/$Run/$LS"
0009 set OutputHTMLINK = "/cms/mon/data/dqm/lumi/dqmhtml"
0010 set OutPrefix = "HLXDQM"
0011 
0012 
0013 set suffix = .`echo $Run`.`echo $LS`
0014 
0015 mkdir -p $OutputDir
0016 mkdir -p $OutputDir/$picExt
0017 
0018 #set filename = $OutPrefix$suffix.html
0019 
0020 set filename = $OutputHTMLINK/index.html
0021 
0022 
0023 if !(-e $filename) then 
0024 
0025 cat > $filename  <<EOF
0026 <html>
0027 <head>                                                                         
0028 <title>
0029 </title>
0030 </head>
0031 <body>
0032 <h2> This File Contains the List of DQM file plots for Run $Run and all Lumi Sections </h2>                                                     
0033 <p>
0034 
0035 <ul>
0036 EOF
0037 
0038 echo "$filename exist now"
0039 
0040 endif
0041 
0042 rm -f /tmp/TempScript.C
0043 
0044 if ( `echo $file` == '' ) then
0045     echo "$1 does not exist"
0046 else
0047 
0048 cat >> /tmp/TempScript.C <<EOF
0049 {
0050     
0051     gROOT->SetStyle("Plain");
0052 
0053     TFile myfile("$1","Read");
0054     
0055     if(myfile.cd("DQMData")){
0056         if(myfile.cd("DQMData/HFPlus")){
0057 EOF
0058 
0059 foreach n (`seq 1 18`)
0060 
0061 set prefix = 'HF_Plus_Wedge"$n"_'
0062 
0063 cat >> /tmp/TempScript.C <<EOF
0064 
0065     if(myfile.cd("DQMData/HFPlus/Wedge$n")){
0066         `echo $prefix`ETSum->Draw();
0067         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`ETSum$suffix.$picExt");
0068         `echo $prefix`Set1_Above->Draw();
0069         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set1_Above$suffix.$picExt");
0070         `echo $prefix`Set1_Between->Draw();
0071         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set1_Between$suffix.$picExt");
0072         `echo $prefix`Set1_Below->Draw();
0073         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set1_Below$suffix.$picExt");
0074         `echo $prefix`Set1_Above->Draw();
0075         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set2_Above$suffix.$picExt");
0076         `echo $prefix`Set1_Between->Draw();
0077         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set2_Between$suffix.$picExt");
0078         `echo $prefix`Set1_Below->Draw();
0079         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set2_Below$suffix.$picExt");
0080     }
0081 EOF
0082 
0083 end
0084 
0085 cat >> /tmp/TempScript.C <<EOF
0086  }
0087  if(myfile.cd("DQMData/HFMinus")){
0088 
0089 EOF
0090 
0091 foreach n (`seq 19 36`)
0092 
0093 set prefix = 'HF_Minus_Wedge"$n"_'
0094 
0095 cat >> /tmp/TempScript.C <<EOF
0096 
0097     if(myfile.cd("DQMData/HFMinus/Wedge$n")){
0098         `echo $prefix`ETSum->Draw();
0099         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`ETSum$suffix.$picExt");
0100         `echo $prefix`Set1_Above->Draw();
0101         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set1_Above$suffix.$picExt");
0102         `echo $prefix`Set1_Between->Draw();
0103         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set1_Between$suffix.$picExt");
0104         `echo $prefix`Set1_Below->Draw();
0105         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set1_Below$suffix.$picExt");
0106         `echo $prefix`Set1_Above->Draw();
0107         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set2_Above$suffix.$picExt");
0108         `echo $prefix`Set1_Between->Draw();
0109         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set2_Between$suffix.$picExt");
0110         `echo $prefix`Set1_Below->Draw();
0111         c1->SaveAs("$OutputDir/$picExt/`echo $prefix`Set2_Below$suffix.$picExt");
0112     }
0113 EOF
0114 
0115 end
0116 
0117 cat >> /tmp/TempScript.C <<EOF
0118         }
0119     } 
0120 }
0121 EOF
0122 
0123 root -b -q .x /tmp/TempScript.C
0124 
0125 rm /tmp/TempScript.C
0126 
0127 
0128 # Create html
0129 
0130 cat >> $OutputDir/$OutPrefix$suffix.html <<EOF
0131 <html>
0132 <head>
0133 <title> </title>
0134 </head>
0135 <body>
0136 <h1>Run $Run - Lumi Section $LS</h1>
0137 <h2>HF Plus</h2>
0138 EOF
0139 
0140 foreach n (`seq 1 18`)
0141 
0142 set prefix = 'HF_Plus_Wedge"$n"_'
0143 
0144 cat >> $OutputDir/$OutPrefix$suffix.html <<EOF
0145     <hr>
0146     <h3>HF Plus - Wedge $n</h3>
0147     <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`ETSum$suffix.$picExt"><img src="$OutputHTMLDirectory/$picExt/`echo $prefix`ETSum$suffix.$picExt"></a></br>
0148   <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Above$suffix.$picExt">  <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Above$suffix.$picExt" width="30%"></a>
0149 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Between$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Between$suffix.$picExt" width="30%"></a>
0150 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Below$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Below$suffix.$picExt" width="30%"></a></br>
0151 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Above$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Above$suffix.$picExt" width="30%"></a>
0152 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Between$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Between$suffix.$picExt" width="30%"></a>
0153 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Below$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Below$suffix.$picExt" width="30%"></a></br>
0154 EOF
0155 
0156 end
0157 
0158 cat >> $OutputDir/$OutPrefix$suffix.html <<EOF
0159     <h2>HF Minus</h2>  
0160 EOF
0161 
0162 foreach n (`seq 19 36`)
0163 
0164 set prefix = 'HF_Minus_Wedge"$n"_'
0165 
0166 cat >> $OutputDir/$OutPrefix$suffix.html <<EOF
0167     <hr>
0168     <h3>Wedge $n</h3>
0169 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`ETSum$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`ETSum$suffix.$picExt"></br>
0170 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Above$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Above$suffix.$picExt" width="30%">
0171 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Between$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Between$suffix.$picExt" width="30%">
0172 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Below$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set1_Below$suffix.$picExt" width="30%"></br>
0173 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Above$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Above$suffix.$picExt" width="30%">
0174 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Between$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Between$suffix.$picExt" width="30%">
0175 <a href="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Below$suffix.$picExt">    <img src="$OutputHTMLDirectory/$picExt/`echo $prefix`Set2_Below$suffix.$picExt" width="30%"></br>
0176 EOF
0177 
0178 end
0179 
0180 cat >> $OutputDir/$OutPrefix$suffix.html <<EOF
0181 </body>
0182 </html>
0183 EOF
0184 
0185 
0186 cat >> $OutputHTMLINK/index.html <<EOF
0187 <li> <a href="$OutputHTMLDirectory/$OutPrefix$suffix.html"> Run $Run LS $LS</a>
0188 
0189 </body>
0190 </html>
0191 EOF
0192 
0193 
0194 endif
0195