Changeset 20152
- Timestamp:
- Oct 14, 2008, 3:33:43 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/scripts/pstamp_job_run.pl (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/scripts/pstamp_job_run.pl
r19221 r20152 13 13 use File::Basename; 14 14 use Digest::MD5::File qw( file_md5_hex ); 15 16 # values for OPTION_MASK 17 # XXX put these in a module 18 use constant PSTAMP_SELECT_IMAGE => 1; 19 use constant PSTAMP_SELECT_MASK => 2; 20 use constant PSTAMP_SELECT_WEIGHT => 4; 21 15 use PStamp::RequestFile qw( :standard ); 22 16 23 17 my $verbose; … … 124 118 open F, ">$reglist" or die "can't open $reglist for output"; 125 119 126 # we are assuming an interface with ppstamp here. 120 # figure out what output images we should expect 121 122 # Note: we are assuming the contents of the filerules here. 127 123 my @extensions = ( "fits", "mk.fits", "wt.fits"); 128 124 129 # XXX TODO: add mask of expected file types to pstampJob so we know what to expect 130 131 my $output_mask = PSTAMP_SELECT_IMAGE; 132 my $m = 1; # XXX we're getting a bit intimate with the bit field definitions here. do better use a hash 125 # we always require an image 126 my $output_mask = $PSTAMP_SELECT_IMAGE; 127 128 # we search the argString for -mask and -weight. 129 # searching the arg string allows us to avoid adding a column in pstampJob 130 # XXX yeah but does this make us susceptible to user input fouling us up? 131 # For example, what if somebody sets the output base to file-mask-weight 132 # TODO: clean this up 133 $output_mask |= $PSTAMP_SELECT_MASK if ($argString =~ /-mask/); 134 $output_mask |= $PSTAMP_SELECT_WEIGHT if ($argString =~ /-weight/); 135 136 # XXX we're getting a bit intimate with the bit field definitions here. 137 # do better use a hash 138 139 my $m = 1; 133 140 foreach my $extension (@extensions) { 134 141 my $do_this_one = $m & $output_mask; … … 141 148 my $path = "${outputBase}.${extension}"; 142 149 143 # XXX is pstamp always the right file type, if not where canwe get the right one?150 # XXX is pstamp always the right file type, if not where do we get the right one? 144 151 print F file_registration_line($filename, $path, "pstamp") . "\n"; 145 152 } … … 182 189 exit $jobStatus; 183 190 191 # create a string to be passed as input to dsreg when registering this file in a fileset 184 192 # XXX move this to a module so it can be shared 193 185 194 sub file_registration_line { 186 195 my $filename = shift;
Note:
See TracChangeset
for help on using the changeset viewer.
