Changeset 18694 for trunk/DataCheck/QuickLook
- Timestamp:
- 12/18/16 23:46:07 (8 years ago)
- Location:
- trunk/DataCheck/QuickLook
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/QuickLook/SendData.sh
r18672 r18694 5 5 printprocesslog "INFO starting $0" 6 6 7 echo "Sent data "7 echo "Sent data." 8 8 9 9 start=$1 … … 17 17 18 18 query="SELECT fSourceName FROM Source WHERE fSourceKey="$source 19 #echo $query 19 20 sourcename=`sendquery` 20 21 … … 64 65 getdbsetup 65 66 printprocesslog "DEBUG sendquery QUERY: "$query 66 mysql -s -u $us --password=$pw --host=$ho $db -e " $query "67 mysql $pwfile -s -u $us $pw --host=$ho $db -e " $query " 67 68 } 68 69 … … 79 80 mjd) timeselect="Mjd(Min(fRunStart)) AS start, Mjd(MAX(fRunStop)) AS stop, " 80 81 timeselect2=" Mjd(MIN(o.start)) AS start, Mjd(MAX(o.stop)) AS stop, " 81 break;;82 ;; 82 83 unix) timeselect="Unix_timestamp(CONVERT_TZ(Min(fRunStart), '+00:00', 'SYSTEM')) AS start, Unix_timestamp(CONVERT_TZ(Max(fRunStop), '+00:00', 'SYSTEM')) AS stop, " 83 84 timeselect2=" Unix_timestamp(CONVERT_TZ(MIN(o.start), '+00:00', 'SYSTEM')) AS start, Unix_timestamp(CONVERT_TZ(MAX(o.stop), '+00:00', 'SYSTEM')) AS stop, " 84 break;;85 ;; 85 86 *) timeselect="MIN(fRunStart) AS start, MAX(fRunStop) AS stop, " 86 87 timeselect2=" MIN(o.start) AS start, MAX(o.stop) as stop, " 87 break;;88 ;; 88 89 esac 89 90 … … 120 121 121 122 #printinfo | mail -a "From: dorner@astro.uni-wuerzburg.de" -s 'test downloading data ' -b dorner@astro.uni-wuerzburg.de $email 122 printinfo | mail -s 'FACT data (test download)' - cdorner@astro.uni-wuerzburg.de -r dorner@astro.uni-wuerzburg.de $email123 printinfo | mail -s 'FACT data (test download)' -b dorner@astro.uni-wuerzburg.de -r dorner@astro.uni-wuerzburg.de $email 123 124 #printinfo 124 125 -
trunk/DataCheck/QuickLook/SendData_Internal.sh
r18672 r18694 83 83 printprocesslog "DEBUG sendquery QUERY: "$query 84 84 echo "DEBUG sendquery QUERY: "$query 85 mysql -s -u $us --password=$pw --host=$ho $db -e " $query "85 mysql $pwfile -s -u $us $pw --host=$ho $db -e " $query " 86 86 if [ "$table" == "AnalysisResultsRunLP" ] 87 87 then 88 88 query2=`echo $query | sed -e 's/AnalysisResultsRunLP/AnalysisResultsRunISDC/g'` 89 89 echo "# QUERY: "$query2 90 mysql -s -u $us --password=$pw --host=$ho factdata_cp20150811 -e " $query2 "91 fi90 mysql $pwfile -s -u $us $pw --host=$ho factdata_cp20150811 -e " $query2 " 91 fi 92 92 } 93 93 … … 132 132 mjd) timeselect="Mjd(Min(fRunStart)) AS start, Mjd(MAX(fRunStop)) AS stop, " 133 133 timeselect2=" Mjd(MIN(o.start)) AS start, Mjd(MAX(o.stop)) AS stop, " 134 break;;134 ;; 135 135 unix) timeselect="Unix_timestamp(CONVERT_TZ(Min(fRunStart), '+00:00', 'SYSTEM')) AS start, Unix_timestamp(CONVERT_TZ(Max(fRunStop), '+00:00', 'SYSTEM')) AS stop, " 136 136 timeselect2=" Unix_timestamp(CONVERT_TZ(MIN(o.start), '+00:00', 'SYSTEM')) AS start, Unix_timestamp(CONVERT_TZ(MAX(o.stop), '+00:00', 'SYSTEM')) AS stop, " 137 break;;137 ;; 138 138 *) timeselect="MIN(fRunStart) AS start, MAX(fRunStop) AS stop, " 139 139 timeselect2=" MIN(o.start) AS start, MAX(o.stop) as stop, " 140 break;;140 ;; 141 141 esac 142 142 … … 155 155 query="SELECT "$timeselect" SUM(fNumExcEvts)/SUM("$ontimeif")*3600 AS excrate, " 156 156 query=$query" ExcErr(Sum(fNumSigEvts), SUM(fNumBgEvts))/SUM("$ontimeif")*3600 AS excerr, " 157 query=$query" SUM("$ontimeif"/60.) AS ontime, " 157 158 query=$query" IF (SUM(fNumSigEvts)>10 AND SUM(fNumBgEvts)>10, LiMa(SUM(fNumSigEvts), SUM(fNumBgEvts)), IF (SUM(fNumSigEvts)-SUM(fNumBgEvts)>10, concat('(', LiMa(SUM(fNumSigEvts), SUM(fNumBgEvts)), ')'), '-')) AS significance, " 158 159 query=$query" LiMa(SUM(fNumSigEvts), SUM(fNumBgEvts)) AS significance2, " … … 179 180 #echo $query 180 181 181 printinfo | mail -s 'test internal downloading data ' - cdorner@astro.uni-wuerzburg.de -r dorner@astro.uni-wuerzburg.de $email182 printinfo | mail -s 'test internal downloading data ' -b dorner@astro.uni-wuerzburg.de -r dorner@astro.uni-wuerzburg.de $email 182 183 #printinfo 183 184
Note:
See TracChangeset
for help on using the changeset viewer.