IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28752 for trunk/tools/czartool


Ignore:
Timestamp:
Jul 28, 2010, 4:12:14 PM (16 years ago)
Author:
rhenders
Message:

Handling save_temps arg properly

Location:
trunk/tools/czartool
Files:
3 edited

Legend:

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

    r28719 r28752  
    22
    33package czartool::CzarDb;
    4 
    54
    65use warnings;
     
    109
    1110my @stages = ("chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist"); # TODO put elsewhere
    12 
    1311
    1412use base 'czartool::MySQLDb';
     
    2018
    2119    # Call the constructor of the parent class, Person.
    22     my $self = $class->SUPER::new( $_[1], $_[2], $_[3], $_[4],  $_[5]);
     20    my $self = $class->SUPER::new( $_[1], $_[2], $_[3], $_[4],  $_[5], $_[6]);
    2321
    2422    bless $self, $class;
     
    147145###########################################################################
    148146sub getTimeDifference { # TODO fix this
    149     my ($self, $save_temps, $fromTime, $toTime) = @_; # TODO save_temps should be constructor arg
    150 
    151     my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$save_temps);
     147    my ($self, $fromTime, $toTime) = @_;
     148
     149    my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$self->{_save_temps});
    152150
    153151    my $query = $self->{_db}->prepare(<<SQL);
     
    167165###########################################################################
    168166sub createTimeSeriesData {
    169     my ($self, $save_temps, $label, $table, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_; # TODO save_temps should be constructor arg
    170 
    171     my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$save_temps);
     167    my ($self, $label, $table, $fromTime, $toTime, $minX, $maxX, $minY, $maxY, $timeDiff) = @_;
     168
     169    my ($tempFile, $tempName) = tempfile( "/tmp/czartool_gnuplot_timeseries.XXXX", UNLINK => !$self->{_save_temps});
    172170
    173171    my $query = $self->{_db}->prepare(<<SQL);
  • trunk/tools/czartool/Czarplot.pm

    r28728 r28752  
    6666    my $stage = undef;
    6767    foreach $stage (@{$stages}) {
    68         $gnuplotFiles{$stage} =  $self->{_czarDb}->createTimeSeriesData($self->{_save_temps}, $label, $stage, $beginTime, $endTime, \$minX, \$maxX, \$minY, \$maxY, \$timeDiff);
     68        $gnuplotFiles{$stage} =  $self->{_czarDb}->createTimeSeriesData($label, $stage, $beginTime, $endTime, \$minX, \$maxX, \$minY, \$maxY, \$timeDiff);
    6969    }                                                           
    7070
  • trunk/tools/czartool/MySQLDb.pm

    r28704 r28752  
    2121        _dbPass => shift,
    2222        _verbose => shift,
     23        _save_temps => shift,
    2324    };                             
    2425
Note: See TracChangeset for help on using the changeset viewer.