Changeset 17097
- Timestamp:
- 09/06/13 16:08:40 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Processing/FillEffectiveOn.sh
r15604 r17097 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) 6 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 7 10 8 11 source `dirname $0`/../Sourcefile.sh … … 11 14 logfile=$runlogpath"/EffectiveOn-"$datetime".log" 12 15 date >> $logfile 13 14 echo $logfile15 16 16 17 # setup to use ftools … … 24 25 fi 25 26 26 27 # get last 3, 6 or 9 nights 28 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \ 29 `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \ 30 # `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \ 31 ) 32 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 33 34 #dates=( "2012/11/19" ) 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 35 38 36 39 printprocesslog "INFO processing the following night(s): "${dates[@]} 37 40 echo `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1 38 39 echo ${dates[@]}40 41 41 42 cd $mars … … 51 52 # continue 52 53 # fi 54 # echo $auxdir" @ "`date` 53 55 54 56 # check if aux files are available from that night … … 74 76 fi 75 77 76 echo "run ontime.C for night "$runnumber77 78 # get file numbers from DB 78 79 # but only for not-corrupted files … … 91 92 fi 92 93 93 #echo ${filenumbers[@]}94 94 # fill auxiliary information for files 95 95 for filenum in ${filenumbers[@]} … … 204 204 query=$query" WHERE fNight="$runnumber" AND fRunID="$filenum 205 205 206 echo $query207 #echo "EffectiveOn:${effectiveon[0]} # RMSEffectiveOn:${effectiveon[1]} # SumOnTime:${effectiveon[2]} # TriggerTimeOver125:${effectiveon[3]}"208 206 #send query to DB 209 207 sendquery >/dev/null
Note:
See TracChangeset
for help on using the changeset viewer.