| 1 | #!/bin/bash
|
|---|
| 2 | #
|
|---|
| 3 | source `dirname $0`/../Sourcefile.sh
|
|---|
| 4 | printprocesslog "INFO starting $0"
|
|---|
| 5 |
|
|---|
| 6 | #root=/opt/root_svn/bin/thisroot.sh
|
|---|
| 7 | #source $root
|
|---|
| 8 |
|
|---|
| 9 | anapath=/loc_data/analysis
|
|---|
| 10 | auxpath=/loc_data/aux
|
|---|
| 11 |
|
|---|
| 12 | printprocesslog "INFO get list of calibrated files"
|
|---|
| 13 |
|
|---|
| 14 | #calfiles=( `find $anapath -type f -name '*_C.root' 2>/dev/null | grep -v failed_stuff | sort` )
|
|---|
| 15 | calfiles=( `find $anapath/callisto -type f -name '*_C.root' 2>/dev/null | sort` )
|
|---|
| 16 | if [ ${#calfiles[@]} -eq 0 ]
|
|---|
| 17 | then
|
|---|
| 18 | printprocesslog "INFO no calibrated files available "
|
|---|
| 19 | finish
|
|---|
| 20 | fi
|
|---|
| 21 | #starfiles=( `find $anapath -type f -name '*_I.root' 2>/dev/null | grep -v failed_stuff | sort` )
|
|---|
| 22 | starfiles=( `find $anapath/star -type f -name '*_I.root' 2>/dev/null | sort` )
|
|---|
| 23 | if [ ${#starfiles[@]} -eq 0 ]
|
|---|
| 24 | then
|
|---|
| 25 | printprocesslog "INFO no star files available "
|
|---|
| 26 | finish
|
|---|
| 27 | fi
|
|---|
| 28 |
|
|---|
| 29 | echo ${#calfiles[@]}" "${#starfiles[@]}
|
|---|
| 30 | printprocesslog "INFO #cal-files:"${#calfiles[@]}" #star-files:"${#starfiles[@]}
|
|---|
| 31 |
|
|---|
| 32 | if [ ${#starfiles[@]} -lt ${#calfiles[@]} ]
|
|---|
| 33 | then
|
|---|
| 34 | for calfile in ${calfiles[@]}
|
|---|
| 35 | do
|
|---|
| 36 | starfile=`echo $calfile | sed -e 's/callisto/star/' -e 's/_C/_I/'`
|
|---|
| 37 | if ! ls $starfile >/dev/null 2>&1
|
|---|
| 38 | then
|
|---|
| 39 | echo $starfile
|
|---|
| 40 | echo $starfile" is missing -> reprocess. "
|
|---|
| 41 | #source=`echo $starfile | cut -d/ -f4`
|
|---|
| 42 | seqfile=`echo $starfile | sed -e 's/star/sequences/' -e 's/_I.root/.seq/'`
|
|---|
| 43 | echo $seqfile
|
|---|
| 44 | ##echo $source" "$seqfile
|
|---|
| 45 | #`dirname $0`/RunStar.sh $source $seqfile
|
|---|
| 46 | `dirname $0`/RunStar.sh $seqfile
|
|---|
| 47 | if ! ls $starfile >/dev/null 2>&1
|
|---|
| 48 | then
|
|---|
| 49 | echo " failed: check log "`echo $starfile | sed -e 's/_I.root/-images.log/'`
|
|---|
| 50 | echo " check calfile "$calfile
|
|---|
| 51 | fi
|
|---|
| 52 | echo ""
|
|---|
| 53 | fi
|
|---|
| 54 | done
|
|---|
| 55 | fi
|
|---|
| 56 |
|
|---|
| 57 |
|
|---|