1 | #include <TROOT.h>
|
---|
2 | #include <TSystem.h>
|
---|
3 | #include <TGClient.h>
|
---|
4 | #include <TGButton.h>
|
---|
5 | #include <TGMenu.h>
|
---|
6 | #include <TGTab.h>
|
---|
7 | #include <TGListBox.h>
|
---|
8 | #include <TGLabel.h>
|
---|
9 | #include <TGPicture.h>
|
---|
10 | #include <TGFSContainer.h>
|
---|
11 | #include <TRootEmbeddedCanvas.h>
|
---|
12 | #include <TNtuple.h>
|
---|
13 | #include <TFile.h>
|
---|
14 | #include <TCanvas.h>
|
---|
15 |
|
---|
16 | #include "COREventHeader.hxx"
|
---|
17 |
|
---|
18 |
|
---|
19 | enum CommandIdentifiers {
|
---|
20 | M_FILE_EXIT ,
|
---|
21 |
|
---|
22 | M_CDIR_UP,
|
---|
23 | M_LIST_MODE ,
|
---|
24 | M_DETAIL_MODE,
|
---|
25 | M_BUTTON_SELECT,
|
---|
26 |
|
---|
27 | M_BUTTON_PRINT,
|
---|
28 | M_BUTTON_PARTID,
|
---|
29 | M_BUTTON_ENERGY,
|
---|
30 | M_BUTTON_CORE,
|
---|
31 | M_BUTTON_THETA,
|
---|
32 | M_BUTTON_PHI,
|
---|
33 | M_BUTTON_FIRSTINT,
|
---|
34 |
|
---|
35 | M_BUTTON_PREV,
|
---|
36 | M_BUTTON_NEXT,
|
---|
37 |
|
---|
38 | M_BUTTON_WAVELEN,
|
---|
39 | M_BUTTON_POSIT,
|
---|
40 | M_BUTTON_HEIGHT,
|
---|
41 | M_BUTTON_TIME,
|
---|
42 | M_BUTTON_DIRE,
|
---|
43 |
|
---|
44 | M_CTRL_EXIT,
|
---|
45 | M_CTRL_PWD,
|
---|
46 | M_CTRL_PATH
|
---|
47 | };
|
---|
48 |
|
---|
49 |
|
---|
50 | class MainFrameSimone : public TGMainFrame {
|
---|
51 |
|
---|
52 | private:
|
---|
53 | Char_t fInputPath[200] ;
|
---|
54 | Int_t fNumEvents ;
|
---|
55 | Char_t fNtupPath[200] ;
|
---|
56 |
|
---|
57 | Int_t fEvtNb ;
|
---|
58 |
|
---|
59 | TNtuple *fNtup ;
|
---|
60 | TNtuple *fNtupEvt ;
|
---|
61 |
|
---|
62 | TGMenuBar *fMenuBar ;
|
---|
63 | TGPopupMenu *fFileMenu ;
|
---|
64 | TGCompositeFrame *fFrame ;
|
---|
65 | TGTab *fTab ;
|
---|
66 | TGCompositeFrame *fTabF1, *fTabF2, *fTabF3, *fTabF4 ;
|
---|
67 |
|
---|
68 | TGCompositeFrame *fTabF1a, *fTabF1b ;
|
---|
69 | TGTextButton *fSelectButton ;
|
---|
70 | TGListBox *fDir ;
|
---|
71 | TGPictureButton *fCdup, *fListMode, *fDetail ;
|
---|
72 | TGFileContainer *fFileCont ;
|
---|
73 | TGListView *fFileView ;
|
---|
74 |
|
---|
75 | TGCompositeFrame *fTabF2a, *fTabF2b, *fTabF2c ;
|
---|
76 | TGLabel *fLabelInput, *fLabelNumEvts ;
|
---|
77 | TGListBox *fDir2, *fDirNum ;
|
---|
78 | TGTextButton *fButtonPrint ;
|
---|
79 | TRootEmbeddedCanvas *fCanvasRun ;
|
---|
80 | TGTextButton *fButtonPartID, *fButtonEnergy, *fButtonCore ;
|
---|
81 | TGTextButton *fButtonTheta, *fButtonPhi, *fButtonFirst ;
|
---|
82 |
|
---|
83 | TGCompositeFrame *fTabF3a, *fTabF3b, *fTabF3c ;
|
---|
84 | TGLabel *fLabel3, *fLabel4 ;
|
---|
85 | TGListBox *fDir3, *fDirEvtNb ;
|
---|
86 | TRootEmbeddedCanvas *fCanvasEvt ;
|
---|
87 | TGTextButton *fButtonPrev, *fButtonNext ;
|
---|
88 | TGTextButton *fButtonWave, *fButtonPosit ;
|
---|
89 | TGTextButton *fButtonHeight, *fButtonTime, *fButtonDire ;
|
---|
90 |
|
---|
91 |
|
---|
92 | TGTextButton *fButton1 ;
|
---|
93 | TGTextButton *fButton2 ;
|
---|
94 | TGTextButton *fButton3 ;
|
---|
95 | TGLayoutHints *fLayout, *fLayMenuBar, *fLayMenuItem ;
|
---|
96 | TGLayoutHints *fLayTab;
|
---|
97 |
|
---|
98 | const TGPicture *fPicCdup, *fPicList, *fPicDetail ;
|
---|
99 |
|
---|
100 | public:
|
---|
101 | MainFrameSimone(const TGWindow *p, UInt_t w, UInt_t h);
|
---|
102 | ~MainFrameSimone();
|
---|
103 |
|
---|
104 | void CloseWindow() ;
|
---|
105 |
|
---|
106 |
|
---|
107 | Bool_t CerFileExist(Char_t *dir) ;
|
---|
108 | Bool_t DrawRunParam(Char_t *paraName) ;
|
---|
109 | Bool_t CheckNtup() ;
|
---|
110 | Bool_t ReadDataToNtup() ;
|
---|
111 | Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
|
---|
112 |
|
---|
113 | };
|
---|
114 |
|
---|
115 |
|
---|
116 |
|
---|
117 |
|
---|
118 |
|
---|
119 |
|
---|
120 |
|
---|
121 |
|
---|
122 |
|
---|
123 |
|
---|
124 |
|
---|
125 |
|
---|
126 |
|
---|
127 |
|
---|
128 |
|
---|
129 |
|
---|