Index: trunk/MagicSoft/Cosy/Changelog
===================================================================
--- trunk/MagicSoft/Cosy/Changelog	(revision 924)
+++ trunk/MagicSoft/Cosy/Changelog	(revision 925)
@@ -1,3 +1,25 @@
                                                                   -*-*- END -*-*-
+ 2001/09/07 - Thomas Bretz:
+ 
+   * aposs/Magic.m:
+     - implemented timeout if cosy crashes
+     
+   * candrv/nodedrv.[h,cc]:
+     - Changed ms in WaitForSDO to signed
+     
+   * devdrv/macs.[h,cc]:
+     - added 'case 0x4000'
+     - added SetTimeout
+     - added ReqTimeout
+     - added EnableTimeout
+     - added disabling Timeout to Init
+     - changed all upper case 'strings' to lower case
+     - added HandleTimer
+
+   * main/MCosy.cc:
+     - added enableing timeout for Mac1, Mac2
+
+
+     
  2001/09/06 - Thomas Bretz:
 
Index: trunk/MagicSoft/Cosy/aposs/Magic.m
===================================================================
--- trunk/MagicSoft/Cosy/aposs/Magic.m	(revision 924)
+++ trunk/MagicSoft/Cosy/aposs/Magic.m	(revision 925)
@@ -10,7 +10,12 @@
 /*                                                                         */
 kVERSION    = 0   /*                                                       */
-kSUBVERSION = 62  /*                                                       */
+kSUBVERSION = 63  /*                                                       */
 /*                                                                         */
 /*  HISTORY:                                                               */
+/*                                                                         */
+/*   * V0.63:                                                              */
+/*       - added movement handshake timeout (removed 0x400 WAITAX)         */
+/*       - added brackets around string SDOs                               */
+/*       - changed SDO 0x3007 to support both sync modes
 /*                                                                         */
 /*   * V0.62:                                                              */
@@ -92,6 +97,10 @@
 /*   0x3006 0 wo Velocity Mode 'strt', 'stop'                              */
 /*          1 wo VelMode Velocity                                          */
-/*   0x3007 x wo Syncronisation 'sync'                                     */
+/*   0x3007 0 wo Velocity Syncronisation 'sync'                            */
+/*          1 wo Position Syncronisation 'sync'                            */
 /*   0x3008 x wo Nowait 'on', 'off'                                        */
+/*   0x4000 0 wo Reset timeout timer                                       */
+/*          1 rw Enable timeout timer, 'on' (1), 'off'(0)                  */
+/*          2 rw Timeout timer time                                        */
 /*   0x6000 x rw Rotation Direction                                        */
 /*   0x6002 x rw Velocity Resolution                                       */
@@ -185,6 +194,16 @@
 pdo1on  = kFALSE
 
-/*-------------------------------------------------------------------------*/
-/* Can Open Difinitions                                                    */
+timeout     = 100
+timeouton   = kFALSE    
+timeouttime = TIME
+
+/*-------------------------------------------------------------------------*/
+/* Can Open Definitions                                                    */
+/*-------------------------------------------------------------------------*/
+/* The CAN Object are static object. This is why they must be deleted.     */
+/* The program should run in any of our nodes.                             */
+/* Therefor the standard CAN objects (SDO, PDO1, PDO2) for communication   */
+/* are defined. The nodenumber is part of the object ID (this is somehow   */
+/* similar to the TCP/IP ports)                                            */
 /*-------------------------------------------------------------------------*/
 CANDEL -1
@@ -195,9 +214,15 @@
 sdotx = DEFCANOUT (0x580+nodenr) 8
 sdorx = DEFCANIN  (0x600+nodenr) 8
-
+                               
+/* Close and reopen communication, enable buffering */                               
 err = REOPEN 0 0
 
 /*-------------------------------------------------------------------------*/
 /* Init                                                                    */
+/*-------------------------------------------------------------------------*/
+/* Before the motor control hardware is enabled (hi on output 1)           */
+/* the commands make sure, that the motor will not start moving.           */
+/* As default positioning commands doesn't stop the further execution      */
+/* of the program.                                                         */
 /*-------------------------------------------------------------------------*/
 MOTOR  STOP
@@ -209,4 +234,9 @@
 /*-------------------------------------------------------------------------*/
 /* ON ... GOSUB ... definitions                                            */
