Changeset 6872 for trunk/psModules/src/config/pmConfig.h
- Timestamp:
- Apr 17, 2006, 8:01:05 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/config/pmConfig.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/config/pmConfig.h
r6297 r6872 3 3 * @author PAP, IfA 4 4 * 5 * @version $Revision: 1. 3$ $Name: not supported by cvs2svn $6 * @date $Date: 2006-0 2-02 04:51:14$5 * @version $Revision: 1.4 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2006-04-17 18:01:05 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 15 15 16 16 17 // Configuration information 18 typedef struct 19 { 20 psMetadata *site; // Site configuration 21 psMetadata *camera; // Camera specification 22 psMetadata *recipes; // Recipes for processing 23 psMetadata *arguments; // Command-line arguments 24 psMetadata *files; // pmFPAfiles used for analysis 25 // psMetadata *format; // camera format for primary image 26 psDB *database; // Database handle 27 } 28 pmConfig; 29 30 pmConfig *pmConfigAlloc(void); 31 32 // Free static variables 33 void pmConfigDone(void); 17 34 18 35 /** pmConfigRead 19 * 36 * 20 37 * pmConfigRead shall load the site configuration (according to the above rule 21 38 * for determining the source). The camera configuration shall also be loaded if … … 32 49 * 33 50 */ 34 bool pmConfigRead( 35 psMetadata **site, 36 psMetadata **camera, 37 psMetadata **recipe, 51 pmConfig *pmConfigRead( 38 52 int *argc, 39 char **argv, 40 const char *recipeName 53 char **argv); 54 55 /** we need this elsewhere; make it public **/ 56 bool readConfig( 57 psMetadata **config, // Config to output 58 const char *name, // Name of file 59 const char *description // Description of file 41 60 ); 42 61 43 44 45 62 /** pmConfigValidateCamera 46 * 63 * 47 64 * This function, used by pmConfigCameraFromHeader, shall return true if the 48 65 * FITS header matches the rule contained in the camera configuration (see 49 66 * x2.2.2.3); otherwise it shall return false. 50 * 67 * 51 68 */ 52 bool pmConfigValidateCamera( 53 const psMetadata *camera, 54 const psMetadata *header 55 ); 56 69 bool pmConfigValidateCameraFormat( 70 const psMetadata *cameraFormat, 71 const psMetadata *header); 57 72 58 73 59 74 /** pmConfigCameraFromHeader 60 * 75 * 61 76 * pmConfigCameraFromHeader shall load the camera configuration based on the 62 77 * contents of the FITS header, using the list of known cameras contained in the 63 78 * site configuration. If more than one camera matches the FITS header, a warning 64 79 * shall be generated and the first matching camera returned. 65 * 80 * 66 81 */ 67 psMetadata *pmConfigCameraF romHeader(68 const psMetadata *site,69 const psMetadata *header 82 psMetadata *pmConfigCameraFormatFromHeader( 83 pmConfig *config, // The configuration 84 const psMetadata *header // The FITS header 70 85 ); 71 86 72 87 73 74 88 /** pmConfigRecipeFromCamera 75 * 76 * pmConfigRecipeFromCamera shall load the recipe configuration based on the 77 * recipeName and the list of known recipes contained in the camera 89 * 90 * pmConfigRecipeFromCamera shall load the recipes from the list of known recipes contained in the camera 78 91 * configuration. 79 * 92 * 80 93 */ 81 psMetadata *pmConfigRecipeFromCamera( 82 const psMetadata *camera, 83 const char *recipeName 94 bool pmConfigReadRecipes( 95 pmConfig *config 84 96 ); 85 97 86 98 /** pmConfigDB 87 * 99 * 88 100 * pmConfigDB shall use the site configuration data to open a database handle. 89 101 * This is fairly straightforward at the moment, but will change when we beef up 90 102 * security. (TBD) 91 * 103 * 92 104 */ 93 105 #ifdef DOMIT_PSDB … … 99 111 ); 100 112 113 /** pmConfigConformHeader 114 * 115 * Make the supplied header conform to the nominated camera format. 116 */ 117 bool pmConfigConformHeader(psMetadata *header, // Header to conform 118 const psMetadata *format // Camera format 119 ); 120 121 122 psArray *pmConfigFileSets (int *argc, char **argv, char *file, char *list); 123 bool pmConfigFileSetsMD (psMetadata *metadata, int *argc, char **argv, char *name, char *file, char *list); 124 101 125 102 126 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
