FACT++  1.0
MStarguider.h
Go to the documentation of this file.
1 #ifndef COSY_MStarguider
2 #define COSY_MStarguider
3 
4 #include "PixClient.h"
5 #include "MGImage.h"
6 #include "Led.h"
7 #include "Camera.h"
8 
9 #include "dic.hxx"
10 #include "dis.hxx"
11 
12 #include <TGButton.h>
13 
14 class TGMenuBar;
15 class TGPopupMenu;
16 class TGTextEntry;
17 
18 class PixGetter;
19 
20 class MGImage;
21 class MCaos;
22 class FilterLed;
23 class Ring;
24 
25 //class Leds;
26 class MStarguider : public PixClient, public TGMainFrame, public DimCommandHandler
27 {
28 private:
32 
34 
35  TGMenuBar *fMenu;
37 
38  TGPopupMenu *fDisplay;
39  TGPopupMenu *fSetup;
40  TGPopupMenu *fInterpol;
41 
42  TGPopupMenu *fCaosWrite;
43  TGPopupMenu *fCaosPrint;
44  TGPopupMenu *fCaosAnalyse;
45  TGPopupMenu *fCaOs;
46 
47 private:
49  TTimer *fTimer;
50 
51  Int_t fDx;
52  Int_t fDy;
53 
55 // int fWrtRate;
56 
57  Double_t fLastBright;
58  Double_t fRadius; // LED radius [cm]
59 
60  Float_t fFindStarCut;
61  Int_t fFindStarBox;
62 
64 
66  std::string fScreenshotName;
67 
68  void WritePNG(const char *name, const byte *gbuf, const byte *cbuf);
69 
70  void Toggle(TGPopupMenu *p, UInt_t id);
71  void SwitchOff(TGPopupMenu *p, UInt_t id);
72  bool Interpolate(const unsigned long n, byte *img) const;
73 
74  void InitGui(Int_t channel);
75 
76  //void DrawZoomImage(const byte *img);
77  //void DrawCosyImage(const byte *img);
78 
79  Bool_t HandleTimer(TTimer *t);
80 
81  void SetCut(Double_t cut);
82 
83 public:
84  MStarguider(Int_t channel);
85  virtual ~MStarguider();
86 
87  //void SetupEnv(TEnv &env);
88 
89  void Layout();
90  void CloseWindow();
91 
92  Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
93 
94  //Bool_t HandleDoubleClick(Event_t *event);
95 
96  //
97  // Execution of one frame - this function may be overloaded!
98  //
99  void ProcessFrame(const unsigned long n, byte *img, struct timeval *tm);
100 
101  void commandHandler();
102 };
103 
104 #endif
105 
106 
byte fIntRate
Definition: MStarguider.h:54
void InitGui(Int_t channel)
Definition: MStarguider.cc:74
std::string fScreenshotName
Definition: MStarguider.h:66
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Definition: MStarguider.cc:526
void Toggle(TGPopupMenu *p, UInt_t id)
Definition: MStarguider.cc:517
Double_t fLastBright
Definition: MStarguider.h:57
TGPopupMenu * fCaOs
Definition: MStarguider.h:45
Int_t fFindStarBox
Definition: MStarguider.h:61
void CloseWindow()
Definition: MStarguider.cc:477
Float_t fFindStarCut
Definition: MStarguider.h:60
void Layout()
Definition: MStarguider.cc:472
MCaos * fCaos
Definition: MStarguider.h:48
TGPopupMenu * fSetup
Definition: MStarguider.h:39
Double_t fRadius
Definition: MStarguider.h:58
bool Interpolate(const unsigned long n, byte *img) const
TTimer * fTimer
Definition: MStarguider.h:49
TGPopupMenu * fCaosWrite
Definition: MStarguider.h:42
TGMenuBar * fMenu
Definition: MStarguider.h:35
Definition: Ring.h:10
bool fScreenshotColor
Definition: MStarguider.h:65
Camera * fGetter
Definition: MStarguider.h:33
TGPopupMenu * fCaosAnalyse
Definition: MStarguider.h:44
unsigned char byte
Definition: MGImage.h:17
MGImage * fImage
Definition: MStarguider.h:36
TGPopupMenu * fDisplay
Definition: MStarguider.h:38
int fTPointMode
Definition: MStarguider.h:63
TGPopupMenu * fInterpol
Definition: MStarguider.h:40
void SwitchOff(TGPopupMenu *p, UInt_t id)
Definition: MStarguider.cc:487
DimService fDimData
Definition: MStarguider.h:29
DimCommand fDimScreenshot
Definition: MStarguider.h:31
void ProcessFrame(const unsigned long n, byte *img, struct timeval *tm)
Definition: MCaos.h:8
Bool_t HandleTimer(TTimer *t)
Definition: MStarguider.cc:59
void commandHandler()
Overwritten DimCommand::commandHandler.
DimCommand fDimTPoint
Definition: MStarguider.h:30
void WritePNG(const char *name, const byte *gbuf, const byte *cbuf)
Definition: MStarguider.cc:976
TT t
Definition: test_client.c:26
void SetCut(Double_t cut)
Definition: Camera.h:15
MStarguider(Int_t channel)
Definition: MStarguider.cc:398
virtual ~MStarguider()
Definition: MStarguider.cc:426
TGPopupMenu * fCaosPrint
Definition: MStarguider.h:43