+/*-------------------------------------------------------------------------*/
+/* The errorlist one can retreive using the corresponding CAN object       */
+/* should be emty when the node is initialized (arrays are static objects) */
+/* therefor it must be deleted.                                            */
+/* Errors are handled in an interrupt procedure called PROC_ERROR          */
 /*-------------------------------------------------------------------------*/
 /* ON CANMSG GOSUB PROC_CANMSG */
@@ -221,4 +251,9 @@
 /*-------------------------------------------------------------------------*/
 /* Program Main Loop                                                       */
+/*-------------------------------------------------------------------------*/
+/* The main loop is the core of the program which handles incoming         */
+/* objects. In principal CANIN should wait until an object is received,    */
+/* but it stops waiting when an interrupt occurs. This is the reason why   */
+/* the validity of the message must be checked.                            */
 /*-------------------------------------------------------------------------*/
 MAIN:
@@ -261,5 +296,5 @@
             i = i - 1
          endwhile
-      elseif (idx == 0x1010 and sdoval == 's'<<24|'a'<<16|'v'<<8|'e') then 
+      elseif (idx == 0x1010 and sdoval == ('s'<<24|'a'<<16|'v'<<8|'e')) then 
          SAVEPROM
       elseif (idx == 0x1800 and subidx == 1) then
@@ -293,13 +328,13 @@
         endif 
       elseif (idx == 0x3000) then
-          if (sdoval == 'o'<<24|'n'<<16) then 
+          if (sdoval == ('o'<<24|'n'<<16)) then 
               MOTOR ON
-          elseif (sdoval == 'o'<<24|'f'<<16|'f'<<8) then
+          elseif (sdoval == ('o'<<24|'f'<<16|'f'<<8)) then
               MOTOR OFF                                     
-          elseif (sdoval == 's'<<24|'t'<<16|'o'<<8|'p') then
+          elseif (sdoval == ('s'<<24|'t'<<16|'o'<<8|'p')) then
               MOTOR STOP
           endif
       elseif (idx == 0x3001) then
-          if (sdoval == 'h'<<24|'o'<<16|'m'<<8|'e') then
+          if (sdoval == ('h'<<24|'o'<<16|'m'<<8|'e')) then
             limitsw = GET I_POSLIMITSW      
             set I_POSLIMITSW 0      
@@ -313,18 +348,18 @@
             SET I_POSLIMITSW limitsw
          endif
-      elseif (idx == 0x3002 and sdoval == 'o'<<24|'p'<<16|'e'<<8|'n') then 
+      elseif (idx == 0x3002 and sdoval == ('o'<<24|'p'<<16|'e'<<8|'n')) then 
          sdoval=REOPEN 2 0
          if (sdoval) then
              PRINT "Error Reopen"
          endif
-      elseif (idx == 0x3003 and sdoval == 'e'<<24|'x'<<16|'i'<<8|'t') then 
+      elseif (idx == 0x3003 and sdoval == ('e'<<24|'x'<<16|'i'<<8|'t')) then 
          CANOUT sdotx (canhi&0xffffff | 0x60000000) 0
          EXIT
       elseif (idx == 0x3006) then
          if (subidx == 0) then
-            if (sdoval == 's'<<24|'t'<<16|'r'<<8|'t') then 
+            if (sdoval == ('s'<<24|'t'<<16|'r'<<8|'t')) then 
                CVEL 0
                CSTART
-             elseif (sdoval == 's'<<24|'t'<<16|'o'<<8|'p') then 
+             elseif (sdoval == ('s'<<24|'t'<<16|'o'<<8|'p')) then 
                CSTOP
              endif
@@ -332,11 +367,35 @@
             CVEL sdoval
          endif
-      elseif (idx == 0x3007 and sdoval == 's'<<24|'y'<<16|'n'<<8|'c') then 
-         SYNCP
+      elseif (idx == 0x3007) then
+         if (subidx==0 and sdoval == ('s'<<24|'y'<<16|'n'<<8|'c')) then 
+            SYNCV
+         elseif (subidx==1 and sdoval == ('s'<<24|'y'<<16|'n'<<8|'c')) then 
+            SYNCP
+         endif   
       elseif (idx == 0x3008) then
-         if (sdoval == 'o'<<24|'n'<<16) then 
+         if (sdoval == ('o'<<24|'n'<<16)) then 
              NOWAIT ON
-         elseif (sdoval == 'o'<<24|'f'<<16|'f'<<8) then 
+         elseif (sdoval == ('o'<<24|'f'<<16|'f'<<8)) then 
              NOWAIT OFF
