Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 2149)
+++ trunk/MagicSoft/Mars/Changelog	(revision 2150)
@@ -19,4 +19,11 @@
    * mgui/MCamDisplay.[h,cc]:
      - added current support
+
+   * mbase/MTime.h:
+     - preliminary changes to support currents
+     
+   * mhist/MH.[h,cc]:
+     - added usescreenfactor to MakeDefCanvas
+     
 
 
Index: trunk/MagicSoft/Mars/mbase/MTime.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MTime.h	(revision 2149)
+++ trunk/MagicSoft/Mars/mbase/MTime.h	(revision 2150)
@@ -17,9 +17,13 @@
 {
 private:
-    UInt_t fTimeStamp[2]; // type of raw event which should be processed by this task
-    UInt_t fDuration;     // time of validity
+    UInt_t   fTimeStamp[2]; // type of raw event which should be processed by this task
+    UInt_t   fDuration;     // time of validity
+
+    Byte_t   fHour;
+    Byte_t   fMin;
+    Byte_t   fSec;
+    UInt_t   fNanoSec;
 
 public:
-
     MTime(const char *name=NULL, const char *title=NULL)
     {
@@ -59,4 +63,25 @@
     }
 
+    void SetCT1Time(UInt_t t1, UInt_t t0)
+    {
+        // int   isecs_since_midday; // seconds passed since midday before sunset (JD of run start)
+        // int   isecfrac_200ns;     // fractional part of isecs_since_midday
+        // fTime->SetTime(isecfrac_200ns, isecs_since_midday);
+        fNanoSec  = 200*t1;
+        fSec      = t0%60;
+        t0 /= 60;
+        fMin      = t0%60;
+        t0 /= 60;
+        fHour     = (t0+12)%24;
+    }
+
+    void SetTime(Byte_t h, Byte_t m, Byte_t s, UShort_t ns)
+    {
+        fHour    = h;
+        fMin     = m;
+        fSec     = s;
+        fNanoSec = ns;
+    }
+
     void SetDuration(UInt_t t)
     {
@@ -82,6 +107,4 @@
 	return fDuration;
     }
-
-    void SetTime(int, int, int, int) {}
 
     ClassDef(MTime, 1)	//A generalized MARS time stamp
Index: trunk/MagicSoft/Mars/mhist/MH.cc
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2149)
+++ trunk/MagicSoft/Mars/mhist/MH.cc	(revision 2150)
@@ -55,4 +55,5 @@
 #include <TH2.h>
 #include <TH3.h>
+#include <TStyle.h>       // TStyle::GetScreenFactor
 #include <TGaxis.h>
 #include <TCanvas.h>
@@ -128,6 +129,11 @@
 // number of all existing canvases plus one)
 //
+// Normally the canvas size is scaled with gStyle->GetScreenFactor() so
+// that on all screens it looks like the same part of the screen.
+// To suppress this scaling use usescreenfactor=kFALSE. In this case
+// you specify directly the size of the embedded pad.
+//
 TCanvas *MH::MakeDefCanvas(TString name, const char *title,
-                           const UInt_t w, const UInt_t h)
+                           UInt_t w, UInt_t h, Bool_t usescreenfactor)
 {
     const TList *list = (TList*)gROOT->GetListOfCanvases();
@@ -139,4 +145,13 @@
         name += Form(" <%d>", list->GetSize()+1);
 
+    if (!usescreenfactor)
+    {
+        const Float_t cx = gStyle->GetScreenFactor();
+        w += 4;
+        h += 28;
+        w = (int)(w/cx+1);
+        h = (int)(h/cx+1);
+    }
+
     return new TCanvas(name, title, w, h);
 }
@@ -147,7 +162,21 @@
 // and title are retrieved from the given TObject.
 //
+// Normally the canvas size is scaled with gStyle->GetScreenFactor() so
+// that on all screens it looks like the same part of the screen.
+// To suppress this scaling use usescreenfactor=kFALSE. In this case
+// you specify directly the size of the embedded pad.
+//
 TCanvas *MH::MakeDefCanvas(const TObject *obj,
-                           const UInt_t w, const UInt_t h)
-{
+                           UInt_t w, UInt_t h, Bool_t usescreenfactor)
+{
+    if (!usescreenfactor)
+    {
+        const Float_t cx = gStyle->GetScreenFactor();
+        w += 4;
+        h += 28;
+        h = (int)(h/cx+1);
+        w = (int)(w/cx+1);
+    }
+
     return MakeDefCanvas(obj->GetName(), obj->GetTitle(), w, h);
 }
Index: trunk/MagicSoft/Mars/mhist/MH.h
===================================================================
--- trunk/MagicSoft/Mars/mhist/MH.h	(revision 2149)
+++ trunk/MagicSoft/Mars/mhist/MH.h	(revision 2150)
@@ -33,7 +33,9 @@
 
     static TCanvas *MakeDefCanvas(TString name="", const char *title="",
-                                  const UInt_t w=625, const UInt_t h=440);
+                                  UInt_t w=625, UInt_t h=440,
+                                  Bool_t usescreenfactor=kTRUE);
     static TCanvas *MakeDefCanvas(const TObject *obj,
-                                  const UInt_t w=625, const UInt_t h=440);
+                                  UInt_t w=625, UInt_t h=440,
+                                  Bool_t usescreenfactor=kFALSE);
 
     // FIXME: * --> & !!!
