Index: trunk/tools/czarplot.pl
===================================================================
--- trunk/tools/czarplot.pl	(revision 29952)
+++ trunk/tools/czarplot.pl	(revision 30250)
@@ -7,10 +7,8 @@
 use POSIX qw/strftime/;
 
-use czartool::CzarDb;
-use czartool::Gpc1Db;
+use czartool::Config;
 use czartool::Plotter;
 use czartool::StageMetrics;
 
-my $czarDbName = "czardb";
 my $label = undef;
 my $stage = undef;
@@ -36,5 +34,4 @@
 
 GetOptions (
-        "dbname=s" => \$czarDbName,
         "label|l=s" => \$label,
         "stage|s=s" => \$stage,
@@ -114,4 +111,6 @@
 if ($quit) { exit; }
 
+my $config = new czartool::Config();
+
 # default values
 if (!$rate && !$magicMask && !$nebulous && !$histogram && !$analysis && !$timeSeries) {$timeSeries = 1;}
@@ -121,7 +120,5 @@
 else {$savingToFile = 1;}
 
-my $gpc1Db = new czartool::Gpc1Db("gpc1", "ippdb01", "ippuser", "ippuser");
-my $czarDb = new czartool::CzarDb($czarDbName, "ippdb01", "ipp", "ipp", $verbose, $save_temps);
-$czarDb->setDateFormat("%Y%m%d-%H%i%s");
+my $czarDb = $config->getCzarDbInstance();
 
 
@@ -129,16 +126,9 @@
 if ($savingToFile) {
 
-    $plotter = czartool::Plotter->new_file(
-            $gpc1Db,
-            $czarDb,
-            $path,
-            $save_temps);
+    $plotter = czartool::Plotter->new_file($config, $path, $save_temps);
 }
 else {
 
-    $plotter = czartool::Plotter->new_display(
-            $gpc1Db, 
-            $czarDb, 
-            $save_temps);
+    $plotter = czartool::Plotter->new_display($config, $save_temps);
 }
 
@@ -148,5 +138,5 @@
     if ($magicMask) {
 
-        $begin =  $day;
+        $begin = $day;
         $end = $day;
     }
@@ -167,4 +157,7 @@
     }
 }
+
+print "B $begin E $end";
+
 if ($rate) {
 
