FACT++  1.0
TPointGui.h
Go to the documentation of this file.
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 
14 class TPointStar;
15 class TVirtualPad;
16 class TGLabel;
17 class TList;
18 
19 class TPointGui : public TGMainFrame
20 {
21 private:
22  enum {
23  kTbFit = 1024,
30 
37  };
38 
39  TList *fList;
40 
41  TList fOriginal;
42  TList fCoordinates;
43  TList fLabel;
44 
46 
47  TString fFileNameStars;
48 
49  FontStruct_t fFont;
50 
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 
91 public:
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
void DrawHorizon(TVirtualPad *pad, const char *fname="drive/horizon.dat") const
Definition: TPointGui.cc:550
void AddCheckButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0)
Definition: TPointGui.cc:349
void LoadStars(TString fname="tpoint.txt")
Definition: TPointGui.cc:656
int mode
void Fcn(Int_t &, Double_t *, Double_t &f, Double_t *par, Int_t)
Definition: TPointGui.cc:305
Bool_t fExitLoopOnClose
Definition: TPointGui.h:51
Float_t fAzMax
Definition: TPointGui.h:54
TList fLabel
Definition: TPointGui.h:43
TPointGui(const std::string fname, const std::string mod)
Definition: TPointGui.cc:35
TString OpenDialog(TString &dir, EFileDialogMode mode=kFDOpen)
Definition: TPointGui.cc:596
void DisplayResult(Double_t before, Double_t after, Double_t backw)
Definition: TPointGui.cc:400
TObject * FindWidget(Int_t id) const
Definition: TPointGui.cc:1343
TList fCoordinates
Definition: TPointGui.h:42
void LoadCollection(TString fname)
Definition: TPointGui.cc:624
void DrawPolLine(TVirtualPad *pad, Double_t r0, Double_t phi0, Double_t r1, Double_t phi1)
Definition: TPointGui.cc:436
TList * fList
Definition: TPointGui.h:39
Float_t fMagMax
Definition: TPointGui.h:57
void DrawMarker(TVirtualPad *pad, Double_t r0, Double_t phi0)
Definition: TPointGui.cc:412
FontStruct_t fFont
Definition: TPointGui.h:49
void Fit(Double_t &before, Double_t &after, Double_t &backw)
Definition: TPointGui.cc:799
Float_t fAzMin
Definition: TPointGui.h:53
Bool_t ProcessMessage(Long_t msg, Long_t mp1, Long_t)
Definition: TPointGui.cc:706
void DisplayBending()
Definition: TPointGui.cc:376
Float_t GetFloat(Int_t id) const
Definition: TPointGui.cc:701
TList fOriginal
Definition: TPointGui.h:41
float height
Definition: HeadersGPS.h:26
TString fFileNameStars
Definition: TPointGui.h:47
void AddTextButton(TGCompositeFrame *f, TString txt, Int_t id=-1, TGLayoutHints *h=0)
Definition: TPointGui.cc:340
void AddResetButton(TGCompositeFrame *f, Int_t id, TGLayoutHints *h, Int_t height)
Definition: TPointGui.cc:357
static void fcn(Int_t &npar, Double_t *gin, Double_t &f, Double_t *par, Int_t iflag)
Definition: TPointGui.cc:335
void DrawSet(TVirtualPad *pad, TPointStar &set, Float_t scale=-1, Float_t angle=0)
Definition: TPointGui.cc:507
MPointing fBending
Definition: TPointGui.h:45
Float_t fLimit
Definition: TPointGui.h:59
Float_t fZdMax
Definition: TPointGui.h:56
void DisplayData()
Definition: TPointGui.cc:394
TGLabel * AddLabel(TGCompositeFrame *f, TString txt, TGLayoutHints *h=0)
Definition: TPointGui.cc:367
Float_t fZdMin
Definition: TPointGui.h:55
void SetExitLoopOnClose(Bool_t b=kTRUE)
Definition: TPointGui.h:95