Changeset 18799
- Timestamp:
- 04/02/17 07:04:46 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/QuickLook/FlareAlerts.sh
r18794 r18799 30 30 finish 31 31 fi 32 voeventpath= $flarealertspath"/amon"32 voeventpath="/home/fact/amon/flare_alerts/" 33 33 34 34 logfile=$runlogpath"/FlareAlerts-"$datetime".log" … … 113 113 bin2=$bin 114 114 fi 115 echo "binning:-"$bin2"- 1+"$1"+ b_"$bin"_"116 115 # query to get information from DB 117 116 query="SELECT MAX(o.b) AS num, " … … 150 149 query=$query"CROSS JOIN (SELECT @night :=0, @ot :=0, @os :=0, @bl:=0) PARAMS " 151 150 query=$query"WHERE fSourceKey="$sourcekey" AND fNight="$night" AND NOT ISNULL(fNumExcEvts) " 152 if [ "$1" != "" ]153 then154 query=$query" AND fRunID <="${results[$num+3]}155 fi151 # if [ "$1" != "" ] 152 # then 153 # query=$query" AND fRunID <="${results[$num+3]} 154 # fi 156 155 query=$query" ORDER BY fRunStart " 157 if [ "$1" != "" ]158 then159 query=$query"DESC"160 fi156 # if [ "$1" != "" ] 157 # then 158 # query=$query"DESC" 159 # fi 161 160 query=$query" ) o GROUP BY b HAVING ontime > "$bin2"*0.75 ORDER BY start " 162 if [ "$1" != "" ]163 then164 query=$query"DESC"165 fi161 # if [ "$1" != "" ] 162 # then 163 # query=$query"DESC" 164 # fi 166 165 #echo $query 167 166 } … … 475 474 if [ $checkstatus -gt 0 ] 476 475 then 477 rm $donetriggerfile 476 # keep history of non-sent triggers 477 donetriggerfile2=$donetriggerfile"-changed-"`date +%Y%m%d%H%M%S` 478 mv $donetriggerfile $donetriggerfile2 478 479 fi 479 480 fi 480 481 # missing: get summary of whole observation 481 482 482 # AMON case: create VOEvent-File483 if [ $triggertype -eq 4 ]484 then485 voeventfile=$voeventpath"/"$night"_"`printf %03d $runid`"-"$exclimit"_"$siglimit"-source"$sourcekey".trigger"$triggertype".xml"486 echo $voeventfile487 echo ${sourceinfo[@]}488 #print_voevent_file489 print_voevent_file > $voeventfile490 fi491 492 483 # send email only of $donetriggerfile doesn't exists 493 484 if ! [ -e $donetriggerfile ] 494 485 then 486 # AMON case: create VOEvent-File 487 if [ $triggertype -eq 4 ] 488 then 489 voeventfile=$voeventpath"/"`basename $triggerfile`".xml" 490 # missing: check for archive file 491 # if exist -> do revision 492 echo "creating "$voeventfile 493 echo "Creating "$voeventfile >> $logfile 494 #print_voevent_file 495 print_voevent_file > $voeventfile 496 # in amon-case no email needs to be sent 497 continue 498 fi 499 495 500 cat $triggerfile | mail -s 'test flare alert ' -b $emailfrom -r $emailfrom $emailto 496 501 fi
Note:
See TracChangeset
for help on using the changeset viewer.