+         endif
+      elseif (idx == 0x4000) then
+         if (subidx == 0) then         
+            timeouttime = TIME + timeout                 
+         elseif (subidx == 1) then
+            ON PERIOD 0 GOSUB PROC_Timeout
+            if (sdoval == ('o'<<24|'n'<<16)) then 
+               timeouttime = TIME + timeout
+               ON PERIOD timeout GOSUB PROC_Timeout
+               timeouton = kTRUE                               
+            elseif (sdoval == ('o'<<24|'f'<<16|'f'<<8)) then 
+               timeouton = kFALSE
+            endif 
+         elseif (subidx == 2) then
+            timeout = sdoval              
+            if (timeouton) then
+               ON PERIOD 0 GOSUB PROC_Timeout
+               timeouttime = TIME + timeout
+               ON PERIOD timeout GOSUB PROC_Timeout
+            endif
          endif
 /*    elseif (idx == 0x4000 and
@@ -356,5 +415,5 @@
          SET VELRES sdoval
       elseif (idx == 0x6003) then
-         if (subidx == 0 and sdoval == 's'<<24|'e'<<16|'t'<<8) then
+         if (subidx == 0 and sdoval == ('s'<<24|'e'<<16|'t'<<8)) then
             DEF ORIGIN   
          elseif (subidx == 1) then
@@ -384,5 +443,6 @@
          SET VELMAX sdoval   
       else
-         CANOUT sdotx (canhi&0xffffff | 0x80000000) 0
+         CANOUT sdotx (canhi&0xffffff | (1<<31)/*&0x80000000*/) 0
+         PRINT "Unknown SDO: idx=", idx, ", subidx=", subidx
          goto ENDSDOSET
       endif
@@ -464,5 +524,9 @@
          sdoval = STAT 
       elseif (idx == 0x4000) then
-         WAITAX
+         if (subidx == 1) then
+            sdoval = timeouton
+         elseif (subidx == 2) then
+            sdoval = timeout               
+         endif
       elseif (idx == 0x6000) then
          if (GET POSDRCT == 1) then
@@ -500,5 +564,15 @@
    RETURN
 
-   /*----------------------------------*/
+   /*----------------------------------------------------------------------*/
+   /*                              PROC_SDORX                              */
+   /*----------------------------------------------------------------------*/
+   /* This procedure handles incoming objects, it is called from the main  */
+   /* loop. If the object ID (COB ID) identifies a SDO object, it is       */
+   /* whether it is a object to set data (write into the object            */
+   /* dictionary) or data is requested (read from object dictionary)       */
+   /* If it isn't a valid SDO a error message is send.                     */
+   /* Remark: Only objects with the right node number are received by the  */
+   /*         main loop.                                                   */
+   /*----------------------------------------------------------------------*/
 
    SUBPROG PROC_SDORX
@@ -536,4 +610,37 @@
       CANOUT pdo1 AXEND APOS
    RETURN
+
+/*-------------------------------------------------------------------------*/
+/* Timeout Interrupt                                                       */
+/*-------------------------------------------------------------------------*/
+   SUBPROG PROC_Timeout
+      if (TIME > timeouttime) then                                  
+         MOTOR STOP
+         
+         /* Tell the bus that an error occured */
+         CANOUT pdo2 0 0
+      
+         i = errlist[1] + 1              /* Fill status of array       */
+         while (i>2) do                  /* shift errors by one        */
+            errlist[i] = errlist[i-1]
+            i = i - 1
+         endwhile                        /* set new errornumber        */
+         errlist[2] = 100                /* User Error #100            */
+         if (errlist[1]<8) then          /* write new size if enhanced */
+            errlist[1] = errlist[1] + 1
+         endif     
+
+         errinf = 0
+                          
+         /*if (firstcall)*/ 
+            PRINT "User Timeout at uptime=", (TIME%1000), "s"
+         /*firstcall = kFALSE  */
+
+         /* tell the bus what exactly happened */
+         CANOUT pdo2 errlist[2] errinf
+      /*elseif
+         firstcall = kTRUE*/
+      endif   
+   RETURN   
 
 /*-------------------------------------------------------------------------*/
