IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29712


Ignore:
Timestamp:
Nov 8, 2010, 3:39:28 PM (16 years ago)
Author:
rhenders
Message:

more temp file cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czartool/Plotter.pm

    r29710 r29712  
    132132
    133133    # now delete temp dat files
    134     foreach my $stage (keys %gnuplotFiles) {
    135        
    136         unlink($gnuplotFiles{$stage});
    137    
    138     }
     134    foreach my $stage (keys %gnuplotFiles) {unlink($gnuplotFiles{$stage});}
    139135}
    140136
     
    182178    if ($numOfPlots == 0 ) {
    183179
    184         print "Warning: No plots could be generated for stage '$selectedStage' and label '$label' during time period '$beginTime', '$endTime'\n";
     180#        print "Warning: No plots could be generated for stage '$selectedStage' and label '$label' during time period '$beginTime', '$endTime'\n";
    185181        return;
    186182    }
     
    216212    my $outputFile = createImageFileName($self, $label, undef, "h", 0);
    217213
    218     my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_gnuplot_".$label."_h.XXXXX", DIR => '/tmp', SUFFIX => '.dat');
     214    my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_gnuplot_".$label."_h.XXXXX", DIR => '/tmp', SUFFIX => 'dat');
    219215    open (GNUDAT, ">".$tmpFile->filename);
    220216
     
    429425    my ($minX, $maxX, $minY, $maxY, $timeDiff);
    430426
    431     my $gnuplotFile = $self->{_czarDb}->createStorageTimeSeriesData($fromTime, $toTime, \$minX, \$maxX, \$minY, \$maxY, \$timeDiff);
     427    my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_gnuplot_storage_timeseries.XXXXX", DIR => '/tmp', SUFFIX => 'dat');
     428    $self->{_czarDb}->createStorageTimeSeriesData($tmpFile, $fromTime, $toTime, \$minX, \$maxX, \$minY, \$maxY, \$timeDiff);
    432429
    433430    my $timeFormat = undef;
     
    453450        "set ylabel \"Available (TB)\";" .
    454451        "plot " .
    455         "'$gnuplotFile' using 1:2 title \"Available\" with lines lt 2 lw 2\n";
     452        "'".$tmpFile->filename."' using 1:2 title \"Available\" with lines lt 2 lw 2\n";
    456453
    457454    print GP "\n";
    458455    close GP;
    459     unlink($gnuplotFile);
    460456}
    461457
     
    471467        my $outputFile = "$prefix/czarplot_hosts_space.png";
    472468    my $limit = 97.0;
    473     my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_hosts_space.XXXXX", DIR => '/tmp', SUFFIX => '.dat');
     469    my $tmpFile = File::Temp->new( TEMPLATE => "czarplot_hosts_space.XXXXX", DIR => '/tmp', SUFFIX => 'dat');
    474470    $self->{_czarDb}->createHostsData($limit, $tmpFile);
    475471
Note: See TracChangeset for help on using the changeset viewer.