| 1 | #ifndef MGCOSY_H
 | 
|---|
| 2 | #define MGCOSY_H
 | 
|---|
| 3 | 
 | 
|---|
| 4 | #ifndef ROOT_TGFrame
 | 
|---|
| 5 | #include <TGFrame.h>
 | 
|---|
| 6 | #endif
 | 
|---|
| 7 | 
 | 
|---|
| 8 | #ifndef MARS_MObservatory
 | 
|---|
| 9 | #include "MObservatory.h"
 | 
|---|
| 10 | #endif
 | 
|---|
| 11 | 
 | 
|---|
| 12 | #ifndef COSY_MStarList
 | 
|---|
| 13 | #include "MStarList.h"
 | 
|---|
| 14 | #endif
 | 
|---|
| 15 | 
 | 
|---|
| 16 | class TIterator;
 | 
|---|
| 17 | 
 | 
|---|
| 18 | class TGTab;
 | 
|---|
| 19 | class TGLabel;
 | 
|---|
| 20 | class TGTextView;
 | 
|---|
| 21 | class TGPopupMenu;
 | 
|---|
| 22 | class TGLayoutHints;
 | 
|---|
| 23 | class TGCompositeFrame;
 | 
|---|
| 24 | class TGHorizontal3DLine;
 | 
|---|
| 25 | 
 | 
|---|
| 26 | class ZdAz;
 | 
|---|
| 27 | class RaDec;
 | 
|---|
| 28 | class MsgQueue;
 | 
|---|
| 29 | class MCeCoCom;
 | 
|---|
| 30 | 
 | 
|---|
| 31 | class MGList;
 | 
|---|
| 32 | class MGImage;
 | 
|---|
| 33 | class MGAccuracy;
 | 
|---|
| 34 | class MGAccuracyTime;
 | 
|---|
| 35 | class MGVelocity;
 | 
|---|
| 36 | class MGCoordinates;
 | 
|---|
| 37 | class MGSkyPosition;
 | 
|---|
| 38 | 
 | 
|---|
| 39 | class MGCosy : public TGMainFrame
 | 
