source: trunk/DataCheck/QuickLook/ReDoStar.sh@ 19007

Last change on this file since 19007 was 18394, checked in by Daniela Dorner, 9 years ago
updated to use the variable certainate instead of editing the script, removed not needed lines
  • Property svn:executable set to *
File size: 1.7 KB
Line 
1#!/bin/bash
2#
3source `dirname $0`/../Sourcefile.sh
4printprocesslog "INFO starting $0"
5
6# get date
7checkstring=`echo $certaindate | grep -E -o '^20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]$'`
8if [ "$checkstring" = "" ] || [ "$certaindate" = "" ]
9then
10 echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)"
11 finish
12else
13 date=$certaindate
14fi
15
16printprocesslog "INFO get list of calibrated files for "$date
17calfiles=( `find $anapath/callisto/$date -type f -name '*_C.root' 2>/dev/null | sort` )
18if [ ${#calfiles[@]} -eq 0 ]
19then
20 printprocesslog "INFO no calibrated files available for "$date
21 finish
22fi
23printprocesslog "INFO get list of star files"
24starfiles=( `find $anapath/star/$date -type f -name '*_I.root' 2>/dev/null | sort` )
25if [ ${#starfiles[@]} -eq 0 ]
26then
27 printprocesslog "INFO no star files available "
28# finish
29fi
30
31echo ${#calfiles[@]}" "${#starfiles[@]}
32printprocesslog "INFO #cal-files:"${#calfiles[@]}" #star-files:"${#starfiles[@]}
33
34if [ ${#starfiles[@]} -lt ${#calfiles[@]} ]
35then
36 for calfile in ${calfiles[@]}
37 do
38 starfile=`echo $calfile | sed -e 's/callisto/star/' -e 's/_C/_I/'`
39 logfile=`echo $starfile | sed -e 's/_I.root/-images.log/'`
40 if ! ls $starfile >/dev/null 2>&1
41 then
42 echo $starfile" is missing -> reprocess. "
43 outpath=`dirname $starfile`
44 makedir $outpath
45 `dirname $0`/RunStar.sh $logfile $calfile $outpath $starfile &
46 if ! ls $starfile >/dev/null 2>&1
47 then
48 echo " failed: check log "`echo $starfile | sed -e 's/_I.root/-images.log/'`
49 echo " check calfile "$calfile
50 fi
51 echo ""
52 fi
53 done
54fi
55
56
Note: See TracBrowser for help on using the repository browser.