ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Jeng/tools/make_html_opt.csh
Revision: 1.2
Committed: Wed Oct 20 03:30:26 2010 UTC (14 years, 6 months ago) by jengbou
Content type: application/x-csh
Branch: MAIN
Changes since 1.1: +11 -5 lines
Log Message:
update

File Contents

# User Rev Content
1 jengbou 1.1 #! /bin/tcsh
2     if ( ! `klist |& grep -c "afs@FNAL.GOV"`) then
3     echo "No afs! Initializing..."
4     kinit -A -f jengbou@FNAL.GOV
5 jengbou 1.2 aklog -cell fnal.gov -k FNAL.GOV
6 jengbou 1.1 else
7     echo "Starting job"
8    
9 jengbou 1.2 set lint = ("6.95pb-1")
10     set njets = ("0" "1" "2" "3" "4")
11     set symb1 = "\≥"
12     # set symb1 = "="
13 jengbou 1.1 foreach njet ($njets)
14     set jbinName = "Incl${njet}"
15 jengbou 1.2 # set jbinName = "Excl${njet}"
16 jengbou 1.1 set categories = ("Data_RelIsogt0p1ORD0gt0p02")
17     set selecs = ("Sel0" "Sel5") ## make sure selec[n]/SELSUFFIXn; n = size of this array
18     set subtitle1 = ("QCD_vs_WJets")
19     set subtitle2 = ("Data_vs_IKS")
20 jengbou 1.2 set jetcolls = ("Calo" "JPT")
21 jengbou 1.1
22 jengbou 1.2 set pdfdir = "/Users/jengbou/Desktop/TopWork/Analysis/CMSSW_3_8_4/Results_${lint}_${jbinName}_KSopt"
23 jengbou 1.1 #echo "pdfdir = $pdfdir"
24     #exit
25    
26     foreach jetcol ($jetcolls)
27     set selec = ()
28     foreach sel ($selecs)
29     set selec = ($selec ${jbinName}_${sel}_${jetcol})
30     end
31     echo "selections = ${selec}"
32 jengbou 1.2 ## set publishdir = "/afs/fnal.gov/files/home/room3/jengbou/public_html/IKS/Results_${lint}_${jbinName}_${jetcol}_KSopt"
33     set publishdir = "~/home/www/IKS/Results_${lint}_${jbinName}_${jetcol}_KSopt"
34 jengbou 1.1 echo "publish dir = $publishdir"
35     mkdir -p $publishdir
36    
37     set idx = 1
38     foreach category ($categories)
39    
40     echo "Making webpage for ${category}_${jetcol}"
41     mkdir -p $publishdir/$category
42    
43     python make_table.py $pdfdir/$category/ ${selec} > ! tmp.log
44    
45     cat template_4p54pb-1_opt.html | sed \
46     -e s@LINT@$lint@g \
47 jengbou 1.2 -e s@SYMB@$symb1@g \
48 jengbou 1.1 -e s@NJETS@$njet@g \
49     -e s@JETCOL@$jetcol@g \
50     -e s@SUBTIT1@$subtitle1@g \
51     -e s@SUBTIT2@$subtitle2@g \
52     -e s@SELSUFFIX0@$selec[1]@g \
53     -e s@SELSUFFIX5@$selec[2]@g \
54     > ! tmp.txt
55    
56     cat tmp.txt $pdfdir/$category/Summary_Results.txt > ! $pdfdir/$category/index.html
57    
58     rm -f tmp.txt tmp.log
59     ## rm -f $publishdir/$category/*.pdf
60     cp $pdfdir/$category/*_${jetcol}.pdf $publishdir/$category
61     ## rm -f $publishdir/$category/*.png
62     cp $pdfdir/$category/*_${jetcol}.png $publishdir/$category
63     cp $pdfdir/$category/*_${jetcol}_KSopt.* $publishdir/$category
64     cp $pdfdir/$category/index.html $publishdir/$category
65    
66     @ idx++
67    
68     end ## category
69     end ## jetcol
70     end ## njet
71     endif