Index: trunk/MagicSoft/Cosy/base/MTimeout.h
===================================================================
--- trunk/MagicSoft/Cosy/base/MTimeout.h	(revision 924)
+++ trunk/MagicSoft/Cosy/base/MTimeout.h	(revision 925)
@@ -6,5 +6,5 @@
 class MTimeout : public TTimer
 {
-    Bool_t Notify()
+    Bool_t Notify(TTimer *t)
     {
         TurnOff(); // remove from system list
Index: trunk/MagicSoft/Cosy/candrv/nodedrv.cc
===================================================================
--- trunk/MagicSoft/Cosy/candrv/nodedrv.cc	(revision 924)
+++ trunk/MagicSoft/Cosy/candrv/nodedrv.cc	(revision 925)
@@ -47,7 +47,7 @@
 void NodeDrv::HandleSDOError(LWORD_t data)
 {
-    lout << "Err: 0x";
-    lout << hex << setfill('0') << setw(4) << data;
-    lout << endl;;
+    lout << "Nodedrv: SDO Error: Entry not found in deictionary (data=0x";
+    lout << hex << setfill('0') << setw(4) << data << ")";
+    lout << endl;
 }
 
@@ -125,5 +125,5 @@
 }
 
-void NodeDrv::WaitForSdo(WORD_t idx, BYTE_t subidx, WORD_t timeout)
+void NodeDrv::WaitForSdo(WORD_t idx, BYTE_t subidx, WORDS_t timeout)
 {
     fNetwork->WaitForSdo(fId, idx, subidx, timeout);
Index: trunk/MagicSoft/Cosy/candrv/nodedrv.h
===================================================================
--- trunk/MagicSoft/Cosy/candrv/nodedrv.h	(revision 924)
+++ trunk/MagicSoft/Cosy/candrv/nodedrv.h	(revision 925)
@@ -65,5 +65,5 @@
 
     // void WaitForSdos();
-    void WaitForSdo(WORD_t idx, BYTE_t subidx=0, WORD_t timeout=500);
+    void WaitForSdo(WORD_t idx, BYTE_t subidx=0, WORDS_t timeout=500);
 
     void EnableCanMsg(BYTE_t fcode);
Index: trunk/MagicSoft/Cosy/devdrv/macs.cc
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/macs.cc	(revision 924)
+++ trunk/MagicSoft/Cosy/devdrv/macs.cc	(revision 925)
@@ -12,8 +12,11 @@
     fPosActive(0), fRpmActive(0)
 {
+    fTimeout = new TTimer(this, 100, kFALSE); // 100ms
 }
 
 Macs::~Macs()
 {
+    fTimerOn = kFALSE;
+    delete fTimeout;
 }
 
@@ -30,4 +33,16 @@
         fVel = val;
         return;
+
+    case 0x4000:
+        switch (subidx)
+        {
+        case 1:
+            cout << "Timeout timer is " << (val?"en":"dis") << "abled." << endl;
+            return;
+        case 2:
+            cout << "Actual timeout time: " << dec << val << "ms" << endl;
+            return;
+        }
+        break;
 
     case 0x6004:
@@ -74,5 +89,5 @@
 
     case 0x6002:
-        lout << "- Velocity resolution #" << (int)GetId() << ": " << dec << val << " ticks/min" << endl;
+        lout << "- Velocity resolution Node#" << (int)GetId() << ": " << dec << val << " ticks/min" << endl;
         fVelRes = val;
         return;
@@ -82,7 +97,45 @@
 }
 
+void Macs::SetTimeoutTime(LWORD_t ms)
+{
+    fTimeoutTime = ms/2;
+
+    SendSDO(0x4000, 2, ms);
+    WaitForSdo(0x4000, 2);
+}
+
+void Macs::ReqTimeoutTime()
+{
+    RequestSDO(0x4000, 2);
+    WaitForSdo(0x4000, 2);
+}
+
+void Macs::EnableTimeout(bool enable, LWORDS_t ms)
+{
+    if (!enable)
+    {
+        SendSDO(0x4000, 1, string('o', 'f', 'f'));
+        WaitForSdo(0x4000, 1);
+
+        cout << "--> Turn Off. " << endl;
+        fTimerOn = kFALSE;
+    }
+    else
+    {
+        if (ms>0)
+            SetTimeoutTime(ms);
+
+        cout << "--> Turn On." << endl;
+        fTimerOn = kTRUE;
+        fTimeout->Start(fTimeoutTime, kTRUE);
+
+        SendSDO(0x4000, 1, string('o', 'n'));
+        WaitForSdo(0x4000, 1);
+    }
+}
+
 void Macs::ReqVelRes()
 {
-    lout << "- Requesting velocity resolution (velres, 0x3007) of " << (int)GetId() << endl;
+    lout << "- Requesting velocity resolution (velres, 0x6002) of " << (int)GetId() << endl;
     RequestSDO(0x6002);
     WaitForSdo(0x6002);
@@ -116,4 +169,5 @@
     WaitForSdo(0x2004);
     */
+    EnableTimeout(kFALSE);
 
     lout << "- Requesting Mac Software Version of " << (int)GetId() << endl;
@@ -126,5 +180,5 @@
 
     lout << "- Motor on of " << (int)GetId() << endl;
-    SendSDO(0x3000, string('O', 'N'));
+    SendSDO(0x3000, string('o', 'n'));
     WaitForSdo(0x3000);
 
@@ -147,5 +201,5 @@
     // Stop the motor and switch off the position control unit
     //
-    SendSDO(0x3000, string('S','T','O','P'));
+    SendSDO(0x3000, string('s','t','o','p'));
     WaitForSdo(0x3000);
 }
@@ -153,4 +207,6 @@
 void Macs::StopDevice()
 {
+    EnableTimeout(kFALSE);
+
     SetNoWait(FALSE);
 
@@ -164,5 +220,5 @@
 
     lout << "- Motor off of " << (int)GetId() << endl;
-    SendSDO(0x3000, string('O', 'F', 'F'));
+    SendSDO(0x3000, string('o', 'f', 'f'));
     WaitForSdo(0x3000);
 
@@ -227,5 +283,5 @@
     // SetRpmMode(FALSE) stop the motor, but lets the position control unit on
     //
-    SendSDO(0x3006, 0, mode ? string('S','T','R','T') : string('S','T','O','P'));
+    SendSDO(0x3006, 0, mode ? string('s','t','r','t') : string('s','t','o','p'));
     WaitForSdo(0x3006, 0);
 }
@@ -250,5 +306,5 @@
 {
     lout << "- Setting NOWAIT " << (flag?"ON":"OFF") << " #" << (int)GetId() << endl;
-    SendSDO(0x3008, flag ? string('O', 'N') : string('O', 'F', 'F'));
+    SendSDO(0x3008, flag ? string('o', 'n') : string('o', 'f', 'f'));
     WaitForSdo(0x3008);
 }
@@ -261,5 +317,5 @@
     //
     lout << "- Setting Vel Sync Mode #" << (int)GetId() << endl;
-    SendSDO(0x3007, 0, string('S', 'Y', 'N', 'C'));
+    SendSDO(0x3007, 0, string('s', 'y', 'n', 'c'));
     WaitForSdo(0x3007, 0);
 }
