Index: trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/plotdb.C	(revision 7494)
+++ trunk/MagicSoft/Mars/datacenter/macros/plotdb.C	(revision 7495)
@@ -47,4 +47,7 @@
 //   .x plotdb.C("2004-11-14 00:00:00", "2005-02-28 00:00:00")
 //  --> all values from 14.11.2004 0h to 28.2.2005 0h are plotted
+// or all data, but with dataset data highlighted
+//   .x plotdb.C("dataset.txt")
+//  --> the sequences defined in dataset.txt aree highlighted (blue:on, red:off)
 //
 // Make sure, that database and password are corretly set in a resource
@@ -432,5 +435,5 @@
 }
 
-int plotdb(TString from="", TString to="")
+int plotdb(TString from, TString to)
 {
     TEnv env("sql.rc");
@@ -464,4 +467,36 @@
 }
 
+int plotdb(const char *ds)
+{
+    TEnv env("sql.rc");
+
+    MSQLServer serv(env);
+    if (!serv.IsConnected())
+    {
+        cout << "ERROR - Connection to database failed." << endl;
+        return 0;
+    }
+
+    cout << "plotdb" << endl;
+    cout << "------" << endl;
+    cout << endl;
+    cout << "Connected to " << serv.GetName() << endl;
+    cout << endl;
+
+    MStatusDisplay *d = new MStatusDisplay;
+    d->SetWindowName(serv.GetName());
+    d->SetTitle(serv.GetName());
+
+    MPlot plot(serv);
+    plot.SetDataSet(ds);
+    plot.SetDisplay(d);
+    plot.SetRequestRange("", "");
+    plotall(plot);
+    d->SaveAsRoot("plotdb.root");
+    d->SaveAsPS("plotdb.ps");
+
+    return 1;
+}
+
 int plotdb(Int_t period)
 {
@@ -495,2 +530,7 @@
     return 1;
 }
+
+int plotdb()
+{
+    return plotdb("", "");
+}
