Changeset 33415 for branches/meh_branches/ppstack_test/ippTasks/survey.pro
- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/survey.pro (modified) (22 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/ippTasks/survey.pro
r31868 r33415 3 3 # test for required global variables 4 4 check.globals 5 6 # there is a bug in 'getbook', use a different method below7 # book getbook SURVEY_DIFF -var isBook8 # if ("$isBook" != "SURVEY_DIFF")9 # book create SURVEY_DIFF10 # end11 # book getbook SURVEY_MAGIC -var isBook12 # if ("$isBook" == "NULL")13 # book create SURVEY_MAGIC14 # end15 # book getbook SURVEY_DESTREAK -var isBook16 # if ("$isBook" == "NULL")17 # book create SURVEY_DESTREAK18 # end19 # book getbook SURVEY_DIST -var isBook20 # if ("$isBook" == "NULL")21 # book create SURVEY_DIST22 # end23 5 24 6 if (not($?haveSurveyBooks)) … … 30 12 book create SURVEY_DIST 31 13 book create SURVEY_ADDSTAR 14 book create SURVEY_MERGEDVODB 32 15 book create SURVEY_CHIP_BG 33 16 book create SURVEY_WARP_BG 34 17 book create SURVEY_PUBLISH 35 book create SURVEY_STATICSKYSINGLE 18 book create SURVEY_STATICSKYSINGLE 36 19 $haveSurveyBooks = TRUE 37 20 end … … 44 27 $SURVEY_DIST_DB = 0 45 28 $SURVEY_ADDSTAR_DB = 0 29 $SURVEY_MERGEDVODB_DB = 0 46 30 $SURVEY_CHIP_BG_DB = 0 47 31 $SURVEY_WARP_BG_DB = 0 48 32 $SURVEY_PUBLISH_DB = 0 49 33 $SURVEY_STATICSKYSINGLE_DB = 0 50 51 34 $SURVEY_EXEC = 120 52 35 $SURVEY_POLL = 10 … … 69 52 active true 70 53 end 54 task survey.mergedvodb 55 active true 56 end 71 57 task survey.destreak 72 58 active true … … 105 91 active false 106 92 end 93 task survey.mergedvodb 94 active false 95 end 107 96 task survey.destreak 108 97 active false … … 213 202 # user functions to manipulate magic labels 214 203 macro survey.add.magic 215 if ( $0 != 3)216 echo "USAGE: survey.add.magic (label) (workdir base) "204 if (($0 != 3)&&($0 != 4)) 205 echo "USAGE: survey.add.magic (label) (workdir base) (multidiff)" 217 206 break 218 207 end 219 208 book newpage SURVEY_MAGIC $1 220 209 book setword SURVEY_MAGIC $1 WORKDIR $2 210 if ($0 == 3) 211 book setword SURVEY_MAGIC $1 MULTIDIFF FALSE 212 else 213 book setword SURVEY_MAGIC $1 MULTIDIFF $3 214 end 221 215 book setword SURVEY_MAGIC $1 STATE PENDING 222 216 end … … 267 261 end 268 262 263 macro survey.add.mergedvodb 264 if ($0 != 4) 265 echo "USAGE: survey.add.mergedvodb (tag) (mergedvodb) (minidvodb_group)" 266 break 267 end 268 book newpage SURVEY_MERGEDVODB $1 269 book setword SURVEY_MERGEDVODB $1 MERGEDVODB $2 270 book setword SURVEY_MERGEDVODB $1 MINIDVODB_GROUP $3 271 end 272 273 macro survey.del.mergedvodb 274 if ($0 != 2) 275 echo "USAGE: survey.del.mergedvodb (tag)" 276 break 277 end 278 book delpage SURVEY_MERGEDVODB $1 279 end 280 281 macro survey.show.mergedvodb 282 if ($0 != 1) 283 echo "USAGE: survey.show.mergedvodb" 284 break 285 end 286 book listbook SURVEY_MERGEDVODB 287 end 288 289 269 290 # user functions to manipulate destreak labels 270 291 macro survey.add.destreak … … 297 318 # user functions to manipulate dist labels 298 319 macro survey.add.dist 299 if ($0 != 3)300 echo "USAGE: survey.add.dist (label) (workdir) "320 if ($0 != 4) 321 echo "USAGE: survey.add.dist (label) (workdir) (muggle)" 301 322 break 302 323 end 303 324 book newpage SURVEY_DIST $1 304 325 book setword SURVEY_DIST $1 WORKDIR $2 326 book setword SURVEY_DIST $1 MUGGLE $3 305 327 book setword SURVEY_DIST $1 STATE PENDING 306 328 end … … 324 346 # user functions to manipulate chip_bg labels 325 347 macro survey.add.chip.bg 326 if ($0 != 3)327 echo "USAGE: survey.add.chip.bg (label) (dist_group) "348 if ($0 != 4) 349 echo "USAGE: survey.add.chip.bg (label) (dist_group) (muggle)" 328 350 break 329 351 end 330 352 book newpage SURVEY_CHIP_BG $1 331 353 book setword SURVEY_CHIP_BG $1 DIST_GROUP $2 354 book setword SURVEY_CHIP_BG $1 MUGGLE $3 332 355 book setword SURVEY_CHIP_BG $1 STATE PENDING 333 356 end … … 351 374 # user functions to manipulate warp_bg labels 352 375 macro survey.add.warp.bg 353 if ($0 != 3)354 echo "USAGE: survey.add.warp.bg (label) (dist_group) "376 if ($0 != 4) 377 echo "USAGE: survey.add.warp.bg (label) (dist_group) (muggle)" 355 378 break 356 379 end 357 380 book newpage SURVEY_WARP_BG $1 358 381 book setword SURVEY_WARP_BG $1 DIST_GROUP $2 382 book setword SURVEY_WARP_BG $1 MUGGLE $3 359 383 book setword SURVEY_WARP_BG $1 STATE PENDING 360 384 end … … 610 634 periods -exec $SURVEY_EXEC 611 635 periods -timeout $SURVEY_TIMEOUT 612 trange 13:00:00 14:00:00 636 # 13:00 was being done in early morning rather than afternoon HST (so UT value), want both times to have SSdiff ASAP? 637 # changing earlier for QUB to fetch @10pm for nightly processing there, should be enough time to finish MD stacks 638 # trange 13:00:00 14:00:00 639 trange 20:00:00 21:00:00 613 640 npending 1 614 641 … … 725 752 book setword SURVEY_MAGIC $label STATE DONE 726 753 book getword SURVEY_MAGIC $label WORKDIR -var workdir 727 754 book getword SURVEY_MAGIC $label MULTIDIFF -var multidiff 755 728 756 $run = magictool -rerun -definebyquery -label $label -diff_label $label -workdir $workdir/$label 757 758 if (("$multidiff" == "TRUE")||("$multidiff" == "MULTIDIFF")) 759 $run = $run -multidiff 760 end 729 761 730 762 if ($DB:n == 0) … … 735 767 end 736 768 737 #echo $run769 echo $run 738 770 command $run 739 771 end … … 814 846 if ("$stage" == "cam") 815 847 #only queue destreaked cams. stacks and staticsky don't need this 816 if ("$DB:$SURVEY_ADDSTAR_DB" == "isp")848 # if ("$DB:$SURVEY_ADDSTAR_DB" == "isp") 817 849 #this is the only way I can think of how to handle this (but it is messy). If it is a database that we KNOW doesn't use magicked (ie, isp), then do not queue destreaked 850 # now with no magic, all are uncensored 818 851 $run = $run -uncensored 819 else852 # else 820 853 #if not isp, then run destreaked version only 821 $run = $run -destreaked822 end854 # $run = $run -destreaked 855 # end 823 856 end 824 857 if ("$stage" == "staticsky") … … 826 859 $run = $run -uncensored 827 860 end 861 if ("$stage" == "staticsky_multi") 862 #only queue uncensored staticsky (multi filter) 863 $run = $run -uncensored 864 end 865 828 866 if ("$stage" == "stack") 829 867 #only queue uncensored stacks … … 858 896 end 859 897 end 898 899 900 task survey.mergedvodb 901 host local 902 903 periods -poll $SURVEY_POLL 904 periods -exec $SURVEY_EXEC 905 periods -timeout $SURVEY_TIMEOUT 906 npending 1 907 908 stdout $LOGDIR/survey.mergedvodb.log 909 stderr $LOGDIR/survey.mergedvodb.log 910 911 task.exec 912 book npages SURVEY_MERGEDVODB -var N 913 if ($N == 0) 914 # echo "No labels for processing" 915 break 916 endif 917 918 book getpage SURVEY_MERGEDVODB 0 -var tag -key STATE NEW 919 if ("$tag" == "NULL") 920 # All labels have been done --- reset 921 # echo "Resetting labels" 922 for i 0 $N 923 book getpage SURVEY_MERGEDVODB $i -var tag 924 book setword SURVEY_MERGEDVODB $tag STATE NEW 925 end 926 book getpage SURVEY_MERGEDVODB 0 -var tag -key STATE NEW 927 928 # Select different database 929 $SURVEY_MERGEDVODB_DB ++ 930 if ($SURVEY_MERGEDVODB_DB >= $DB:n) set SURVEY_MERGEDVODB_DB = 0 931 end 932 book setword SURVEY_MERGEDVODB $tag STATE DONE 933 book getword SURVEY_MERGEDVODB $tag MERGEDVODB -var mergedvodb 934 book getword SURVEY_MERGEDVODB $tag MINIDVODB_GROUP -var minidvodb_group 935 936 # $run = addtool -definebyquery -destreaked -label $label -set_dvodb $dbodb 937 #$run = mergetool 938 $run = mergedvodb_queue.pl --outroot $mergedvodb --mergedvodb $mergedvodb --minidvodb_group $minidvodb_group 939 if ($DB:n == 0) 940 option DEFAULT 941 else 942 $run = $run --dbname $DB:$SURVEY_MERGEDVODB_DB 943 option $DB:$SURVEY_MERGEDVODB_DB 944 end 945 #this run doesn't work because there's no workdir 946 #$run = $run -definebyquery -mergedvodb $mergedvodb -minidvodb_group $minidvodb_group 947 948 949 # echo $run 950 951 echo $run 952 command $run 953 end 954 955 # success 956 957 task.exit 0 958 # echo "Success" 959 end 960 961 # locked list 962 task.exit default 963 showcommand failure 964 end 965 966 task.exit crash 967 showcommand crash 968 end 969 970 # operation times out? 971 task.exit timeout 972 showcommand timeout 973 end 974 end 975 860 976 861 977 … … 974 1090 $workdir = $workdir_base/$label/$year/$month/$day 975 1091 1092 book getword SURVEY_DIST $label MUGGLE -var muggle 1093 976 1094 book setword SURVEY_DIST $label STATE DONE 977 1095 978 1096 # note workdir is set by the script based on site.config 979 1097 $run = dist_defineruns.pl --label $label --workdir $workdir 1098 if ($muggle != 0) 1099 $run = $run --no_magic 1100 end 980 1101 981 1102 if ($DB:n == 0) … … 1048 1169 book setword SURVEY_CHIP_BG $label STATE DONE 1049 1170 book getword SURVEY_CHIP_BG $label DIST_GROUP -var dist_group 1171 book getword SURVEY_CHIP_BG $label MUGGLE -var muggle 1050 1172 1051 1173 $run = bgtool -definechip -label $label -set_dist_group $dist_group 1174 if ($muggle == 0) 1175 $run = $run -destreaked 1176 end 1052 1177 1053 1178 if ($DB:n == 0) … … 1058 1183 end 1059 1184 1060 # echo $run 1185 if ($VERBOSE > 1) 1186 echo $run 1187 end 1061 1188 command $run 1062 1189 end … … 1118 1245 book setword SURVEY_WARP_BG $label STATE DONE 1119 1246 book getword SURVEY_WARP_BG $label DIST_GROUP -var dist_group 1247 book getword SURVEY_WARP_BG $label MUGGLE -var muggle 1120 1248 1121 1249 $run = bgtool -definewarp -warp_label $label -set_dist_group $dist_group 1250 if ($muggle == 0) 1251 $run = $run -destreaked 1252 end 1253 1122 1254 1123 1255 if ($DB:n == 0) … … 1128 1260 end 1129 1261 1130 # echo $run 1262 if ($VERBOSE > 1) 1263 echo $run 1264 end 1131 1265 command $run 1132 1266 end … … 1248 1382 book npages SURVEY_STATICSKYSINGLE -var N 1249 1383 if ($N == 0) 1250 echo "No STATICSKYSINGLE labels for processing"1384 # echo "No STATICSKYSINGLE labels for processing" 1251 1385 break 1252 1386 endif
Note:
See TracChangeset
for help on using the changeset viewer.
