Changeset 15518
- Timestamp:
- 05/07/13 23:24:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DataCheck/QuickLook/Step3.sh
r15438 r15518 9 9 export LD_LIBRARY_PATH=./:$LD_LIBRARY_PATH 10 10 11 mars=/home/fact/ Mars11 mars=/home/fact/SW.automatic.processing/Mars.svn.2013.04.29 12 12 cd $mars 13 pwd14 # use macro from different mars version until versions are sorted out15 mars2=/home/fact/SW.automatic.processing/Mars.svn.2013.04.1216 13 17 14 if ! [ "$1" = "run" ] && ! [ "$1" = "night" ] … … 53 50 timebins=( 5 10 20 30 40 60 90 120 180 240 300 360 ) 54 51 55 echo ${dates[@]}52 #echo ${dates[@]} 56 53 for date in ${dates[@]} 57 54 do … … 63 60 query="SELECT fSourceKEY FROM RunInfo WHERE fNight="$date2" AND fSourceKey > 0 AND fRunTypeKEY=1 GROUP BY fSourceKey " 64 61 sources=( `sendquery` ) 65 echo "process "$date" -> sources: "${sources[@]}62 printprocesslog "INFO process "$date" -> sources: "${sources[@]} 66 63 for source in ${sources[@]} 67 64 do 68 echo $source65 #echo $source 69 66 printprocesslog "INFO processing files for source "$source 70 67 outpath=$anapath/lightcurves/$date … … 76 73 logfile=$outpath"/lightcurve"$source"_"$timebin"min_"$date2".log" 77 74 outfile=$outpath"/lightcurve"$source"_"$timebin"min_"$date2".root" 78 echo $outfile75 #echo $outfile 79 76 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2 80 77 81 check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`78 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$date2\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep` 82 79 83 80 case $check1 in 84 81 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" (check1=$check1)" 85 ./showplot -b --save-as-png $outfile 82 if ! ./showplot -b --save-as-png $outfile >/dev/null 83 then 84 printprocesslog "WARN showplot -b --save-as-png "$outfile" failed." 85 fi 86 86 ;; 87 87 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2", but nothing to plot (check1=$check1)" … … 96 96 logfile=$outpath"/lightcurve"$source"_"$timebin"min_week.log" 97 97 outfile=$outpath"/lightcurve"$source"_"$timebin"min_week.root" 98 echo $outfile98 #echo $outfile 99 99 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2" last week ("$lastweek")" 100 100 101 check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`101 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$lastweek\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep` 102 102 103 103 case $check1 in 104 104 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" last week (check1=$check1)" 105 ./showplot -b --save-as-png $outfile 105 #./showplot -b --save-as-png $outfile 106 if ! ./showplot -b --save-as-png $outfile >/dev/null 107 then 108 printprocesslog "WARN showplot -b --save-as-png "$outfile" failed." 109 fi 106 110 ;; 107 111 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" last week, but nothing to plot (check1=$check1)" … … 114 118 logfile=$outpath"/lightcurve"$source"_"$timebin"min_all.log" 115 119 outfile=$outpath"/lightcurve"$source"_"$timebin"min_all.root" 116 echo $outfile120 #echo $outfile 117 121 printprocesslog "INFO starting lightcurve.C+ for source "$source" timebin "$timebin" night "$date2" all nights" 118 122 119 check1=`root -q -b $mars2/fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep`123 check1=`root -q -b fact/analysis/lightcurve.C+\($source\,$firstnight\\,$date2\,$timebin\,"\"$resulttable1"\"\,"\"$outfile\""\) | tee $logfile | intgrep` 120 124 121 125 case $check1 in 122 126 0) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" all nights (check1=$check1)" 123 ./showplot -b --save-as-png $outfile 127 #./showplot -b --save-as-png $outfile 128 if ! ./showplot -b --save-as-png $outfile >/dev/null 129 then 130 printprocesslog "WARN showplot -b --save-as-png "$outfile" failed." 131 fi 124 132 ;; 125 133 1) printprocesslog "INFO lightcurve.C was successful for source "$source" timebin "$timebin" night "$date2" all nights, but nothing to plot (check1=$check1)" … … 131 139 done 132 140 printprocesslog "INFO rsync output of source "$source" to gate." 133 rsync -av $anapath/lightcurves/ gate:/home/factwww/lightcurves 141 #rsync -av $anapath/lightcurves/ gate:/home/factwww/lightcurves 142 rsync -a $anapath/lightcurves/ gate:/home/factwww/lightcurves 134 143 done 135 144
Note:
See TracChangeset
for help on using the changeset viewer.