IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 21, 2013, 5:57:02 AM (13 years ago)
Author:
eugene
Message:

add -verify option (= -check-only) to check for merged tables, but not actually merge the data

Location:
branches/eam_branches/ipp-20130419/Ohana/src/dvomerge
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130419/Ohana/src/dvomerge/include/dvomerge.h

    r35416 r35589  
    2525
    2626int    VERBOSE;
     27int    VERIFY;
    2728char   CATDIR[256];
    2829char   GSCFILE[256];
  • branches/eam_branches/ipp-20130419/Ohana/src/dvomerge/src/args.c

    r35416 r35589  
    1212    remove_argument (N, argc, argv);
    1313  }
     14
     15  /* verify merge status of output tables, but do not modify */
     16  VERIFY = FALSE;
     17  if ((N = get_argument (*argc, argv, "-verify"))) {
     18    VERIFY = TRUE;
     19    remove_argument (N, argc, argv);
     20  }
     21  if ((N = get_argument (*argc, argv, "-check-only"))) {
     22    VERIFY = TRUE;
     23    remove_argument (N, argc, argv);
     24  }
     25
     26  /* use a different photcode file to define mean values */
    1427  if ((N = get_argument (*argc, argv, "-photcode-file"))) {
    1528    remove_argument (N, argc, argv);
     
    113126  }
    114127
     128  /* verify merge status of output tables, but do not modify */
     129  VERIFY = FALSE;
     130  if ((N = get_argument (*argc, argv, "-verify"))) {
     131    VERIFY = TRUE;
     132    remove_argument (N, argc, argv);
     133  }
     134  if ((N = get_argument (*argc, argv, "-check-only"))) {
     135    VERIFY = TRUE;
     136    remove_argument (N, argc, argv);
     137  }
     138
    115139  /* replace measurement, don't duplicate */
    116140  REPLACE_BY_PHOTCODE = FALSE;
  • branches/eam_branches/ipp-20130419/Ohana/src/dvomerge/src/dvomergeUpdate.c

    r33963 r35589  
    2323    CONTINUE = TRUE;
    2424  }
     25  if (VERIFY) CONTINUE = TRUE;
    2526
    2627  input  = argv[1];
  • branches/eam_branches/ipp-20130419/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r34405 r35589  
    7676    }
    7777    if (!missed) {
    78       if (VERBOSE) fprintf (stderr, "skipping %s, empty or already merged\n", inlist[0].filename[i]);
     78      if (VERBOSE || VERIFY) fprintf (stderr, "skipping %s, already merged\n", inlist[0].filename[i]);
    7979      OutputStatusFree (outstat, outlist->Nregions);
    8080      dmhObjectStatsFree (inStats);
    8181      SkyListFree (outlist);
     82      continue;
     83    }
     84    if (VERIFY) {
     85      fprintf (stderr, "%s NOT merged\n", inlist[0].filename[i]);
    8286      continue;
    8387    }
     
    193197    char tmpline[DVO_MAX_PATH];
    194198    if (VERBOSE)             { snprintf (tmpline, DVO_MAX_PATH, "%s -v",       command); strcpy (command, tmpline); }
     199    if (VERIFY)              { snprintf (tmpline, DVO_MAX_PATH, "%s -verify",  command); strcpy (command, tmpline); }
    195200    if (REPLACE_BY_PHOTCODE) { snprintf (tmpline, DVO_MAX_PATH, "%s -replace", command); strcpy (command, tmpline); }
    196201
  • branches/eam_branches/ipp-20130419/Ohana/src/dvomerge/src/help.c

    r35416 r35589  
    5959  fprintf (stderr, "  optional flags:\n");
    6060  fprintf (stderr, "  -v                          : verbose mode\n");
     61  fprintf (stderr, "  -verify                     : verify merge status of output tables, but do not modify\n");
     62  fprintf (stderr, "  -check-only                 : verify merge status of output tables, but do not modify [same as -verify]\n");
    6163  fprintf (stderr, "  -help                       : this list\n");
    6264  fprintf (stderr, "  -h                          : this list\n\n");
     
    8183  fprintf (stderr, "  optional flags:\n");
    8284  fprintf (stderr, "  -v                          : verbose mode\n");
     85  fprintf (stderr, "  -verify                     : verify merge status of output tables, but do not modify\n");
     86  fprintf (stderr, "  -check-only                 : verify merge status of output tables, but do not modify [same as -verify]\n");
    8387  fprintf (stderr, "  -help                       : this list\n");
    8488  fprintf (stderr, "  -h                          : this list\n\n");
Note: See TracChangeset for help on using the changeset viewer.