ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/HiggsAnalysis/EarlyDataStudy/scripts/createTableSkimDetails.sh
Revision: 1.2
Committed: Thu May 6 17:55:14 2010 UTC (14 years, 11 months ago) by mangano
Content type: application/x-sh
Branch: MAIN
Changes since 1.1: +2 -2 lines
Log Message:
change destination folder for WWW pages

File Contents

# User Rev Content
1 mangano 1.1 #!/bin/bash
2     ############# preliminary part ################
3     choice=$1
4     echo "choice: " $choice
5     ###
6    
7    
8     dailySkim=$HEDS_NAMEPREFIX$HEDS_LABEL-v$HEDS_TASKATTEMPT
9    
10     ################################################
11     #possible options:
12     # choice:
13     # clean --> clean up the folder of detailed logs in AFS
14     # add --> add new entries for new daily-skim
15     ################################################
16    
17     case $choice in
18     clean)
19 mangano 1.2 cd $HEDS_WWWAREA_TMP/logs.SkimV$HEDS_SKIMVERSION/$HEDS_LABEL.listSkimmedEvents
20 mangano 1.1 rm *.html
21     rm configFiles/*
22     rmdir configFiles
23     ;;
24    
25     add)
26     mergedFileCastor="rfio:$HEDS_CASTORFOLDER/skimV$HEDS_SKIMVERSION/merged_$HEDS_LABEL.root"
27    
28 mangano 1.2 listSkimmedEventsPath=$HEDS_WWWAREA_TMP/logs.SkimV$HEDS_SKIMVERSION/$HEDS_LABEL.listSkimmedEvents
29 mangano 1.1
30     if [ ! -z $listSkimmedEventsPath/configFiles ];then
31     mkdir $listSkimmedEventsPath/configFiles
32     fi
33     cp $HEDSPATH/scripts/extractEvent.php $listSkimmedEventsPath/configFiles/
34     listSkims=`ls $listSkimmedEventsPath|grep -v summary|grep -v html|grep -v configFiles|grep -v dumperLogs`
35     # --- loop over skim paths ---
36     for j in $listSkims
37     do
38     nSkimmed=`cat $listSkimmedEventsPath/$j|wc -l`
39     skimName=`echo $j|sed s/^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9][0-9][0-9]\_//g`
40    
41     cat > $j.html <<EOF
42     <html>
43     <head>
44     <title>Skim Path Details</title>
45     <link rel="stylesheet" type="text/css" href="../../fromGiovanni.css" />
46     </head>
47     <body>
48     <h1>Skim Path Details</h1>
49     <table class='selectedEventsSummary'>
50     <tr>
51     <th>Run</th> <th> LumiSection </th> <th> event </th> <th> date & time</th> <th> event summary </th> <th> event display shots </th> <th> extract event </th>
52     </tr>
53     EOF
54     IFS=$'\n'
55     for line in $(cat $listSkimmedEventsPath/$j);
56     do
57     run=`echo $line|awk '{print $1}'`
58     ls=`echo $line|awk '{print $2}'`
59     evt=`echo $line|awk '{print $3}'`
60     date=`echo $line|awk '{print $4" "$5" "$6" "$7" "$8}'`
61    
62     cat >> $j.html <<EOF
63     <tr>
64     <td> $run </td> <td> $ls </td> <td> $evt </td> <td> $date</td> <td><a href="$HEDS_LABEL.dumperLogs/$run.$ls.$evt.log"> link </a></td> <td><a
65     href="../$HEDS_LABEL.shots/?match=${run}_${evt}_${ls}_*.png"> link </a></td> <td><a href="configFiles/extractEvent.php?input=$mergedFileCastor&amp;run=$run&amp;ls=$ls&amp;evt=$evt"> extractEvent.py </a></td>
66     </tr>
67     EOF
68     done
69     cat >> $j.html <<EOF
70     </table>
71    
72     </body>
73     </html>
74    
75     EOF
76     mv $j.html $listSkimmedEventsPath/
77     done
78     ;;
79     *)
80     echo "option " $1 " not defined"
81     ;;
82    
83     esac
84    
85