IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

Long overdue introduction of XML config file for czartool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/czarplot.pl

    r29952 r30250  
    77use POSIX qw/strftime/;
    88
    9 use czartool::CzarDb;
    10 use czartool::Gpc1Db;
     9use czartool::Config;
    1110use czartool::Plotter;
    1211use czartool::StageMetrics;
    1312
    14 my $czarDbName = "czardb";
    1513my $label = undef;
    1614my $stage = undef;
     
    3634
    3735GetOptions (
    38         "dbname=s" => \$czarDbName,
    3936        "label|l=s" => \$label,
    4037        "stage|s=s" => \$stage,
     
    114111if ($quit) { exit; }
    115112
     113my $config = new czartool::Config();
     114
    116115# default values
    117116if (!$rate && !$magicMask && !$nebulous && !$histogram && !$analysis && !$timeSeries) {$timeSeries = 1;}
     
    121120else {$savingToFile = 1;}
    122121
    123 my $gpc1Db = new czartool::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser");
    124 my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", $verbose, $save_temps);
    125 $czarDb->setDateFormat("%Y%m%d-%H%i%s");
     122my $czarDb = $config->getCzarDbInstance();
    126123
    127124
     
    129126if ($savingToFile) {
    130127
    131     $plotter = czartool::Plotter->new_file(
    132             $gpc1Db,
    133             $czarDb,
    134             $path,
    135             $save_temps);
     128    $plotter = czartool::Plotter->new_file($config, $path, $save_temps);
    136129}
    137130else {
    138131
    139     $plotter = czartool::Plotter->new_display(
    140             $gpc1Db,
    141             $czarDb,
    142             $save_temps);
     132    $plotter = czartool::Plotter->new_display($config, $save_temps);
    143133}
    144134
     
    148138    if ($magicMask) {
    149139
    150         $begin =  $day;
     140        $begin = $day;
    151141        $end = $day;
    152142    }
     
    167157    }
    168158}
     159
     160print "B $begin E $end";
     161
    169162if ($rate) {
    170163
Note: See TracChangeset for help on using the changeset viewer.