source: trunk/FACT++/drive/TPointGui.h@ 19713

Last change on this file since 19713 was 18625, checked in by tbretz, 8 years ago
Removed reference to root dictionary, some minor update to disentengle from root and Mars as much as possible, changed path to horizon.dat
File size: 2.4 KB
Line 
1#ifndef COSY_TPointGui
2#define COSY_TPointGui
3
4#ifndef ROOT_TGFrame
5#include <TGFrame.h>
6#endif
7
8#ifndef ROOT_TGFileDialog
9#include <TGFileDialog.h>
10#endif
11
12#include "MPointing.h"
13
14class TPointStar;
15class TVirtualPad;
16class TGLabel;
17class TList;
18
19class TPointGui : public TGMainFrame
20{
21private:
22 enum {
23 kTbFit = 1024,
24 kTbLoad,
25 kTbSave,
26 kTbLoadStars,
27 kTbReset,
28 kTbResetStars,
29 kTbReloadStars,
30
31 kIdAzMin,
32 kIdAzMax,
33 kIdZdMin,
34 kIdZdMax,
35 kIdMagMax,
36 kIdLimit,
37 };
38
39 TList *fList;
40
41 TList fOriginal;
42 TList fCoordinates;
43 TList fLabel;
44
45 MPointing fBending;
46
47 TString fFileNameStars;
48
49 FontStruct_t fFont;
50
51 Bool_t fExitLoopOnClose;
52
53 Float_t fAzMin;
54 Float_t fAzMax;
55 Float_t fZdMin;
56 Float_t fZdMax;
57 Float_t fMagMax;
58
59 Float_t fLimit;
60
61 void Fcn(Int_t &/*npar*/, Double_t */*gin*/, Double_t &f, Double_t *par, Int_t /*iflag*/);
62 static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag);
63
64 TObject *FindWidget(Int_t id) const;
65
66 void AddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0);
67 void AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0);
68 void AddResetButton(TGCompositeFrame *f, Int_t id, TGLayoutHints *h, Int_t height);
69 TGLabel *AddLabel(TGCompositeFrame *f, TString txt, TGLayoutHints *h=0);
70
71 void DisplayBending();
72 void DisplayData();
73 void DisplayResult(Double_t before, Double_t after, Double_t backw);
74
75 void DrawMarker(TVirtualPad *pad, Double_t r0, Double_t phi0);
76 void DrawPolLine(TVirtualPad *pad, Double_t r0, Double_t phi0, Double_t r1, Double_t phi1);
77 void DrawSet(TVirtualPad *pad, TPointStar &set, Float_t scale=-1, Float_t angle=0);
78 void DrawHorizon(TVirtualPad *pad, const char *fname="drive/horizon.dat") const;
79
80 TString OpenDialog(TString &dir, EFileDialogMode mode=kFDOpen);
81
82 void LoadCollection(TString fname);
83 void LoadStars(TString fname="tpoint.txt");
84
85 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t);
86
87 void Fit(Double_t &before, Double_t &after, Double_t &backw);
88
89 Float_t GetFloat(Int_t id) const;
90
91public:
92 TPointGui(const std::string fname, const std::string mod);
93 ~TPointGui();
94
95 void SetExitLoopOnClose(Bool_t b=kTRUE) { fExitLoopOnClose=b; }
96};
97
98#endif
Note: See TracBrowser for help on using the repository browser.