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

Last change on this file since 8405 was 778, checked in by domingo, 24 years ago
Version of GuiSimone for a "single file per run" output of Mmcs. The "previous" event command is not operational at present. May need some further thinking...
File size: 3.5 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 Char_t fNtupFile[256] ;
60 Char_t fCerFileName[256] ;
61 Char_t fRunSuffix[10] ;
62
63 ifstream fCerFile ;
64 Int_t fEvtNb ;
65
66 TNtuple *fNtup ;
67 TNtuple *fNtupEvt ;
68
69 TGMenuBar *fMenuBar ;
70 TGPopupMenu *fFileMenu ;
71 TGCompositeFrame *fFrame ;
72 TGTab *fTab ;
73 TGCompositeFrame *fTabF1, *fTabF2, *fTabF3, *fTabF4 ;
74
75 // Tab 1
76 TGCompositeFrame *fTabF1a, *fTabF1b ;
77 TGTextButton *fSelectButton ;
78 TGListBox *fDir ;
79 TGPictureButton *fCdup, *fListMode, *fDetail ;
80 TGFileContainer *fFileCont ;
81 TGListView *fFileView ;
82
83 // Tab2
84 TGCompositeFrame *fTabF2a, *fTabF2b, *fTabF2c ;
85 TGLabel *fLabelInput, *fLabelNumEvts ;
86 TGListBox *fDir2, *fDirNum ;
87 TGTextButton *fButtonPrint ;
88 TRootEmbeddedCanvas *fCanvasRun ;
89 TGTextButton *fButtonPartID, *fButtonEnergy, *fButtonCore ;
90 TGTextButton *fButtonTheta, *fButtonPhi, *fButtonFirst ;
91
92 // Tab3
93 TGCompositeFrame *fTabF3a, *fTabF3b, *fTabF3c ;
94 TGCompositeFrame *fTabF3bI, *fTabF3bII, *fTabF3bIII ;
95 TGLabel *fLabel3, *fLabel4 ;
96 TGListBox *fDir3, *fDirEvtNb ;
97 TGLabel *fLabelId, *fLabelEner ;
98 TGLabel *fLabelNbPhot ;
99 TGLabel *fLabelCoreX, *fLabelCoreY ;
100 TGLabel *fLabelTheta, *fLabelPhi, *fLabelDireX, *fLabelDireY ;
101 TGTextEntry *fInfoId, *fInfoEner, *fInfoNbPhot;
102 TGTextEntry *fInfoCoreX, *fInfoCoreY ;
103 TGTextEntry *fInfoTheta, *fInfoPhi, *fInfoDireX, *fInfoDireY ;
104 TGTextBuffer *fTextId, *fTextEner, *fTextNbPhot;
105 TGTextBuffer *fTextCoreX, *fTextCoreY ;
106 TGTextBuffer *fTextTheta, *fTextPhi, *fTextDireX, *fTextDireY ;
107
108 TRootEmbeddedCanvas *fCanvasEvt ;
109 TGTextButton *fButtonPrev, *fButtonNext ;
110 TGRadioButton *fRadioEvt[5] ;
111
112 // Tab4
113 TGTextButton *fButton1 ;
114 TGTextButton *fButton2 ;
115 TGTextButton *fButton3 ;
116 TGLayoutHints *fLayout, *fLayMenuBar, *fLayMenuItem ;
117 TGLayoutHints *fLayTab;
118
119 const TGPicture *fPicCdup, *fPicList, *fPicDetail ;
120
121public:
122 MainFrameSimone(const TGWindow *p, UInt_t w, UInt_t h);
123 ~MainFrameSimone();
124
125 void CloseWindow() ;
126
127 Bool_t CerFileExist(Char_t *dir) ;
128 Bool_t DrawRunParam(Char_t *paraName) ;
129 Bool_t DrawEvtParam() ;
130
131 Bool_t CheckNtup() ;
132
133 Bool_t ReadDataToNtup() ;
134 Bool_t ReadinEvt() ;
135
136 Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
137
138};
139
140
141
142
143
144
145
Note: See TracBrowser for help on using the repository browser.