Changeset 18682 for trunk/DataCheck/Processing
- Timestamp:
- 12/18/16 18:38:15 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Processing/FillAuxData.sh
r18662 r18682 63 63 if [ "$2" = "" ] 64 64 then 65 printprocesslog "WARN couldn't get statistics from file $1 for run "$date" "$ file65 printprocesslog "WARN couldn't get statistics from file $1 for run "$date" "$rawfile 66 66 continue 67 67 fi … … 74 74 if [ "$evaluation" = "" ] 75 75 then 76 printprocesslog "WARN empty evaluation of statistic ("$@") for run "$date" "$file 76 if [ $runtypekey -ne 1 ] #|| [ $sourcekey -gt 0 ] #doesn't work as sourcekey can be empty 77 then 78 printprocesslog "DEBUG empty evaluation of statistic ("$@") for run "$date" file "$rawfile 79 else 80 printprocesslog "WARN empty evaluation of statistic ("$@") for run "$date" file "$rawfile 81 fi 77 82 fi 78 83 min=`echo $evaluation | grep -E -o 'Min:\ [-]?[0-9]+[.]?[0-9]*' | sed -e 's/Min:\ //'` … … 173 178 174 179 # get information from rawfile 175 rawfile=`ls $rawdir/$runnumber"_"\`printf %03d $filenum\`.fits* `180 rawfile=`ls $rawdir/$runnumber"_"\`printf %03d $filenum\`.fits* 2>/dev/null` 176 181 if ! [ -e $rawfile ] 177 182 then … … 180 185 fi 181 186 182 #runtype=`$factpath/fitsdump -h $rawfile 2>/dev/null | grep RUNTYPE | grep -E -o "['][a-z-]+[']" | sed -e "s/'//g"`187 runtype=`$factpath/fitsdump -h $rawfile 2>/dev/null | grep RUNTYPE | grep -E -o "['][a-z-]+[']" | sed -e "s/'//g"` 183 188 #mjdrefraw=`$factpath/fitsdump -h $rawfile 2>/dev/null | grep 'MJDREF' | grep -E -o '[0-9]{5}'` 184 189 tstarti=`$factpath/fitsdump -h $rawfile 2>/dev/null | grep 'TSTARTI' | grep -E -o '[0-9]{5}'` … … 234 239 fi 235 240 fi 241 # set runtype to 'unknown', if no runtype could be retrieved from file 242 if [ "$runtype" == "" ] 243 then 244 runtype="n/a" 245 fi 246 # on 15.11.2011 the runtypes had different names 247 if [ "$date" == "2011/11/15" ] 248 then 249 if [ "$runtype" == "drs-calib" ] 250 then 251 runtype="drs-gain" 252 fi 253 if [ "$runtype" == "drs-time-calib" ] 254 then 255 runtype="drs-time" 256 fi 257 if [ "$runtype" == "pedestal" ] 258 then 259 runtype="drs-pedestal" 260 fi 261 if [ "$runtype" == "light-pulser" ] 262 then 263 runtype="light-pulser-ext" 264 fi 265 if [ "$runtype" == "pedestal-on" ] 266 then 267 runtype="pedestal" 268 fi 269 fi 270 # get runtype 271 query="SELECT fRunTypeKEY FROM RunType WHERE fRunTypeName='"$runtype"'" 272 result2=( `sendquery` ) 273 if [ ${#result2} -eq 0 ] 274 then 275 printprocesslog "ERROR "$numberfromname": Could not query fRunTypeKey for runtype "$runtype" ." 276 continue 277 fi 278 runtypekey=${result2[0]} 279 236 280 if [ "$doupdate" == "force" ] 237 281 then 238 # set runtype to 'unknown', if no runtype could be retrieved from file239 if [ "$runtype" == "" ]240 then241 runtype="n/a"242 fi243 # on 15.11.2011 the runtypes had different names244 if [ "$date" == "2011/11/15" ]245 then246 if [ "$runtype" == "drs-calib" ]247 then248 runtype="drs-gain"249 fi250 if [ "$runtype" == "drs-time-calib" ]251 then252 runtype="drs-time"253 fi254 if [ "$runtype" == "pedestal" ]255 then256 runtype="drs-pedestal"257 fi258 if [ "$runtype" == "light-pulser" ]259 then260 runtype="light-pulser-ext"261 fi262 if [ "$runtype" == "pedestal-on" ]263 then264 runtype="pedestal"265 fi266 fi267 # get runtype268 query="SELECT fRunTypeKEY FROM RunType WHERE fRunTypeName='"$runtype"'"269 result2=( `sendquery` )270 if [ ${#result2} -eq 0 ]271 then272 printprocesslog "ERROR "$numberfromname": Could not query fRunTypeKey for runtype "$runtype" ."273 continue274 fi275 282 # in newest data start time is in DATE-OBS 276 283 # in older data start time is in TSTART … … 537 544 then 538 545 query=$query", fRunStart='"$runstart"', fRunStop='"$runstop"'" 539 query=$query", fRunTypeKey="$ {result2[0]}546 query=$query", fRunTypeKey="$runtypekey 540 547 if [ "$numevents" != "" ] 541 548 then
Note:
See TracChangeset
for help on using the changeset viewer.