Index: trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/plotdb.C	(revision 9389)
+++ trunk/MagicSoft/Mars/datacenter/macros/plotdb.C	(revision 9402)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.55 2009-03-04 18:45:26 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: plotdb.C,v 1.56 2009-03-16 15:13:43 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -379,5 +379,5 @@
             delete fDataSet;
     }
-    void SetDataSet(const TString filename)
+    void SetDataSet(const TString filename, UInt_t num=(UInt_t)-1)
     {
         if (fDataSet)
@@ -392,5 +392,5 @@
             return;
 
-        fDataSet = new MDataSet(filename);
+        fDataSet = new MDataSet(filename, num);
         fPrimaryNumber="Sequences.fSequenceFirst";
     }
@@ -427,5 +427,5 @@
         case kNone:
         case kGroupByPrimary:
-            query += Form("%s AS %s", valued.Data(), valued.Data()+1);
+            query += Form("%s AS %s", named.Data(), valued.Data()+1);
             break;
         case kGroupByHour:
@@ -701,5 +701,5 @@
 }
 
-int plotdb(TString from, TString to, const char *dataset=0)
+int plotdb(TString from, TString to, const char *dataset=0, UInt_t num=(UInt_t)-1)
 {
     MSQLMagic serv("sql.rc");
@@ -721,5 +721,5 @@
 
     MPlot plot(serv);
-    plot.SetDataSet(dataset);
+    plot.SetDataSet(dataset, num);
     plot.SetDisplay(d);
     plot.SetRequestRange(from, to);
@@ -731,5 +731,5 @@
 }
 
-int plotdb(const char *ds, TString path)
+int plotdb(const char *ds, UInt_t num, TString path="/magic/sequences")
 {
     MSQLMagic serv("sql.rc");
@@ -751,5 +751,5 @@
 
     MPlot plot(serv);
-    plot.SetDataSet(ds);
+    plot.SetDataSet(ds, num);
     plot.SetDisplay(d);
     plot.SetRequestRange("", "");
@@ -759,4 +759,9 @@
 
     return 1;
+}
+
+int plotdb(const char *ds, TString path="/magic/sequences")
+{
+    return plotdb(ds, (UInt_t)-1, path);
 }
 
Index: trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C	(revision 9389)
+++ trunk/MagicSoft/Mars/datacenter/macros/plotrundb.C	(revision 9402)
@@ -1,4 +1,4 @@
 /* ======================================================================== *\
-! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.8 2009-03-06 20:36:20 tbretz Exp $
+! $Name: not supported by cvs2svn $:$Id: plotrundb.C,v 1.9 2009-03-16 15:13:43 tbretz Exp $
 ! --------------------------------------------------------------------------
 !
@@ -78,4 +78,7 @@
         cond += tel;
     }
+
+    //cond +=" AND (RunData.fSourceKEY=403 OR RunData.fSourceKEY=871) ";
+
     plot.SetCondition(cond);
 
@@ -94,9 +97,9 @@
 
     plot.SetDescription("L1 trigger rate after cleaning;R_{L1}", "CleanL1");
-    plot.Plot("RunDataCheck.fRateCleanedTrig", -0, 400, 1);
+    plot.Plot("RunDataCheck.fRateCleanedTrig", -0.5, 399.5, 1);
     plot.SetDescription("Sum trigger rate after cleaning;R_{sum}", "CleanSum");
-    plot.Plot("RunDataCheck.fRateCleanedSum", -0, 400, 1);
+    plot.Plot("RunDataCheck.fRateCleanedSum", -0.5, 399.5, 1);
     plot.SetDescription("Unknown events trigger rate after cleaning;R_{0}", "Clean0");
-    plot.Plot("RunDataCheck.fRateCleanedNull", -0, 400, 1);
+    plot.Plot("RunDataCheck.fRateCleanedNull", -0.5, 399.5, 1);
 
 /*
@@ -122,5 +125,5 @@
 }
 
-int plotrundb(TString from, TString to, const char *dataset=0)
+int plotrundb(TString from, TString to, const char *dataset=0, UInt_t num=(UInt_t)-1)
 {
     MSQLMagic serv("sql.rc");
@@ -142,5 +145,5 @@
 
     MPlot plot(serv);
-    plot.SetDataSet(dataset);
+    plot.SetDataSet(dataset, num);
     plot.SetDisplay(d);
     plot.SetRequestRange(from, to);
@@ -152,5 +155,5 @@
 }
 
-int plotrundb(const char *ds)
+int plotrundb(const char *ds, UInt_t num=(UInt_t)-1)
 {
     MSQLMagic serv("sql.rc");
@@ -172,5 +175,5 @@
 
     MPlot plot(serv);
-    plot.SetDataSet(ds);
+    plot.SetDataSet(ds, num);
     plot.SetDisplay(d);
     plot.SetRequestRange("", "");
