Changeset 15755 for trunk/ippTools/src/flatcorrConfig.c
- Timestamp:
- Dec 6, 2007, 3:46:12 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ippTools/src/flatcorrConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/flatcorrConfig.c
r15684 r15755 144 144 "use the simple output format", false); 145 145 146 // -flatcorrimfile 147 psMetadata *flatcorrimfileArgs = psMetadataAlloc(); 148 psMetadataAddStr(flatcorrimfileArgs, PS_LIST_TAIL, "-corr_id", 0, 149 "search by exp_id", NULL); 150 psMetadataAddU64(flatcorrimfileArgs, PS_LIST_TAIL, "-limit", 0, 151 "limit result set to N items", 0); 152 psMetadataAddBool(flatcorrimfileArgs, PS_LIST_TAIL, "-simple", 0, 153 "use the simple output format", false); 154 146 155 // -update 147 156 psMetadata *updateArgs = psMetadataAlloc(); … … 156 165 PXTOOL_ADD_MODE("-pending", "show flat correction runs needing to be processed", 157 166 FLATCORR_MODE_PENDING, pendingArgs); 167 PXTOOL_ADD_MODE("-flatcorrimfile", "list all the exposures in flat correction runs", 168 FLATCORR_MODE_FLATCORRIMFILE, flatcorrimfileArgs); 158 169 PXTOOL_ADD_MODE("-update", "change a flat calibration run's state", 159 170 FLATCORR_MODE_UPDATE, updateArgs); … … 187 198 config->where = psMetadataAlloc(); 188 199 189 addWhereStr(det_id); 190 { 191 // XXX this is broke because you can't specify -iteration 0 192 psMetadataItem *item = psMetadataLookup(config->args, "-iteration"); 193 if (item && psStrcasestr(item->comment, "found")) { 194 if (!psMetadataAddS32(config->where, PS_LIST_TAIL, "iteration", 0, "==", item->data.S32)) { 195 psError(PS_ERR_UNKNOWN, false, "failed to add item iteration"); 196 psFree(config); 197 return NULL; 198 } 200 { 201 psString str = NULL; 202 bool status = false; 203 if ((str = psMetadataLookupStr(&status, config->args, "-corr_id"))) { 204 if (!psMetadataAddS64(config->where, PS_LIST_TAIL, "corr_id", 0, "==", (psS64)atoll(str))) { 205 psError(PS_ERR_UNKNOWN, false, "failed to add item corr_id"); 206 psFree(config); 207 return NULL; 199 208 } 200 209 } 201 202 addWhereStr(det_id); 203 204 // convert '-code' to 'fault' 205 { 206 psS16 fault = 0; 207 bool status = false; 208 if ((fault = psMetadataLookupS16(&status, config->args, "-code"))) { 209 if (!psMetadataAddS16(config->where, PS_LIST_TAIL, "fault", 0, "==", fault)) { 210 psError(PS_ERR_UNKNOWN, false, "failed to add item fault"); 211 psFree(config); 212 return NULL; 213 } 214 } 215 } 210 } 216 211 217 212 if (config->where->list->n < 1) {
Note:
See TracChangeset
for help on using the changeset viewer.
