Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2612)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2617)
@@ -9,7 +9,18 @@
      - added some new member function
      - fixed wrong calculations
+     - moved all stand-alone operators into class
      
    * mhist/MHPixVsTime.cc, mhist/MHVsTime.cc:
      - fixed MTime handling
+
+   * Makefile.rules:
+     - removed obsolete $(HEADERS) from rule for $(LIB)
+     - added $(CINT)LinkDef.h for rule for $(CINT)Cint.cc
+     
+   * mbase/BaseLinkDef.h:
+     - added operator<<(ostream&, MTime&)
+     
+   * mmain/MOnlineDump.cc:
+     - fixed a small bug using MTime
 
 
Index: trunk/MagicSoft/Mars/Makefile.rules
===================================================================
--- trunk/MagicSoft/Mars/Makefile.rules	(revision 2612)
+++ trunk/MagicSoft/Mars/Makefile.rules	(revision 2617)
@@ -1,9 +1,9 @@
 
-$(LIB): $(OBJS) $(HEADERS) $(CINT)Cint.o
+$(LIB): $(OBJS) $(CINT)Cint.o
 	@echo " - Building Library lib$(LIB)"
 	$(AR) $(LIB) *.o
 	@echo " "
 
-$(CINT)Cint.cc: $(HEADERS) 
+$(CINT)Cint.cc: $(HEADERS) $(CINT)LinkDef.h
 	@echo " - Generating dictionary $(CINT)Cint.cc"
 
Index: trunk/MagicSoft/Mars/mbase/BaseLinkDef.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 2612)
+++ trunk/MagicSoft/Mars/mbase/BaseLinkDef.h	(revision 2617)
@@ -50,4 +50,5 @@
 
 #pragma link C++ class MTime+;
+#pragma link C++ function operator<<(ostream&, const MTime&);
 
 #pragma link C++ class MArgs+;
Index: trunk/MagicSoft/Mars/mbase/MTime.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.h	(revision 2612)
+++ trunk/MagicSoft/Mars/mbase/MTime.h	(revision 2617)
@@ -22,28 +22,21 @@
 class MTime : public MParContainer
 {
-    friend bool operator==(MTime &t1, MTime &t2);
-    friend bool operator!=(MTime &t1, MTime &t2);
-    friend bool operator< (MTime &t1, MTime &t2);
-    friend bool operator> (MTime &t1, MTime &t2);
-    //friend bool operator<=(MTime &t1, MTime &t2);
-    //friend bool operator>=(MTime &t1, MTime &t2);
-
 private:
     static const UInt_t kHour; // [ms] one hour
     static const UInt_t kDay;  // [ms] one day
 
-     UInt_t fMjd;     // [d]  Day in the century        (Day of sun rise)
-     TTime  fTime;    // [ms] Time of Day               (-11h<=x<13h)
-     UInt_t fNanoSec; // [ns] NanoSec part of TimeOfDay (<1000000)
+    UInt_t fMjd;     // [d]  Day in the century        (Day of sun rise)
+    TTime  fTime;    // [ms] Time of Day               (-11h<=x<13h)
+    UInt_t fNanoSec; // [ns] NanoSec part of TimeOfDay (<1000000)
 
-     ULong_t GetTime24() const
-     {
-         return (Long_t)fTime<0 ? (Long_t)fTime+kDay : (ULong_t)fTime;
-     }
-     void Init(const char *name, const char *title)
-     {
+    ULong_t GetTime24() const
+    {
+        return (Long_t)fTime<0 ? (Long_t)fTime+kDay : (ULong_t)fTime;
+    }
+    void Init(const char *name, const char *title)
+    {
         fName  = name  ? name  : "MTime";
         fTitle = title ? title : "Generalized time stamp";
-     }
+    }
 
 public:
@@ -111,50 +104,54 @@
     }
 
