- 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/difftool.c (modified) (4 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/difftool.c
r31435 r33415 1634 1634 PXOPT_COPY_F32(config->args, selectWhere, "-timediff", 1635 1635 "ABS(TIME_TO_SEC(TIMEDIFF(inputRawExp.dateobs, templateRawExp.dateobs)))", "<="); 1636 PXOPT_COPY_F32(config->args, selectWhere, "-mintimediff", 1637 "ABS(TIME_TO_SEC(TIMEDIFF(inputRawExp.dateobs, templateRawExp.dateobs)))", ">="); 1636 1638 1637 1639 // other where restrictions: … … 1867 1869 const char *tess_id = psMetadataLookupStr(NULL, row, "tess_id"); 1868 1870 psString input_data_group = psMetadataLookupStr(NULL, row, "input_data_group"); 1869 if ( input_data_group) {1871 if (!data_group) { 1870 1872 data_group = input_data_group; 1871 1873 } … … 1934 1936 return false; 1935 1937 } 1938 psS64 numSkycells = psDBAffectedRows(config->dbh); 1939 if (numSkycells > 0) { 1940 if (!setdiffRunState(config, run->diff_id, "new", false)) { 1941 psError(PS_ERR_UNKNOWN, false, "Failed to change diffRun.state for diff_id: %" PRId64, 1942 run->diff_id); 1943 psFree(input); 1944 psFree(diff); 1945 psFree(run); 1946 psFree(list); 1947 psFree(insert); 1948 psFree(results); 1949 if (!psDBRollback(config->dbh)) { 1950 psError(PS_ERR_UNKNOWN, false, "database error"); 1951 } 1952 return false; 1953 } 1954 run->state = psStringCopy("new"); 1955 } else { 1956 // No overlap between the warps. Insert a dummy skycell which will complete this pair of warps 1957 // XXX: we'd like to use diffInputSkyfileRowAlloc and diffInputSkyfileInsert but there doesn't 1958 // seem to be a way to pass in NULL for skycell_id, stack1 and stack2 1959 psString dummyQuery = NULL; 1960 psStringAppend(&dummyQuery, 1961 "INSERT INTO diffInputSkyfile VALUES(%" PRId64 ", NULL, %s, NULL, %s, NULL, '%s', 0)", 1962 run->diff_id, 1963 input, // warp1 1964 template, // warp2 1965 tess_id); 1966 if (!p_psDBRunQuery(config->dbh, dummyQuery)) { 1967 psError(PS_ERR_UNKNOWN, false, "database error"); 1968 psFree(dummyQuery); 1969 psFree(input); 1970 psFree(diff); 1971 psFree(run); 1972 psFree(list); 1973 psFree(insert); 1974 psFree(results); 1975 if (!psDBRollback(config->dbh)) { 1976 psError(PS_ERR_UNKNOWN, false, "database error"); 1977 } 1978 return false; 1979 } 1980 psFree(dummyQuery); 1981 psString finishQuery = NULL; 1982 psStringAppend( &finishQuery, 1983 "UPDATE diffRun set state ='full', dist_group = NULL, note = 'dummy run - no overlap' WHERE diff_id = %" PRId64, 1984 run->diff_id); 1985 if (!p_psDBRunQuery(config->dbh, finishQuery)) { 1986 psError(PS_ERR_UNKNOWN, false, "database error"); 1987 psFree(finishQuery); 1988 psFree(input); 1989 psFree(diff); 1990 psFree(run); 1991 psFree(list); 1992 psFree(insert); 1993 psFree(results); 1994 if (!psDBRollback(config->dbh)) { 1995 psError(PS_ERR_UNKNOWN, false, "database error"); 1996 } 1997 return false; 1998 } 1999 psFree(finishQuery); 2000 run->state = psStringCopy("full"); 2001 } 1936 2002 psFree(input); 1937 2003 psFree(diff); 1938 1939 if (!setdiffRunState(config, run->diff_id, "new", false)) {1940 psError(PS_ERR_UNKNOWN, false, "Failed to change diffRun.state for diff_id: %" PRId64,1941 run->diff_id);1942 psFree(run);1943 psFree(list);1944 psFree(insert);1945 psFree(results);1946 if (!psDBRollback(config->dbh)) {1947 psError(PS_ERR_UNKNOWN, false, "database error");1948 }1949 return false;1950 }1951 2004 1952 2005 psArrayAdd(list, list->n, run); … … 2461 2514 psString limitString = psDBGenerateLimitSQL(limit); 2462 2515 psStringAppend(&query, " %s", limitString); 2516 psStringSubstitute(&query,limitString,"@INNERLIMITS@"); 2463 2517 psFree(limitString); 2518 2519 } 2520 else { 2521 psStringSubstitute(&query,NULL,"@INNERLIMITS@"); 2464 2522 } 2465 2523 // fprintf(stderr,"%s",query);
Note:
See TracChangeset
for help on using the changeset viewer.
