Changeset 18068 for trunk/DataCheck/QuickLook
- Timestamp:
- 01/04/15 04:57:35 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/QuickLook/Step1.sh
r17903 r18068 28 28 # create aux directory on daq, if not yet there 29 29 auxpath=/loc_data/aux/$datepath 30 makedir $auxpath 30 makedir $auxpath >/dev/null 31 31 # create path for info files needed for analysis 32 32 infopath=$anapath/info/$datepath 33 makedir $infopath 33 makedir $infopath >/dev/null 34 34 echo "" > $infopath/runrow.txt 35 35 # create path for callisto output 36 36 calpath=$anapath/callisto/$datepath 37 makedir $calpath 37 makedir $calpath >/dev/null 38 38 rawpathnewdaq=/newdaq/raw/$datepath 39 39 rawpath=/loc_data/raw/$datepath … … 105 105 finish 106 106 fi 107 fileslocal=( `find $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?'| sort` )108 callistofiles=( `find $calpath -type f -name $date*-calibration.log | sort` )107 fileslocal=( `find -L $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' 2>/dev/null| sort` ) 108 callistofiles=( `find $calpath -type f -name $date*-calibration.log 2>/dev/null| sort` ) 109 109 # get number of dataruns from DB 110 110 query="SELECT Count(*) FROM RunInfo WHERE fNight="$date" AND fRunTypeKey=1" … … 121 121 122 122 # create raw directory on daq, if not yet there 123 makedir $rawpath 124 125 echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated123 makedir $rawpath >/dev/null 124 125 #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated 126 126 printprocesslog "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated 127 127 … … 134 134 135 135 numcalibrated=0 136 echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated136 #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated 137 137 printprocesslog "INFO status beginning of while-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated 138 138 … … 155 155 then 156 156 nondrs=`basename $file | sed -e 's/[.]drs//g'` 157 nondrsfile=`find $rawpath -name $nondrs.*z`157 nondrsfile=`find -L $rawpath -name $nondrs.*z` 158 158 tstop=`$factpath/fitsdump -h $nondrsfile 2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'` 159 159 else … … 203 203 fi 204 204 205 # # temporary check 206 # if [ "`echo $file | grep -o drs`" == "drs" ] 207 # then 208 # nondrs=`basename $file | sed -e 's/[.]drs//g'` 209 # nondrsfile=`find -L $rawpath -name $nondrs.*z` 210 # tstop=`$factpath/fitsdump -h $nondrsfile 2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'` 211 # else 212 # tstop=`$factpath/fitsdump -h $file 2>/dev/null | grep TSTOPI | grep -E -o '[0-9]+'` 213 # fi 214 # # when stop time is 0, file is not closed 215 # # when an error is returned the tstop is empty 216 # if [ "$tstop" == "0" ] || [ "$tstop" == "" ] 217 # then 218 # printprocesslog "WARN "$file" not yet closed. -> continue (temporary check)" 219 # continue 220 # fi 221 # # end temporary check 222 205 223 # treat other files (.fits.fz) 206 224 runtype=`$factpath/fitsdump -h $localfile 2>/dev/null | grep RUNTYPE | grep -E -o "['][a-z0-9._-]+[']" | sed -e "s/'//g" -e "s/_/-/g" -e "s/[.]//g"` … … 264 282 calfile=$calpath"/"$date"_"$runnum"_C.root" 265 283 printprocesslog "INFO starting RunCallisto.sh for drun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" outpath "$outpath" calfile "$calfile 266 echo "INFO starting RunCallisto.sh for drun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" outpath "$outpath" calfile "$calfile284 #echo "INFO starting RunCallisto.sh for drun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" outpath "$outpath" calfile "$calfile 267 285 `dirname $0`/RunCallisto.sh "drun" $callistolog $localfile $drscalib $drstime $calpath $calfile & 268 286 fi … … 283 301 #else 284 302 # not needed for QLA 303 #numcalibrated=`echo " $numcalibrated + 1 " | bc -l` 285 304 #if ! [ -e $callistolog ] 286 305 #then 287 306 # pedfile=$calpath"/"$date"_"$runnum"-pedestal.root" 288 307 # # count runs to be calibrated 289 # numcalibrated=`echo " $numcalibrated + 1 " | bc -l`290 308 # printprocesslog "INFO starting RunCallisto.sh for prun "$localfile" logfile "$callistolog" drs-calib "$drscalib" pedfile "$pedfile 291 309 # echo "INFO starting RunCallisto.sh for prun "$localfile" logfile "$callistolog" drs-calib "$drscalib" pedfile "$pedfile … … 298 316 # do lp-treatment -> not needed for QLA 299 317 #lpfile=$calpath"/"$date"_"$runnum"-lightpulser.root" 318 #numcalibrated=`echo " $numcalibrated + 1 " | bc -l` 300 319 #if ! [ -e $callistolog ] 301 320 #then … … 303 322 # then 304 323 # # count runs to be calibrated 305 # numcalibrated=`echo " $numcalibrated + 1 " | bc -l`306 324 # printprocesslog "INFO starting RunCallisto.sh for crun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" lpfile "$lpfile 307 325 # echo "INFO starting RunCallisto.sh for crun "$localfile" logfile "$callistolog" drs-calib "$drscalib" drs-time "$drstime" lpfile "$lpfile … … 314 332 drstime=$calpath"/"$date"_"$runnum"-drstime.root" 315 333 # starting calibration 334 numcalibrated=`echo " $numcalibrated + 1 " | bc -l` 316 335 if ! [ -e $callistolog ] 317 336 then 318 337 # count runs to be calibrated 319 numcalibrated=`echo " $numcalibrated + 1 " | bc -l`320 338 printprocesslog "INFO starting RunCallisto.sh for time "$localfile" logfile "$callistolog" drs-ped "$drsped" drstime "$drstime 321 echo "INFO starting RunCallisto.sh for time "$localfile" logfile "$callistolog" drs-ped "$drsped" drstime "$drstime339 #echo "INFO starting RunCallisto.sh for time "$localfile" logfile "$callistolog" drs-ped "$drsped" drstime "$drstime 322 340 `dirname $0`/RunCallisto.sh "time" $callistolog $localfile $drsped $drstime & 323 341 fi … … 342 360 printprocesslog "INFO get new file lists for "$datepath 343 361 files=( `find $rawpathnewdaq -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` ) 344 fileslocal=( `find $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` )362 fileslocal=( `find -L $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` ) 345 363 callistofiles=( `find $calpath -type f -name $date*-calibration.log | sort` ) 346 echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated364 #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated 347 365 printprocesslog "INFO status after for-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated 348 366 … … 355 373 printprocesslog "INFO get new file lists for "$datepath 356 374 files=( `find $rawpathnewdaq -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` ) 357 fileslocal=( `find $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` )375 fileslocal=( `find -L $rawpath -type f -regex '.*[.]fits[.]?[g]?[f]?[z]?' | sort` ) 358 376 callistofiles=( `find $calpath -type f -name $date*-calibration.log | sort` ) 359 377 fi 360 echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated378 #echo "INFO #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated 361 379 printprocesslog "INFO status after wait end of while-loop #files-daq:"${#fileslocal[@]}" #files-newdaq:"${#files[@]}" #callisto-logs:"${#callistofiles[@]}" #runs:"$numcalibrated 380 sleep 30 381 printprocesslog "INFO sleep 30" 362 382 done 363 383
Note:
See TracChangeset
for help on using the changeset viewer.