Changeset 14875
- Timestamp:
- 02/06/13 10:50:23 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Processing/FillMoonInfo.sh
r14849 r14875 8 8 printprocesslog "INFO starting $0 with option doupdate="$doupdate 9 9 10 logfile=$runlogpath"/FillMoonInfo-"$datetime".log"11 date >> $logfile10 #logfile=$runlogpath"/FillMoonInfo-"$datetime".log" 11 #date >> $logfile 12 12 13 13 # get last 3, 6 or 9 nights … … 17 17 ) 18 18 #dates=( `find $auxdata -mindepth 3 -type d | sort -r | sed "s/\${auxdata_for_sed}//g" | sed -e 's/^\///'` ) 19 echo ${dates[@]} 19 20 20 printprocesslog "INFO processing the following night(s): "${dates[@]} 21 echo `date`": processing the following night(s): "${dates[@]}>> $logfile 2>&121 #echo `date`": processing the following night(s): "${dates[@]} #>> $logfile 2>&1 22 22 23 23 # do filling of aux data … … 29 29 continue 30 30 fi 31 echo "processing date "$date 31 printprocesslog "INFO processing date "$date 32 #echo "INFO processing date "$date 32 33 33 34 # get file numbers from DB … … 52 53 do 53 54 printprocesslog "INFO processing file number "$runnumber"_"`printf %03d $filenum` 54 echo `date`": processing file number "$runnumber"_"`printf %03d $filenum`>> $logfile 2>&155 #echo `date`": processing file number "$runnumber"_"`printf %03d $filenum` # >> $logfile 2>&1 55 56 56 57 # get input info from DB 58 # query 999 in case value is empty to easily recognize this case 57 59 query="SELECT if (isnull(fRightAscension), 999, fRightAscension), " 58 60 query=$query" if (isnull(fDeclination), 999, fDeclination), " … … 60 62 query=$query" WHERE fNight="$runnumber" AND fRunID="$filenum 61 63 info=( `sendquery` ) 62 echo ${info[@]}64 #echo ${info[@]} 63 65 #echo "/home/fact/FACT++.db/moon "${info[2]} ${info[3]}" --ra=${info[0]} --dec=${info[1]} 2>/dev/null" 64 66 if [ "${info[0]}" == "999" ] && [ "${info[1]}" == "999" ] … … 70 72 # return values of the programm 71 73 # timestamp sunzd moon-visible moondisk moonzd angletomoon angletosun 72 echo ${lightinfo[@]}74 #echo ${lightinfo[@]} 73 75 74 76 # build query to update runinfo in DB 75 77 query="UPDATE RunInfo SET fSunZenithDistance="${lightinfo[2]}", fMoonDisk="${lightinfo[4]} 76 78 query=$query", fMoonZenithDistance="${lightinfo[5]} 77 echo $query78 79 if [ "${info[0]}" != "999" ] && [ "${info[1]}" != "999" ] 79 80 then … … 83 84 # add where condition 84 85 query=$query" WHERE fNight="$runnumber" AND fRunID="$filenum 85 echo $query86 #echo $query 86 87 # send query to DB 87 88 sendquery >/dev/null
Note:
See TracChangeset
for help on using the changeset viewer.