source: trunk/MagicSoft/Cosy/tpoint/TPointGui.h@ 9522

Last change on this file since 9522 was 9495, checked in by tbretz, 15 years ago
*** empty log message ***
File size: 2.3 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 MGList; // To be removed!!!
15class TPointStar;
16
17class TGLabel;
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 kIdMagMin,
36 kIdLimit,
37 };
38
39 MGList *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 fMagMin;
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 void AddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0);
65 void AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0);
66 void AddResetButton(TGCompositeFrame *f, Int_t id, TGLayoutHints *h, Int_t height);
67 TGLabel *AddLabel(TGCompositeFrame *f, TString txt, TGLayoutHints *h=0);
68
69 void DisplayBending();
70 void DisplayData();
71 void DisplayResult(Double_t before, Double_t after, Double_t backw);
72
73 void DrawMarker(TVirtualPad *pad, Double_t r0, Double_t phi0);
74 void DrawPolLine(TVirtualPad *pad, Double_t r0, Double_t phi0, Double_t r1, Double_t phi1);
75 void DrawSet(TVirtualPad *pad, TPointStar &set, Float_t scale=-1, Float_t angle=0);
76 void DrawHorizon(TVirtualPad *pad, const char *fname="horizon.dat") const;
77
78 TString OpenDialog(TString &dir, EFileDialogMode mode=kFDOpen);
79
80 void LoadCollection(TString fname);
81 void LoadStars(TString fname="tpoint.txt");
82
83 Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t);
84
85 void Fit(Double_t &before, Double_t &after, Double_t &backw);
86
87 Float_t GetFloat(Int_t id) const;
88
89public:
90 TPointGui(const char *fname=NULL, const char *mod=NULL);
91 ~TPointGui();
92
93 void SetExitLoopOnClose(Bool_t b=kTRUE) { fExitLoopOnClose=b; }
94
95 ClassDef(TPointGui, 0)
96};
97
98#endif
Note: See TracBrowser for help on using the repository browser.