ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/Jeng/scripts/make_html.csh
Revision: 1.2
Committed: Fri Oct 30 22:08:56 2009 UTC (15 years, 6 months ago) by jengbou
Content type: application/x-csh
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +7 -3 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 samples = ("TTbar_madgraph" "TTbar_mcatnlo" "TTbar_pythia" "WJets_madgraph" "ZJets_madgraph" "WcJets_madgraph" "AstarJets_madgraph")
9     set datasets = ("/TTbarJets-madgraph/Summer09-MC_31X_V3_7TeV_preproduction-v1/GEN-SIM-RECO/" "/TTbar-mcatnlo/Summer09-MC_31X_V3_7TeV_preproduction-v2/GEN-SIM-RECO" "/TTbar/Summer09-MC_31X_V3_7TeV-v1/GEN-SIM-RECO" "/WJets-madgraph/Summer09-MC_31X_V3_7TeV_preproduction-v1/GEN-SIM-RECO" "/ZJets-madgraph/Summer09-MC_31X_V3_7TeV_preproduction-v1/GEN-SIM-RECO" "/WcJets-madgraph/Summer09-MC_31X_V3_7TeV_preproduction-v1/GEN-SIM-RECO" "/AstarJets-madgraph/Summer09-MC_31X_V3_7TeV_preproduction-v1/GEN-SIM-RECO")
10 jengbou 1.2 set weights = (0.0169 0.0321 0.006 0.1817 0.1012 0.0026 0.0277)
11 jengbou 1.1
12     set pngdir = "/Users/jengbou/Desktop/TopWork/Analysis/Validation/7TeV/"
13     set publishdir = "/afs/fnal.gov/files/home/room3/jengbou/public_html/MCValidation/Summer09_7TeV/"
14    
15     set idx = 1
16     foreach sample ($samples)
17     echo $weights[$idx] $sample
18     set sampleDir = ("./$sample")
19     echo "Making webpage for $sample; dataset = $datasets[$idx]"
20     python make_table.py $sampleDir true $sample $weights[$idx] > ! macro.$sample.log
21    
22     cat template.html | sed \
23     -e s@SAMPLE@$sample@g \
24     -e s@DATASET@$datasets[$idx]@g \
25 jengbou 1.2 > ! tmp.txt
26 jengbou 1.1
27 jengbou 1.2 cat tmp.txt Summary_cut_flow_$sample.txt > ! $sample/index.html
28    
29     mkdir -p $publishdir/$sample
30 jengbou 1.1 rm -f $publishdir/$sample/*.png
31     cp $pngdir/$sample/*.png $publishdir/$sample
32     cp $sample/*.root $publishdir/$sample
33     cp $sample/index.html $publishdir/$sample
34 jengbou 1.2
35 jengbou 1.1 @ idx++
36     end
37 jengbou 1.2 rm -f tmp.txt
38 jengbou 1.1
39     endif