Changeset 18213
- Timestamp:
- 06/15/15 00:18:11 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/DataCheck/PlotRatescans.sh
r15519 r18213 4 4 printprocesslog "INFO starting $0 $1" 5 5 6 # get current hour 7 hour=`date +%k` 8 9 # define dates depending on the time 10 if [ $hour -lt 9 ] || [ $hour -gt 19 ] 6 # get dates 7 if [ "$certaindate" != "" ] 11 8 then 12 # get current night 13 dates=( `date +%Y/%m/%d --date="-12hour"` ) 9 checkstring=`echo $certaindate | grep -E -o '^20[0-9][0-9]\/[01][0-9]\/[0-3][0-9]$'\|'^[0-9][0-9][0-9]$'` 10 if [ "$checkstring" = "" ] 11 then 12 echo "Please give the variable certaindate in the correct format (YYYY/MM/DD)" 13 finish 14 fi 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 if [ "$1" = "" ] 18 then 19 # get last 6 nights if hour between 7 and 19h, else only current night 20 getdates 3 7 19 21 else 22 getdates $1 23 fi 20 24 fi 21 25 22 26 # for testing only 23 anapath=/ daq/analysis27 anapath=/loc_data/analysis 24 28 25 mars=/home/fact/SW.automatic.processing/Mars.svn.2013.04.2926 29 cd $mars 27 28 30 29 31 for date in ${dates[@]} … … 32 34 makedir $outpath 33 35 date2=`echo $date | sed -e 's/\///g'` 34 echo "root -q -b fact/plots/plotratescan.C\("\"$date2\""\) | tee $logfile | intgrep" 36 logfile=$outpath/$date2.log 37 printprocesslog "INFO root -q -b fact/plots/plotratescan.C\("\"$date2\""\) | tee $logfile | intgrep" 35 38 check1=`root -q -b fact/plots/plotratescan.C\("\"$date2\""\) | tee $logfile | intgrep` 36 39 … … 41 44 ;; 42 45 esac 43 44 printprocesslog "INFO rsync output to gate."45 rsync -avn $anapath/ratescans/ gate:/home/factwww/ratescans46 46 done 47 47
Note:
See TracChangeset
for help on using the changeset viewer.