Changeset 7027
- Timestamp:
- May 1, 2006, 3:05:04 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 10 edited
-
chiptoolConfig.c (modified) (3 diffs)
-
guidetoolConfig.c (modified) (4 diffs)
-
pxadminConfig.c (modified) (3 diffs)
-
pxconfig.c (modified) (3 diffs)
-
pxtables.c (modified) (1 diff)
-
pxtools.h (modified) (4 diffs)
-
pzgetexpConfig.c (modified) (3 diffs)
-
pzgetimfilesConfig.c (modified) (4 diffs)
-
pztoolConfig.c (modified) (3 diffs)
-
regtoolConfig.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/chiptoolConfig.c
r6978 r7027 12 12 } 13 13 14 if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) { 14 config->modules = pmConfigRead(&argc, argv); 15 if (! config->modules) { 15 16 psErrorStackPrint(stderr, "Can't find site configuration!\n"); 16 17 exit(EXIT_FAILURE); … … 59 60 config->mode = PX_MODE_DONE; 60 61 } 61 62 // paul's argument parsing convention requires: -key value 62 63 // paul's argument parsing convention requires: -key value 63 64 psMetadataAddBool(arguments, PS_LIST_TAIL, "-quick", 0, "examine raw image table, write ppImage output", false); 64 65 psMetadataAddStr(arguments, PS_LIST_TAIL, "-define", 0, "examine raw image table, add to pending image table", ""); … … 158 159 159 160 // define Database handle, if used 160 config->dbh = pmConfigDB(config-> site);161 config->dbh = pmConfigDB(config->modules); 161 162 162 163 return true; 163 } 164 } -
trunk/ippTools/src/guidetoolConfig.c
r7024 r7027 15 15 16 16 // setup site config 17 if (! pmConfigRead(&config->site, &config->camera, &config->recipe,18 &argc, argv, RECIPE)) {17 config->modules = pmConfigRead(&argc, argv); 18 if (!config->modules) { 19 19 psError(PS_ERR_UNKNOWN, false, "Can't find site configuration!\n"); 20 20 exit(EXIT_FAILURE); … … 89 89 config->mode = PX_MODE_DEFINE; 90 90 } 91 91 92 92 // parse CLI for these options 93 93 psMetadata *argSet = NULL; … … 125 125 exit(EXIT_FAILURE); 126 126 } 127 127 128 128 psFree(args); 129 129 psFree(pendingArgs); … … 192 192 193 193 // define Database handle, if used 194 config->dbh = pmConfigDB(config-> site);194 config->dbh = pmConfigDB(config->modules); 195 195 196 196 return config; 197 } 197 } -
trunk/ippTools/src/pxadminConfig.c
r6978 r7027 12 12 } 13 13 14 if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) { 14 config->modules = pmConfigRead(&argc, argv); 15 16 if (! config->modules) { 15 17 psErrorStackPrint(stderr, "Can't find site configuration!\n"); 16 18 exit(EXIT_FAILURE); … … 44 46 } 45 47 46 // paul's argument parsing convention requires: -key value 48 // paul's argument parsing convention requires: -key value 47 49 psMetadataAddStr(arguments, PS_LIST_TAIL, "-create", 0, 48 50 "create the P2 tables", ""); … … 75 77 76 78 // define Database handle, if used 77 config->dbh = pmConfigDB(config-> site);79 config->dbh = pmConfigDB(config->modules); 78 80 return config; 79 } 81 } 80 82 81 83 /* -
trunk/ippTools/src/pxconfig.c
r6978 r7027 17 17 config->start = NULL; 18 18 config->stop = NULL; 19 config->camera = NULL;20 19 config->camera_name = NULL; 21 20 config->telescope = NULL; … … 23 22 config->filter = NULL; 24 23 config->dbh = NULL; 25 config->site = NULL; 26 config->recipe = NULL; 24 config->modules = NULL; 27 25 config->exp_id = NULL; 28 26 config->class = NULL; … … 38 36 psFree(config->start); 39 37 psFree(config->stop); 40 psFree(config->camera);41 38 psFree(config->camera_name); 42 39 psFree(config->telescope); 43 40 psFree(config->exp_type); 44 41 psFree(config->filter); 45 psFree(config->dbh); 46 psFree(config->site); 47 psFree(config->recipe); 42 psFree(config->dbh); 43 psFree(config->modules); 48 44 psFree(config->exp_id); 49 45 psFree(config->class); -
trunk/ippTools/src/pxtables.c
r6978 r7027 60 60 fgets (line, 128, stdin); 61 61 sscanf (line, "%s", answer); 62 62 63 63 { 64 64 bool status; 65 psString dbPassword = psMetadataLookupStr(&status, config-> site, "DBPASSWORD");65 psString dbPassword = psMetadataLookupStr(&status, config->modules->site, "DBPASSWORD"); 66 66 if (strcmp (answer, dbPassword)) goto escape; 67 67 psFree(dbPassword); -
trunk/ippTools/src/pxtools.h
r6978 r7027 6 6 # include <unistd.h> // for unlink 7 7 # include <pslib.h> 8 # include <pmObjects.h> 9 # include <pmPSF.h> 10 # include <pmPSFtry.h> 11 # include <pmModelGroup.h> 8 # include <psmodules.h> 12 9 # include <metadatadb.h> 13 10 … … 40 37 psSphere r1; 41 38 psSphere r2; 42 p sMetadata *camera;39 pmConfig *modules; 43 40 char *camera_name; 44 41 char *telescope; … … 46 43 char *filter; 47 44 psDB *dbh; 48 psMetadata *site;49 psMetadata *recipe;50 45 char *exp_id; 51 46 char *class; … … 149 144 rawScienceFrame *newToRawScienceFrame(newFrame *newFrame); 150 145 bool rawScienceFrameInsert(pxConfig *config, rawScienceFrame *frame); 151 rawDetrendFrame *newToRawDetrendFrame(newFrame *newFrame); 146 rawDetrendFrame *newToRawDetrendFrame(newFrame *newFrame); 152 147 bool rawDetrendFrameInsert(pxConfig *config, rawDetrendFrame *frame); 153 148 -
trunk/ippTools/src/pzgetexpConfig.c
r6978 r7027 9 9 pxConfig *pzgetexpConfig(pxConfig *config, int argc, char **argv) { 10 10 if (!config) { 11 config = pxConfigAlloc(); 11 config = pxConfigAlloc(); 12 12 } 13 13 14 if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) { 14 config->modules = pmConfigRead(&argc, argv); 15 16 if (! config->modules) { 15 17 psError(PS_ERR_UNKNOWN, false, "Can't find site configuration!\n"); 16 18 exit(EXIT_FAILURE); … … 46 48 47 49 // define Database handle, if used 48 config->dbh = pmConfigDB(config-> site);50 config->dbh = pmConfigDB(config->modules); 49 51 if(!config->dbh) { 50 52 psError(PS_ERR_UNKNOWN, false, "Can't connect to db\n"); … … 54 56 55 57 return config; 56 } 58 } -
trunk/ippTools/src/pzgetimfilesConfig.c
r6978 r7027 9 9 pxConfig *pzgetimfilesConfig(pxConfig *config, int argc, char **argv) { 10 10 if (!config) { 11 config = pxConfigAlloc(); 11 config = pxConfigAlloc(); 12 12 } 13 13 14 if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) { 14 config->modules = pmConfigRead(&argc, argv); 15 16 if (! config->modules) { 15 17 psError(PS_ERR_UNKNOWN, false, "Can't find site configuration!\n"); 16 18 exit(EXIT_FAILURE); … … 19 21 psMetadata *args = psMetadataAlloc(); 20 22 psMetadataAddStr(args , PS_LIST_TAIL, "-uri", 0, 21 "DataStore FileSet URI", ""); 23 "DataStore FileSet URI", ""); 22 24 psMetadataAddStr(args , PS_LIST_TAIL, "-filesetid", 0, 23 "FileSet ID", ""); 25 "FileSet ID", ""); 24 26 25 27 bool status = false; … … 42 44 43 45 // define Database handle, if used 44 config->dbh = pmConfigDB(config-> site);46 config->dbh = pmConfigDB(config->modules); 45 47 if(!config->dbh) { 46 48 psError(PS_ERR_UNKNOWN, false, "Can't connect to db\n"); … … 50 52 51 53 return config; 52 } 54 } -
trunk/ippTools/src/pztoolConfig.c
r6978 r7027 12 12 } 13 13 14 if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) { 14 config->modules = pmConfigRead(&argc, argv); 15 16 if (! config->modules) { 15 17 psError(PS_ERR_UNKNOWN, false, "Can't find site configuration!\n"); 16 18 exit(EXIT_FAILURE); … … 40 42 config->mode = PX_MODE_COPYDONE; 41 43 } 42 43 // paul's argument parsing convention requires: -key value 44 45 // paul's argument parsing convention requires: -key value 44 46 // Parse other command-line arguments 45 47 psMetadata *args = psMetadataAlloc(); … … 127 129 128 130 // define Database handle, if used 129 config->dbh = pmConfigDB(config-> site);131 config->dbh = pmConfigDB(config->modules); 130 132 131 133 return config; 132 } 134 } -
trunk/ippTools/src/regtoolConfig.c
r6978 r7027 12 12 } 13 13 14 if (! pmConfigRead(&config->site, &config->camera, &config->recipe, &argc, argv, RECIPE)) { 14 config->modules = pmConfigRead(&argc, argv); 15 16 if (! config->modules) { 15 17 psError(PS_ERR_UNKNOWN, false, "Can't find site configuration!\n"); 16 18 exit(EXIT_FAILURE); … … 33 35 config->mode = PX_MODE_UPDATE; 34 36 } 35 36 // paul's argument parsing convention requires: -key value 37 38 // paul's argument parsing convention requires: -key value 37 39 // Parse other command-line arguments 38 40 psMetadata *args = psMetadataAlloc(); … … 191 193 192 194 // define Database handle, if used 193 config->dbh = pmConfigDB(config-> site);195 config->dbh = pmConfigDB(config->modules); 194 196 195 197 return true; 196 } 198 }
Note:
See TracChangeset
for help on using the changeset viewer.
