Changeset 540 for BAORadio/AmasNancay/gainmaker.sh
- Timestamp:
- Oct 3, 2011, 10:58:41 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/AmasNancay/gainmaker.sh
r529 r540 101 101 102 102 103 #JEC 1/10/11 Use generic baodaqstatus name 103 104 #get the daq current irod status 104 tag=`${DATE} +%F` 105 OUT1=${publicpath}/baodaqstatus-${tag}.txt 105 #tag=`${DATE} +%F` 106 #OUT1=${publicpath}/baodaqstatus-${tag}.txt 107 OUT1=${publicpath}/baodaqstatus-current.txt 106 108 107 109 if [ ! -e ${OUT1} -o ! -r ${OUT1} ]; then 108 $ECHO "We should bring the DAQ status more up to date, this take 1 or 2sec..." 109 $RM -f ${tmppublicpath}/statusdaq.finished 110 ${scriptpath}/statusdaq.sh > ${OUT1} 111 while [ ! -f "${tmppublicpath}/statusdaq.finished" ]; do 112 sleep 30 113 done 114 $RM ${tmppublicpath}/statusdaq.finished 110 $ECHO "FATAL (${scriptName}): ${OUT1} has a problem" 111 exit 1 112 # $RM -f ${tmppublicpath}/statusdaq.finished 113 # ${scriptpath}/statusdaq.sh > ${OUT1} 114 # while [ ! -f "${tmppublicpath}/statusdaq.finished" ]; do 115 # sleep 30 116 # done 117 # $RM ${tmppublicpath}/statusdaq.finished 115 118 #protect against remove/rewriting 116 $CHMOD -v 444 ${OUT1} 119 # $CHMOD -v 444 ${OUT1} 120 # 117 121 fi 118 122 … … 136 140 $ECHO "DEBUG (${scriptName}): irods root dir $i" 137 141 dateDAQ=`$ECHO ${i} | $AWK '{split($0,a,"/"); print a[6];}' | $AWK "{sub(/${srclower}/,\"\"); print}"` 142 #JEC 1/10/11 Use generic baodaqstatus name 138 143 #Look if the date has changed since beginning of the job! 139 curtag=`${DATE} +%F`140 if [ "<${curtag}>" != "<${tag}>" ]; then141 tag=${curtag}144 # curtag=`${DATE} +%F` 145 # if [ "<${curtag}>" != "<${tag}>" ]; then 146 # tag=${curtag} 142 147 #it is necessary to update the daq status as the day has changed during the processing... (batch can take a long time...) 143 OUT1=${publicpath}/baodaqstatus-${curtag}.txt144 $ECHO "We should bring the DAQ status more up to date, this take 1 or 2sec..."145 $RM -f ${tmppublicpath}/statusdaq.finished146 ${scriptpath}/statusdaq.sh > ${OUT1}147 while [ ! -f "${tmppublicpath}/statusdaq.finished" ]; do148 sleep 30149 done150 $RM ${tmppublicpath}/statusdaq.finished148 # OUT1=${publicpath}/baodaqstatus-${curtag}.txt 149 # $ECHO "We should bring the DAQ status more up to date, this take 1 or 2sec..." 150 # $RM -f ${tmppublicpath}/statusdaq.finished 151 # ${scriptpath}/statusdaq.sh > ${OUT1} 152 # while [ ! -f "${tmppublicpath}/statusdaq.finished" ]; do 153 # sleep 30 154 # done 155 # $RM ${tmppublicpath}/statusdaq.finished 151 156 #protect against remove/rewriting 152 $CHMOD -v 444 ${OUT1}153 fi157 # $CHMOD -v 444 ${OUT1} 158 # fi 154 159 # 155 160 # look if the fits file of the gains already exists
Note: See TracChangeset
for help on using the changeset viewer.