Changeset 29159 for trunk/tools/runcameraexp.pl
- Timestamp:
- Sep 15, 2010, 11:02:40 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/tools/runcameraexp.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/runcameraexp.pl
r29158 r29159 32 32 my $dbh = getDBHandle(); 33 33 34 my $query = "SELECT rawExp.camera, rawExp.exp_tag, camProcessedExp.path_base, cam Run.dvodb, camRun.reduction, camRun.state FROM camRun JOIN camProcessedExp USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE cam_id = $cam_id";34 my $query = "SELECT rawExp.camera, rawExp.exp_tag, camProcessedExp.path_base, camProcessedExp.fault, camRun.dvodb, camRun.reduction, camRun.state FROM camRun JOIN camProcessedExp USING(cam_id) JOIN chipRun USING(chip_id) JOIN rawExp USING(exp_id) WHERE cam_id = $cam_id"; 35 35 36 36 my $stmt = $dbh->prepare($query); … … 44 44 my $reduction = $results->{reduction}; 45 45 my $state = $results->{state}; 46 my $fault = $results->{fault}; 46 47 47 48 die "path_base not found\n" if !$path_base; … … 51 52 die "state not found\n" if !$state; 52 53 die "reduction not found\n" if !$reduction; 54 55 die "Cannot update when run is not faulted\n" if $update and ! $fault; 53 56 54 57 my $run_state; … … 63 66 $command .= " --reduction $reduction" if $reduction and ($reduction ne "NULL"); 64 67 $command .= " --dvodb $dvodb" if $dvodb and ($dvodb ne "NULL"); 65 $command .= " --redirect-output" if $redirect ;68 $command .= " --redirect-output" if $redirect or $update; 66 69 $command .= " --no-update" unless $update; 67 70 $command .= " --verbose" unless $no_verbose; 68 71 $command .= " --dbname $dbname" if $dbname; 72 69 73 70 74 … … 109 113 } 110 114 115 __END__ 116 117 =pod 118 119 =head1 NAME 120 121 runcameraexp.pl - gather the parameters for and execute camera_exp.pl 122 123 =head1 SYNOPSIS 124 125 perl runcameraexp.pl --cam_id <cam_id> [--update] [--redirect-output] [--pretend] [--dbname <dbname>] 126 127 Query the database for the results of a completed camera run and rerun the processing, optionally reverting a faulted 128 run. 129 130 =over 4 131 132 =item * --cam_id <cam_id> 133 134 The id of the camera run to process. 135 136 =item * --update 137 138 Revert a faulted run before processing. WARNING: insure that the standard science procesing either has camera stage turned off or the 139 label of this camRun ommited from the label list otherwise it may attempt to processes this run at the same time. 140 Optional. 141 142 =item * --redirect-output 143 144 Send the output of the command to the logfile. (This is the default if --update is supplied); 145 Optional. 146 147 =item * --pretend 148 149 Just print the commands that would be executed, but do not run them. 150 Optional. 151 152 153 =item * --dbname <dbname> 154 155 Name of the IPP databse to query. Default is 'gpc1'. 156 Optional. 157 158 159 =head1 SEE ALSO 160 L<runchipimfile.pl>, L<runwarpskyfile.pl>, L<rundiffskyfile.pl> 161 162 =cut
Note:
See TracChangeset
for help on using the changeset viewer.
