- Timestamp:
- Dec 3, 2010, 2:28:34 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101103/psphot/src/psphotOutput.c
r29824 r29904 1 1 # include "psphotInternal.h" 2 3 // convert filerule to filerule.NUM and look up in the config->arguments metadata 4 int psphotFileruleCount(const pmConfig *config, const char *filerule) { 5 6 bool status = false; 7 8 psString name = NULL; 9 psStringAppend(&name, "%s.NUM", filerule); 10 int num = psMetadataLookupS32 (&status, config->arguments, name); 11 psAssert (status, "programming error: must define %s", name); 12 psFree (name); 13 return num; 14 } 2 15 3 16 pmReadout *psphotSelectBackground (pmConfig *config, … … 117 130 bool psphotAddPhotcode (pmConfig *config, const pmFPAview *view, const char *filerule) { 118 131 119 bool status = false; 120 121 int num = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.INPUT.NUM"); 122 psAssert (status, "programming error: must define PSPHOT.INPUT.NUM"); 132 int num = psphotFileruleCount(config, filerule); 123 133 124 134 // loop over the available readouts 125 135 for (int i = 0; i < num; i++) { 126 136 if (!psphotAddPhotcodeReadout (config, view, filerule, i)) { 127 psError (PSPHOT_ERR_CONFIG, false, "failed to add photcode to PSPHOT.INPUT entry %d", i);137 psError (PSPHOT_ERR_CONFIG, false, "failed to add photcode to %s entry %d", filerule, i); 128 138 return false; 129 139 }
Note:
See TracChangeset
for help on using the changeset viewer.
