Changeset 17052 for trunk/pstamp/src/pstampparse.c
- Timestamp:
- Mar 18, 2008, 4:08:40 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/src/pstampparse.c (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/src/pstampparse.c
r16978 r17052 5 5 #include <psmodules.h> 6 6 #include <string.h> 7 #include <strings.h> 7 8 #include "pstamp.h" 8 9 #include "pstampROI.h" … … 135 136 psError(PS_ERR_IO, false, "psFitsReadTable failed for %s", options->fileName); 136 137 return false; 137 } 138 } 138 139 139 140 options->md = array->data[0]; … … 213 214 // target key1 214 215 // 215 // 216 // 216 217 // we return an array containing strins for the values 217 218 … … 283 284 } 284 285 psU64 len = psArrayLength(array); 285 286 286 287 psString id = NULL; 287 288 if (len > 0) { … … 322 323 return NULL; 323 324 324 psArray *chip_files = runQuery(options, 325 psArray *chip_files = runQuery(options, 325 326 "SELECT %s from chipProcessedImfile WHERE chip_id = %s AND class_id = '%s'", 326 327 "uri", chip_id, class_id, true, NULL); … … 343 344 psString warp_id = warpIDForCam(options, cam_id); 344 345 345 psArray *warp_files = runQuery(options, 346 psArray *warp_files = runQuery(options, 346 347 "SELECT %s from warpSkyfile WHERE warp_id = %s" 347 348 " AND uri IS NOT NULL and (fault = 0 or fault is NULL)", … … 384 385 385 386 psU64 len = psArrayLength(stackIDs); 386 387 387 388 // loop over the stack's for this exposure and add the images 388 389 for (int i = 0; i < len ; i++ ) { … … 424 425 425 426 psU64 len = psArrayLength(diffIDs); 426 427 427 428 for (int i = 0; i < len ; i++ ) { 428 429 psString diff_id = (psString) diffIDs->data[i]; … … 474 475 psString uri = (psString) uris->data[i]; 475 476 printf("uri: %s\n", uri ? (psString) uri : "NULL uri"); 476 } 477 } 477 478 #endif 478 479 … … 484 485 { 485 486 psArray *results; 486 487 487 488 results = runQuery(options, "SELECT %s from rawExp WHERE exp_name = '%s'", 488 489 "exp_id", exposure, NULL, false, NULL); … … 603 604 psString cmd = NULL; 604 605 605 psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -job_type %s -uri %s ", 606 psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -job_type %s -uri %s ", 606 607 options->req_id, job_type, uri); 607 608 608 609 if (outputBase != NULL) { 609 610 psStringAppend(&cmd, "-outputBase "); 610 611 611 612 if (options->outputDirectory) { 612 613 psStringAppend(&cmd, "%s/", options->outputDirectory); … … 646 647 for (int i = 0; i< numURIs; i++) { 647 648 psString outputBase = NULL; 648 649 649 650 // append an integer to the user_tag to get a uniqueu outputBase 650 651 psStringAppend(&outputBase, "%s_%d", user_tag, i); … … 677 678 psString img_type = psMetadataLookupStr(NULL, options->md, "IMG_TYPE"); 678 679 679 if (! turnOffResultsFile(options)) { 680 if (! turnOffResultsFile(options)) { 680 681 fprintf(stderr, "failed to update resultsFile for request %" PRId64 "\n", options->req_id); 681 682 return false; … … 700 701 701 702 psString cmd = NULL; 702 psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -job_type get_image -uri %s -outputBase %s", 703 psStringAppend(&cmd, "pstamptool -addjob -req_id %ld -job_type get_image -uri %s -outputBase %s", 703 704 options->req_id, fileName, options->outputDirectory); 704 705 705 706 int rstatus = system(cmd); 706 707 if (rstatus) { … … 792 793 // TODO: the ppstamp argument needs to change to class_id 793 794 // perhaps allow chip as a synonym 794 psStringAppend(&commandArgs, " -chip %s", class_id); 795 psStringAppend(&commandArgs, " -chip %s", class_id); 795 796 } 796 797 psString user_tag = psMetadataLookupStr(&status, options->md, "USER_TAG"); … … 839 840 840 841 // XXX: create a set of status codes to return so the 841 // scripts can distinguish between different errors. 842 // scripts can distinguish between different errors. 842 843 // For example: 843 844 // If we can't connect to the DB it's a configuration problem.
Note:
See TracChangeset
for help on using the changeset viewer.