|---|
| 40 | {
 | 
|---|
| 41 | private:
 | 
|---|
| 42 |     const MObservatory::LocationName_t fObservatory;
 | 
|---|
| 43 | 
 | 
|---|
| 44 |     //
 | 
|---|
| 45 |     // Create a main frame with a number of different buttons.
 | 
|---|
| 46 |     //
 | 
|---|
| 47 |     MGList        *fList;
 | 
|---|
| 48 | 
 | 
|---|
| 49 |     TGLabel       *fLabel1;
 | 
|---|
| 50 |     TGLabel       *fLabel2;
 | 
|---|
| 51 |     // TGLabel       *fLabel3;
 | 
|---|
| 52 | 
 | 
|---|
| 53 |     // TGLabel       *fOffsetZd;
 | 
|---|
| 54 |     // TGLabel       *fOffsetAz;
 | 
|---|
| 55 | 
 | 
|---|
| 56 |     TGLabel       *fRaEst;
 | 
|---|
| 57 |     TGLabel       *fDecEst;
 | 
|---|
| 58 | 
 | 
|---|
| 59 |     TGLabel       *fRaSoll;
 | 
|---|
| 60 |     TGLabel       *fDecSoll;
 | 
|---|
| 61 | 
 | 
|---|
| 62 |     TGLabel       *fZdSoll;
 | 
|---|
| 63 |     TGLabel       *fAzSoll;
 | 
|---|
| 64 | 
 | 
|---|
| 65 |     TGLabel       *fMsgZd;
 | 
|---|
| 66 |     TGLabel       *fMsgAz;
 | 
|---|
| 67 | 
 | 
|---|
| 68 |     TGLabel       *fUtc;
 | 
|---|
| 69 |     TGLabel       *fMjd;
 | 
|---|
| 70 | 
 | 
|---|
| 71 |     TGLabel       *fWeather;
 | 
|---|
| 72 | 
 | 
|---|
| 73 |     MStarList     fPreDefList;
 | 
|---|
| 74 |     MStarList     fStarList;
 | 
|---|
| 75 | 
 | 
|---|
| 76 |     MGCoordinates *fCZdAz;
 | 
|---|
| 77 |     MGCoordinates *fCRaDec;
 | 
|---|
| 78 |     MGCoordinates *fCCalib;
 | 
|---|
| 79 | 
 | 
|---|
| 80 |     MGSkyPosition  *fSkyPosition;
 | 
|---|
| 81 |     MGAccuracy     *fAccuracy;
 | 
|---|
| 82 |     MGVelocity     *fVelocity;
 | 
|---|
| 83 |     MGVelocity     *fOffset;
 | 
|---|
| 84 | 
 | 
|---|
| 85 |     MGImage *fImage;
 | 
|---|
| 86 | 
 | 
|---|
| 87 |     MsgQueue      *fQueue;
 | 
|---|
| 88 | 
 | 
|---|
| 89 |     TGTab         *fTab;
 | 
|---|
| 90 | 
 | 
|---|
| 91 |     TGLabel *fArmed;
 | 
|---|
| 92 |     TGLabel *fError;
 | 
|---|
| 93 |     TGLabel *fMoving;
 | 
|---|
| 94 |     TGLabel *fTracking;
 | 
|---|
| 95 |     TGLabel *fStopping;
 | 
|---|
| 96 |     TGLabel *fStopped;
 | 
|---|
| 97 |     //TGLabel *fAvailDkc1;
 | 
|---|
| 98 |     //TGLabel *fAvailDkc2;
 | 
|---|
| 99 |     TGLabel *fAvailTcp;
 | 
|---|
| 100 | 
 | 
|---|
| 101 |     TGLabel *fDkcReady1;
 | 
|---|
| 102 |     TGLabel *fDkcReady2;
 | 
|---|
| 103 |     TGLabel *fDkcEmergency;
 | 
|---|
| 104 |     TGLabel *fDkcPcMode;
 | 
|---|
| 105 |     TGLabel *fDkcRF1;
 | 
|---|
| 106 |     TGLabel *fDkcRF2;
 | 
|---|
| 107 |     TGLabel *fDkcBrake;
 | 
|---|
| 108 |     TGLabel *fDkcPower;
 | 
|---|
| 109 | 
 | 
|---|
| 110 |     TGTextView *fLog;
 | 
|---|
| 111 | 
 | 
|---|
| 112 |     FontStruct_t fFont;
 | 
|---|
| 113 |     Int_t fCelestObj;
 | 
|---|
| 114 | 
 | 
|---|
| 115 |     void CreateMenu();
 | 
|---|
| 116 |     void CreateLabel(TGCompositeFrame *f);
 | 
|---|
| 117 |     void CreateTabs(const char *prepos);
 | 
|---|
| 118 |     void CreatePredefinedPos(TGCompositeFrame *tf1, const char *prepos);
 | 
|---|
| 119 |     void CreateStarList(TGCompositeFrame *tf1);
 | 
|---|
| 120 |     void CreateCelestList(TGCompositeFrame *tf1);
 | 
|---|
| 121 | 
 | 
|---|
| 122 |     void StartPos();
 | 
|---|
| 123 |     void StartTrack(bool track);
 | 
|---|
| 124 |     void StartCelest();
 | 
|---|
| 125 |     void StartTrackPos(Long_t mp1=0);
 | 
|---|
| 126 |     void StartDemo();
 | 
|---|
| 127 |     //void StartCalib();
 | 
|---|
| 128 |     void StartTPoint();
 | 
|---|
| 129 | 
 | 
|---|
| 130 |     void EnableLabel(TGLabel *label, Bool_t stat);
 | 
|---|
| 131 |     void SetLabelColor(TGLabel *label, Bool_t col);
 | 
|---|
| 132 |     //void UpdateOffset(ZdAz &off);
 | 
|---|
| 133 |     void UpdateZdAz(ZdAz &off);
 | 
|---|
| 134 |     void UpdateRaDec(ZdAz &pos, double mjd, RaDec &radec);
 | 
|---|
| 135 |     double UpdateTime();
 | 
|---|
| 136 | 
 | 
|---|
| 137 | public:
 | 
|---|
| 138 |     MGCosy(MObservatory::LocationName_t key, const char *prepos, MsgQueue *q);
 | 
|---|
| 139 |     ~MGCosy();
 | 
|---|
| 140 | 
 | 
|---|
| 141 |     void CloseWindow();
 | 
|---|
| 142 | 
 | 
|---|
| 143 |     TGLabel *GetLabel1() const { return fLabel1; }
 | 
|---|
| 144 |     TGLabel *GetLabel2() const { return fLabel2; }
 | 
|---|
| 145 |     //TGLabel *GetLabel3() const { return fLabel3; }
 | 
|---|
| 146 | 
 | 
|---|
| 147 |     TGTextView *GetLog() const { return fLog; }
 | 
|---|
| 148 |     MGImage    *GetImage()     { return fImage; }
 | 
|---|
| 149 | 
 | 
|---|
| 150 |     void Update(ZdAz pos, ZdAz acc, /*ZdAz vel, ZdAz off,*/ RaDec radec, ZdAz soll, UInt_t stat, UInt_t pdo3, UInt_t stat2, Bool_t armed, const TString &statzd, const TString &stataz);
 | 
|---|
| 151 |     void UpdateWeather(const MCeCoCom &com);
 | 
|---|
| 152 | 
 | 
|---|
| 153 |     Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t mp2);
 | 
|---|
| 154 | 
 | 
|---|
| 155 |     ClassDef(MGCosy, 0)
 | 
|---|
| 156 | };
 | 
|---|
| 157 | 
 | 
|---|
| 158 | #endif
 | 
|---|
| 159 | 
 | 
|---|
| 160 | 
 | 
|---|