Changeset 27160 for trunk/ppStack/src/ppStack.c
- Timestamp:
- Mar 3, 2010, 1:54:33 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ppStack/src/ppStack.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppStack/src/ppStack.c
r27135 r27160 24 24 25 25 pmConfig *config = pmConfigRead(&argc, argv, PPSTACK_RECIPE); // Configuration 26 ppStackOptions *options = NULL; // Options for stacking 26 27 if (!config) { 27 28 goto die; … … 54 55 } 55 56 56 if (!ppStackLoop(config)) { 57 options = ppStackOptionsAlloc(); 58 if (!ppStackLoop(config, options)) { 57 59 goto die; 58 60 } … … 76 78 } 77 79 } 80 81 // Write out summary statistics 82 if (options && options->stats) { 83 84 psMetadataAddS32(options->stats, PS_LIST_TAIL, "QUALITY", PS_META_REPLACE, 85 "Bad data quality flag", options->quality); 86 psMetadataAddF32(options->stats, PS_LIST_TAIL, "TIME_STACK", 0, 87 "Total time", psTimerClear("PPSTACK_TOTAL")); 88 89 const char *statsMDC = psMetadataConfigFormat(options->stats); 90 if (!statsMDC || strlen(statsMDC) == 0) { 91 psError(PS_ERR_IO, false, "Unable to get statistics MDC file."); 92 return false; 93 } 94 if (fprintf(options->statsFile, "%s", statsMDC) != strlen(statsMDC)) { 95 psError(PS_ERR_IO, false, "Unable to write statistics MDC file."); 96 return false; 97 } 98 psFree(statsMDC); 99 if (fclose(options->statsFile) == EOF) { 100 psError(PS_ERR_IO, false, "Unable to close statistics MDC file."); 101 return false; 102 } 103 options->statsFile = NULL; 104 pmConfigRunFilenameAddWrite(config, "STATS", 105 psMetadataLookupStr(NULL, config->arguments, "STATS")); 106 } 107 psFree(options); 78 108 79 109 // Dump configuration
Note:
See TracChangeset
for help on using the changeset viewer.
