IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35693


Ignore:
Timestamp:
Jun 21, 2013, 9:03:51 AM (13 years ago)
Author:
eugene
Message:

add more options to clean the dvo directories

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509/Ohana/src/opihi/dvo/hosts.c

    r34260 r35693  
    33# define DVO_MAX_PATH 1024
    44
    5 enum {TEMP_NONE, TEMP_DVO_RESULTS, TEMP_DVO_LOG, TEMP_RELPHOT_RESULTS, TEMP_RELPHOT_LOG};
     5enum {TEMP_NONE, TEMP_DVO_RESULTS, TEMP_DVO_LOG, TEMP_RELASTRO_CATALOG, TEMP_RELPHOT_CATALOG, TEMP_RELPHOT_LOG, TEMP_DVOPSPS_DET, TEMP_FIXSTKIDS_RESULTS};
    66
    77// functions to manage the remote hosts
     
    5858      TEMP_TYPE = TEMP_NONE;
    5959      remove_argument (N, &argc, argv);
    60       if (!strcasecmp(argv[N], "dvo.results"))     TEMP_TYPE = TEMP_DVO_RESULTS;
    61       if (!strcasecmp(argv[N], "dvo.log"))         TEMP_TYPE = TEMP_DVO_LOG;
    62       if (!strcasecmp(argv[N], "relphot.results")) TEMP_TYPE = TEMP_RELPHOT_RESULTS;
    63       if (!strcasecmp(argv[N], "relphot.log"))     TEMP_TYPE = TEMP_RELPHOT_LOG;
     60      if (!strcasecmp(argv[N], "dvo.results"))       TEMP_TYPE = TEMP_DVO_RESULTS;
     61      if (!strcasecmp(argv[N], "dvo.log"))           TEMP_TYPE = TEMP_DVO_LOG;
     62      if (!strcasecmp(argv[N], "relastro.catalog"))   TEMP_TYPE = TEMP_RELASTRO_CATALOG;
     63      if (!strcasecmp(argv[N], "relphot.catalog"))   TEMP_TYPE = TEMP_RELPHOT_CATALOG;
     64      if (!strcasecmp(argv[N], "relphot.log"))       TEMP_TYPE = TEMP_RELPHOT_LOG;
     65      if (!strcasecmp(argv[N], "dvopsps.det"))       TEMP_TYPE = TEMP_DVOPSPS_DET;
     66      if (!strcasecmp(argv[N], "fixstkids.results")) TEMP_TYPE = TEMP_FIXSTKIDS_RESULTS;
    6467      if (TEMP_TYPE == TEMP_NONE) {
    6568        gprint (GP_ERR, "USAGE: hosts purge-temp [-type (type)]\n");
     
    9497    int i;
    9598    for (i = 0; i < table->Nhosts; i++) {
     99      if (HOST_ID && (HOST_ID != table->hosts[i].hostID)) continue;
     100
    96101      pglob.gl_offs = 0;
    97102      char name[DVO_MAX_PATH];
    98103      if (ALL_PID) {
    99         if (TEMP_TYPE == TEMP_DVO_RESULTS)     snprintf (name, DVO_MAX_PATH, "%s/dvo.results.*.fits", table->hosts[i].pathname);
    100         if (TEMP_TYPE == TEMP_DVO_LOG)         snprintf (name, DVO_MAX_PATH, "%s/dvo.results.*.fits.log", table->hosts[i].pathname);
    101         if (TEMP_TYPE == TEMP_RELPHOT_RESULTS) snprintf (name, DVO_MAX_PATH, "%s/log.rlpc.*", table->hosts[i].pathname);
    102         if (TEMP_TYPE == TEMP_RELPHOT_LOG)     snprintf (name, DVO_MAX_PATH, "%s/relphot.catalog.subset.dat", table->hosts[i].pathname);
     104        if (TEMP_TYPE == TEMP_DVO_RESULTS)       snprintf (name, DVO_MAX_PATH, "%s/dvo.results.*.fits", table->hosts[i].pathname);
     105        if (TEMP_TYPE == TEMP_DVO_LOG)           snprintf (name, DVO_MAX_PATH, "%s/dvo.results.*.fits.log", table->hosts[i].pathname);
     106        if (TEMP_TYPE == TEMP_RELASTRO_CATALOG)  snprintf (name, DVO_MAX_PATH, "%s/relastro.catalog.subset.dat", table->hosts[i].pathname);
     107        if (TEMP_TYPE == TEMP_RELPHOT_CATALOG)   snprintf (name, DVO_MAX_PATH, "%s/relphot.catalog.subset.dat", table->hosts[i].pathname);
     108        if (TEMP_TYPE == TEMP_RELPHOT_LOG)       snprintf (name, DVO_MAX_PATH, "%s/log.rlpc.*", table->hosts[i].pathname);
     109        if (TEMP_TYPE == TEMP_DVOPSPS_DET)       snprintf (name, DVO_MAX_PATH, "%s/dvopsps.*.det.dat", table->hosts[i].pathname);
     110        if (TEMP_TYPE == TEMP_FIXSTKIDS_RESULTS) snprintf (name, DVO_MAX_PATH, "%s/fixstkids.results.*.dat", table->hosts[i].pathname);
    103111      } else {
    104         if (TEMP_TYPE == TEMP_DVO_RESULTS)     snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID);
    105         if (TEMP_TYPE == TEMP_DVO_LOG)         snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits.log", table->hosts[i].pathname, PID);
    106         if (TEMP_TYPE == TEMP_RELPHOT_RESULTS) snprintf (name, DVO_MAX_PATH, "%s/log.rlpc.*", table->hosts[i].pathname);
    107         if (TEMP_TYPE == TEMP_RELPHOT_LOG)     snprintf (name, DVO_MAX_PATH, "%s/relphot.catalog.subset.dat", table->hosts[i].pathname);
     112        if (TEMP_TYPE == TEMP_DVO_RESULTS)       snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits", table->hosts[i].pathname, PID);
     113        if (TEMP_TYPE == TEMP_DVO_LOG)           snprintf (name, DVO_MAX_PATH, "%s/dvo.results.%05d.*.fits.log", table->hosts[i].pathname, PID);
     114        if (TEMP_TYPE == TEMP_RELASTRO_CATALOG)  snprintf (name, DVO_MAX_PATH, "%s/relastro.catalog.subset.dat", table->hosts[i].pathname);
     115        if (TEMP_TYPE == TEMP_RELPHOT_CATALOG)   snprintf (name, DVO_MAX_PATH, "%s/relphot.catalog.subset.dat", table->hosts[i].pathname);
     116        if (TEMP_TYPE == TEMP_RELPHOT_LOG)       snprintf (name, DVO_MAX_PATH, "%s/log.rlpc.*", table->hosts[i].pathname);
     117        if (TEMP_TYPE == TEMP_DVOPSPS_DET)       snprintf (name, DVO_MAX_PATH, "%s/dvopsps.%05d.*.det.dat", table->hosts[i].pathname, PID);
     118        if (TEMP_TYPE == TEMP_FIXSTKIDS_RESULTS) snprintf (name, DVO_MAX_PATH, "%s/fixstkids.results.%05d.*.dat", table->hosts[i].pathname, PID);
    108119      }
    109120      if (VERBOSE) gprint (GP_ERR, "checking %s\n", name);
Note: See TracChangeset for help on using the changeset viewer.