Index: trunk/MagicSoft/Mars/mbase/MArrayD.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArrayD.cc	(revision 5088)
+++ trunk/MagicSoft/Mars/mbase/MArrayD.cc	(revision 5088)
@@ -0,0 +1,73 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// MArrayD
+//
+// Array of Double_t. It is almost the same than TArrayD but derives from
+// TObject
+//
+// Another advantage is: operator[] has no range check!
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MArrayD.h"
+#include "TArrayD.h"
+
+ClassImp(MArrayD);
+
+// --------------------------------------------------------------------------
+//
+//  Cuts the last entries of an array containing only zeros.
+//
+void MArrayD::StripZeros(TArrayD &arr)
+{
+
+  const Int_t n = arr.GetSize();
+  
+  for (Int_t i=n-1; i>=0; i--)
+    if (arr[i] != 0)
+        {
+          arr.Set(i+1);
+          break;
+        }
+}
+
+// --------------------------------------------------------------------------
+//
+//  Cuts the last entries of an array containing only zeros.
+//
+void MArrayD::StripZeros()
+{
+    const Int_t n = GetSize();
+
+    for (Int_t i=n-1; i>=0; i--)
+      if ((*this)[i] != 0)
+        {
+          Set(i+1);
+          break;
+        }
+}
+
Index: trunk/MagicSoft/Mars/mbase/MArrayD.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArrayD.h	(revision 5088)
+++ trunk/MagicSoft/Mars/mbase/MArrayD.h	(revision 5088)
@@ -0,0 +1,165 @@
+#ifndef MARS_MArrayD
+#define MARS_MArrayD
+
+#ifndef MARS_MArray
+#include "MArray.h"
+#endif
+
+#include <string.h>
+
+class TArrayD;
+class MArrayD : public MArray
+{
+private:
+    Double_t *fArray; //[fN] Array of fN chars
+
+public:
+
+    MArrayD()
+    {
+        fN     = 0;
+        fArray = NULL;
+    }
+
+    MArrayD(UInt_t n)
+    {
+        fN     = 0;
+        fArray = NULL;
+        Set(n);
+    }
+
+    MArrayD(UInt_t n, Double_t *array)
+    {
+        // Create TArrayC object and initialize it with values of array.
+        fN     = 0;
+        fArray = NULL;
+        Set(n, array);
+    }
+
+    MArrayD(const MArrayD &array)
+    {
+        // Copy constructor.
+        fArray = NULL;
+        Set(array.fN, array.fArray);
+    }
+
+    UInt_t GetSize() const
+    {
+        return fN;
+    }
+
+    MArrayD &operator=(const MArrayD &rhs)
+    {
+        // TArrayC assignment operator.
+        if (this != &rhs)
+            Set(rhs.fN, rhs.fArray);
+        return *this;
+    }
+
+    virtual ~MArrayD()
+    {
+        // Delete TArrayC object.
+        delete [] fArray;
+        fArray = NULL;
+    }
+
+    void Adopt(UInt_t n, Double_t *array)
+    {
+        // Adopt array arr into TArrayC, i.e. don't copy arr but use it directly
+        // in TArrayC. User may not delete arr, TArrayC dtor will do it.
+        if (fArray)
+            delete [] fArray;
+
+        fN     = n;
+        fArray = array;
+    }
+
+    void AddAt(Double_t c, UInt_t i)
+    {
+        // Add char c at position i. Check for out of bounds.
+        fArray[i] = c;
+    }
+
+    Double_t     At(UInt_t i) const
+    {
+        return fArray[i];
+    }
+
+    Double_t    *GetArray() const
+    {
+        return fArray;
+    }
+
+    void Reset()
+    {
+        memset(fArray, 0, fN*sizeof(Double_t));
+    }
+
+    void Set(UInt_t n)
+    {
+        // Set size of this array to n chars.
+        // A new array is created, the old contents copied to the new array,
+        // then the old array is deleted.
+
+        if (n==fN)
+            return;
+
+        Double_t *temp = fArray;
+        if (n == 0)
+            fArray = NULL;
+        else
+        {
+            fArray = new Double_t[n];
+            if (n < fN)
+                memcpy(fArray, temp, n*sizeof(Double_t));
+            else
+            {
+                memcpy(fArray, temp, fN*sizeof(Double_t));
+                memset(&fArray[fN], 0, (n-fN)*sizeof(Double_t));
+            }
+        }
+
+        if (fN)
+            delete [] temp;
+
+        fN = n;
+    }
+
+    void Set(UInt_t n, Double_t *array)
+    {
+        // Set size of this array to n chars and set the contents.
+        if (!array)
+            return;
+
+        if (fArray && fN != n)
+        {
+            delete [] fArray;
+            fArray = 0;
+        }
+        fN = n;
+
+        if (fN == 0)
+            return;
+
+        if (!fArray)
+            fArray = new Double_t[fN];
+
+        memcpy(fArray, array, n*sizeof(Double_t));
+    }
+
+    Double_t &operator[](UInt_t i)
+    {
+        return fArray[i];
+    }
+    const Double_t &operator[](UInt_t i) const
+    {
+        return fArray[i];
+    }
+
+    static void  StripZeros(TArrayD &arr);
+    void  StripZeros();
+
+    ClassDef(MArrayD, 1)  //Array of Double_t
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mbase/MArrayF.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArrayF.cc	(revision 5088)
+++ trunk/MagicSoft/Mars/mbase/MArrayF.cc	(revision 5088)
@@ -0,0 +1,73 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// MArrayF
+//
+// Array of Float_t. It is almost the same than TArrayF but derives from
+// TObject
+//
+// Another advantage is: operator[] has no range check!
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MArrayF.h"
+#include "TArrayF.h"
+
+ClassImp(MArrayF);
+
+// --------------------------------------------------------------------------
+//
+//  Cuts the last entries of an array containing only zeros.
+//
+void MArrayF::StripZeros(TArrayF &arr)
+{
+
+  const Int_t n = arr.GetSize();
+  
+  for (Int_t i=n-1; i>=0; i--)
+    if (arr[i] != 0)
+        {
+          arr.Set(i+1);
+          break;
+        }
+}
+
+// --------------------------------------------------------------------------
+//
+//  Cuts the last entries of an array containing only zeros.
+//
+void MArrayF::StripZeros()
+{
+    const Int_t n = GetSize();
+
+    for (Int_t i=n-1; i>=0; i--)
+      if ((*this)[i] != 0)
+        {
+          Set(i+1);
+          break;
+        }
+}
+
Index: trunk/MagicSoft/Mars/mbase/MArrayF.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArrayF.h	(revision 5088)
+++ trunk/MagicSoft/Mars/mbase/MArrayF.h	(revision 5088)
@@ -0,0 +1,165 @@
+#ifndef MARS_MArrayF
+#define MARS_MArrayF
+
+#ifndef MARS_MArray
+#include "MArray.h"
+#endif
+
+#include <string.h>
+
+class TArrayF;
+class MArrayF : public MArray
+{
+private:
+    Float_t *fArray; //[fN] Array of fN chars
+
+public:
+
+    MArrayF()
+    {
+        fN     = 0;
+        fArray = NULL;
+    }
+
+    MArrayF(UInt_t n)
+    {
+        fN     = 0;
+        fArray = NULL;
+        Set(n);
+    }
+
+    MArrayF(UInt_t n, Float_t *array)
+    {
+        // Create TArrayC object and initialize it with values of array.
+        fN     = 0;
+        fArray = NULL;
+        Set(n, array);
+    }
+
+    MArrayF(const MArrayF &array)
+    {
+        // Copy constructor.
+        fArray = NULL;
+        Set(array.fN, array.fArray);
+    }
+
+    UInt_t GetSize() const
+    {
+        return fN;
+    }
+
+    MArrayF &operator=(const MArrayF &rhs)
+    {
+        // TArrayC assignment operator.
+        if (this != &rhs)
+            Set(rhs.fN, rhs.fArray);
+        return *this;
+    }
+
+    virtual ~MArrayF()
+    {
+        // Delete TArrayC object.
+        delete [] fArray;
+        fArray = NULL;
+    }
+
+    void Adopt(UInt_t n, Float_t *array)
+    {
+        // Adopt array arr into TArrayC, i.e. don't copy arr but use it directly
+        // in TArrayC. User may not delete arr, TArrayC dtor will do it.
+        if (fArray)
+            delete [] fArray;
+
+        fN     = n;
+        fArray = array;
+    }
+
+    void AddAt(Float_t c, UInt_t i)
+    {
+        // Add char c at position i. Check for out of bounds.
+        fArray[i] = c;
+    }
+
+    Float_t     At(UInt_t i) const 
+    {
+        return fArray[i];
+    }
+
+    Float_t    *GetArray() const
+    {
+        return fArray;
+    }
+
+    void Reset()
+    {
+        memset(fArray, 0, fN*sizeof(Float_t));
+    }
+
+    void Set(UInt_t n)
+    {
+        // Set size of this array to n chars.
+        // A new array is created, the old contents copied to the new array,
+        // then the old array is deleted.
+
+        if (n==fN)
+            return;
+
+        Float_t *temp = fArray;
+        if (n == 0)
+            fArray = NULL;
+        else
+        {
+            fArray = new Float_t[n];
+            if (n < fN)
+                memcpy(fArray, temp, n*sizeof(Float_t));
+            else
+            {
+                memcpy(fArray, temp, fN*sizeof(Float_t));
+                memset(&fArray[fN], 0, (n-fN)*sizeof(Float_t));
+            }
+        }
+
+        if (fN)
+            delete [] temp;
+
+        fN = n;
+    }
+
+    void Set(UInt_t n, Float_t *array)
+    {
+        // Set size of this array to n chars and set the contents.
+        if (!array)
+            return;
+
+        if (fArray && fN != n)
+        {
+            delete [] fArray;
+            fArray = 0;
+        }
+        fN = n;
+
+        if (fN == 0)
+            return;
+
+        if (!fArray)
+            fArray = new Float_t[fN];
+
+        memcpy(fArray, array, n*sizeof(Float_t));
+    }
+
+    Float_t &operator[](UInt_t i)
+    {
+        return fArray[i];
+    }
+    const Float_t &operator[](UInt_t i) const
+    {
+        return fArray[i];
+    }
+
+    static void  StripZeros(TArrayF &arr);
+    void  StripZeros();
+
+    ClassDef(MArrayF, 1)  //Array of Float_t
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mbase/MArrayI.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArrayI.cc	(revision 5088)
+++ trunk/MagicSoft/Mars/mbase/MArrayI.cc	(revision 5088)
@@ -0,0 +1,39 @@
+/* ======================================================================== *\
+!
+! *
+! * This file is part of MARS, the MAGIC Analysis and Reconstruction
+! * Software. It is distributed to you in the hope that it can be a useful
+! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+! * It is distributed WITHOUT ANY WARRANTY.
+! *
+! * Permission to use, copy, modify and distribute this software and its
+! * documentation for any purpose is hereby granted without fee,
+! * provided that the above copyright notice appear in all copies and
+! * that both that copyright notice and this permission notice appear
+! * in supporting documentation. It is provided "as is" without express
+! * or implied warranty.
+! *
+!
+!
+!   Author(s): Thomas Bretz  12/2000 <mailto:tbretz@astro.uni-wuerzburg.de>
+!
+!   Copyright: MAGIC Software Development, 2000-2004
+!
+!
+\* ======================================================================== */
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// MArrayI
+//
+// Array of Int_t. It is almost the same than TArrayI but derives from
+// TObject
+//
+// Another advantage is: operator[] has no range check!
+//
+//////////////////////////////////////////////////////////////////////////////
+#include "MArrayI.h"
+
+ClassImp(MArrayI);
+
Index: trunk/MagicSoft/Mars/mbase/MArrayI.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MArrayI.h	(revision 5088)
+++ trunk/MagicSoft/Mars/mbase/MArrayI.h	(revision 5088)
@@ -0,0 +1,161 @@
+#ifndef MARS_MArrayI
+#define MARS_MArrayI
+
+#ifndef MARS_MArray
+#include "MArray.h"
+#endif
+
+#include <string.h>
+
+class MArrayI : public MArray
+{
+private:
+    Int_t *fArray; //[fN] Array of fN chars
+
+public:
+
+    MArrayI()
+    {
+        fN     = 0;
+        fArray = NULL;
+    }
+
+    MArrayI(UInt_t n)
+    {
+        fN     = 0;
+        fArray = NULL;
+        Set(n);
+    }
+
+    MArrayI(UInt_t n, Int_t *array)
+    {
+        // Create TArrayC object and initialize it with values of array.
+        fN     = 0;
+        fArray = NULL;
+        Set(n, array);
+    }
+
+    MArrayI(const MArrayI &array)
+    {
+        // Copy constructor.
+        fArray = NULL;
+        Set(array.fN, array.fArray);
+    }
+
+    UInt_t GetSize() const
+    {
+        return fN;
+    }
+
+    MArrayI &operator=(const MArrayI &rhs)
+    {
+        // TArrayC assignment operator.
+        if (this != &rhs)
+            Set(rhs.fN, rhs.fArray);
+        return *this;
+    }
+
+    virtual ~MArrayI()
+    {
+        // Delete TArrayC object.
+        delete [] fArray;
+        fArray = NULL;
+    }
+
+    void Adopt(UInt_t n, Int_t *array)
+    {
+        // Adopt array arr into TArrayC, i.e. don't copy arr but use it directly
+        // in TArrayC. User may not delete arr, TArrayC dtor will do it.
+        if (fArray)
+            delete [] fArray;
+
+        fN     = n;
+        fArray = array;
+    }
+
+    void AddAt(Int_t c, UInt_t i)
+    {
+        // Add char c at position i. Check for out of bounds.
+        fArray[i] = c;
+    }
+
+    Int_t     At(UInt_t i) const
+    {
+        return fArray[i];
+    }
+
+    Int_t    *GetArray() const
+    {
+        return fArray;
+    }
+
+    void Reset()
+    {
+        memset(fArray, 0, fN*sizeof(Int_t));
+    }
+
+    void Set(UInt_t n)
+    {
+        // Set size of this array to n chars.
+        // A new array is created, the old contents copied to the new array,
+        // then the old array is deleted.
+
+        if (n==fN)
+            return;
+
+        Int_t *temp = fArray;
+        if (n == 0)
+            fArray = NULL;
+        else
+        {
+            fArray = new Int_t[n];
+            if (n < fN)
+                memcpy(fArray, temp, n*sizeof(Int_t));
+            else
+            {
+                memcpy(fArray, temp, fN*sizeof(Int_t));
+                memset(&fArray[fN], 0, (n-fN)*sizeof(Int_t));
+            }
+        }
+
+        if (fN)
+            delete [] temp;
+
+        fN = n;
+    }
+
+    void Set(UInt_t n, Int_t *array)
+    {
+        // Set size of this array to n chars and set the contents.
+        if (!array)
+            return;
+
+        if (fArray && fN != n)
+        {
+            delete [] fArray;
+            fArray = 0;
+        }
+        fN = n;
+
+        if (fN == 0)
+            return;
+
+        if (!fArray)
+            fArray = new Int_t[fN];
+
+        memcpy(fArray, array, n*sizeof(Int_t));
+    }
+
+    Int_t &operator[](UInt_t i)
+    {
+        return fArray[i];
+    }
+    const Int_t &operator[](UInt_t i) const
+    {
+        return fArray[i];
+    }
+
+    ClassDef(MArrayI, 1)  //Array of Int_t
+};
+
+#endif
Index: trunk/MagicSoft/Mars/mbase/MAstro.cc
===================================================================
--- trunk/MagicSoft/Mars/mbase/MAstro.cc	(revision 5087)
+++ 	(revision )
@@ -1,238 +1,0 @@
-/* ======================================================================== *\
-!
-! *
-! * This file is part of MARS, the MAGIC Analysis and Reconstruction
-! * Software. It is distributed to you in the hope that it can be a useful
-! * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
-! * It is distributed WITHOUT ANY WARRANTY.
-! *
-! * Permission to use, copy, modify and distribute this software and its
-! * documentation for any purpose is hereby granted without fee,
-! * provided that the above copyright notice appear in all copies and
-! * that both that copyright notice and this permission notice appear
-! * in supporting documentation. It is provided "as is" without express
-! * or implied warranty.
-! *
-!
-!
-!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
-!
-!   Copyright: MAGIC Software Development, 2000-2003
-!
-!
-\* ======================================================================== */
-
-/////////////////////////////////////////////////////////////////////////////
-//
-// MAstro
-// ------
-//
-////////////////////////////////////////////////////////////////////////////
-#include "MAstro.h"
-
-ClassImp(MAstro);
-
-Double_t MAstro::Trunc(Double_t val)
-{
-    /* dint(A) - truncate to nearest whole number towards zero (double) */
-    return val<0 ? TMath::Ceil(val) : TMath::Floor(val);
-}
-
-Double_t MAstro::Round(Double_t val)
-{
-    /* dnint(A) - round to nearest whole number (double) */
-    return val<0 ? TMath::Ceil(val-0.5) : TMath::Floor(val+0.5);
-}
-
-Double_t MAstro::Hms2Sec(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
-{
-    const Double_t rc = TMath::Sign((60.0 * (60.0 * (Double_t)TMath::Abs(deg) + (Double_t)min) + sec), (Double_t)deg);
-    return sgn=='-' ? -rc : rc;
-}
-
-Double_t MAstro::Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
-{
-    /* pi/(180*3600):  arcseconds to radians */
-#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
-    return Hms2Sec(deg, min, sec, sgn)*DAS2R;
-}
-
-Double_t MAstro::Hms2Rad(Int_t hor, UInt_t min, Double_t sec, Char_t sgn)
-{
-    /* pi/(12*3600):  seconds of time to radians */
-#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
-    return Hms2Sec(hor, min, sec, sgn)*DS2R;
-}
-
-Double_t MAstro::Dms2Deg(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
-{
-    return Hms2Sec(deg, min, sec, sgn)/3600.;
-}
-
-Double_t MAstro::Hms2Deg(Int_t hor, UInt_t min, Double_t sec, Char_t sgn)
-{
-    return Hms2Sec(hor, min, sec, sgn)/240.;
-}
-
-Double_t MAstro::Dms2Hor(Int_t deg, UInt_t min, Double_t sec, Char_t sgn)
-{
-    return Hms2Sec(deg, min, sec, sgn)/15.;
-}
-
-Double_t MAstro::Hms2Hor(Int_t hor, UInt_t min, Double_t sec, Char_t sgn)
-{
-    return Hms2Sec(hor, min, sec, sgn)/3600.;
-}
-
-void MAstro::Day2Hms(Double_t day, Char_t &sgn, UShort_t &hor, UShort_t &min, UShort_t &sec)
-{
-    /* Handle sign */
-    sgn = day<0?'-':'+';
-
-    /* Round interval and express in smallest units required */
-    Double_t a = Round(86400. * TMath::Abs(day)); // Days to seconds
-
-    /* Separate into fields */
-    const Double_t ah = Trunc(a/3600.);
-    a -= ah * 3600.;
-    const Double_t am = Trunc(a/60.);
-    a -= am * 60.;
-    const Double_t as = Trunc(a);
-
-    /* Return results */
-    hor = (UShort_t)ah;
-    min = (UShort_t)am;
-    sec = (UShort_t)as;
-}
-
-void MAstro::Rad2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
-{
-    Day2Hms(rad/(TMath::Pi()*2), sgn, deg, min, sec);
-}
-
-void MAstro::Rad2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
-{
-    Rad2Hms(rad*15, sgn, deg, min, sec);
-}
-
-void MAstro::Deg2Dms(Double_t d, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
-{
-    Day2Hms(d/24, sgn, deg, min, sec);
-}
-
-void MAstro::Deg2Hms(Double_t d, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
-{
-    Rad2Hms(d/360, sgn, deg, min, sec);
-}
-
-void MAstro::Hor2Dms(Double_t h, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
-{
-    Day2Hms(h*15/24, sgn, deg, min, sec);
-}
-
-void MAstro::Hor2Hms(Double_t h, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec)
-{
-    Day2Hms(h/24, sgn, deg, min, sec);
-}
-
-void MAstro::Day2Hm(Double_t day, Char_t &sgn, UShort_t &hor, Double_t &min)
-{
-    /* Handle sign */
-    sgn = day<0?'-':'+';
-
-    /* Round interval and express in smallest units required */
-    Double_t a = Round(86400. * TMath::Abs(day)); // Days to seconds
-
-    /* Separate into fields */
-    const Double_t ah = Trunc(a/3600.);
-    a -= ah * 3600.;
-
-    /* Return results */
-    hor = (UShort_t)ah;
-    min = a/60.;
-}
-
-void MAstro::Rad2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min)
-{
-    Day2Hm(rad/(TMath::Pi()*2), sgn, deg, min);
-}
-
-void MAstro::Rad2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min)
-{
-    Rad2Hm(rad*15, sgn, deg, min);
-}
-
-void MAstro::Deg2Dm(Double_t d, Char_t &sgn, UShort_t &deg, Double_t &min)
-{
-    Day2Hm(d/24, sgn, deg, min);
-}
-
-void MAstro::Deg2Hm(Double_t d, Char_t &sgn, UShort_t &deg, Double_t &min)
-{
-    Rad2Hm(d/360, sgn, deg, min);
-}
-
-void MAstro::Hor2Dm(Double_t h, Char_t &sgn, UShort_t &deg, Double_t &min)
-{
-    Day2Hm(h*15/24, sgn, deg, min);
-}
-
-void MAstro::Hor2Hm(Double_t h, Char_t &sgn, UShort_t &deg, Double_t &min)
-{
-    Day2Hm(h/24, sgn, deg, min);
-}
-
-Bool_t MAstro::String2Angle(TString &str, Double_t &ret)
-{
-    Char_t  sgn;
-    Int_t   d, len;
-    UInt_t  m;
-    Float_t s;
-
-    // Skip whitespaces before %c and after %f
-    int n=sscanf(str.Data(), " %c %d %d %f %n", &sgn, &d, &m, &s, &len);
-
-    if (n!=4 || (sgn!='+' && sgn!='-'))
-        return kFALSE;
-
-    str.Remove(0, len);
-
-    ret = Dms2Deg(d, m, s, sgn);
-    return kTRUE;
-}
-
-void MAstro::Mjd2Ymd(UInt_t mjd, UShort_t &y, Byte_t &m, Byte_t &d)
-{
-    // Express day in Gregorian calendar
-    const ULong_t jd   = mjd + 2400001;
-    const ULong_t n4   = 4*(jd+((6*((4*jd-17918)/146097))/4+1)/2-37);
-    const ULong_t nd10 = 10*(((n4-237)%1461)/4)+5;
-
-    y = n4/1461L-4712;
-    m = ((nd10/306+2)%12)+1;
-    d = (nd10%306)/10+1;
-}
-
-Int_t MAstro::Ymd2Mjd(UShort_t y, Byte_t m, Byte_t d)
-{
-    // Month lengths in days
-    static int months[12] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };
-
-    // Validate month
-    if (m<1 || m>12)
-        return -1;
-
-    // Allow for leap year
-    months[1] = (y%4==0 && (y%100!=0 || y%400==0)) ? 29 : 28;
-
-    // Validate day
-    if (d<1 || d>months[m-1])
-        return -1;
-
-    // Precalculate some values
-    const Byte_t  lm = 12-m;
-    const ULong_t lm10 = 4712 + y - lm/10;
-
-    // Perform the conversion
-    return 1461L*lm10/4 + (306*((m+9)%12)+5)/10 - (3*((lm10+188)/100))/4 + d - 2399904;
-}
Index: trunk/MagicSoft/Mars/mbase/MAstro.h
===================================================================
--- trunk/MagicSoft/Mars/mbase/MAstro.h	(revision 5087)
+++ 	(revision )
@@ -1,47 +1,0 @@
-#ifndef MARS_MAstro
-#define MARS_MAstro
-
-#ifndef ROOT_TROOT
-#include <TROOT.h>
-#endif
-
-class MAstro
-{
-private:
-    static Double_t Round(Double_t val);
-    static Double_t Trunc(Double_t val);
-
-public:
-    static Double_t Hms2Sec(Int_t deg, UInt_t min, Double_t sec, char sgn='+');
-    static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
-    static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
-    static Double_t Dms2Deg(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
-    static Double_t Hms2Deg(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
-    static Double_t Dms2Hor(Int_t deg, UInt_t min, Double_t sec, Char_t sgn='+');
-    static Double_t Hms2Hor(Int_t hor, UInt_t min, Double_t sec, Char_t sgn='+');
-
-    static void Day2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
-    static void Rad2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
-    static void Rad2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
-    static void Deg2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
-    static void Deg2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
-    static void Hor2Dms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
-    static void Hor2Hms(Double_t rad, Char_t &sgn, UShort_t &deg, UShort_t &min, UShort_t &sec);
-
-    static void Day2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
-    static void Rad2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
-    static void Rad2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
-    static void Deg2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
-    static void Deg2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
-    static void Hor2Dm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
-    static void Hor2Hm(Double_t rad, Char_t &sgn, UShort_t &deg, Double_t &min);
-
-    static Bool_t String2Angle(TString &str, Double_t &ret);
-
-    static void  Mjd2Ymd(UInt_t mjd, UShort_t &y, Byte_t &m, Byte_t &d);
-    static Int_t Ymd2Mjd(UShort_t y, Byte_t m, Byte_t d);
-
-    ClassDef(MAstro, 0)
-};
-
-#endif
