source: trunk/Cosy/gui/MGCosy.h@ 20049

Last change on this file since 20049 was 12589, checked in by tbretz, 13 years ago
Added possibility to track celestial objects; adapted status bit pattern for pdo3 for FACT
File size: 3.4 KB
Line 
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
16class TIterator;
17
18class TGTab;
19class TGLabel;
20class TGTextView;
21class TGPopupMenu;
22class TGLayoutHints;
23class TGCompositeFrame;
24class TGHorizontal3DLine;
25
26class ZdAz;
27class RaDec;
28class MsgQueue;
29class MCeCoCom;
30
31class MGList;
32class MGImage;
33class MGAccuracy;
34class MGAccuracyTime;
35class MGVelocity;
36class MGCoordinates;
37class MGSkyPosition;
38
39class MGCosy : public TGMainFrame
40{
41private:
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
137public:
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
Note: See TracBrowser for help on using the repository browser.