- Timestamp:
- Dec 8, 2010, 7:21:36 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20101203/ippScripts/scripts/register_imfile.pl
r29909 r29982 19 19 use File::Basename qw( basename); 20 20 use IPC::Run; 21 use IPC::Cmd 0.36 qw( can_run );21 use IPC::Cmd 0.36 qw( can_run run ); 22 22 use PS::IPP::Config 1.01 qw( :standard ); 23 use PS::IPP::Metadata::List qw( parse_md_list ); 23 24 use PS::IPP::Metadata::Config; 24 25 use Math::Trig; … … 179 180 $command .= " $cmdflags"; 180 181 182 print "$command\n"; 181 183 # determine solar-system parameters 182 184 my $longitude = &value_for_flag($cmdflags, 0.0, "-longitude"); … … 235 237 236 238 { 239 my $mdcParser = PS::IPP::Metadata::Config->new; 240 241 my $class_id = &value_for_flag($cmdflags, 0.0, "-class_id"); 242 my $check_date = &value_for_flag($cmdflags, 0.0, "-dateobs"); 243 $check_date =~ s/T.*$//; 244 my $exp_name = $tmp_exp_name; 245 246 237 247 my $bt_check_command = "$regtool -checkburntoolimfile "; 238 $bt_check_command = " -class_id $class_id "; 239 $bt_check_command = " -date $date "; 240 $bt_check_command = " -exp_name $exp_name "; 241 $bt_check_command = " -dbname $dbname" if defined $dbname; 242 243 ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 248 $bt_check_command .= " -class_id $class_id "; 249 $bt_check_command .= " -date $check_date "; 250 $bt_check_command .= " -valid_burntool $burntoolStateGood "; 251 $bt_check_command .= " -exp_name $exp_name "; 252 $bt_check_command .= " -dbname $dbname" if defined $dbname; 253 254 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 244 255 run ( command => $bt_check_command, verbose => $verbose); 245 256 unless ($success) { … … 270 281 271 282 my $regtool_update = "$regtool -updateprocessedimfile "; 272 $regtool_update .= "-dbname $dbname " if defined $dbname;283 $regtool_update .= "-dbname $dbname " if defined $dbname; 273 284 $regtool_update .= "-exp_id $exp_id -class_id $class_id "; 274 285 275 286 my $burntool_data = pop(@{ $exposures }); 276 287 if ($burntool_data->{burnable} == 0) { 277 $regtool_update .= " -burntool_state 0 - data_state pending_burntool ";288 $regtool_update .= " -burntool_state 0 -set_state pending_burntool "; 278 289 } 279 290 else { 280 291 my $apply_command = "$ippApplyBurntoolSingle --dbname $dbname "; 281 292 $apply_command .= " --class_id $class_id --exp_id $exp_id "; 282 $apply_command .= " --this_uri $burntool_data->{ this_uri} ";293 $apply_command .= " --this_uri $burntool_data->{uri} "; 283 294 $apply_command .= " --previous_uri $burntool_data->{previous_uri} " if defined $burntool_data->{previous_uri}; 284 295 $apply_command .= " --imfile_state $burntool_data->{imfile_state} "; 285 296 $apply_command .= " --verbose " if $verbose; 297 print "$apply_command\n"; 286 298 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 287 299 IPC::Cmd::run(command => $apply_command, verbose => $verbose);
Note:
See TracChangeset
for help on using the changeset viewer.
