IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 12, 2011, 2:52:40 PM (16 years ago)
Author:
rhenders
Message:

Long overdue introduction of XML config file for czartool

File:
1 edited

Legend:

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

    r29951 r30250  
    77
    88use File::Temp;
     9
     10use czartool::Config;
    911
    1012my @allStages = ("burntool", "chip", "cam", "fake", "warp", "stack", "diff", "magic", "magicDS", "dist");
     
    1820    my $class = shift;
    1921    my $self = {
    20         _gpc1Db => shift,
    21         _czarDb => shift,
     22        _config => shift,
    2223        _dateFormat => shift,
    2324        _outputFormat => shift,
     
    2728
    2829    bless $self, $class;
     30    $self->init();
    2931    return $self;
    3032}
     
    3840    my $class = shift;
    3941    my $self = {
    40         _gpc1Db => shift,
    41         _czarDb => shift,
     42        _config => shift,
    4243        _outputPath => shift,
    4344        _save_temps => shift,
    4445                                                    };
    45 
    4646    $self->{_dateFormat} = "%Y%m%d-%H%M%S";
    47     $self->{_outputFormat} = "png font \"/usr/share/fonts/corefonts/arial.ttf\" 8"; # TODO path needs to be in config
    48 
    49         bless $self, $class;
     47    $self->{_outputFormat} = "png font \"".$self->{_config}->getGnuplotFont()."\" ".$self->{_config}->getGnuplotFontSize();
     48
     49    bless $self, $class;
     50    $self->init();
    5051    return $self;
    5152}
     
    5960    my $class = shift;
    6061    my $self = {
    61         _gpc1Db => shift,
    62         _czarDb => shift,
     62        _config => shift,
    6363        _save_temps => shift,
    6464    };
     
    6969
    7070    bless $self, $class;
     71    $self->init();
    7172    return $self;
    7273}
    7374
    74 
     75###########################################################################
     76#
     77# Some initialisation code common to all constructors
     78#
     79###########################################################################
     80sub init {
     81    my ($self) = @_;
     82
     83    $self->{_gpc1Db} = $self->{_config}->getGpc1Instance();
     84    $self->{_czarDb} = $self->{_config}->getCzarDbInstance();
     85}
    7586
    7687###########################################################################
Note: See TracChangeset for help on using the changeset viewer.