Changeset 17088 for trunk/DataCheck/Processing
- Timestamp:
- 09/06/13 15:44:44 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/Processing/FillNumEvts.sh
r16674 r17088 7 7 date >> $logfile 8 8 9 # get current hour 10 hour=`date +%k` 11 if [ $hour -le 7 ] || [ $hour -ge 19 ] 9 # this script doesn't need variable $doupdate 10 # filling is done by macro. therefore update is always done 11 12 # get dates 13 if [ "$certaindate" != "" ] 12 14 then 13 dates=( `date +%Y/%m/%d --date="-12hour"` )15 getdates $certaindate 14 16 else 15 # get last 3, 6 or 9 nights 16 dates=( `date +%Y/%m/%d --date="-12hour"` `date +%Y/%m/%d --date="-36hour"` `date +%Y/%m/%d --date="-60hour"` \ 17 # `date +%Y/%m/%d --date="-84hour"` `date +%Y/%m/%d --date="-108hour"` `date +%Y/%m/%d --date="-132hour"` \ 18 # `date +%Y/%m/%d --date="-156hour"` `date +%Y/%m/%d --date="-180hour"` `date +%Y/%m/%d --date="-204hour"` \ 19 ) 17 # get all night 18 #getdates "all" 19 # get last 6 nights 20 getdates 6 20 21 fi 21 22 22 #dates=( `find -L $auxdata -mindepth 3 -type d | sort -r | grep -v bad | sed "s/\${auxdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw23 24 #dates=( "2013/04/17" )25 23 26 24 printprocesslog "INFO processing the following night(s): "${dates[@]} 27 25 echo `date`": processing the following night(s): "${dates[@]} >> $logfile 2>&1 28 26 29 #echo ${dates[@]}30 31 mars=/home/fact/SW.automatic.processing/Mars.svn.2013.04.2932 27 cd $mars 33 28 … … 37 32 runnumber=`echo $date | sed -e 's/\///g'` 38 33 39 # data which are not processed in LP40 if [ $runnumber -lt 20121212]34 # process only data which are available 35 if [ $runnumber -lt $firstnight ] 41 36 then 42 37 continue 43 38 fi 44 39 45 echo "run numevts.C for night "$runnumber" (run-wise processing) " >> $logfile 2>&1 46 printprocesslog "run numevts.C for night "$runnumber" (run-wise processing) " 47 printprocesslog "root -q -b -l fact/processing/numevents.C+\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable1"\"\,kFALSE\,kFALSE\)" 48 check1=`root -q -b -l fact/processing/numevents.C+\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable1"\"\,kFALSE\,kFALSE\) | tee $logfile | intgrep` 40 # fill run-wise processing 41 if [ -d $anapath/ganymed_run/$date ] 42 then 43 echo "run numevts.C for night "$runnumber" (run-wise processing) for table "$resulttable1 >> $logfile 2>&1 44 printprocesslog "INFO run numevts.C for night "$runnumber" (run-wise processing) for table "$resulttable1 45 printprocesslog "DEBUG root -q -b -l fact/processing/numevents.C+\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable1"\"\,kFALSE\,kFALSE\)" 46 check1=`root -q -b -l fact/processing/numevents.C+\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable1"\"\,kFALSE\,kFALSE\) | tee $logfile | intgrep` 47 48 case $check1 in 49 1) printprocesslog "INFO filling numevts.C was successfully for night "$runnumber" and table "$resulttable1" (check1=$check1)" 50 ;; 51 0) printprocesslog "WARN connection to DB failed in numevts.C (check1=$check1)" 52 ;; 53 *) printprocesslog "ERROR numevts.C failed for night "$runnumber" and table "$resulttable1" (check1=$check1)" 54 ;; 55 esac 56 fi 57 58 query="SELECT fSourceKEY FROM RunInfo WHERE fNight="$runnumber" AND fSourceKey > 0 AND fRunTypeKEY=1 GROUP BY fSourceKey " 59 sources=( `sendquery` ) 60 # fill night-wise processing 61 for source in ${sources[@]} 62 do 63 if [ -d $anapath/ganymed_night/$source/$date ] 64 then 65 echo "run numevts.C for night "$runnumber" and source "$source" (night-wise processing) " >> $logfile 2>&1 66 printprocesslog "INFO run numevents.C for night "$runnumber" and source "$source" (night-wise processing) " 67 printprocesslog "DEBUG root -q -b -l fact/processing/numevents.C+\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable2"\"\,kFALSE\,kTRUE\,$source\)" 49 68 50 case $check1 in 51 1) printprocesslog "INFO filling numevts.C was successfully (check1=$check1)" 52 ;; 53 0) printprocesslog "WARN connection to DB failed in numevts.C (check1=$check1)" 54 ;; 55 *) printprocesslog "ERROR numevts.C failed (check1=$check1)" 56 ;; 57 esac 58 59 #echo "run numevts.C for night "$runnumber" (night-wise processing) " 60 #root -q -b -l fact/processing/numevts.C\("\"$runnumber"\"\,"\"$inpath"\"\,"\"$resulttable2"\"\,kFALSE\,kTRUE\) 61 69 check1=`root -q -b -l fact/processing/numevents.C+\("\"$runnumber"\"\,"\"$anapath"\"\,"\"$resulttable2"\"\,kFALSE\,kTRUE\,$source\) | tee $logfile | intgrep` 70 case $check1 in 71 1) printprocesslog "INFO filling numevts.C was successfully for night "$runnumber" and table "$resulttable2" (check1=$check1)" 72 ;; 73 0) printprocesslog "WARN connection to DB failed in numevts.C (check1=$check1)" 74 ;; 75 *) printprocesslog "ERROR numevts.C failed for night "$runnumber" and table "$resulttable2" (check1=$check1)" 76 ;; 77 esac 78 fi 79 done 62 80 done 63 81
Note:
See TracChangeset
for help on using the changeset viewer.