Changeset 25472 for trunk/tools/examine_burntool_pcontrol.pl
- Timestamp:
- Sep 21, 2009, 4:52:53 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/tools/examine_burntool_pcontrol.pl (modified) (7 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);
Note:
See TracChangeset
for help on using the changeset viewer.
