GNuMcMainFrame.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::GNuMcMainFrame
5 
6 \brief GENIE Neutrino Masterclass app main frame
7 
8 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11 \created October 07, 2004
12 
13 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15 */
16 //____________________________________________________________________________
17 
18 #ifndef _G_NUMC_MAIN_FRAME_H_
19 #define _G_NUMC_MAIN_FRAME_H_
20 
21 #include <string>
22 
23 #include <TApplication.h>
24 #include <TGFrame.h>
25 #include <TGButton.h>
26 #include <RQ_OBJECT.h>
27 /*
28 class TApplication;
29 class TVirtualX;
30 class TSystem;
31 class TGListBox;
32 class TGComboBox;
33 class TGClient;
34 class TGIcon;
35 class TGLabel;
36 class TGNumberEntry;
37 class TGTextEntry;
38 class TGMsgBox;
39 class TGMenu;
40 class TGCanvas;
41 class TGTab;
42 class TGFileDialog;
43 class TGTextEdit;
44 class TGStatusBar;
45 class TGProgressBar;
46 class TGColorSelect;
47 class TCanvas;
48 class TGraphAsymmErrors;
49 class TRootEmbeddedCanvas;
50 class TFile;
51 class TTree;
52 */
53 
54 //class TApplication;
55 #include <TVirtualX.h>
56 #include <TSystem.h>
57 #include <TGListBox.h>
58 #include <TGComboBox.h>
59 #include <TGClient.h>
60 #include <TGIcon.h>
61 #include <TGLabel.h>
62 #include <TGNumberEntry.h>
63 #include <TGTextEntry.h>
64 #include <TGMsgBox.h>
65 #include <TGMenu.h>
66 #include <TGCanvas.h>
67 #include <TGTab.h>
68 #include <TGFileDialog.h>
69 #include <TGTextEdit.h>
70 #include <TGStatusBar.h>
71 #include <TGProgressBar.h>
72 #include <TGColorSelect.h>
73 #include <TCanvas.h>
74 #include <TGraphAsymmErrors.h>
75 #include <TRootEmbeddedCanvas.h>
76 #include <TFile.h>
77 #include <TTree.h>
78 
82 
83 using std::string;
84 
85 namespace genie {
86 namespace masterclass {
87 
88 class GNuMcMainFrame : public TGMainFrame {
89 
90 public:
91  GNuMcMainFrame(const TGWindow * p, UInt_t w, UInt_t h);
92  virtual ~GNuMcMainFrame();
93 
94  void Close (void) { gApplication->Terminate(0); }
95  void Exit (void) { Close(); }
96  void FileOpen (void);
97  void NextEvent (void);
98  void ShowEvent (EventRecord * ev_rec);
99 
100 private:
101 
102  void Init (void);
103  void BuildHelpers (void);
104  void BuildGUI (const TGWindow * p, UInt_t w, UInt_t h);
105  void BuildMainFrames (void);
106  void BuildTabs (void);
107  void BuildMCTruthTab (void);
108  void BuildFastSimScintCaloTab (void);
109  void BuildFastSimCherenkovTab (void);
110  void BuildStatusBar (void);
111  TGGroupFrame * BuildImageButtonFrame (void);
112  const char * Icon (const char * name);
113 
114  // GUI widgets & properties
115  TGMainFrame * fMain;
116  TGGroupFrame * fImgButtonGroupFrame;
117  TGCompositeFrame * fMainFrame;
118  TGCompositeFrame * fUpperFrame;
119  TGCompositeFrame * fLowerFrame;
120  TGTab * fViewerTabs;
121  TGCompositeFrame * fFeynmanTab;
122  TGCompositeFrame * fGHepTab;
123  TRootEmbeddedCanvas * fEmbeddedCanvas;
124  TGTextEdit * fGHep;
125  TGStatusBar * fStatusBar;
126  TGLayoutHints * fFeynmanTabLayout;
127  TGLayoutHints * fGHepTabLayout;
128  TGLayoutHints * fStatusBarLayout;
129  TGLayoutHints * fViewerTabsLayout;
130  TGMatrixLayout * fButtonMatrixLayout;
131  TGPictureButton * fFileOpenButton;
132  TGPictureButton * fNextEventButton;
133  TGPictureButton * fExitButton;
134  unsigned int fViewTabWidth;
135  unsigned int fViewTabHeight;
136 
137  // utility classes
139 
140  // input events
142  TFile* fEventFile;
143  TTree* fGHepTree;
145  Long64_t fNuOfEvents;
146  Long64_t fCurrEventNu;
147 
149 };
150 
151 } // masterclass namespace
152 } // genie namespace
153 
154 #endif // _G_NUMC_MAIN_FRAME_H_
static QCString name
Definition: declinfo.cpp:673
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
TRootEmbeddedCanvas * fEmbeddedCanvas
std::string string
Definition: nybbler.cc:12
MINOS-style ntuple record. Each such ntuple record holds a generated EventRecord object. Ntuples of this type are intended for feeding GENIE events into other applications (for example the GEANT4 based MC generation framework of an experiment) if no direct interface exists.
void BuildGUI(const TGWindow *p, UInt_t w, UInt_t h)
p
Definition: test.py:223
const char * Icon(const char *name)
void ShowEvent(EventRecord *ev_rec)
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Definition: EventRecord.h:37
TGGroupFrame * BuildImageButtonFrame(void)
GNuMcMainFrame(const TGWindow *p, UInt_t w, UInt_t h)