IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 5, 2008, 12:41:58 PM (18 years ago)
Author:
bills
Message:

Get configuration dump file name from command line option. If no file
is provided, no dump is created

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubArguments.c

    r19165 r19399  
    219219    psMetadataAddBool(arguments, PS_LIST_TAIL, "-photometry", 0, "Perform photometry?", false);
    220220    psMetadataAddS32(arguments, PS_LIST_TAIL, "-threads", 0, "Number of threads", 0);
     221    psMetadataAddStr(arguments, PS_LIST_TAIL, "-dumpconfig", 0, "file to dump configuration to", NULL);
    221222
    222223    if (argc == 1 || !psArgumentParse(arguments, &argc, argv) || argc != 4) {
     
    345346
    346347    // Dump configuration, now that's it's settled
    347     {
     348    psBool status;
     349    psString dump_file =  psMetadataLookupStr(&status, config->arguments, "-dumpconfig");
     350    if (dump_file) {
    348351        pmConfigCamerasCull(config, NULL);
    349352        pmConfigRecipesCull(config, "PPSUB,PPSTATS,PSPHOT,MASKS");
    350353
    351         const char *outroot = psMetadataLookupStr(NULL, arguments, "OUTPUT"); // Output root name
    352         psAssert(outroot, "Should be there, we put it there!");
    353 
    354354        pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PPSUB.INPUT"); // Input file
    355         pmConfigDump(config, input->fpa, outroot);
     355        pmConfigDump(config, input->fpa, dump_file);
    356356    }
    357357
Note: See TracChangeset for help on using the changeset viewer.