Changeset 30912
- Timestamp:
- Mar 15, 2011, 4:50:08 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
dbconfig/changes.txt (modified) (1 diff)
-
dbconfig/minidvodb.md (modified) (1 diff)
-
ippScripts/scripts/minidvodb_merge.pl (modified) (8 diffs)
-
ippTools/src/addtool.c (modified) (6 diffs)
-
ippTools/src/addtoolConfig.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/dbconfig/changes.txt
r30314 r30912 1998 1998 1999 1999 ALTER TABLE pstampDataStore ADD COLUMN need_magic INT; 2000 2001 2002 --Version 1.1.67 2003 2004 ALTER TABLE minidvodbProcessed add column dtime_verify FLOAT AFTER dtime_relphot; 2005 ALTER TABLE minidvodbProcessed add column dtime_script FLOAT AFTER dtime_merge; -
trunk/dbconfig/minidvodb.md
r29527 r30912 14 14 dtime_resort F32 0.0 15 15 dtime_relphot F32 0.0 16 dtime_verify F32 0.0 16 17 dtime_merge F32 0.0 18 dtime_script F32 0.0 17 19 epoch UTC 0001-01-01T00:00:00Z 18 20 mergedvodb_path STR 255 -
trunk/ippScripts/scripts/minidvodb_merge.pl
r28311 r30912 16 16 my $dtime_relphot; 17 17 my $dtime_merge; 18 my $dtime_verify; 19 my $dtime_script; 18 20 19 21 use vars qw( $VERSION ); … … 36 38 my $relphot = can_run('relphot') or (warn "Can't find relphot" and $missing_tools = 1); 37 39 my $relastro = can_run('relastro') or (warn "Can't find relastro" and $missing_tools = 1); 40 my $dvoverify = can_run('dvoverify') or (warn "Can't find dvoverify" and $missing_tools = 1); 41 42 38 43 if ($missing_tools) { 39 44 warn("Can't find required tools."); … … 87 92 unless ($no_op) { 88 93 if (defined $mergedvodbReal) { 94 95 #this is chopped into several parts: addstar, relphot, dvoverify, merge 96 97 98 #addstar 89 99 { 90 100 my $command = "$addstar -resort"; … … 105 115 print "addstar -resort time $dtime_addstar\n"; 106 116 } 117 118 #relphot 107 119 108 120 { … … 124 136 print "relphot time $dtime_relphot\n"; 125 137 } 138 #dvoverify 139 { 140 my $command = "$dvoverify -s $minidvodb"; 141 print "$command\n"; 142 my $mjd_dvoverify_start = DateTime->now->mjd; # MJD of starting script 143 144 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 145 run(command => $command, verbose => $verbose); 146 unless ($success) { 147 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 148 &my_die("Unable to perform dvoverify: $error_code", $mergedvodb, $error_code); 149 } 150 $dtime_dvoverify = 86400.0*(DateTime->now->mjd - $mjd_dvoverify_start); # MJD of starting script 151 print "dvoverify time $dtime_dvoverify\n"; 152 } 153 154 155 #Merge 126 156 127 157 my $this_is_the_first; … … 190 220 191 221 { 222 223 $dtime_script = 86400.0*(DateTime->now->mjd - $mjd_start); 224 225 192 226 my $command = "addtool -minidvodb_id $minidvodb_id"; 193 227 $command .= " -addminidvodbprocessed"; … … 197 231 $command .= " -dtime_resort $dtime_resort" if defined $dtime_resort; 198 232 $command .= " -dtime_merge $dtime_merge" if defined $dtime_merge; 199 $command .= " -dbname $dbname" if defined $dbname; 233 $command .= " -dtime_script $dtime_script" if defined $dtime_script; 234 $command .= " -dtime_verify $dtime_dvoverify" if defined $dtime_dvoverify; 235 $command .= " -dbname $dbname" if defined $dbname; 200 236 #print $command; 201 237 … … 236 272 $command .= " -dtime_resort $dtime_resort" if defined $dtime_resort; 237 273 $command .= " -dtime_merge $dtime_merge" if defined $dtime_merge; 274 $command .= " -dtime_script $dtime_script" if defined $dtime_script; 275 $command .= " -dtime_verify $dtime_dvoverify" if defined $dtime_dvoverify; 238 276 $command .= " -dbname $dbname" if defined $dbname; 239 277 -
trunk/ippTools/src/addtool.c
r30907 r30912 1179 1179 PXOPT_LOOKUP_F32(dtime_resort, config->args, "-dtime_resort", false, false); 1180 1180 PXOPT_LOOKUP_F32(dtime_merge, config->args, "-dtime_merge", false, false); 1181 PXOPT_LOOKUP_F32(dtime_verify, config->args, "-dtime_verify", false, false); 1182 PXOPT_LOOKUP_F32(dtime_script, config->args, "-dtime_script", false, false); 1183 1181 1184 PXOPT_LOOKUP_TIME(epoch, config->args, "-epoch", false, false); 1182 1185 PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false); … … 1230 1233 dtime_resort, 1231 1234 dtime_relphot, 1235 dtime_verify, 1232 1236 dtime_merge, 1237 dtime_script, 1233 1238 epoch, 1234 1239 mergedvodb_path, … … 1293 1298 psStringAppend(&query4, "update minidvodbProcessed set merge_order = %"PRIu64,m_order); 1294 1299 psStringAppend(&query4," where minidvodb_id = %" PRIu64, minidvodb_id); 1295 printf("%s", query4);1300 //printf("%s", query4); 1296 1301 if (!p_psDBRunQuery(config->dbh, query4)) { 1297 1302 // rollback … … 1511 1516 PXOPT_LOOKUP_F32(dtime_resort, config->args, "-set_dtime_resort", false, false); 1512 1517 PXOPT_LOOKUP_F32(dtime_merge, config->args, "-set_dtime_merge", false, false); 1513 1518 PXOPT_LOOKUP_F32(dtime_verify, config->args, "-set_dtime_verify", false, false); 1519 PXOPT_LOOKUP_F32(dtime_script, config->args, "-set_dtime_script", false, false); 1514 1520 PXOPT_COPY_S64(config->args, where, "-minidvodb_id", "minidvodbProcessed.minidvodb_id", "=="); 1515 1521 PXOPT_COPY_STR(config->args, where, "-minidvodb_name", "minidvodbRun.minidvodb_name", "=="); … … 1562 1568 cnt++; 1563 1569 } 1570 if (dtime_verify) { 1571 if (cnt) { 1572 psStringAppend(&query, "%s", comma); 1573 } 1574 psStringAppend(&query, " dtime_verify = %f", dtime_verify); 1575 cnt++; 1576 } 1577 if (dtime_script) { 1578 if (cnt) { 1579 psStringAppend(&query, "%s", comma); 1580 } 1581 psStringAppend(&query, " dtime_script = %f", dtime_script); 1582 cnt++; 1583 } 1564 1584 1565 1585 psString whereClause = psDBGenerateWhereConditionSQL(where, NULL); … … 1567 1587 1568 1588 if (!p_psDBRunQuery(config->dbh, query)) { 1569 psError(PS_ERR_UNKNOWN, false, "database error");1589 psError(PS_ERR_UNKNOWN, false, "database error \n%s\n",query ); 1570 1590 psFree(query); 1571 1591 return false; -
trunk/ippTools/src/addtoolConfig.c
r28211 r30912 195 195 psMetadataAddF32(addminidvodbprocessedArgs, PS_LIST_TAIL, "-dtime_relphot", 0, "define elapsed time for relphot (seconds)", NAN); 196 196 psMetadataAddF32(addminidvodbprocessedArgs, PS_LIST_TAIL, "-dtime_resort", 0, "define elapsed time for resort (seconds)", NAN); 197 psMetadataAddF32(addminidvodbprocessedArgs, PS_LIST_TAIL, "-dtime_verify", 0, "define elapsed time for DVO verify (seconds)", NAN); 197 198 psMetadataAddF32(addminidvodbprocessedArgs, PS_LIST_TAIL, "-dtime_merge", 0, "define elapsed time for DVO merge (seconds)", NAN); 199 psMetadataAddF32(addminidvodbprocessedArgs, PS_LIST_TAIL, "-dtime_script", 0, "define elapsed time for script (seconds)", NAN); 198 200 psMetadataAddTime(addminidvodbprocessedArgs, PS_LIST_TAIL, "-epoch", 0, "time merge is finished", NULL); 199 201 psMetadataAddStr(addminidvodbprocessedArgs, PS_LIST_TAIL, "-mergedvodb_path",0, "path of merged dvodb", NULL); … … 220 222 psMetadataAddF32(updateminidvodbprocessedArgs, PS_LIST_TAIL, "-set_dtime_relphot", 0, "define elapsed time for relphot (seconds)", 0); 221 223 psMetadataAddF32(updateminidvodbprocessedArgs, PS_LIST_TAIL, "-set_dtime_resort", 0, "define elapsed time for resort (seconds)", 0); 224 psMetadataAddF32(updateminidvodbprocessedArgs, PS_LIST_TAIL, "-set_dtime_verify", 0, "define elapsed time for DVO verify (seconds)", 0); 222 225 psMetadataAddF32(updateminidvodbprocessedArgs, PS_LIST_TAIL, "-set_dtime_merge", 0, "define elapsed time for DVO merge (seconds)", 0); 223 226 psMetadataAddF32(updateminidvodbprocessedArgs, PS_LIST_TAIL, "-set_dtime_script", 0, "define elapsed time for script (seconds)", 0); 224 227 psMetadata *argSets = psMetadataAlloc(); 225 228 psMetadata *modes = psMetadataAlloc();
Note:
See TracChangeset
for help on using the changeset viewer.
