- Timestamp:
- Mar 5, 2012, 5:19:48 PM (14 years ago)
- Location:
- branches/meh_branches/ppstack_test
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
ippTools/src (modified) (2 props)
-
ippTools/src/warptool.c (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/meh_branches/ppstack_test
- Property svn:mergeinfo changed
-
branches/meh_branches/ppstack_test/ippTools/src
- Property svn:ignore
- Property svn:mergeinfo changed
/branches/eam_branches/ipp-20110710/ippTools/src (added) merged: 32337 /branches/eam_branches/ipp-20110906/ippTools/src (added) merged: 32630 /branches/eam_branches/ipp-20111110/ippTools/src (added) merged: 32694 /branches/haf_add201112/ippTools/src (added) merged: 32980,32986,33003,33023,33027
-
branches/meh_branches/ppstack_test/ippTools/src/warptool.c
r31955 r33415 975 975 psFree(where); 976 976 977 psArray *allOutput = psArrayAllocEmpty(0); 977 978 // Now loop over the labels and query each individually 978 979 for (long i = 0; i < psArrayLength(labelOutput); i++) { … … 983 984 984 985 psString query = psStringCopy(originalQuery); 985 986 psStringAppend(&query,"\nORDER BY warp_id"); 986 987 // treat limit == 0 as "no limit" 987 988 psString limitString = psStringCopy(""); … … 992 993 psStringAppend(&query, "%s", limitString); 993 994 } 995 994 996 psString thisWhere = NULL; 995 997 if (whereStr) { … … 1023 1025 long outputLength = psArrayLength(output); 1024 1026 if (outputLength) { 1025 // negative simple so the default is true 1026 if (!ippdbPrintMetadatas(stdout, output, "warpPendingSkyCell", !simple)) { 1027 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 1028 psFree(output); 1029 return false; 1027 for (int i = 0; i< outputLength; i++) { 1028 psPtr ptr = output->data[i]; 1029 allOutput = psArrayAdd(allOutput, outputLength - i + 10, ptr); 1030 if (!allOutput) { 1031 psError(PS_ERR_UNKNOWN, false, "failed to add element to array"); 1032 return false; 1033 } 1030 1034 } 1031 1035 } else { … … 1044 1048 } 1045 1049 } 1050 long allLabelsLength = psArrayLength(allOutput); 1051 if (allLabelsLength) { 1052 if (!ippdbPrintMetadatas(stdout, allOutput, "warpPendingSkyCell", !simple)) { 1053 psError(PS_ERR_UNKNOWN, false, "failed to print array"); 1054 psFree(allOutput); 1055 return false; 1056 } 1057 } 1058 psFree(allOutput); 1046 1059 psFree(labelOutput); 1047 1060 psFree(whereStr); … … 2039 2052 // magicked is only an argument for for -tofullskyfile 2040 2053 PXOPT_LOOKUP_S64(magicked, config->args, "-set_magicked", false, false); 2054 PXOPT_LOOKUP_S16(quality, config->args, "-set_quality", false, false); 2041 2055 if (magicked) { 2042 2056 psStringAppend(&set_magicked_skyfile, "\n , warpSkyfile.magicked = %" PRId64, magicked); 2043 2057 psStringAppend(&set_magicked_run, "\n, warpRun.magicked = %" PRId64, magicked); 2044 2058 } 2059 if (quality) { 2060 psStringAppend(&set_magicked_skyfile, "\n , warpSkyfile.quality = %"PRId16, quality); 2061 } 2045 2062 } else if (!strcmp(data_state, "cleaned") || !strcmp(data_state, "purged")) { 2046 2063 // if magicked is currently nonzero set it to -1 … … 2421 2438 PXOPT_COPY_S64(config->args, where, "-exp_id", "rawExp.exp_id", "=="); 2422 2439 PXOPT_COPY_STR(config->args, where, "-exp_name", "rawExp.exp_name", "=="); 2440 PXOPT_COPY_S64(config->args, where, "-chip_id", "chipRun.chip_id", "=="); 2441 PXOPT_COPY_S64(config->args, where, "-cam_id", "camRun.cam_id", "=="); 2423 2442 PXOPT_COPY_S64(config->args, where, "-fake_id", "fakeRun.fake_id", "=="); 2424 2443 PXOPT_COPY_TIME(config->args, where, "-dateobs_begin", "rawExp.dateobs", ">="); … … 2562 2581 psFree(query); 2563 2582 2564 return true; 2565 } 2583 if (!skycell_id) { 2584 // If we are updateing a whole warpRun set skycells with bad quality to 'full' 2585 query = "UPDATE warpSkyfile SET data_state ='full', fault = 0 WHERE warp_id = %" PRId64 " AND quality != 0 AND (data_state != 'full')"; 2586 if (!p_psDBRunQueryF(config->dbh, query, warp_id)) { 2587 psError(PS_ERR_UNKNOWN, false, "database error"); 2588 return false; 2589 } 2590 } 2591 2592 return true; 2593 }
Note:
See TracChangeset
for help on using the changeset viewer.