+    bool operator<(const MTime &t) const
+    {
+        if (fMjd<t.fMjd)
+            return true;
+        if (fMjd==t.fMjd && fTime<t.fTime)
+            return true;
+        if (fMjd==t.fMjd && fTime==t.fTime && fNanoSec<t.fNanoSec)
+            return true;
+        return false;
+    }
+    bool operator>(const MTime &t) const
+    {
+        if (fMjd>t.fMjd)
+            return true;
+        if (fMjd==t.fMjd && fTime>t.fTime)
+            return true;
+        if (fMjd==t.fMjd && fTime==t.fTime && fNanoSec>t.fNanoSec)
+            return true;
+        return false;
+    }
+
+    bool operator<=(const MTime &t) const
+    {
+        return !operator>(t);
+    }
+
+    bool operator>=(const MTime &t) const
+    {
+        return !operator<(t);
+    }
+
+    bool operator==(const MTime &t) const
+    {
+        return fNanoSec==t.fNanoSec && fTime==t.fTime && fMjd==t.fMjd;
+    }
+
+    bool operator!=(const MTime &t) const
+    {
+        return fNanoSec!=t.fNanoSec || fTime!=t.fTime || fMjd!=t.fMjd;
+    }
+
+    bool operator!() const
+    {
+        return fNanoSec==0 && (ULong_t)fTime==0 && fMjd==0;
+    }
+
     ClassDef(MTime, 3)	//A generalized MARS time stamp
 };
 
-inline bool operator<(MTime &t1, MTime &t2)
-{
-    if (t1.fMjd<t2.fMjd)
-        return true;
-    if (t1.fMjd==t2.fMjd && t1.fTime<t2.fTime)
-        return true;
-    if (t1.fMjd==t2.fMjd && t1.fTime==t2.fTime && t1.fNanoSec<t2.fNanoSec)
-        return true;
-    return false;
-}
-
-inline bool operator>(MTime &t1, MTime &t2)
-{
-    if (t1.fMjd>t2.fMjd)
-        return true;
-    if (t1.fMjd==t2.fMjd && t1.fTime>t2.fTime)
-        return true;
-    if (t1.fMjd==t2.fMjd && t1.fTime==t2.fTime && t1.fNanoSec>t2.fNanoSec)
-        return true;
-    return false;
-}
-
-inline bool operator<=(MTime &t1, MTime &t2)
-{
-    return !(t1>t2);
-}
-
-inline bool operator>=(MTime &t1, MTime &t2)
-{
-    return !(t1<t2);
-}
-
-inline bool operator==(MTime &t1, MTime &t2)
-{
-    return t1.fNanoSec==t2.fNanoSec && t1.fTime==t2.fTime && t1.fMjd==t2.fMjd;
-}
-
-inline bool operator!=(MTime &t1, MTime &t2)
-{
-    return t1.fNanoSec!=t2.fNanoSec || t1.fTime!=t2.fTime || t1.fMjd!=t2.fMjd;
-}
-
-inline ostream &operator<<(ostream &out, MTime &t)
+inline ostream &operator<<(ostream &out, const MTime &t)
 {
     out << t.GetString();
Index: trunk/MagicSoft/Mars/mmain/MOnlineDump.cc
===================================================================
--- trunk/MagicSoft/Mars/mmain/MOnlineDump.cc	(revision 2612)
+++ trunk/MagicSoft/Mars/mmain/MOnlineDump.cc	(revision 2617)
@@ -38,5 +38,5 @@
     Bool_t set = kFALSE;
 
-    if (*fEvtTime==0)
+    if (!*fEvtTime)
     {
         fEvtTime->Now();
@@ -51,5 +51,6 @@
 
     if (evts>0 && sec>0 && fDisplay)
-        fDisplay->SetStatusLine2(Form("Trigger Rate: %.1fHz /  Event Rate: %.1fHz", evts/sec, fRate->GetRate()));
+        fDisplay->SetStatusLine2(Form("%sTrigger Rate: %.1fHz / Event Rate: %.1fHz",
+                                      (set?"Arb. ":""), evts/sec, fRate->GetRate()));
 
     if (set)
