- Timestamp:
- Mar 5, 2009, 11:13:29 AM (17 years ago)
- Location:
- branches/cnb_branches/cnb_branch_20090215
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippScripts/scripts/register_exp.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/cnb_branches/cnb_branch_20090215
-
branches/cnb_branches/cnb_branch_20090215/ippScripts/scripts/register_exp.pl
r20429 r23197 27 27 my $ipprc = PS::IPP::Config->new(); 28 28 29 # Look for commands we need 30 my $missing_tools; 31 my $regtool = can_run('regtool') or (warn "can't find regtool" and $missing_tools = 1); 32 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1); 33 if ($missing_tools) { 34 warn ("Can't find required tools"); 35 exit($PS_EXIT_CONFIG_ERROR); 36 } 37 29 38 my ($cache, $exp_id, $exp_tag, $label, $dvodb, $end_stage, $tess_id, $dbname, $verbose, $no_update, $no_op, $save_temps, $logfile); 30 39 GetOptions( … … 33 42 'exp_tag|t=s' => \$exp_tag, 34 43 'dbname|d=s' => \$dbname, # Database name 35 'label=s' => \$label, 36 'dvodb=s' => \$dvodb, 37 'end_stage=s' => \$end_stage, 38 'tess_id=s' => \$tess_id, 44 'label=s' => \$label, 45 'dvodb=s' => \$dvodb, 46 'end_stage=s' => \$end_stage, 47 'tess_id=s' => \$tess_id, 39 48 'verbose' => \$verbose, # Print to stdout 40 49 'no-update' => \$no_update, … … 44 53 ) or pod2usage( 2 ); 45 54 55 # Unhandled exceptions should be passed on to my_die so they get pushed into the database 56 $SIG{__DIE__} = sub { die @_ if $^S; 57 my_die( $_[0], $exp_id, $PS_EXIT_UNKNOWN_ERROR ); }; 58 46 59 $ipprc->redirect_output($logfile) if $logfile; 47 60 … … 55 68 my @SCIENCE = ( "object", "science", "light" ); # Observation types to NOT mark as detrend 56 69 my $DETREND_FLAG = "-end_stage reg"; # Flag to use to mark detrend exposure 57 58 # Look for commands we need59 my $missing_tools;60 my $regtool = can_run('regtool') or (warn "can't find regtool" and $missing_tools = 1);61 my $ppStatsFromMetadata = can_run('ppStatsFromMetadata') or (warn "Can't find ppStatsFromMetadata" and $missing_tools = 1);62 63 if ($missing_tools) {64 warn ("Can't find required tools");65 exit($PS_EXIT_CONFIG_ERROR);66 }67 70 68 71 # setup cache interface … … 123 126 $command .= " -exp_tag $exp_tag"; 124 127 $command .= " -hostname $host" if defined $host; 125 $command .= " -dbname $dbname" if defined $dbname;126 $command .= " -label $label" if defined $label;127 $command .= " -dvodb $dvodb" if defined $dvodb;128 $command .= " -dbname $dbname" if defined $dbname; 129 $command .= " -label $label" if defined $label; 130 $command .= " -dvodb $dvodb" if defined $dvodb; 128 131 $command .= " -end_stage $end_stage" if defined $end_stage; 129 132 $command .= " -tess_id $tess_id" if defined $tess_id;
Note:
See TracChangeset
for help on using the changeset viewer.
