Changeset 18944 for trunk/DataCheck
- Timestamp:
- 02/09/18 23:03:23 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Processing/FillAuxMagic.sh
r18940 r18944 29 29 then 30 30 getdates $certaindate 31 echo `date`": processing the following night(s): "${dates[@]} 31 32 else 32 33 # get all night … … 87 88 then 88 89 printprocesslog "WARN for $magicweatherfile fverify returned "$weathernumerrors" error(s)." 89 fi90 fi91 92 fsctempfile=$auxdir/$runnumber.FSC_CONTROL_TEMPERATURE.fits93 if ! [ -e $fsctempfile ]94 then95 printprocesslog "WARN "$fsctempfile" not found."96 else97 tempnumerrors=`fverify $fsctempfile 2>/dev/null | grep -o '[0-9][ ]error(s)' | grep -E -o '[0-9]'`98 if [ $tempnumerrors -gt 0 ]99 then100 printprocesslog "WARN for $fsctempfile fverify returned "$tempnumerrors" error(s)."101 90 fi 102 91 fi … … 150 139 tstop=`echo " $tstopi + $tstopf " | bc -l` 151 140 fi 141 #echo `date`": processing file number "$runnumber"_"`printf %03d $filenum`" "$runtype 152 142 153 143 # build query to update runinfo in DB 154 144 query="UPDATE RunInfo SET " 155 145 156 # get information from fsc: T[31]157 if [ -e $fsctempfile ] && [ $tempnumerrors -eq 0 ]158 then159 fsctemps=( `root -q -b -l fact/processing/camtemp.C\("\"$fsctempfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )160 if [ "${fsctemps[0]}" == "" ]161 then162 query=$query"fCameraTempMean=NULL"163 else164 query=$query"fCameraTempMean="${fsctemps[0]}165 fi166 if [ "${fsctemps[1]}" == "" ]167 then168 query=$query", fCameraTempRms=NULL"169 else170 query=$query", fCameraTempRms="${fsctemps[1]}171 fi172 if [ "${fsctemps[2]}" == "" ]173 then174 query=$query", fCameraTempRmsMean=NULL"175 else176 query=$query", fCameraTempRmsMean="${fsctemps[2]}177 fi178 else179 query=$query" fCameraTempMean=NULL"180 query=$query", fCameraTempRms=NULL"181 query=$query", fCameraTempRmsMean=NULL"182 fi183 #fCameraTempMeanRms: mean of rms of single sensors184 185 146 # get information from weather: T 186 147 if [ -e $magicweatherfile ] && [ $weathernumerrors -eq 0 ] 187 148 then 188 mtemps=( `root -q -b -l fact/processing/magictemp.C\("\"$magicweatherfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` ) 149 #echo $magicweatherfile" "$tstart" "$tstop 150 #root -q -b -l fact/processing/magicweather.C\("\"$magicweatherfile\""\,$tstart\,$tstop\) | grep "result" 151 mtemps=( `root -q -b -l fact/processing/magicweather.C\("\"$magicweatherfile\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[-]?[0-9]+[.]?[0-9]*'` ) 152 #echo ${mtemps[@]} 189 153 if [ "${mtemps[0]}" == "" ] 190 154 then 191 query=$query" ,fOutsideTempMean=NULL"192 else 193 query=$query" ,fOutsideTempMean="${mtemps[0]}155 query=$query"fOutsideTempMean=NULL" 156 else 157 query=$query"fOutsideTempMean="${mtemps[0]} 194 158 fi 195 159 if [ "${mtemps[1]}" == "" ] … … 199 163 query=$query", fOutsideTempRms="${mtemps[1]} 200 164 fi 165 if [ "${mtemps[2]}" == "" ] 166 then 167 query=$query", fHumidityMean=NULL" 168 else 169 query=$query", fHumidityMean="${mtemps[2]} 170 fi 171 if [ "${mtemps[3]}" == "" ] 172 then 173 query=$query", fHumidityRms=NULL" 174 else 175 query=$query", fHumidityRms="${mtemps[3]} 176 fi 177 if [ "${mtemps[4]}" == "" ] 178 then 179 query=$query", fAirPressureMean=NULL" 180 else 181 query=$query", fAirPressureMean="${mtemps[4]} 182 fi 183 if [ "${mtemps[5]}" == "" ] 184 then 185 query=$query", fAirPressureRms=NULL" 186 else 187 query=$query", fAirPressureRms="${mtemps[5]} 188 fi 189 if [ "${mtemps[6]}" == "" ] 190 then 191 query=$query", fDewPointMean=NULL" 192 else 193 query=$query", fDewPointMean="${mtemps[6]} 194 fi 195 if [ "${mtemps[7]}" == "" ] 196 then 197 query=$query", fDewPointRms=NULL" 198 else 199 query=$query", fDewPointRms="${mtemps[7]} 200 fi 201 if [ "${mtemps[8]}" == "" ] 202 then 203 query=$query", fWindSpeedMean=NULL" 204 else 205 query=$query", fWindSpeedMean="${mtemps[8]} 206 fi 207 if [ "${mtemps[9]}" == "" ] 208 then 209 query=$query", fWindSpeedRms=NULL" 210 else 211 query=$query", fWindSpeedRms="${mtemps[9]} 212 fi 213 if [ "${mtemps[10]}" == "" ] 214 then 215 query=$query", fWindGustMean=NULL" 216 else 217 query=$query", fWindGustMean="${mtemps[10]} 218 fi 219 if [ "${mtemps[119]}" == "" ] 220 then 221 query=$query", fWindGustRms=NULL" 222 else 223 query=$query", fWindGustRms="${mtemps[11]} 224 fi 201 225 else 202 query=$query" ,fOutsideTempMean=NULL"226 query=$query"fOutsideTempMean=NULL" 203 227 query=$query", fOutsideTempRms=NULL" 204 fi 205 228 query=$query", fHumidityMean=NULL" 229 query=$query", fHumidityRms=NULL" 230 query=$query", fAirPressureMean=NULL" 231 query=$query", fAirPressureRms=NULL" 232 query=$query", fDewPointMean=NULL" 233 query=$query", fDewPointRms=NULL" 234 query=$query", fWindSpeedMean=NULL" 235 query=$query", fWindSpeedRms=NULL" 236 query=$query", fWindGustMean=NULL" 237 query=$query", fWindGustRms=NULL" 238 fi 239 206 240 # add where condition 207 241 query=$query" WHERE fNight="$runnumber" AND fRunID="$filenum
Note:
See TracChangeset
for help on using the changeset viewer.