IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35720


Ignore:
Timestamp:
Jun 28, 2013, 1:59:30 PM (13 years ago)
Author:
eugene
Message:

add a -force-merge option to disable the check of the target file (for re-dvomerge, but not actually used to generate the big LAP db)

Location:
branches/eam_branches/ipp-20130509/Ohana/src/dvomerge
Files:
3 edited

Legend:

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

    r35699 r35720  
    4040char  *ALTERNATE_PHOTCODE_FILE;
    4141int    REPLACE_BY_PHOTCODE;
     42int    FORCE_MERGE;
    4243
    4344char *SINGLE_CPT;
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/args.c

    r35699 r35720  
    4141    remove_argument (N, argc, argv);
    4242    ALTERNATE_PHOTCODE_FILE = strcreate(argv[N]);
     43    remove_argument (N, argc, argv);
     44  }
     45
     46  // merge even if header claims db has already been merged
     47  FORCE_MERGE = FALSE;
     48  if ((N = get_argument (*argc, argv, "-force-merge"))) {
     49    FORCE_MERGE = TRUE;
    4350    remove_argument (N, argc, argv);
    4451  }
     
    171178  }
    172179
     180  // merge even if header claims db has already been merged
     181  FORCE_MERGE = FALSE;
     182  if ((N = get_argument (*argc, argv, "-force-merge"))) {
     183    FORCE_MERGE = TRUE;
     184    remove_argument (N, argc, argv);
     185  }
     186
    173187  /* replace measurement, don't duplicate */
    174188  REPLACE_BY_PHOTCODE = FALSE;
  • branches/eam_branches/ipp-20130509/Ohana/src/dvomerge/src/dvomergeUpdate_catalogs.c

    r35705 r35720  
    109109      missed = (missed || outstat[j].missed);
    110110    }
    111     if (!missed) {
     111    if (!FORCE_MERGE && !missed) {
    112112      if (VERBOSE || VERIFY) fprintf (stderr, "skipping %s, already merged\n", filename_input);
    113113      OutputStatusFree (outstat, outlist->Nregions);
     
    146146
    147147      // skip if we have already done the merge
    148       if (!outstat[j].missed) continue;
     148      if (!FORCE_MERGE && !outstat[j].missed) continue;
    149149
    150150      if (VERBOSE) fprintf (stderr, "output : %s\n", outlist[0].regions[j][0].name);
     
    161161      outcatalog.catflags = LOAD_AVES | LOAD_MEAS | LOAD_MISS | LOAD_SECF;
    162162
    163       dmhObjectAdd (outstat[j].history, &outcatalog.header, inStats);
     163      if (outstat[i].missed) {
     164        dmhObjectAdd (outstat[j].history, &outcatalog.header, inStats);
     165      }
    164166
    165167      if (!dvo_catalog_backup (&outcatalog, TRUE)) {
     
    239241
    240242    char tmpline[DVO_MAX_PATH];
    241     if (VERBOSE)             { snprintf (tmpline, DVO_MAX_PATH, "%s -v",       command);          strcpy (command, tmpline); }
    242     if (VERIFY)              { snprintf (tmpline, DVO_MAX_PATH, "%s -verify",  command);          strcpy (command, tmpline); }
    243     if (VERIFY_CATALOG_ONLY) { snprintf (tmpline, DVO_MAX_PATH, "%s -verify-catalogs",  command); strcpy (command, tmpline); }
    244     if (REPLACE_BY_PHOTCODE) { snprintf (tmpline, DVO_MAX_PATH, "%s -replace", command);          strcpy (command, tmpline); }
    245     if (PARALLEL_INPUT)      { snprintf (tmpline, DVO_MAX_PATH, "%s -parallel-input",  command);  strcpy (command, tmpline); }
     243    if (VERBOSE)             { snprintf (tmpline, DVO_MAX_PATH, "%s -v",               command); strcpy (command, tmpline); }
     244    if (VERIFY)              { snprintf (tmpline, DVO_MAX_PATH, "%s -verify",          command); strcpy (command, tmpline); }
     245    if (VERIFY_CATALOG_ONLY) { snprintf (tmpline, DVO_MAX_PATH, "%s -verify-catalogs", command); strcpy (command, tmpline); }
     246    if (REPLACE_BY_PHOTCODE) { snprintf (tmpline, DVO_MAX_PATH, "%s -replace",         command); strcpy (command, tmpline); }
     247    if (PARALLEL_INPUT)      { snprintf (tmpline, DVO_MAX_PATH, "%s -parallel-input",  command); strcpy (command, tmpline); }
     248    if (FORCE_MERGE)         { snprintf (tmpline, DVO_MAX_PATH, "%s -force-merge",     command); strcpy (command, tmpline); }
    246249
    247250    fprintf (stderr, "command: %s\n", command);
Note: See TracChangeset for help on using the changeset viewer.