Changeset 14091
- Timestamp:
- Jul 9, 2007, 3:17:14 PM (19 years ago)
- Location:
- trunk/ippTools
- Files:
-
- 8 edited
-
scripts/regtest.sh (modified) (2 diffs)
-
share/regtool_pendingexp.sql (modified) (1 diff)
-
src/pxchip.c (modified) (1 diff)
-
src/pxchip.h (modified) (1 diff)
-
src/pxinject.c (modified) (2 diffs)
-
src/pxinjectConfig.c (modified) (1 diff)
-
src/regtool.c (modified) (7 diffs)
-
src/regtoolConfig.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/scripts/regtest.sh
r14059 r14091 8 8 echo -e "YES\nipp\n\n" | pxadmin -recreate || exit 1 9 9 10 exp_id1=`$inject -newExp -tmp_exp_name t10 -tmp_inst gpc -tmp_telescope ps1 -workdir file::///some/path - simple` || exit 110 exp_id1=`$inject -newExp -tmp_exp_name t10 -tmp_inst gpc -tmp_telescope ps1 -workdir file::///some/path -reduction batman -simple` || exit 1 11 11 12 12 for ID in `seq 0 3`; do … … 16 16 $inject -updatenewExp -exp_id $exp_id1 -state run 17 17 18 exp_id2=`$inject -newExp -tmp_exp_name t11 -tmp_inst gpc -tmp_telescope ps1 -workdir file::///some/path - simple` || exit 118 exp_id2=`$inject -newExp -tmp_exp_name t11 -tmp_inst gpc -tmp_telescope ps1 -workdir file::///some/path -reduction robin -simple` || exit 1 19 19 20 20 for ID in `seq 0 3`; do -
trunk/ippTools/share/regtool_pendingexp.sql
r14057 r14091 1 SELECT DISTINCT * FROM 1 -- output should match the format of newExp 2 SELECT DISTINCT 3 exp_id, 4 tmp_exp_name, 5 tmp_camera, 6 tmp_telescope, 7 state, 8 workdir, 9 workdir_state, 10 reduction 11 FROM 2 12 (SELECT 3 13 newExp.*, -
trunk/ippTools/src/pxchip.c
r14065 r14091 74 74 // create a chipRun 75 75 if (!chipRunInsert(config->dbh, 76 0x0, 76 0x0, // chip_id 77 77 (psS64)atoll(exp_id), 78 78 "run", // state -
trunk/ippTools/src/pxchip.h
r14023 r14091 31 31 psString workdir, 32 32 psString label, 33 psString re cipe,33 psString reduction, 34 34 psString expgroup, 35 35 psString dvodb); -
trunk/ippTools/src/pxinject.c
r14037 r14091 115 115 if (!workdir) { 116 116 psError(PS_ERR_UNKNOWN, true, "-workdir is required"); 117 return false; 118 } 119 120 psString reduction = psMetadataLookupStr(&status, config->args, "-reduction"); 121 if (!status) { 122 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -reduction"); 123 return false; 124 } 125 if (!reduction) { 126 psError(PS_ERR_UNKNOWN, true, "-reduction is required"); 117 127 return false; 118 128 } … … 125 135 "reg", // state 126 136 workdir, 127 "dirty" 137 "dirty", 138 reduction 128 139 ) 129 140 ) { -
trunk/ippTools/src/pxinjectConfig.c
r14037 r14091 53 53 psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-workdir", 0, 54 54 "define workdir (required)", 0); 55 psMetadataAddStr(newExpArgs, PS_LIST_TAIL, "-reduction", 0, 56 "define reduction class (required)", 0); 55 57 psMetadataAddBool(newExpArgs, PS_LIST_TAIL, "-simple", 0, 56 58 "use the simple output format", false); -
trunk/ippTools/src/regtool.c
r14059 r14091 629 629 return false; 630 630 } 631 psFree(rawExp);632 631 633 632 // if this is a detrend image don't put it in the chip queue (and we're … … 641 640 } 642 641 psError(PS_ERR_UNKNOWN, false, "failed to change newExp.state for exp_id: %s", exp_id); 642 psFree(rawExp); 643 643 psFree(output); 644 644 return false; … … 655 655 } 656 656 psError(PS_ERR_UNKNOWN, false, "failed to change newExp.state for exp_id: %s", exp_id); 657 psFree(rawExp); 657 658 psFree(output); 658 659 return false; … … 661 662 // insert an entry into the chipPendingExp table 662 663 // this can only be run as the newExp's state has been set to stop 663 if (!pxchipQueueByExpTag(config, exp_id, NULL, NULL, NULL, NULL, NULL)) { 664 if (!pxchipQueueByExpTag(config, 665 exp_id, // exp_id is the string version, rawExp->exp_id isa int 666 rawExp->workdir, 667 NULL, // label 668 rawExp->reduction, 669 NULL, // expgroup 670 NULL // dvodb 671 )) { 664 672 // rollback 665 673 if (!psDBRollback(config->dbh)) { … … 667 675 } 668 676 psError(PS_ERR_UNKNOWN, false, "failed to queue chipPendingExp"); 677 psFree(rawExp); 669 678 psFree(output); 670 679 return false; 671 680 } 681 psFree(rawExp); 672 682 } 673 683 psFree(output); … … 924 934 } 925 935 936 psString workdir = psMetadataLookupStr(&status, config->args, "-workdir"); 937 if (!status) { 938 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -workdir"); 939 return false; 940 } 941 942 psString reduction = psMetadataLookupStr(&status, config->args, "-reduction"); 943 if (!status) { 944 psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -reduction"); 945 return false; 946 } 947 926 948 psString filter = psMetadataLookupStr(&status, config->args, "-filter"); 927 949 if (!status) { … … 1065 1087 exp_type, 1066 1088 filelevel, 1067 exp->workdir, 1089 workdir ? workdir : exp->workdir, 1090 reduction ? reduction : exp->reduction, 1068 1091 filter, 1069 1092 airmass, -
trunk/ippTools/src/regtoolConfig.c
r14059 r14091 176 176 psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-filelevel", 0, 177 177 "define the data partitioning level of this file", NULL); 178 psMetadataAddStr(addprocessed imfileArgs, PS_LIST_TAIL, "-workdir", 0,178 psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-workdir", 0, 179 179 "define the \"default\" workdir for this exposure", NULL); 180 psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-reduction", 0, 181 "define the \"default\" reduction class for this exposure", NULL); 180 182 psMetadataAddStr(addprocessedexpArgs, PS_LIST_TAIL, "-filter", 0, 181 183 "define filter ", NULL);
Note:
See TracChangeset
for help on using the changeset viewer.
