Changeset 17096 for trunk/DataCheck/Processing
- Timestamp:
- 09/06/13 15:59:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Processing/FillAuxThresholds.sh
r15330 r17096 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 … … 22 26 23 27 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 -r | sed "s/\${ziprawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw 30 #dates=( `find -L $rawdata -mindepth 3 -type d | sort -r | sed "s/\${rawdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /fact/raw 31 32 #dates=( "2013/01/31" ) 28 # get dates 29 if [ "$certaindate" != "" ] 30 then 31 getdates $certaindate 32 else 33 # get all night 34 #getdates "all" 35 # get last 6 nights 36 getdates 6 37 fi 33 38 34 39 printprocesslog "INFO processing the following night(s): "${dates[@]} 35 40 echo `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1 36 41 37 echo ${dates[@]}42 #echo ${dates[@]} 38 43 39 44 cd $mars … … 45 50 runnumber=`echo $date | sed -e 's/\///g'` 46 51 47 echo $auxdir48 49 52 # check if aux files are available from that night 50 53 if ! [ -d $auxdir ] … … 57 60 58 61 thresholdfile=$auxdir/$runnumber.RATE_CONTROL_THRESHOLD.fits 59 ls $thresholdfile 62 printprocesslog "INFO processing "$thresholdfile 63 echo "INFO processing "$thresholdfile >> $logfile 2>&1 60 64 if ! [ -e $thresholdfile ] 61 65 then … … 71 75 72 76 thresholdfile2=$auxdir/$runnumber.FTM_CONTROL_STATIC_DATA.fits 73 ls $thresholdfile277 #ls $thresholdfile2 74 78 if ! [ -e $thresholdfile2 ] 75 79 then … … 150 154 if [ -e $threshcurrentsfile ] && [ $threshnumerrors -eq 0 ] 151 155 then 152 thresholds1=( `root -q -b -l fact/ threshold.C\("\"$thresholdfile2\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )156 thresholds1=( `root -q -b -l fact/processing/threshold.C\("\"$thresholdfile2\""\,$tstart\,$tstop\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` ) 153 157 #root -q -b -l fact/threshold.C\("\"$thresholdfile2\""\,$tstart\,$tstop\) | grep "result" 154 echo ${thresholds1[@]}158 #echo ${thresholds1[@]} 155 159 if [ "${thresholds1[0]}" == "" ] 156 160 then … … 187 191 if [ -e $threshcurrentsfile2 ] && [ $threshnumerrors2 -eq 0 ] 188 192 then 189 thresholds2=( `root -q -b -l fact/ lastth.C\("\"$thresholdfile\""\,$tstart\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` )193 thresholds2=( `root -q -b -l fact/processing/lastth.C\("\"$thresholdfile\""\,$tstart\) | grep "result" | grep -E -o '[0-9]+[.]?[0-9]*'` ) 190 194 #root -q -b -l fact/lastth.C\("\"$thresholdfile\""\,$tstart\) | grep "result" 191 echo ${thresholds2[@]}195 #echo ${thresholds2[@]} 192 196 if [ "${thresholds2[0]}" == "" ] 193 197 then … … 210 214 query=$query" WHERE fNight="$runnumber" AND fRunID="$filenum 211 215 212 echo $query216 #echo $query 213 217 # send query to DB 214 218 sendquery >/dev/null
Note:
See TracChangeset
for help on using the changeset viewer.