ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/auterman/SusyScan/CrabScript/list
Revision: 1.1.1.1 (vendor branch)
Committed: Mon Feb 25 15:54:04 2008 UTC (17 years, 2 months ago) by auterman
Branch: tex, Demo
CVS Tags: start
Changes since 1.1: +10 -5 lines
Error occurred while calculating annotation data.
Log Message:
PAT Jet Analyzer

File Contents

# Content
1 #!/bin/bash
2
3 DCACHEDIR=/pnfs/desy.de/cms/analysis/uhh/susy/susy-signal-mc/scan
4 CFGDIR=/rdata2/uhh-cms014/data/auterman/data/scan
5
6 POINTS=`ls Pythia_mSUGRA_incl_*.cfg`
7 for POINT in $POINTS
8 do
9 #strip possible endings:
10 SAMPLE=`echo $POINT | sed -e "s|.cfg| |"`
11 SAMPLE=`echo $SAMPLE | sed -e "s|.cfi| |"`
12 SAMPLE=`echo $SAMPLE | sed -e "s|.cff| |"`
13 SAMPLE=`echo $SAMPLE | sed -e "s|.dat| |"`
14 SAMPLENAME=`cat $POINT | grep "untracked string fileName" | cut -b 38-`
15 SAMPLENAME=`echo $SAMPLENAME | sed -e "s|.root\"||"`
16 N=`ls $DCACHEDIR/$SAMPLENAME* | wc -l`
17 echo "$SAMPLE: $N"
18 TOT=$(($TOT+$N))
19
20 #Write configuration files to access the data
21 CFGFILE="$CFGDIR/$SAMPLE.cfg"
22 rm -f $CFGFILE
23 touch $CFGFILE
24 echo "source = PoolSource {" >> $CFGFILE
25 echo "untracked vstring fileNames = {" >> $CFGFILE
26 rm -f /tmp/$SAMPLE
27 touch /tmp/$SAMPLE
28 FILES=`ls $DCACHEDIR/$SAMPLENAME*`
29 for FILE in $FILES
30 do
31 SIZE=`ls -ls $FILE | cut -b -5`
32 SIZE=`echo $SIZE | sed -e "s|-||"`
33 SIZE=`echo $SIZE | sed -e "s|r||"`
34 SIZE=`echo $SIZE | sed -e "s|w||"`
35 if [ "$SIZE" -le 30000 ]
36 then
37 echo "Bad file: $FILE has size $SIZE"
38 else
39 echo " \"dcap://$FILE\"," >> /tmp/$SAMPLE
40 fi
41 done
42 #remove last ',':
43 FILES=`cat /tmp/$SAMPLE`
44 FILES=${FILES%,}
45 rm -f /tmp/$SAMPLE
46 for FILE in $FILES
47 do
48 echo " $FILE" >> $CFGFILE
49 done
50 echo " }" >> $CFGFILE
51 echo "}" >> $CFGFILE
52 done
53 echo "In total: $TOT"