Changeset 30277
- Timestamp:
- Jan 14, 2011, 2:16:52 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
ippScripts/scripts/register_imfile.pl (modified) (2 diffs)
-
ippTools/share/regtool_checkburntoolimfile.sql (modified) (2 diffs)
-
ippTools/src/regtool.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/register_imfile.pl
r30275 r30277 10 10 my $date = `date`; 11 11 print "\n\n"; 12 print "Starting script $0 on $host at $date\n\n"; 12 my $cmd_line = join ' ', @ARGV; 13 print "Starting script $0 $cmd_line on $host at $date\n\n"; 13 14 14 15 use vars qw( $VERSION ); … … 399 400 $second =~ s/Z//; 400 401 } 401 if (($hour >= $ss_hour)&&($minute >= $ss_minute)&&($second >= $ss_second)) { 402 if (($hour <= $sr_hour)&&($minute <= $sr_minute)&&($second <= $sr_second)) { 403 return(1); 402 # print "this exposure: $hour $minute $second\n"; 403 # print "sunset: $ss_hour $ss_minute $ss_second\n"; 404 # print "sunrise: $sr_hour $sr_minute $sr_second\n"; 405 # printf "Hss: %d Mss: %d Sss: %d\n",($hour >= $ss_hour),($minute >= $ss_minute),($second >= $ss_second); 406 # printf "Hsr: %d Msr: %d Ssr: %d\n",($hour <= $sr_hour),($minute <= $sr_minute),($second <= $sr_second); 407 408 if (($hour > $ss_hour)&&($hour <= 24)) { 409 return(1); # After sunset by more than an hour, before midnight 410 } 411 elsif ($hour == $ss_hour) { 412 if ($minute > $ss_minute) { 413 return(1); # After sunset by more than a minute 404 414 } 405 } 406 407 return(0); 415 elsif ($minute == $ss_minute) { 416 if ($second >= $ss_second) { 417 return(1); # After sunset by more than a second 418 } 419 else { 420 return(0); 421 } 422 } 423 else { 424 return(0); 425 } 426 } 427 elsif (($hour < $sr_hour)&&($hour >= 0)) { 428 return(1); # Before sunrise by more than an hour, but after midnight 429 } 430 elsif ($hour == $sr_hour) { 431 if ($minute < $sr_minute) { 432 return(1); # Before sunrise by more than a minute 433 } 434 elsif ($minute == $sr_minute) { 435 if ($second <= $sr_second) { 436 return(1); # Before sunrise by more than a second 437 } 438 else { 439 return(0); 440 } 441 } 442 else { 443 return(0); 444 } 445 } 446 else { 447 return(0); # We should never get here. 448 } 408 449 } 409 450 -
trunk/ippTools/share/regtool_checkburntoolimfile.sql
r30240 r30277 1 1 SELECT DISTINCT 2 exp_name,2 summitExp.exp_name, 3 3 rawImfile.uri, 4 4 summitExp.dateobs AS registered, … … 31 31 AND summitExp.dateobs <= '@DATEOBS_END@' 32 32 AND summitImfile.class_id = '@CLASS_ID@' 33 AND ( exp_name <= '@EXP_NAME@')33 AND (summitExp.exp_name <= '@EXP_NAME@') 34 34 ORDER BY summitExp.dateobs -
trunk/ippTools/src/regtool.c
r30240 r30277 95 95 psAbort("invalid option (this should not happen)"); 96 96 } 97 97 psTrace("regtool",9,"Attempting to free config\n"); 98 98 psFree(config); 99 99 pmConfigDone(); … … 204 204 205 205 // convert regular class_id format to summitImfile.class_id format 206 rep = psStringCopy(class_id); 207 psFree(class_id); 208 class_id = rep; 209 206 210 psStringSubstitute(&class_id,"ota","XY"); 207 211 … … 211 215 psStringSubstitute(&query,dateobs_end,"@DATEOBS_END@"); 212 216 213 fprintf(stderr,"%s",query);217 // fprintf(stderr,"%s",query); 214 218 215 219 if (!p_psDBRunQuery(config->dbh, query)) { … … 237 241 if (!psArrayLength(output)) { 238 242 psTrace("regtool", PS_LOG_INFO, "no rows found"); 239 psFree(output);240 243 return true; 241 244 }
Note:
See TracChangeset
for help on using the changeset viewer.
