Changeset 28211 for trunk/ippScripts/scripts/minidvodb_merge.pl
- Timestamp:
- Jun 3, 2010, 7:11:23 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/minidvodb_merge.pl (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/minidvodb_merge.pl
r28181 r28211 4 4 use strict; 5 5 use Carp; 6 6 7 7 ## report the program and machine 8 8 use Sys::Hostname; … … 90 90 my $command = "$addstar -resort"; 91 91 $command .= " -D CAMERA $camera"; 92 $command .= " -D CATDIR $m ergedvodbReal";92 $command .= " -D CATDIR $minidvodb"; 93 93 94 94 my $mjd_addstar_start = DateTime->now->mjd; # MJD of starting script 95 95 print "\n$command\n"; 96 96 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 97 97 run(command => $command, verbose => $verbose); … … 102 102 $dtime_addstar = 86400.0*(DateTime->now->mjd - $mjd_addstar_start); $dtime_resort = $dtime_addstar; 103 103 # MJD of starting script 104 $dtime_resort = $dtime_addstar; 104 105 print "addstar -resort time $dtime_addstar\n"; 105 106 } … … 110 111 my $command = "$relphot -averages -update"; 111 112 $command .= " -D CAMERA $relphot_camera"; 112 $command .= " -D CATDIR $m ergedvodbReal";113 113 $command .= " -D CATDIR $minidvodb"; 114 print "$command\n"; 114 115 my $mjd_relphot_start = DateTime->now->mjd; # MJD of starting script 115 116 … … 129 130 my $mdcParser = PS::IPP::Metadata::Config->new; 130 131 131 my $command = "$addtool -listminidvodbrun -state merged sdfsad-minidvodb_group " . $minidvodb_group;132 my $command = "$addtool -listminidvodbrun -state merged -minidvodb_group " . $minidvodb_group; 132 133 $command .= " -dbname $dbname" if defined $dbname; 133 134 … … 152 153 } 153 154 } 155 { 156 if (!-e "$mergedvodb/Image.dat") { 157 $this_is_the_first = 1; #the first time it copied maybe it failed? we want it to copy this time 158 159 } 160 161 } 154 162 155 163 { 156 164 my $merge_command; 165 my $mjd_merge_start = DateTime->now->mjd; # MJD of starting script 157 166 if ($this_is_the_first) { 158 $merge_command = "cp -rp $minidvodb $mergedvodb" 159 } else { 160 $merge_command = "$dvomerge $minidvodb into $mergedvodb" 161 }162 163 my $mjd_merge_start = DateTime->now->mjd; # MJD of starting script 164 165 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =166 run(command => $merge_command, verbose => $verbose);167 unless ($success) {168 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);169 &my_die("Unable to merge: $error_code", $mergedvodb, $error_code);170 }171 172 $dtime_merge = 86400.0*(DateTime->now->mjd - $mjd_merge_start); # MJD of starting script173 print "merge time $dtime_merge\n";174 }175 176 177 {167 $merge_command = "cp -rp $minidvodb/* $mergedvodb"; 168 print "$merge_command\n"; 169 } else { 170 $merge_command = "$dvomerge $minidvodb into $mergedvodb"; 171 } 172 173 print "\n$merge_command\n"; 174 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 175 run(command => $merge_command, verbose => $verbose); 176 unless ($success) { 177 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 178 &my_die("Unable to merge: $error_code", $mergedvodb, $error_code); 179 } 180 181 $dtime_merge = 86400.0*(DateTime->now->mjd - $mjd_merge_start); # MJD of starting script 182 print "merge time $dtime_merge\n"; 183 # } 184 } 185 186 { 178 187 my $command = "addtool -minidvodb_id $minidvodb_id"; 179 188 $command .= " -addminidvodbprocessed"; … … 181 190 $command .= " -minidvodb_group $minidvodb_group"; 182 191 $command .= " -dtime_relphot $dtime_relphot" if defined $dtime_relphot; 183 $command .= " -dtime_re lphot $dtime_resort" if defined $dtime_resort;184 $command .= " -dtime_ relphot$dtime_merge" if defined $dtime_merge;192 $command .= " -dtime_resort $dtime_resort" if defined $dtime_resort; 193 $command .= " -dtime_merge $dtime_merge" if defined $dtime_merge; 185 194 $command .= " -dbname $dbname" if defined $dbname; 186 195 #print $command; … … 220 229 $command .= " -minidvodb_group $minidvodb_group"; 221 230 $command .= " -dtime_relphot $dtime_relphot" if defined $dtime_relphot; 222 $command .= " -dtime_re lphot $dtime_resort" if defined $dtime_resort;223 $command .= " -dtime_ relphot$dtime_merge" if defined $dtime_merge;231 $command .= " -dtime_resort $dtime_resort" if defined $dtime_resort; 232 $command .= " -dtime_merge $dtime_merge" if defined $dtime_merge; 224 233 $command .= " -dbname $dbname" if defined $dbname; 225 234
Note:
See TracChangeset
for help on using the changeset viewer.
