Index: trunk/MagicSoft/Mars/mbase/MTime.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 8324)
+++ trunk/MagicSoft/Mars/mbase/MTime.cc	(revision 8337)
@@ -108,4 +108,14 @@
 // --------------------------------------------------------------------------
 //
+// Constructor. Calls Set(y, m, d, h, min, s, ms, ns).
+// To check validity test for (*this)==MTime()
+//
+MTime::MTime(UShort_t y, Byte_t m, Byte_t d, Byte_t h, Byte_t min, Byte_t s, UShort_t ms, UInt_t ns)
+{
+    Set(y, m, d, h, min, s, ms, ns);
+}
+
+// --------------------------------------------------------------------------
+//
 // Return date as year(y), month(m), day(d)
 //
@@ -218,4 +228,15 @@
 {
     return (ULong_t)((GetMjd()-49718)*kDay);
+}
+
+// --------------------------------------------------------------------------
+//
+// Return a time which is expressed in seconds since 01/01/1970 0:00h
+// This is compatible with root's definition used in the constructor of
+// TDatime.
+//
+TDatime MTime::GetRootDatime() const
+{
+    return TDatime((UInt_t)((GetMjd()-40587)*kDay/1000));
 }
 
Index: trunk/MagicSoft/Mars/mbase/MTime.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.h	(revision 8324)
+++ trunk/MagicSoft/Mars/mbase/MTime.h	(revision 8337)
@@ -64,8 +64,12 @@
     }
     MTime(Double_t mjd);
+    MTime(UShort_t y, Byte_t m, Byte_t d, Byte_t h=13, Byte_t min=0, Byte_t s=0, UShort_t ms=0, UInt_t ns=0);
     MTime(const MTime& t) : MParContainer(), fMjd(t.fMjd), fTime(t.fTime), fNanoSec(t.fNanoSec)
     {
         Init(NULL, NULL);
     }
+
+    //static Int_t Hour() { return 3600; }
+    //static Int_t Day()  { return 3600;*24 }
 
     void operator=(const MTime &t)
@@ -108,4 +112,5 @@
     void     GetDateOfSunrise(UShort_t &y, Byte_t &m, Byte_t &d) const;
     TTime    GetRootTime() const;
+    TDatime  GetRootDatime() const;
     Double_t GetAxisTime() const;
     Double_t GetMoonPhase() const;
@@ -143,4 +148,8 @@
     operator double() const;   //[s]
     double operator()() const; //[s]
+
+    Double_t    AsDouble() const    { return GetMjd(); }
+    //const char *AsString() const    { return GetString(); }
+    //const char *AsSQLString() const { return GetSqldateTime(); }
 
     // Calculation functions
