Changeset 17109
- Timestamp:
- 09/06/13 17:58:38 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/QuickLook/Step3.sh
r15518 r17109 21 21 if [ "$1" = "run" ] 22 22 then 23 tablenam=$resulttable1 23 tablename=$resulttable1 24 timebins=( 5 10 20 30 40 60 90 120 180 240 300 360 ) 25 timename="min" 24 26 fi 25 27 26 28 if [ "$1" = "night" ] 27 29 then 28 tablenam=$resulttable2 30 tablename=$resulttable2 31 timebins=( 1 2 3 4 5 6 7 8 9 10 ) 32 timename="night" 33 fi 34 35 # possibility to give table name as second option 36 if [ "$2" != "" ] 37 then 38 tablename=$2 39 else 40 printprocesslog "INFO no second option given -> using table resulttable1 or resulttable2 for producing plots. " 29 41 fi 30 42 … … 43 55 #dates=( `find -L $auxdata -mindepth 3 -type d | sort -r | sed "s/\${auxdata_for_sed}//g" | sed -e 's/^\///'` ) #all available dates in /loc_data/zipraw 44 56 45 #dates=( "2013/0 4/19" )57 #dates=( "2013/08/31" ) 46 58 47 59 # source info on daq in /loc_data/analysis/sources.txt 48 60 # (dump of DB scheduling.sources) 49 61 50 timebins=( 5 10 20 30 40 60 90 120 180 240 300 360 )51 62 52 63 #echo ${dates[@]} … … 58 69 continue 59 70 fi 71 #echo "date: "$date 60 72 query="SELECT fSourceKEY FROM RunInfo WHERE fNight="$date2" AND fSourceKey > 0 AND fRunTypeKEY=1 GROUP BY fSourceKey " 61 73 sources=( `sendquery` ) … … 71 83 do 72 84 # doing the plots for one night 73 logfile=$outpath"/lightcurve"$source"_"$timebin "min_"$date2".log"74 outfile=$outpath"/lightcurve"$source"_"$timebin "min_"$date2".root"85 logfile=$outpath"/lightcurve"$source"_"$timebin$timename"_"$date2".log" 86 outfile=$outpath"/lightcurve"$source"_"$timebin$timename"_"$date2".root" 75 87 #echo $outfile 76 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date277 78 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,$timebin\,"\"$ resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`88 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" "$timename" night "$date2 89 90 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,$timebin\,"\"$tablename"\"\,"\"$outfile\""\,kFALSE\) | tee $logfile | intgrep` 79 91 80 92 case $check1 in 81 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" (check1=$check1)"93 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" "$timename" night "$date2" (check1=$check1)" 82 94 if ! ./showplot -b --save-as-png $outfile >/dev/null 83 95 then … … 85 97 fi 86 98 ;; 87 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2", but nothing to plot (check1=$check1)"88 ;; 89 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin "$timebin" night "$date2" (check1=$check1)"99 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" "$timename" night "$date2", but nothing to plot (check1=$check1)" 100 ;; 101 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin "$timebin" "$timename" night "$date2" (check1=$check1)" 90 102 ;; 91 103 esac … … 94 106 # doing the plots for last week 95 107 lastweek=`date +%Y%m%d --date="$date -1 week"` 96 logfile=$outpath"/lightcurve"$source"_"$timebin "min_week.log"97 outfile=$outpath"/lightcurve"$source"_"$timebin "min_week.root"108 logfile=$outpath"/lightcurve"$source"_"$timebin$timename"_week.log" 109 outfile=$outpath"/lightcurve"$source"_"$timebin$timename"_week.root" 98 110 #echo $outfile 99 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2" last week ("$lastweek")"100 101 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,$timebin\,"\"$ resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`111 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" "$timename" night "$date2" last week ("$lastweek")" 112 113 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,$timebin\,"\"$tablename"\"\,"\"$outfile\""\,kFALSE\) | tee $logfile | intgrep` 102 114 103 115 case $check1 in 104 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" last week (check1=$check1)"116 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" "$timename" night "$date2" last week (check1=$check1)" 105 117 #./showplot -b --save-as-png $outfile 106 118 if ! ./showplot -b --save-as-png $outfile >/dev/null … … 109 121 fi 110 122 ;; 111 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" last week, but nothing to plot (check1=$check1)"112 ;; 113 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin "$timebin" night "$date2" last week (check1=$check1)"123 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" "$timename" night "$date2" last week, but nothing to plot (check1=$check1)" 124 ;; 125 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin "$timebin" "$timename" night "$date2" last week (check1=$check1)" 114 126 ;; 115 127 esac 116 128 117 129 # doing the plots for all nights 118 logfile=$outpath"/lightcurve"$source"_"$timebin "min_all.log"119 outfile=$outpath"/lightcurve"$source"_"$timebin "min_all.root"130 logfile=$outpath"/lightcurve"$source"_"$timebin$timename"_all.log" 131 outfile=$outpath"/lightcurve"$source"_"$timebin$timename"_all.root" 120 132 #echo $outfile 121 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2" all nights"122 123 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,$timebin\,"\"$ resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`133 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" "$timename" night "$date2" all nights" 134 135 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,$timebin\,"\"$tablename"\"\,"\"$outfile\""\,kFALSE\) | tee $logfile | intgrep` 124 136 125 137 case $check1 in 126 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" all nights (check1=$check1)"138 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" "$timename" night "$date2" all nights (check1=$check1)" 127 139 #./showplot -b --save-as-png $outfile 128 140 if ! ./showplot -b --save-as-png $outfile >/dev/null … … 131 143 fi 132 144 ;; 133 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" all nights, but nothing to plot (check1=$check1)"134 ;; 135 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin "$timebin" night "$date2" all nights (check1=$check1)"145 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" "$timename" night "$date2" all nights, but nothing to plot (check1=$check1)" 146 ;; 147 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin "$timebin" "$timename" night "$date2" all nights (check1=$check1)" 136 148 ;; 137 149 esac 138 150 done 151 152 153 # doing nightly plots 154 155 # doing the plots for one night 156 logfile=$outpath"/lightcurve"$source"_1night_"$date2".log" 157 outfile=$outpath"/lightcurve"$source"_1night_"$date2".root" 158 #echo $outfile 159 printprocesslog "INFO starting lightcurve.C+ for source "$source" 1 night for night "$date2 160 161 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,-1\,"\"$tablename"\"\,"\"$outfile\""\,kFALSE\) | tee $logfile | intgrep` 162 163 case $check1 in 164 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin 1 night for night "$date2" (check1=$check1)" 165 if ! ./showplot -b --save-as-png $outfile >/dev/null 166 then 167 printprocesslog "WARN showplot -b --save-as-png "$outfile" failed." 168 fi 169 ;; 170 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin 1 night for night "$date2", but nothing to plot (check1=$check1)" 171 ;; 172 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin 1 night for night "$date2" (check1=$check1)" 173 ;; 174 esac 175 176 177 # doing the plots for last week 178 lastweek=`date +%Y%m%d --date="$date -1 week"` 179 logfile=$outpath"/lightcurve"$source"_1night_week.log" 180 outfile=$outpath"/lightcurve"$source"_1night_week.root" 181 #echo $outfile 182 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin 1 night for night "$date2" last week ("$lastweek")" 183 184 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,-1\,"\"$tablename"\"\,"\"$outfile\""\,kFALSE\) | tee $logfile | intgrep` 185 186 case $check1 in 187 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin 1 night for night "$date2" last week (check1=$check1)" 188 #./showplot -b --save-as-png $outfile 189 if ! ./showplot -b --save-as-png $outfile >/dev/null 190 then 191 printprocesslog "WARN showplot -b --save-as-png "$outfile" failed." 192 fi 193 ;; 194 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin 1 night for night "$date2" last week, but nothing to plot (check1=$check1)" 195 ;; 196 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin 1 night for night "$date2" last week (check1=$check1)" 197 ;; 198 esac 199 200 # doing the plots for all nights 201 logfile=$outpath"/lightcurve"$source"_1night_all.log" 202 outfile=$outpath"/lightcurve"$source"_1night_all.root" 203 #echo $outfile 204 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin 1 night for night "$date2" all nights" 205 206 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,-1\,"\"$tablename"\"\,"\"$outfile\""\,kFALSE\) | tee $logfile | intgrep` 207 208 case $check1 in 209 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin 1 night for night "$date2" all nights (check1=$check1)" 210 #./showplot -b --save-as-png $outfile 211 if ! ./showplot -b --save-as-png $outfile >/dev/null 212 then 213 printprocesslog "WARN showplot -b --save-as-png "$outfile" failed." 214 fi 215 ;; 216 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin 1 night for night "$date2" all nights, but nothing to plot (check1=$check1)" 217 ;; 218 *) printprocesslog "ERROR lightcurve.C failed for source "$source" timebin 1 night for night "$date2" all nights (check1=$check1)" 219 ;; 220 esac 221 139 222 done 140 223 printprocesslog "INFO rsync output of source "$source" to gate."
Note:
See TracChangeset
for help on using the changeset viewer.