Changeset 23566 for trunk/ippTools
- Timestamp:
- Mar 26, 2009, 2:03:56 PM (17 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 5 edited
-
share/disttool_definebyquery_select.sql (modified) (2 diffs)
-
share/disttool_pendingcomponent.sql (modified) (9 diffs)
-
share/pxadmin_create_tables.sql (modified) (1 diff)
-
src/disttool.c (modified) (2 diffs)
-
src/disttoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/share/disttool_definebyquery_select.sql
r23394 r23566 20 20 WHERE distTarget.state = 'enabled' 21 21 AND rcInterest.state = 'enabled' 22 AND chipRun.state = 'full' -- XXX: we need a completed chip stage magicDSRun because we22 AND chipRun.state = 'full' -- Note: we need a completed chip stage magicDSRun because we 23 23 -- need the mask file to NAN masked pixels 24 24 -- to support cameras that don't need magic disttool adds the magicked restriction 25 25 -- \nAND rawExp.magicked AND chipRun.magicked here: 26 AND rawExp.magicked AND chipRun.magicked27 26 -- raw magicked HOOK %s 28 27 AND distRun.dist_id IS NULL -- no existing distRun … … 46 45 -- If camera requires files to be magicked before distibution 47 46 -- the following gets added by disttool 48 --AND chipRun.magicked47 AND chipRun.magicked 49 48 -- chip magicked HOOK %s 50 49 ) -
trunk/ippTools/share/disttool_pendingcomponent.sql
r23254 r23566 2 2 SELECT 3 3 distRun.dist_id, 4 distRun.label, 4 5 stage, 5 6 stage_id, … … 8 9 rawExp.camera, 9 10 outroot, 10 rawImfile.uri as path_base, 11 rawImfile.uri as path_base, -- change this once rawImfile has path_base 11 12 chipProcessedImfile.path_base as chip_path_base, 12 13 NULL as state, … … 15 16 FROM distRun 16 17 JOIN rawExp ON exp_id = stage_id 17 JOIN rawImfile using(exp_id) 18 JOIN ( -- find the last magicked chip run 19 SELECT 20 exp_id, 21 MAX(chip_id) AS chip_id 22 FROM chipRun 23 WHERE 24 chipRun.state = 'full' 25 AND chipRun.exp_id = exp_id 26 -- AND chipRun.magicked 27 -- magicked hook 1 %s 28 GROUP BY exp_id 29 ) AS bestChipRun 30 USING(exp_id) 31 JOIN rawImfile USING(exp_id) 18 32 JOIN chipProcessedImfile 19 ON distRun.chip_id = chipProcessedImfile.chip_id 20 AND rawImfile.class_id = chipProcessedImfile.class_id 33 USING(exp_id, chip_id, class_id) 21 34 LEFT JOIN distComponent 22 35 ON distRun.dist_id = distComponent.dist_id … … 26 39 AND distRun.stage = 'raw' 27 40 AND distComponent.dist_id IS NULL 41 -- if magicked add AND rawImfile.magicked here 42 -- where hook 1 %s 28 43 29 44 -- chip stage … … 31 46 SELECT 32 47 distRun.dist_id, 48 distRun.label, 33 49 stage, 34 50 stage_id, … … 53 69 AND distRun.stage = 'chip' 54 70 AND distComponent.dist_id IS NULL 55 UNION 56 SELECT 57 distRun.dist_id, 71 -- where hook 2 %s 72 UNION 73 SELECT 74 distRun.dist_id, 75 distRun.label, 76 stage, 77 stage_id, 78 chipProcessedImfile.class_id AS component, 79 clean, 80 rawExp.camera, 81 outroot, 82 camProcessedExp.path_base, 83 chipProcessedImfile.path_base as chip_path_base, 84 camRun.state, 85 NULL, 86 0 87 FROM distRun 88 JOIN camRun ON camRun.cam_id = distRun.stage_id 89 JOIN camProcessedExp USING(cam_id) 90 JOIN chipRun USING(chip_id) 91 JOIN chipProcessedImfile USING(exp_id, chip_id) 92 JOIN rawExp using(exp_id) 93 LEFT JOIN distComponent 94 ON distRun.dist_id = distComponent.dist_id 95 AND chipProcessedImfile.class_id = distComponent.component 96 WHERE 97 distRun.state = 'new' 98 AND distRun.stage = 'camera' 99 AND distComponent.dist_id IS NULL 100 -- where hook 3 %s 101 UNION 102 SELECT 103 distRun.dist_id, 104 distRun.label, 105 stage, 106 stage_id, 107 fakeProcessedImfile.class_id AS component, 108 clean, 109 rawExp.camera, 110 outroot, 111 fakeProcessedImfile.path_base, 112 NULL, 113 fakeRun.state, 114 NULL, 115 0 116 FROM distRun 117 JOIN fakeRun ON fakeRun.fake_id = distRun.stage_id 118 JOIN fakeProcessedImfile USING(fake_id) 119 JOIN camRun USING(cam_id) 120 JOIN chipRun USING(chip_id, exp_id) 121 JOIN rawExp using(exp_id) 122 LEFT JOIN distComponent 123 ON distRun.dist_id = distComponent.dist_id 124 AND fakeProcessedImfile.class_id = distComponent.component 125 WHERE 126 distRun.state = 'new' 127 AND distRun.stage = 'fake' 128 AND distComponent.dist_id IS NULL 129 -- where hook 4 %s 130 UNION 131 SELECT 132 distRun.dist_id, 133 distRun.label, 58 134 stage, 59 135 stage_id, … … 81 157 AND distRun.stage = 'warp' 82 158 AND distComponent.dist_id IS NULL 83 UNION 84 SELECT 85 distRun.dist_id, 159 -- where hook 5 %s 160 UNION 161 SELECT 162 distRun.dist_id, 163 distRun.label, 86 164 stage, 87 165 stage_id, … … 108 186 AND distRun.stage = 'diff' 109 187 AND distComponent.dist_id IS NULL 188 -- where hook 6 %s 110 189 UNION 111 190 SELECT DISTINCT 112 191 distRun.dist_id, 192 distRun.label, 113 193 stage, 114 194 stage_id, … … 152 232 AND distRun.stage = 'stack' 153 233 AND distComponent.dist_id IS NULL 234 -- where hook 7 %s 154 235 ) as Foo -
trunk/ippTools/share/pxadmin_create_tables.sql
r23390 r23566 1249 1249 stage VARCHAR(64), 1250 1250 stage_id BIGINT, 1251 chip_id BIGINT,1252 1251 label VARCHAR(64), 1253 1252 outroot VARCHAR(255), -
trunk/ippTools/src/disttool.c
r23365 r23566 296 296 PXOPT_LOOKUP_U64(limit, config->args, "-limit", false, false); 297 297 PXOPT_LOOKUP_BOOL(simple, config->args, "-simple", false); 298 PXOPT_LOOKUP_BOOL(need_magic, config->args, "-need_magic", false); 298 299 299 300 // look for "inputs" that need to processed … … 318 319 } 319 320 320 if (!p_psDBRunQuery(config->dbh, query)) { 321 psString chip_magic = ""; 322 psString raw_where = ""; 323 psString chip_where = ""; 324 psString camera_where = ""; 325 psString fake_where = ""; 326 psString warp_where = ""; 327 psString diff_where = ""; 328 psString stack_where = ""; 329 330 if (need_magic) { 331 chip_magic = psStringCopy("\nAND chipRun.magicked"); 332 raw_where = psStringCopy("\nAND rawExp.magicked"); 333 chip_where = psStringCopy("\nAND (distRun.clean OR chipRun.magicked)"); 334 // chipRun must be magicked to allow release camera level masks 335 camera_where = psStringCopy("\nAND (distRun.clean OR chipRun.magicked)"); 336 warp_where = psStringCopy("\nAND (distRun.clean OR warpRun.magicked)"); 337 diff_where = psStringCopy("\nAND (distRun.clean OR diffRun.magicked)"); 338 } 339 340 if (!p_psDBRunQueryF(config->dbh, 341 query, 342 chip_magic, 343 raw_where, 344 chip_where, 345 camera_where, 346 fake_where, 347 warp_where, 348 diff_where, 349 stack_where)) { 321 350 psError(PS_ERR_UNKNOWN, false, "database error"); 322 351 psFree(query); -
trunk/ippTools/src/disttoolConfig.c
r23393 r23566 75 75 psMetadataAddS64(pendingcomponentArgs, PS_LIST_TAIL, "-dist_id", 0, "define dist_id", 0); 76 76 psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-stage", 0, "limit results to runs for stage", NULL); 77 psMetadataAddBool(pendingcomponentArgs, PS_LIST_TAIL, "-need_magic", 0, "magic is needed", false); 77 78 psMetadataAddStr(pendingcomponentArgs, PS_LIST_TAIL, "-label", 0, "limit results to label", NULL); 78 79 psMetadataAddU64(pendingcomponentArgs, PS_LIST_TAIL, "-limit", 0, "limit result set to N items", 0);
Note:
See TracChangeset
for help on using the changeset viewer.
