Changeset 35792 for trunk/ippScripts/scripts
- Timestamp:
- Jul 10, 2013, 12:56:40 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/lap_science.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/lap_science.pl
r34635 r35792 34 34 my $qstack_threshold = 0.05; # Only make a quickstack if more than 5% of the exposures require it. 35 35 my $minimum_stack_inputs = 4; # We can avoid magicking stack inputs if we have more than this number. 36 my $do_updates_pv2 = 1; # Do updates using the calls needed for PV2. 36 37 37 38 GetOptions( … … 231 232 my $chip = ${ $chips }[0]; 232 233 my $chip_magicDS_id = 0; 234 my $chip_cam_id = 0; 233 235 if ($chip) { 234 236 $chip_magicDS_id = $chip->{magic_ds_id}; 237 $chip_cam_id = $chip->{cam_id}; 235 238 } 236 239 if ($chip_magicDS_id == 0) { 237 240 # return(&remake_this_exposure($exposure)); 241 } 242 243 my $do_cam_update = 0; 244 if ($chip_cam_id) { # If there is no cam_id, we can't look for it. 245 my $camtool_info_cmd = "camtool -processedexp -cam_id $chip_cam_id "; 246 $camtool_info_cmd .= " -dbname $dbname " if defined $dbname; 247 ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 248 run(command => $camtool_info_cmd, verbose => $verbose); 249 unless ($success) { 250 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 251 &my_die("Unable to perform camtool -listrun: $error_code", $exposure->{exp_id}, $data_group); 252 } 253 my $cams = $mdcParser->parse_list(join "", @$stdout_buf) or 254 &my_die("Unable to parse metadata from camtool -listrun", $exposure->{exp_id}, $data_group); 255 my $cam = ${ $cams }[0]; 256 # There can be only one. 257 if ($cam) { 258 if ($cam->{label} ne $label) { 259 $do_cam_update = 1; 260 } 261 } 238 262 } 239 263 … … 272 296 } 273 297 298 # 299 # This is where we launch updates. 300 # 274 301 275 302 my $chiptool_update_cmd = "chiptool -setimfiletoupdate -chip_id $exposure->{chip_id} -set_label $label"; 303 if ($do_updates_pv2) { 304 $chiptool_update_cmd .= " -set_update_mode 1 "; # Use the current config information 305 } 276 306 $chiptool_update_cmd .= " -dbname $dbname " if defined $dbname; 307 my $camtool_update_cmd .= "camtool -updaterun -set_state update -cam_id $chip_cam_id -set_label $label"; 308 $camtool_update_cmd .= " -dbname $dbname " if defined $dbname; 277 309 my $magicDS_update_cmd = "magicdstool -setfiletoupdate -magic_ds_id $chip_magicDS_id -set_label $label"; 278 310 $magicDS_update_cmd .= " -dbname $dbname " if defined $dbname; … … 289 321 &my_die("Unable to perform chiptool -setimfiletoupdate: $error_code", $exposure->{exp_id}, $data_group); 290 322 } 291 323 if ($do_updates_pv2) { # Are we updating camera stages for PV2? 324 if ($do_cam_update) { # Is this camRun still set to the old label? 325 ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 326 run(command => $camtool_update_cmd, verbose => $verbose); 327 unless ($success) { 328 $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR); 329 &my_die("Unable to perform camtool -updaterun: $error_code", $exposure->{exp_id}, $data_group); 330 } 331 } 332 } 292 333 # if ($chip_magicDS_id != 0) { 293 334 # ($success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
Note:
See TracChangeset
for help on using the changeset viewer.
