Changeset 17090 for trunk/DataCheck/Processing
- Timestamp:
- 09/06/13 15:47:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Processing/FillDrsTemp.sh
r14835 r17090 1 1 #!/bin/bash 2 2 3 # option 4 doupdate="yes" # update all entries (needed when new fields have been added) 5 #doupdate="no" # fill only entries which are not yet existing (default) 3 # option whether to fill all row or only those where information is missing 4 # $doupdate might be given as environment variable 5 if [ "$doupdate" = "" ] 6 then 7 doupdate="yes" # update all entries (needed when new fields have been added) 8 doupdate="no" # fill only entries which are not yet existing (default) 9 fi 6 10 7 11 source `dirname $0`/../Sourcefile.sh 8 12 printprocesslog "INFO starting $0 with option doupdate="$doupdate 9 13 10 logfile=$runlogpath"/Fill Temp-"$datetime".log"14 logfile=$runlogpath"/FillDrsTemp-"$datetime".log" 11 15 date >> $logfile 12 16 … … 21 25 fi 22 26 23 24 # get last 3, 6 or 9 nights 25 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \ 26 # `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \ 27 # `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \ 28 ) 29 dates=( `find -L $ziprawdata -mindepth 3 -type d | sort | sed "s/\${ziprawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw 27 # get dates 28 if [ "$certaindate" != "" ] 29 then 30 getdates $certaindate 31 else 32 # get all night 33 #getdates "all" 34 # get last 6 nights 35 getdates 6 36 fi 37 38 30 39 printprocesslog "INFO processing the following night(s): "${dates[@]} 31 40 echo `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1 32 41 33 echo ${dates[@]}42 #echo ${dates[@]} 34 43 35 44 cd $mars … … 44 53 continue 45 54 fi 55 #echo $auxdir" @ "`date` 46 56 47 57 # check if aux files are available from that night … … 151 161 if [ -e $drstempfile ] && [ $tempnumerrors -eq 0 ] 152 162 then 153 drstemps=( `root -q -b -l fact/ drstemp.C\("\"$drstempfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )163 drstemps=( `root -q -b -l fact/processing/drstemp.C\("\"$drstempfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` ) 154 164 if [ "${drstemps[0]}" == "" ] 155 165 then … … 187 197 if [ -e $magicweatherfile ] && [ $weathernumerrors -eq 0 ] 188 198 then 189 mtemps=( `root -q -b -l fact/ magictemp.C\("\"$magicweatherfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )199 mtemps=( `root -q -b -l fact/processing/magictemp.C\("\"$magicweatherfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` ) 190 200 if [ "${mtemps[0]}" == "" ] 191 201 then … … 208 218 query=$query" WHERE fNight="$runnumber" AND fRunID="$filenum 209 219 210 echo $query220 #echo $query 211 221 # send query to DB 212 222 sendquery >/dev/null
Note:
See TracChangeset
for help on using the changeset viewer.