ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Jeng/tools/make_html.csh
Revision: 1.5
Committed: Tue Oct 5 05:02:52 2010 UTC (14 years, 6 months ago) by jengbou
Content type: application/x-csh
Branch: MAIN
Changes since 1.4: +2 -2 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     else
6     echo "Starting job"
7    
8     set lint = ("2.88pb-1")
9 jengbou 1.3 set njets = ("0")
10 jengbou 1.4 ## set categories = ("MC" "MC_D0gt0p02" "MC_RelIsogt0p1" "Data_MC" "Data_D0gt0p02" "Data_RelIsogt0p1")
11 jengbou 1.5 set categories = ("Data_D0gt0p02" "Data_RelIsogt0p1" "Data_RelIsogt0p1ORD0gt0p02")
12 jengbou 1.1 ##set categories = ("MC")
13 jengbou 1.4 set selec = ("Incl0_Sel0" "Incl0_Sel1" "Incl0_Sel2" "Incl0_Sel3" "Incl0_Sel4" "Incl0_Sel5") ## make sure selec[n]/SELSUFFIXn; n = size of this array
14 jengbou 1.1 set subtitle1 = ("QCD_vs_WJets")
15     set subtitle2 = ("Data_vs_IKS")
16    
17 jengbou 1.2 set pdfdir = "/Users/jengbou/Desktop/TopWork/Analysis/CMSSW_3_6_3/Results_${lint}_Incl0"
18 jengbou 1.1 #echo "pdfdir = $pdfdir"
19     #exit
20 jengbou 1.2 set publishdir = "/afs/fnal.gov/files/home/room3/jengbou/public_html/IKS/Results_${lint}_Incl0"
21 jengbou 1.1 mkdir -p $publishdir
22    
23     set idx = 1
24     foreach category ($categories)
25    
26     set categoryDir = ("./$category")
27     echo "Making webpage for $category"
28     mkdir -p $publishdir/$category
29    
30 jengbou 1.5 python make_table.py $pdfdir/$category/ $selec > ! tmp.log
31 jengbou 1.1
32     cat template.html | sed \
33     -e s@LINT@$lint@g \
34 jengbou 1.3 -e s@NJETS@$njets@g \
35 jengbou 1.1 -e s@SUBTIT1@$subtitle1@g \
36     -e s@SUBTIT2@$subtitle2@g \
37 jengbou 1.2 -e s@SELSUFFIX0@$selec[1]@g \
38     -e s@SELSUFFIX1@$selec[2]@g \
39     -e s@SELSUFFIX2@$selec[3]@g \
40     -e s@SELSUFFIX3@$selec[4]@g \
41     -e s@SELSUFFIX4@$selec[5]@g \
42 jengbou 1.4 -e s@SELSUFFIX5@$selec[6]@g \
43 jengbou 1.1 > ! tmp.txt
44    
45     cat tmp.txt $category/Summary_Results.txt > ! $category/index.html
46    
47     rm -f tmp.txt tmp.log
48 jengbou 1.4 ## rm -f $publishdir/$category/*.pdf
49     ## cp $pdfdir/$category/*.pdf $publishdir/$category
50     ## rm -f $publishdir/$category/*.png
51     ## cp $pdfdir/$category/*.png $publishdir/$category
52 jengbou 1.1 cp $category/index.html $publishdir/$category
53    
54     @ idx++
55     end
56    
57     endif