(file) Return to update_sharp_keys.c CVS log (file) (dir) Up to [Development] / JSOC / proj / sharp / apps

Diff for /JSOC/proj/sharp/apps/update_sharp_keys.c between version 1.8 and 1.9

version 1.8, 2014/06/05 21:27:32 version 1.9, 2014/06/06 19:04:51
Line 18 
Line 18 
  *                   -- DRMS SHARP CEA series  *                   -- DRMS SHARP CEA series
  *                   -- HARPNUM  *                   -- HARPNUM
  *                   -- comma separated list of keywords to recalculate  *                   -- comma separated list of keywords to recalculate
    *                   -- DEBUG flag (use like this debug=debug)
  *  *
  *      AUTHOR     : Monica Bobra  *      AUTHOR     : Monica Bobra
  *  *
Line 26 
Line 27 
  *  *
  *      EXAMPLE    :  *      EXAMPLE    :
  *      update_sharp_keys sharpseriesin=hmi.sharp_720s sharpceaseriesin=hmi.sharp_cea_720s //  *      update_sharp_keys sharpseriesin=hmi.sharp_720s sharpceaseriesin=hmi.sharp_cea_720s //
  *      HARPNUM=1 sharpseriesout=hmi.sharp_720s sharpceaseriesout=hmi.sharp_cea_720s keylist=USFLUX,TOTPOT   *      HARPNUM=1 sharpseriesout=hmi.sharp_720s sharpceaseriesout=hmi.sharp_cea_720s keylist=USFLUX,TOTPOT debug=debug
  *  *
  */  */
  
Line 71  ModuleArgs_t module_args[] =
Line 72  ModuleArgs_t module_args[] =
         {ARG_STRING, "sharpceaseriesout",  NULL, "Output Sharp CEA dataseries"},         {ARG_STRING, "sharpceaseriesout",  NULL, "Output Sharp CEA dataseries"},
         {ARG_INT,    "HARPNUM",         NULL, "HARP number"},         {ARG_INT,    "HARPNUM",         NULL, "HARP number"},
         {ARG_STRING, "keylist",         NULL, "comma separated list of keywords to update"},         {ARG_STRING, "keylist",         NULL, "comma separated list of keywords to update"},
           {ARG_STRING, "debug",              NULL, "debug mode functionality. use like this: debug=debug"},
         {ARG_END}         {ARG_END}
 }; };
  
Line 143  int DoIt(void)
Line 145  int DoIt(void)
  
         char sharpquery[256];         char sharpquery[256];
         char sharpceaquery[256];         char sharpceaquery[256];
         printf("sameflag = %d\n", sameflag);  
         printf("testflag = %d\n", testflag);  
         sprintf(sharpceaquery, "%s[%d]\n", sharpceaseriesin,harpnum);         sprintf(sharpceaquery, "%s[%d]\n", sharpceaseriesin,harpnum);
         printf(sharpceaquery, "%s[%d]\n", sharpceaseriesin,harpnum);         printf(sharpceaquery, "%s[%d]\n", sharpceaseriesin,harpnum);
  
Line 187  int DoIt(void)
Line 187  int DoIt(void)
  
  
         char *keylist = (char *) params_get_str(&cmdparams, "keylist");         char *keylist = (char *) params_get_str(&cmdparams, "keylist");
           char *debug   = (char *) params_get_str(&cmdparams, "debug");
  
         // Flags to indicate which keyword will be recalculated         // Flags to indicate which keyword will be recalculated
         int meanvfflag  = (strstr(keylist,"USFLUX")  != NULL);  // generalize so that lowercase is acceptable         int meanvfflag  = (strstr(keylist,"USFLUX")  != NULL);  // generalize so that lowercase is acceptable
Line 213  int DoIt(void)
Line 214  int DoIt(void)
         int epsxflag    = (strstr(keylist,"EPSX")    != NULL);         int epsxflag    = (strstr(keylist,"EPSX")    != NULL);
         int epsyflag    = (strstr(keylist,"EPSY")    != NULL);         int epsyflag    = (strstr(keylist,"EPSY")    != NULL);
         int epszflag    = (strstr(keylist,"EPSZ")    != NULL);         int epszflag    = (strstr(keylist,"EPSZ")    != NULL);
           int debugflag   = (strstr(debug,"debug")     != NULL);
  
         DRMS_Record_t *sharpinrec = sharpinrecset->records[0];         DRMS_Record_t *sharpinrec = sharpinrecset->records[0];
         DRMS_Record_t *sharpceainrec = sharpceainrecset->records[0];         DRMS_Record_t *sharpceainrec = sharpceainrecset->records[0];
Line 335  int DoIt(void)
Line 337  int DoIt(void)
            tnow = (double)time(NULL);            tnow = (double)time(NULL);
            tnow += UNIX_epoch;            tnow += UNIX_epoch;
  
              if (debugflag)
              {
                 printf("i=%d\n",irec);
              }
   
            // set CODEVER7 and HISTORY and DATE            // set CODEVER7 and HISTORY and DATE
            drms_setkey_string(sharpoutrec, "CODEVER7", cvsinfoall);            drms_setkey_string(sharpoutrec, "CODEVER7", cvsinfoall);
            drms_setkey_string(sharpoutrec,"HISTORY",historyofthemodule);            drms_setkey_string(sharpoutrec,"HISTORY",historyofthemodule);
Line 775  int DoIt(void)
Line 782  int DoIt(void)
  
         // free the arrays that are related to the lorentz calculation         // free the arrays that are related to the lorentz calculation
         free(fx); free(fy); free(fz);         free(fx); free(fy); free(fz);
           printf("Success=%d\n",sameflag);
 return 0; return 0;
 }       // DoIt }       // DoIt


Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Karen Tian
Powered by
ViewCVS 0.9.4