pxar
 All Classes Namespaces Functions Variables Typedefs Friends
PixGui.hh
1 #ifndef PIXGUI_H
2 #define PIXGUI_H
3 
4 #ifdef __CINT__
5 #undef __GNUC__
6 typedef char __signed;
7 typedef char int8_t;
8 #endif
9 
10 #include <vector>
11 #include <map>
12 #include <iostream>
13 #include <string>
14 
15 #include <TGFrame.h>
16 #include <TGTab.h>
17 #include <TGButton.h>
18 #include <TGLabel.h>
19 #include <TGSlider.h>
20 #include <TGSplitter.h>
21 #include <TGTextView.h>
22 #include <TGTextEntry.h>
23 #include <TGTextEdit.h>
24 #include <TGTextBuffer.h>
25 #include <TApplication.h>
26 #include <TCanvas.h>
27 #include <TSystem.h>
28 #include <TRandom.h>
29 #include <TH1.h>
30 #include <TRootEmbeddedCanvas.h>
31 #include <TVirtualStreamerInfo.h> // w/o this dict compilation problems
32 
33 #include "api.h"
34 
35 class ConfigParameters;
36 class PixParTab;
37 class PixTab;
38 class PixMonitorFrame;
39 class PixSetup;
40 class PixTest;
41 class PixTestParameters;
42 
43 class DLLEXPORT PixGui: public TGMainFrame {
44 public:
45  PixGui(const TGWindow *p, UInt_t w, UInt_t h, PixSetup *setup);
46  ~PixGui();
47 
48  void Cleanup();
49  void CloseWindow();
50 
51  void handleButtons(Int_t id = -1);
52  void createTab(const char*);
53  // void createParTab();
54  void selectedTab(int);
55  void selectProbes(int);
56  void changeRootFile();
57  bool isHvOn() {return fHV;}
58  void hvOn();
59  void hvOff();
60  void powerOn();
61  void powerOff();
62  bool isPowerOff() {return !fPower;}
63 
64  PixTest* createTest(std::string);
65 
66  TGCompositeFrame *fhFrame;
67  TGTab *getTabs() {return fTabs;}
68  PixTab *getPixTab() {return fPixTab;}
69 
70  int getWidth() {return fWidth;}
71  int getHeight() {return fHeight;}
72  pxar::pxarCore* getApi() {return fApi;}
73  PixSetup* getPixSetup() {return fPixSetup;}
74 
75  void updateSelectedRocs(std::map<int, int> a);
76 
77  ULong_t fRed, fGreen, fYellow, fWhite, fDarkSeaGreen, fDarkOrange, fLavender, fDarkGray, fDarkSalmon;
78 
79  std::string getHdiType();
80 
81 private:
82 
83  static const int TESTNUMBER = 300;
84  enum CommandIdentifiers {
85  B_FILENAME = TESTNUMBER + 21,
86  B_DIRECTORY,
87  B_EXIT,
88  B_WRITEALLFILES,
89  B_POWER,
90  B_HV
91  };
92 
93  TTimer *fTimer;
94  TGTab *fTabs;
95  // TGCompositeFrame *fParTab;
96  TGTextBuffer *fRootFileNameBuffer, *fDirNameBuffer;
97  TGTextButton *fbtnPower, *fbtnHV;
98  TGSlider *fpowerSlider;
99  TGSlider *fhvSlider;
100  TGLabel *flblPower;
101  TGLabel *flblHV;
102  TGHorizontalFrame *fH1;
103  TGHorizontalFrame *fH2;
104  std::vector<PixTest *> fTestList;
105  bool fDebug;
106  bool fPower, fHV;
107 
108  PixSetup *fPixSetup;
109  pxar::pxarCore *fApi;
110  ConfigParameters *fConfigParameters;
111  PixTestParameters *fTestParameters;
112  PixMonitorFrame *fMonitor;
113  PixParTab *fParTab;
114 
115  std::vector<PixTab*> fPixTabList;
116  PixTab *fPixTab;
117 
118  int fWidth, fHeight;
119  std::string fOldDirectory;
120 
121  int fBorderN, fBorderT, fBorderL; // normal, tiny, large
122 
123  ClassDef(PixGui, 1); //
124 
125 };
126 
127 #endif
Definition: PixTab.hh:22
Definition: PixGui.hh:43