Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7624)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7625)
@@ -18,4 +18,12 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2006/04/04 Thomas Bretz
+
+   * datacenter/macros/plotdb.C:
+     - if no dataset and no time-interval is given only sequences with
+       an effective on-time above five minutes are plotted anymore
+
+
 
  2006/03/21 Daniela Dorner
Index: trunk/MagicSoft/Mars/NEWS
===================================================================
--- trunk/MagicSoft/Mars/NEWS	(revision 7624)
+++ trunk/MagicSoft/Mars/NEWS	(revision 7625)
@@ -27,4 +27,8 @@
      for optimization (kWeakSource) which is suggested by the Berlin
      people for weak sources.
+
+   - macros: plotdc.C: if no dataset and no time-interval is given only
+     sequences with an effective on-time above five minutes are plotted
+     anymore
 
    - ganymed: In the second loop the MHNewImagePar histograms disapeared.
Index: trunk/MagicSoft/Mars/datacenter/macros/plotdb.C
===================================================================
--- trunk/MagicSoft/Mars/datacenter/macros/plotdb.C	(revision 7624)
+++ trunk/MagicSoft/Mars/datacenter/macros/plotdb.C	(revision 7625)
@@ -350,11 +350,21 @@
         query += Form("on %s.%s=%s.%s ",       tabled.Data(), join.Data(), tablev.Data(), join.Data());
 
-        if (!fRequestFrom.IsNull() && !fRequestTo.IsNull())
-            query += Form("where fRunStart between '%s' and '%s' ",
+        const Bool_t interval = !fRequestFrom.IsNull() && !fRequestTo.IsNull();
+
+        if (!fDataSet && !interval)
+        {
+            if (!query.Contains("Star.fSequenceFirst"))
+                query += "left join Star on Sequences.fSequenceFirst=Star.fSequenceFirst ";
+            query += "where Star.fEffOnTime>300 ";
+        }
+
+        if (interval)
+        {
+            query += query.Contains(" where ") ? "and " : "where ";
+            query += Form("fRunStart between '%s' and '%s' ",
                           fRequestFrom.Data(), fRequestTo.Data());
+        }
 
         query += "order by fRunStart";
-
-        //cout << "q: " << query << endl;
 
         TSQLResult *res = fServer.Query(query);