@@ -272,5 +328,5 @@
     //
     lout << "- Setting Pos Sync Mode #" << (int)GetId() << endl;
-    SendSDO(0x3007, 1, string('S', 'Y', 'N', 'C'));
+    SendSDO(0x3007, 1, string('s', 'y', 'n', 'c'));
     WaitForSdo(0x3007, 1);
 }
@@ -403,8 +459,9 @@
     switch (GetError())
     {
-    case  6: // home
-    case  8: // control dev
-    case  9: // zero idx
-    case 84: // ON TIME
+    case   6: // home
+    case   8: // control dev
+    case   9: // zero idx
+    case  84: // ON TIME
+    case 100: // timeout
         // Stop program?
         return;
@@ -457,2 +514,36 @@
     WaitForSdo(0x2000, 3);
 }
+
+Bool_t Macs::HandleTimer(TTimer *t)
+{
+    /*
+     Fons:
+     -----
+
+     timers never trigger at the same time or when in a TTimer::Notify.
+     Little explanation:
+
+     - there are two types of timers synchronous and a-synchronous.
+     - synchronous timers are only handled via the ROOT eventloop
+       (see TUnixSystem::DispatchOneEvent()). If there are no mouse/keyboard
+       events then the synchronous timer queue is checked. So if the processing
+       of a mouse/keyboard event takes a long time synchronous timers are not
+       called for a while. To prevent this from happening one can call in long
+       procedures gSystem->ProcessEvents(). The system schedules only the
+       next timer in the queue when the current one's Notify() has finished.
+     - a-synchronous timers are triggered via SIGALARM, i.e. the program is
+       interupted and execution jumps to the Notify() function. When the
+       notify is finished the next a-sync timer is scheduled and the system
+       resumes from the place where it was initially interrupted. One of the
+       things to remember when using a-sync timers is don't make any graphics
+       calls in them. X11 is not re-entrant and it might be that the SIGALARM
+       signal interrupted the system while being in X11. A-sync timers are best
+       used to set flags that you can test at a convenient and controlled
+       time.
+       */
+    SendSDO(0x4000);
+    WaitForSdo(0x4000, 0, kDontWait);
+    if (fTimerOn)
+        fTimeout->Start(fTimeoutTime, kTRUE);
+    return kTRUE;
+}
Index: trunk/MagicSoft/Cosy/devdrv/macs.h
===================================================================
--- trunk/MagicSoft/Cosy/devdrv/macs.h	(revision 924)
+++ trunk/MagicSoft/Cosy/devdrv/macs.h	(revision 925)
@@ -1,9 +1,11 @@
 #ifndef MACS_H
 #define MACS_H
