#!/bin/bash # source `dirname $0`/../Sourcefile.sh printprocesslog "INFO starting $0" #root=/opt/root_svn/bin/thisroot.sh #source $root anapath=/loc_data/analysis auxpath=/loc_data/aux printprocesslog "INFO get list of calibrated files" #calfiles=( `find $anapath -type f -name '*_C.root' 2>/dev/null | grep -v failed_stuff | sort` ) calfiles=( `find $anapath/callisto -type f -name '*_C.root' 2>/dev/null | sort` ) if [ ${#calfiles[@]} -eq 0 ] then printprocesslog "INFO no calibrated files available " finish fi #starfiles=( `find $anapath -type f -name '*_I.root' 2>/dev/null | grep -v failed_stuff | sort` ) starfiles=( `find $anapath/star -type f -name '*_I.root' 2>/dev/null | sort` ) if [ ${#starfiles[@]} -eq 0 ] then printprocesslog "INFO no star files available " finish fi echo ${#calfiles[@]}" "${#starfiles[@]} printprocesslog "INFO #cal-files:"${#calfiles[@]}" #star-files:"${#starfiles[@]} if [ ${#starfiles[@]} -lt ${#calfiles[@]} ] then for calfile in ${calfiles[@]} do starfile=`echo $calfile | sed -e 's/callisto/star/' -e 's/_C/_I/'` if ! ls $starfile >/dev/null 2>&1 then echo $starfile echo $starfile" is missing -> reprocess. " #source=`echo $starfile | cut -d/ -f4` seqfile=`echo $starfile | sed -e 's/star/sequences/' -e 's/_I.root/.seq/'` echo $seqfile ##echo $source" "$seqfile #`dirname $0`/RunStar.sh $source $seqfile `dirname $0`/RunStar.sh $seqfile if ! ls $starfile >/dev/null 2>&1 then echo " failed: check log "`echo $starfile | sed -e 's/_I.root/-images.log/'` echo " check calfile "$calfile fi echo "" fi done fi