Changeset 21244 for trunk/ppArith/src/ppArithLoop.c
- Timestamp:
- Feb 1, 2009, 11:43:05 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/ppArith/src/ppArithLoop.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppArith/src/ppArithLoop.c
r18070 r21244 1 /** @file ppArithLoop.c 2 * 3 * @brief 4 * 5 * @ingroup ppArith 6 * 7 * @author IfA 8 * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2009-02-01 21:40:52 $ 10 * Copyright 2009 Institute for Astronomy, University of Hawaii 11 */ 12 1 13 #ifdef HAVE_CONFIG_H 2 14 #include <config.h> … … 16 28 PS_ASSERT_PTR_NON_NULL(config, false); 17 29 18 bool mdok; // Status of MD lookup19 const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); // Filename for statistics20 psMetadata *stats = NULL; // Container for statistics21 FILE *statsFile = NULL; // File stream for statistics30 bool mdok; ///< Status of MD lookup 31 const char *statsName = psMetadataLookupStr(&mdok, config->arguments, "STATS"); ///< Filename for statistics 32 psMetadata *stats = NULL; ///< Container for statistics 33 FILE *statsFile = NULL; ///< File stream for statistics 22 34 if (statsName && strlen(statsName) > 0) { 23 psString resolved = pmConfigConvertFilename(statsName, config, true, true); // Resolved filename35 psString resolved = pmConfigConvertFilename(statsName, config, true, true); ///< Resolved filename 24 36 statsFile = fopen(resolved, "w"); 25 37 if (!statsFile) { … … 33 45 } 34 46 35 const char *outName = psMetadataLookupStr(NULL, config->arguments, "FILERULE.OUTPUT"); // Output filerule36 pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); // Output file47 const char *outName = psMetadataLookupStr(NULL, config->arguments, "FILERULE.OUTPUT"); ///< Output filerule 48 pmFPAfile *output = psMetadataLookupPtr(NULL, config->files, outName); ///< Output file 37 49 assert(output); // We added it earlier 38 50 39 const char *inName = psMetadataLookupStr(NULL, config->arguments, "FILERULE.INPUT"); // Input filerule40 pmFPAfile *input1 = NULL, *input2 = NULL; // Input files41 psString fileRegex = NULL; //Regular expression to find input files51 const char *inName = psMetadataLookupStr(NULL, config->arguments, "FILERULE.INPUT"); ///< Input filerule 52 pmFPAfile *input1 = NULL, *input2 = NULL; ///< Input files 53 psString fileRegex = NULL; ///< Regular expression to find input files 42 54 psStringAppend(&fileRegex, "^%s$", inName); 43 psMetadataIterator *iter = psMetadataIteratorAlloc(config->files, PS_LIST_HEAD, fileRegex); // Iterator44 psMetadataItem *item = psMetadataGetAndIncrement(iter); // Item from iteration55 psMetadataIterator *iter = psMetadataIteratorAlloc(config->files, PS_LIST_HEAD, fileRegex); ///< Iterator 56 psMetadataItem *item = psMetadataGetAndIncrement(iter); ///< Item from iteration 45 57 input1 = item->data.V; 46 58 assert(input1); // It should be there! … … 51 63 psFree(iter); 52 64 53 pmFPAview *view = pmFPAviewAlloc(0); // Pointer into FPA hierarchy54 pmHDU *lastHDU = NULL; // Last HDU that was updated65 pmFPAview *view = pmFPAviewAlloc(0); ///< Pointer into FPA hierarchy 66 pmHDU *lastHDU = NULL; ///< Last HDU that was updated 55 67 56 68 // Iterate over the FPA hierarchy … … 59 71 } 60 72 61 pmChip *outChip; // Output chip of interest73 pmChip *outChip; ///< Output chip of interest 62 74 while ((outChip = pmFPAviewNextChip(view, output->fpa, 1)) != NULL) { 63 pmChip *inChip1 = pmFPAviewThisChip(view, input1->fpa); // Input chip of interest64 pmChip *inChip2 = input2 ? pmFPAviewThisChip(view, input2->fpa) : NULL; // Input chip of interest75 pmChip *inChip1 = pmFPAviewThisChip(view, input1->fpa); ///< Input chip of interest 76 pmChip *inChip2 = input2 ? pmFPAviewThisChip(view, input2->fpa) : NULL; ///< Input chip of interest 65 77 if (inChip2 && ((!inChip1->file_exists && inChip2->file_exists) || 66 78 (inChip1->file_exists && !inChip2->file_exists))) { … … 78 90 } 79 91 80 pmCell *outCell; // Cell of interest92 pmCell *outCell; ///< Cell of interest 81 93 while ((outCell = pmFPAviewNextCell(view, output->fpa, 1)) != NULL) { 82 pmCell *inCell1 = pmFPAviewThisCell(view, input1->fpa); // Input cell of interest83 pmCell *inCell2 = input2 ? pmFPAviewThisCell(view, input2->fpa) : NULL; // Input cell of interest94 pmCell *inCell1 = pmFPAviewThisCell(view, input1->fpa); ///< Input cell of interest 95 pmCell *inCell2 = input2 ? pmFPAviewThisCell(view, input2->fpa) : NULL; ///< Input cell of interest 84 96 if (inCell2 && ((!inCell1->file_exists && inCell2->file_exists) || 85 97 (inCell1->file_exists && !inCell2->file_exists))) { … … 105 117 } 106 118 107 pmReadout *outRO; // Readout of interest119 pmReadout *outRO; ///< Readout of interest 108 120 while ((outRO = pmFPAviewNextReadout(view, output->fpa, 1))) { 109 121 if (!pmFPAfileIOChecks(config, view, PM_FPA_BEFORE)) { 110 122 return false; 111 123 } 112 pmReadout *inRO1 = pmFPAviewThisReadout(view, input1->fpa);// Input readout of interest124 pmReadout *inRO1 = pmFPAviewThisReadout(view, input1->fpa);///< Input readout of interest 113 125 pmReadout *inRO2 = input2 ? pmFPAviewThisReadout(view, input2->fpa) : 114 NULL;// Input readout of interest126 NULL;///< Input readout of interest 115 127 116 128 if (inRO2 && ((!inRO1->data_exists && inRO2->data_exists) ||
Note:
See TracChangeset
for help on using the changeset viewer.
