source: trunk/MagicSoft/Simulation/Corsika/GuiSimone/MainFrameSimone.hxx@ 526

Last change on this file since 526 was 429, checked in by harald, 24 years ago
The former version was not running on alpha. On the event distribution tab the presentation of the values for the event was creating a crash. This crash was not really understood, but neverthe less some changes on that tab were mad and now it is running on alpha osf without a crash. hopefully.....
File size: 3.4 KB
Line 
1#include <TROOT.h>
2#include <TSystem.h>
3#include <TGClient.h>
4#include <TGButton.h>
5//#include <TGRadioButton.h>
6#include <TGMenu.h>
7#include <TGTab.h>
8#include <TGListBox.h>
9#include <TGTextEntry.h>
10#include <TGLabel.h>
11#include <TGPicture.h>
12#include <TGFSContainer.h>
13#include <TRootEmbeddedCanvas.h>
14#include <TNtuple.h>
15#include <TFile.h>
16#include <TCanvas.h>
17
18#include "COREventHeader.hxx"
19#include "CORParticle.hxx"
20
21
22enum CommandIdentifiers {
23 M_FILE_EXIT ,
24
25 M_CDIR_UP,
26 M_LIST_MODE ,
27 M_DETAIL_MODE,
28 M_BUTTON_SELECT,
29
30 M_BUTTON_PRINT,
31 M_BUTTON_PARTID,
32 M_BUTTON_ENERGY,
33 M_BUTTON_CORE,
34 M_BUTTON_THETA,
35 M_BUTTON_PHI,
36 M_BUTTON_FIRSTINT,
37
38 M_BUTTON_PREV,
39 M_BUTTON_NEXT,
40
41 M_BUTTON_WAVELEN,
42 M_BUTTON_POSIT,
43 M_BUTTON_HEIGHT,
44 M_BUTTON_TIME,
45 M_BUTTON_DIRE,
46
47 M_CTRL_EXIT,
48 M_CTRL_PWD,
49 M_CTRL_PATH
50};
51
52
53class MainFrameSimone : public TGMainFrame {
54
55private:
56 Char_t fInputPath[200] ;
57 Int_t fNumEvents ;
58 Char_t fNtupPath[200] ;
59
60 Int_t fEvtNb ;
61
62 TNtuple *fNtup ;
63 TNtuple *fNtupEvt ;
64
65 TGMenuBar *fMenuBar ;
66 TGPopupMenu *fFileMenu ;
67 TGCompositeFrame *fFrame ;
68 TGTab *fTab ;
69 TGCompositeFrame *fTabF1, *fTabF2, *fTabF3, *fTabF4 ;
70
71 // Tab 1
72 TGCompositeFrame *fTabF1a, *fTabF1b ;
73 TGTextButton *fSelectButton ;
74 TGListBox *fDir ;
75 TGPictureButton *fCdup, *fListMode, *fDetail ;
76 TGFileContainer *fFileCont ;
77 TGListView *fFileView ;
78
79 // Tab2
80 TGCompositeFrame *fTabF2a, *fTabF2b, *fTabF2c ;
81 TGLabel *fLabelInput, *fLabelNumEvts ;
82 TGListBox *fDir2, *fDirNum ;
83 TGTextButton *fButtonPrint ;
84 TRootEmbeddedCanvas *fCanvasRun ;
85 TGTextButton *fButtonPartID, *fButtonEnergy, *fButtonCore ;
86 TGTextButton *fButtonTheta, *fButtonPhi, *fButtonFirst ;
87
88 // Tab3
89 TGCompositeFrame *fTabF3a, *fTabF3b, *fTabF3c ;
90 TGCompositeFrame *fTabF3bI, *fTabF3bII, *fTabF3bIII ;
91 TGLabel *fLabel3, *fLabel4 ;
92 TGListBox *fDir3, *fDirEvtNb ;
93 TGLabel *fLabelId, *fLabelEner ;
94 TGLabel *fLabelNbPhot ;
95 TGLabel *fLabelCoreX, *fLabelCoreY ;
96 TGLabel *fLabelTheta, *fLabelPhi, *fLabelDireX, *fLabelDireY ;
97 TGTextEntry *fInfoId, *fInfoEner, *fInfoNbPhot;
98 TGTextEntry *fInfoCoreX, *fInfoCoreY ;
99 TGTextEntry *fInfoTheta, *fInfoPhi, *fInfoDireX, *fInfoDireY ;
100 TGTextBuffer *fTextId, *fTextEner, *fTextNbPhot;
101 TGTextBuffer *fTextCoreX, *fTextCoreY ;
102 TGTextBuffer *fTextTheta, *fTextPhi, *fTextDireX, *fTextDireY ;
103
104 TRootEmbeddedCanvas *fCanvasEvt ;
105 TGTextButton *fButtonPrev, *fButtonNext ;
106 TGRadioButton *fRadioEvt[5] ;
107
108 // Tab4
109 TGTextButton *fButton1 ;
110 TGTextButton *fButton2 ;
111 TGTextButton *fButton3 ;
112 TGLayoutHints *fLayout, *fLayMenuBar, *fLayMenuItem ;
113 TGLayoutHints *fLayTab;
114
115 const TGPicture *fPicCdup, *fPicList, *fPicDetail ;
116
117public:
118 MainFrameSimone(const TGWindow *p, UInt_t w, UInt_t h);
119 ~MainFrameSimone();
120
121 void CloseWindow() ;
122
123 Bool_t CerFileExist(Char_t *dir) ;
124 Bool_t DrawRunParam(Char_t *paraName) ;
125 Bool_t DrawEvtParam() ;
126
127 Bool_t CheckNtup() ;
128
129 Bool_t ReadDataToNtup() ;
130 Bool_t ReadinEvt() ;
131
132 Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
133
134};
135
136
137
138
139
140
141
Note: See TracBrowser for help on using the repository browser.