Changeset 25472
- Timestamp:
- Sep 21, 2009, 4:52:53 PM (17 years ago)
- Location:
- trunk/tools
- Files:
-
- 2 edited
-
examine_burntool_pcontrol.pl (modified) (7 diffs)
-
ipp_apply_burntool.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/examine_burntool_pcontrol.pl
r25425 r25472 5 5 use Getopt::Std; 6 6 7 getopts('hf ',\%opt);7 getopts('hfcP',\%opt); 8 8 if (exists($opt{h})) { 9 9 print STDERR "Usage: examine_burntool_pcontrol.pl [-f] <pcontrol.pro>\n"; 10 10 print STDERR " -f Read all burntool entries, even those commented out.\n"; 11 print STDERR " -c Print out the needed mysql statement to do a convert. DOES NOT EXECUTE THIS!\n"; 12 print STDERR " -P Print out the ipp_apply_burntool.pl commands, even if fully updated.\n"; 11 13 print STDERR "\n"; 12 14 print STDERR " Reads in the pcontrol.pro file you're using to run burntool, and uses the\n"; … … 19 21 print STDERR " B Current version value for burntool_state. Burntool succeeded.\n"; 20 22 print STDERR " b Old version value for burntool_state. Burntool needs to be rerun.\n"; 23 print STDERR " ? No matching rawImfile entry found in database.\n"; 21 24 exit(1); 22 25 } … … 36 39 print STDERR "GOOD == $burntoolStateGood\n"; 37 40 } 41 $convert_bt_state = -1.0 * $burntoolStateGood; 38 42 39 43 # Read a class_id and burntool_state pair, and set the correct cell of the (sorry, global) character array vector … … 121 125 # images on a single night. 122 126 $sth = "SELECT exp_id,exp_name,obs_mode,dateobs,class_id,burntool_state,comment FROM rawImfile WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' order by dateobs limit 60000"; 127 128 $no_sth = "UPDATE rawImfile SET burntool_state = $convert_bt_state WHERE dateobs >= '${dmin}' AND dateobs <= '${dmax}' AND user_1 = 1.0;"; 123 129 $data_ref = $db->selectall_arrayref( $sth ); 124 130 … … 133 139 # Print out query for clarity, and the header: 134 140 print "#### $sth\n"; 141 if (exists($opt{c})) { 142 print "#### $no_sth\n"; 143 } 135 144 print "# 0 1 2 3 4 5 6 7 \n"; 136 145 print "#exp_i exp_name obs_mode dateobs nB 0123456701234567012345670123456701234567012345670123456701234567 comment\n"; … … 176 185 } 177 186 else { 178 $vector[$j] = '[3 2m?[m';187 $vector[$j] = '[36;40;01m?[m'; 179 188 } 180 189 } … … 192 201 193 202 # If we didn't find that all 60 chips had succesful burntools run, print out the ipp_apply_burntool.pl command we would need to fix this: 194 if ( $burncount != 60) {203 if (($burncount != 60)||(exists($opt{P}))) { 195 204 for ($j = 0; $j < 64; $j++) { 196 205 # printf("%d %s %d\n",$j, $vector[$j], ($vector[$j] !~ /B/)); 197 if ( $vector[$j] !~ /B/) {206 if (($vector[$j] !~ /B/)||(exists($opt{P}))) { 198 207 if ($vector[$j] ne '_') { 199 208 $id = sprintf("XY%d%d",int($j / 8),$j % 8); -
trunk/tools/ipp_apply_burntool.pl
r25425 r25472 67 67 68 68 # Determine the value of a "good" burntool run. 69 my $config_cmd = "$ppConfigDump -camera $camera -dump-camera - | grep BURNTOOL ";69 my $config_cmd = "$ppConfigDump -camera $camera -dump-camera - | grep BURNTOOL | uniq"; 70 70 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = 71 71 run ( command => $config_cmd, verbose => $verbose); … … 110 110 111 111 my $files = parse_md_list($metadata) or 112 &my_die("Unable to parse metadat list", $class_id, $dateobs_begin, $dateobs_end, $PS_EXIT_SYS_ERROR);112 &my_die("Unable to parse metadata list", $class_id, $dateobs_begin, $dateobs_end, $PS_EXIT_SYS_ERROR); 113 113 114 114 my $REALRUN = 1; … … 130 130 131 131 my $process = 0; 132 my $previousTableStyle = 0; 132 133 133 134 if ($state == 0) { … … 145 146 elsif ($state == $burntoolStateGood) { 146 147 $process = 0; 147 $previousTable = "infits=$rawImfileReal";148 $previousTableStyle = 1; 148 149 } 149 150 elsif ($state == -1 * $burntoolStateGood) { 150 151 $process = 0; 151 $previousTable = "in=$outTableReal"; 152 # $previousTable = "in=$outTableReal"; 153 $previousTableStyle = -1; 152 154 } 153 155 else { 154 156 $process = 1; 155 157 } 156 158 if ($REALRUN == 0) { 159 print "##Pretending to process as instructed!\n"; 160 $process = 1; 161 } 157 162 if (($process == 1)||($processNext == 1)) { 158 163 $processNext = 1; … … 190 195 } 191 196 197 $previousTableStyle = -1; 198 199 print "\n"; 200 } 201 202 if ($previousTableStyle == 1) { 203 $previousTable = "infits=$rawImfileReal"; 204 } 205 elsif ($previousTableStyle == -1) { 192 206 $previousTable = "in=$outTableReal"; 193 194 print "\n"; 195 } 207 } 208 else { 209 die "previousTableStyle undefined!\n"; 210 } 211 196 212 } 197 213
Note:
See TracChangeset
for help on using the changeset viewer.
