IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

Handling save_temps arg properly

File:
1 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);
Note: See TracChangeset for help on using the changeset viewer.