Index: trunk/tools/czartool/MultiDayMetrics.pm
===================================================================
--- trunk/tools/czartool/MultiDayMetrics.pm	(revision 29860)
+++ trunk/tools/czartool/MultiDayMetrics.pm	(revision 29860)
@@ -0,0 +1,78 @@
+#!/usr/bin/perl -w
+
+use warnings;
+use strict;
+
+use Getopt::Long qw( GetOptions :config auto_help auto_version gnu_getopt );
+use POSIX qw/strftime/;
+use CGI::Pretty qw[:standard];
+
+use czartool::CzarDb;
+use czartool::Gpc1Db;
+use czartool::Plotter;
+use czartool::StageMetrics;
+use czartool::Metrics;
+
+
+package czartool::MultiDayMetrics;
+our @ISA = qw(czartool::Metrics);    # inherits from Metrics class
+
+###########################################################################
+#
+# Constructor (overrides superclass)
+#
+###########################################################################
+sub new {
+    my ($class) = @_;
+
+    # Call the constructor of the parent class
+    my $self = $class->SUPER::new(
+            $_[1],  # gpc1Db 
+            $_[2],  # czarDb
+            $_[3],  # baseDir
+            $_[4],  # verbose
+            $_[5]   # save_temps
+            );
+
+    $self->{startDay} = $_[6];
+    $self->{endDay} = $_[7];
+
+    # sort out times
+    $self->{begin} =  "$self->{startDay} 06:00";
+    $self->{end} =  "$self->{endDay} 06:00";
+
+    # create path, dir and html file
+    $self->{path} = "$self->{baseDir}/$self->{startDay}_$self->{endDay}";
+    rmdir($self->{path});
+    mkdir($self->{path}, 0777);
+    $self->{plotter}->setOutputPath($self->{path});
+
+    if ($self->{verbose}) {print "* Creating metrics for $self->{startDay} to $self->{endDay}\n";}
+
+    bless $self, $class;
+
+    return $self;
+}
+
+###########################################################################
+#
+# Writes HTML document
+#
+###########################################################################
+sub writeHTML {
+    my ($self) = @_;
+
+    $self->createHtml("IPP Metrics for $self->{startDay} to $self->{endDay}");
+    my $htmlFile = $self->{htmlFile};
+
+    print $htmlFile "<h5  align=\"middle\"><a href=\"../index.html\">all</a><br> </h5>";
+
+    # summary plots
+    $self->createSummaryPlots();
+
+    # magic mask plots
+    $self->createMaskPlots($self->{startDay}, $self->{endDay});
+
+    $self->finishHtml();
+}
+1;