+
+#include <TObject.h>
 
 #include "nodedrv.h"
 #include "base/timer.h"
 
-class Macs : public NodeDrv
+class Macs : public NodeDrv, public TObject
 {
 private:
@@ -22,8 +24,14 @@
     BYTE_t   fRpmActive;
 
+    TTimer  *fTimeout;
+    Bool_t   fTimerOn;
+    LWORD_t  fTimeoutTime;
+
     LWORD_t string(BYTE_t b0=0, BYTE_t b1=0, BYTE_t b2=0, BYTE_t b3=0)
     {
         return (LWORD_t)(b0<<24 | b1<<16 | b2<<8 | b3);
     }
+
+    Bool_t HandleTimer(TTimer *t);
 
 public:
@@ -70,4 +78,9 @@
     void StartAbsPos(LWORDS_t pos);
 
+    void SetTimeoutTime(LWORD_t ms);
+    void ReqTimeoutTime();
+
+    void EnableTimeout(bool enable=true, LWORDS_t ms=-1);
+
     void StopMotor();
 
Index: trunk/MagicSoft/Cosy/gui/Makefile
===================================================================
--- trunk/MagicSoft/Cosy/gui/Makefile	(revision 924)
+++ trunk/MagicSoft/Cosy/gui/Makefile	(revision 925)
@@ -21,5 +21,5 @@
 
 INCLUDES = -I. -I.. -I../base -I../slalib -I../candrv -I../incl \
-	   -I../catalog -I../videodev
+	   -I../catalog -I../videodev -I../main
 
 # @code 
Index: trunk/MagicSoft/Cosy/main/MCosy.cc
===================================================================
--- trunk/MagicSoft/Cosy/main/MCosy.cc	(revision 924)
+++ trunk/MagicSoft/Cosy/main/MCosy.cc	(revision 925)
@@ -676,4 +676,7 @@
     fMac2->SetPosEndswitch(Deg2ZdRE(env.GetValue("Zd_Max[Deg]", +1.0)));
     cout << "done." << endl;
+
+    fMac1->EnableTimeout(kTRUE, 500);
+    fMac2->EnableTimeout(kTRUE, 500);
 
 /*
Index: trunk/MagicSoft/Cosy/main/MStarguider.h
===================================================================
--- trunk/MagicSoft/Cosy/main/MStarguider.h	(revision 924)
+++ trunk/MagicSoft/Cosy/main/MStarguider.h	(revision 925)
@@ -3,15 +3,15 @@
 
 #include "Camera.h"
-#include "Starguider.h"
+#include "MGStarguider.h"
 
 class MStarguider : public Camera
 {
 private:
-    Starguider *fDisplay;
+    MGStarguider *fDisplay;
 
 public:
     MStarguider()
     {
-        fDisplay = new Starguider;
+        fDisplay = new MGStarguider;
     }
 
Index: trunk/MagicSoft/Cosy/main/MainCint.cc
===================================================================
--- trunk/MagicSoft/Cosy/main/MainCint.cc	(revision 924)
+++ 	(revision )
@@ -1,285 +1,0 @@
-//
-// File generated by /home/tbretz/root/root/bin/rootcint at Thu Sep  6 11:48:35 2001.
-// Do NOT change. Changes will be lost next time file is generated
-//
-#include "MainCint.h"
-
-#include "TClass.h"
-#include "TBuffer.h"
-#include "TMemberInspector.h"
-#include "TError.h"
-
-#ifndef G__ROOT
-#define G__ROOT
-#endif
-
-/********************************************************
-* MainCint.cc
-********************************************************/
-
-#ifdef G__MEMTEST
-#undef malloc
-#undef free
-#endif
-
-extern "C" void G__cpp_reset_tagtableMainCint();
-
-extern "C" void G__set_cpp_environmentMainCint() {
-  G__add_compiledheader("TROOT.h");
-  G__add_compiledheader("TMemberInspector.h");
-  G__add_compiledheader("MainIncl.h");
-  G__cpp_reset_tagtableMainCint();
-}
-class G__MainCintdOcc_tag {};
-
-void* operator new(size_t size,G__MainCintdOcc_tag* p) {
-  if(p && G__PVOID!=G__getgvp()) return((void*)p);
-#ifndef G__ROOT
-  return(malloc(size));
-#else
-  return(::operator new(size));
-#endif
-}
-
-/* dummy, for exception */
-#ifdef G__EH_DUMMY_DELETE
-void operator delete(void *p,G__MainCintdOcc_tag* x) {
-  if((long)p==G__getgvp() && G__PVOID!=G__getgvp()) return;
-#ifndef G__ROOT
-  free(p);
-#else
-  ::operator delete(p);
-#endif
-}
-#endif
-
-static void G__operator_delete(void *p) {
-  if((long)p==G__getgvp() && G__PVOID!=G__getgvp()) return;
-#ifndef G__ROOT
-  free(p);
-#else
-  ::operator delete(p);
-#endif
-}
-
-void G__DELDMY_MainCintdOcc() { G__operator_delete(0); }
-
-extern "C" int G__cpp_dllrevMainCint() { return(30051503); }
-
-/*********************************************************
-* Member function Interface Method
-*********************************************************/
-
-/* Setting up global function */
-
-/*********************************************************
-* Member function Stub
-*********************************************************/
-
-/*********************************************************
-* Global function Stub
-*********************************************************/
-
-/*********************************************************
-* Get size of pointer to member function
-*********************************************************/
-class G__Sizep2memfuncMainCint {
- public:
-  G__Sizep2memfuncMainCint() {p=&G__Sizep2memfuncMainCint::sizep2memfunc;}
-    size_t sizep2memfunc() { return(sizeof(p)); }
-  private:
-    size_t (G__Sizep2memfuncMainCint::*p)();
-};
-
-size_t G__get_sizep2memfuncMainCint()
-{
-  G__Sizep2memfuncMainCint a;
-  G__setsizep2memfunc((int)a.sizep2memfunc());
-  return((size_t)a.sizep2memfunc());
-}
-
-
-/*********************************************************
-* virtual base class offset calculation interface
-*********************************************************/
-
-   /* Setting up class inheritance */
-
-/*********************************************************
-* Inheritance information setup/
-*********************************************************/
-extern "C" void G__cpp_setup_inheritanceMainCint() {
-
-   /* Setting up class inheritance */
-}
-
-/*********************************************************
-* typedef information setup/
-*********************************************************/
-extern "C" void G__cpp_setup_typetableMainCint() {
-
-   /* Setting up typedef entry */
-   G__search_typename2("Char_t",99,-1,0,
--1);
-   G__setnewtype(-1,"Signed Character 1 byte",0);
-   G__search_typename2("UChar_t",98,-1,0,
--1);
-   G__setnewtype(-1,"Unsigned Character 1 byte",0);
-   G__search_typename2("Short_t",115,-1,0,
--1);
-   G__setnewtype(-1,"Signed Short integer 2 bytes",0);
-   G__search_typename2("UShort_t",114,-1,0,
--1);
-   G__setnewtype(-1,"Unsigned Short integer 2 bytes",0);
-   G__search_typename2("Int_t",105,-1,0,
--1);
-   G__setnewtype(-1,"Signed integer 4 bytes",0);
-   G__search_typename2("UInt_t",104,-1,0,
--1);
-   G__setnewtype(-1,"Unsigned integer 4 bytes",0);
-   G__search_typename2("Seek_t",105,-1,0,
--1);
-   G__setnewtype(-1,"File pointer",0);
-   G__search_typename2("Long_t",108,-1,0,
--1);
-   G__setnewtype(-1,"Signed long integer 4 bytes",0);
-   G__search_typename2("ULong_t",107,-1,0,
--1);
-   G__setnewtype(-1,"Unsigned long integer 4 bytes",0);
-   G__search_typename2("Float_t",102,-1,0,
--1);
-   G__setnewtype(-1,"Float 4 bytes",0);
-   G__search_typename2("Double_t",100,-1,0,
--1);
-   G__setnewtype(-1,"Float 8 bytes",0);
-   G__search_typename2("Text_t",99,-1,0,
--1);
-   G__setnewtype(-1,"General string",0);
-   G__search_typename2("Bool_t",98,-1,0,
--1);
-   G__setnewtype(-1,"Boolean (0=false, 1=true)",0);
-   G__search_typename2("Byte_t",98,-1,0,
--1);
-   G__setnewtype(-1,"Byte (8 bits)",0);
-   G__search_typename2("Version_t",115,-1,0,
--1);
-   G__setnewtype(-1,"Class version identifier",0);
-   G__search_typename2("Option_t",99,-1,0,
--1);
-   G__setnewtype(-1,"Option string",0);
-   G__search_typename2("Ssiz_t",105,-1,0,
--1);
-   G__setnewtype(-1,"String size",0);
-   G__search_typename2("Real_t",102,-1,0,
--1);
-   G__setnewtype(-1,"TVector and TMatrix element type",0);
-   G__search_typename2("Streamer_t",89,-1,0,
--1);
-   G__setnewtype(-1,NULL,0);
-   G__search_typename2("VoidFuncPtr_t",89,-1,0,
--1);
-   G__setnewtype(-1,"pointer to void function",0);
-   G__search_typename2("FreeHookFun_t",89,-1,0,
--1);
-   G__setnewtype(-1,NULL,0);
-   G__search_typename2("ReAllocFun_t",81,-1,0,
--1);
-   G__setnewtype(-1,NULL,0);
-   G__search_typename2("ReAllocCFun_t",81,-1,0,
--1);
-   G__setnewtype(-1,NULL,0);
-   G__search_typename2("Axis_t",100,-1,0,
--1);
-   G__setnewtype(-1,"Axis values type",0);
-   G__search_typename2("Stat_t",100,-1,0,
--1);
-   G__setnewtype(-1,"Statistics type",0);
-}
-
-/*********************************************************
-* Data Member information setup/
-*********************************************************/
-
-   /* Setting up class,struct,union tag member variable */
-extern "C" void G__cpp_setup_memvarMainCint() {
-}
-/***********************************************************
-************************************************************
-************************************************************
-************************************************************
-************************************************************
-************************************************************
-************************************************************
-***********************************************************/
-
-/*********************************************************
-* Member function information setup for each class
-*********************************************************/
-
-/*********************************************************
-* Member function information setup
-*********************************************************/
-extern "C" void G__cpp_setup_memfuncMainCint() {
-}
-
-/*********************************************************
-* Global variable information setup for each class
-*********************************************************/
-extern "C" void G__cpp_setup_globalMainCint() {
-
-   /* Setting up global variables */
-   G__resetplocal();
-
-
-   G__resetglobalenv();
-}
-
-/*********************************************************
-* Global function information setup for each class
-*********************************************************/
-extern "C" void G__cpp_setup_funcMainCint() {
-   G__lastifuncposition();
-
-
-   G__resetifuncposition();
-}
-
-/*********************************************************
-* Class,struct,union,enum tag information setup
-*********************************************************/
-/* Setup class/struct taginfo */
-
-/* Reset class/struct taginfo */
-extern "C" void G__cpp_reset_tagtableMainCint() {
-}
-
-
-extern "C" void G__cpp_setup_tagtableMainCint() {
-
-   /* Setting up class,struct,union tag entry */
-}
-extern "C" void G__cpp_setupMainCint(void) {
-  G__check_setup_version(30051503,"G__cpp_setupMainCint()");
-  G__set_cpp_environmentMainCint();
-  G__cpp_setup_tagtableMainCint();
-
-  G__cpp_setup_inheritanceMainCint();
-
-  G__cpp_setup_typetableMainCint();
-
-  G__cpp_setup_memvarMainCint();
-
-  G__cpp_setup_memfuncMainCint();
-  G__cpp_setup_globalMainCint();
-  G__cpp_setup_funcMainCint();
-
-   if(0==G__getsizep2memfunc()) G__get_sizep2memfuncMainCint();
-  return;
-}
-class G__cpp_setup_initMainCint {
-  public:
-    G__cpp_setup_initMainCint() { G__add_setup_func("MainCint",(G__incsetup)(&G__cpp_setupMainCint)); G__call_setup_funcs(); }
-   ~G__cpp_setup_initMainCint() { G__remove_setup_func("MainCint"); }
-};
-G__cpp_setup_initMainCint G__cpp_setup_initializerMainCint;
-
