IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 26, 2010, 4:03:50 PM (16 years ago)
Author:
watersc1
Message:

Updated to 100x faster metadata parser, which will hopefully cut out
the hour of parsing at the start of each call to ipp_apply_burntool.pl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/ipp_apply_burntool.pl

    r27038 r27112  
    107107}
    108108
    109 my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
    110     &my_die("Unable to parse metadata", $class_id, $dateobs_begin, $dateobs_end, $PS_EXIT_SYS_ERROR);
    111 
    112 my $files = parse_md_list($metadata) or
    113     &my_die("Unable to parse metadata list", $class_id, $dateobs_begin, $dateobs_end, $PS_EXIT_SYS_ERROR);
     109my @whole = split /\n/, (join "", @$stdout_buf);
     110my @single = ();
     111my $files;
     112while ( scalar @whole > 0 ) {
     113    my $value = shift @whole;
     114    push @single, $value;
     115    if ($value =~ /^\s*END\s*$/) {
     116        push @single, "\n";
     117       
     118        my $list = parse_md_list( $mdcParser->parse( join( "\n", @single ) ) );
     119        &my_die("Unable to parse output from regtool", $class_id, $dateobs_begin, $dateobs_end, $PS_EXIT_PROG_ERROR) unless
     120            defined $list;
     121        push @{ $files }, @$list;
     122        @single = ();
     123    }
     124}
     125
     126#my $metadata = $mdcParser->parse(join "", @$stdout_buf) or
     127#    &my_die("Unable to parse metadata", $class_id, $dateobs_begin, $dateobs_end, $PS_EXIT_SYS_ERROR);
     128#
     129#my $files = parse_md_list($metadata) or
     130#    &my_die("Unable to parse metadata list", $class_id, $dateobs_begin, $dateobs_end, $PS_EXIT_SYS_ERROR);
    114131
    115132my $REALRUN = 1;
Note: See TracChangeset for help on using the changeset viewer.