21#include <TGComboBox.h>
25#include <TGNumberEntry.h>
26#include <TGTextEntry.h>
31#include <TGFileDialog.h>
32#include <TGTextEdit.h>
33#include <TGStatusBar.h>
34#include <TGProgressBar.h>
35#include <TGColorSelect.h>
37#include <TGraphAsymmErrors.h>
38#include <TRootEmbeddedCanvas.h>
39#include <TLorentzVector.h>
54using std::ostringstream;
55using std::setprecision;
69 this->BuildGUI(p,w,
h);
110 fMain =
new TGMainFrame(p,w,
h);
113 "CloseWindow()",
"genie::GNuMcMainFrame",
this,
"Close()");
128 fMain->SetWindowName(
"GENIE Event Viewer");
129 fMain->MapSubwindows();
155 TGGroupFrame * bf =
new TGGroupFrame(
156 fUpperFrame,
"Viewer Control Buttons", kHorizontalFrame);
159 new TGPictureButton(bf, gClient->GetPicture(
Icon(
"open"),32,32));
161 new TGPictureButton(bf, gClient->GetPicture(
Icon(
"next"),32,32));
163 new TGPictureButton(bf, gClient->GetPicture(
Icon(
"exit"), 32,32),
164 "gApplication->Terminate(0)");
171 "Clicked()",
"genie::masterclass::GNuMcMainFrame",
this,
"FileOpen()");
173 "Clicked()",
"genie::masterclass::GNuMcMainFrame",
this,
"NextEvent()");
193 ULong_t hintViewerTabsLayout =
194 kLHintsTop | kLHintsExpandX | kLHintsExpandY;
196 =
new TGLayoutHints(hintViewerTabsLayout, 5, 5, 10, 1);
205 TGCompositeFrame * tf = 0;
214 fFeynmanTab =
new TGCompositeFrame(tf, w,
h, kVerticalFrame);
220 ULong_t hintFeynmanTabLayout =
221 kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY;
223 new TGLayoutHints(hintFeynmanTabLayout, 5, 5, 10, 1);
232 fGHepTab =
new TGCompositeFrame(tf, w,
h, kVerticalFrame);
234 fGHep =
new TGTextEdit(
fGHepTab, w,
h, kSunkenFrame | kDoubleBorder);
235 fGHep->AddLine(
"GHEP:" );
237 ULong_t hintGHepTabLayout =
238 kLHintsTop | kLHintsLeft | kLHintsExpandX | kLHintsExpandY;
240 =
new TGLayoutHints(hintGHepTabLayout, 5, 5, 10, 1);
251 TGCompositeFrame * tf = 0;
262 TGCompositeFrame * tf = 0;
270 Int_t parts[] = { 60, 20, 20 };
274 ULong_t hintStatusBarLayout =
275 kLHintsBottom | kLHintsLeft | kLHintsExpandX;
277 =
new TGLayoutHints(hintStatusBarLayout, 0, 0, 2, 0);
285 pic << gSystem->Getenv(
"GENIE") <<
"/data/icons/" << name <<
".xpm";
287 LOG(
"MasterClass",
pINFO) <<
"Loading icon: " << pic.str();
289 return pic.str().c_str();
299 fStatusBar->SetText(
"Asking for event file name...", 0);
301 static TString
dir(
".");
302 const char * kFileExt[] = {
"GHEP/ROOT event files",
"*.root", 0, 0};
305 fi.fFileTypes = kFileExt;
306 fi.fIniDir = StrDup(
dir.Data());
308 new TGFileDialog(gClient->GetRoot(),
fMain, kFDOpen, &fi);
315 fStatusBar -> SetText( cmd.str().c_str(), 0 );
328 dynamic_cast <TTree *
> (
fEventFile->Get(
"gtree"));
344 <<
"Input tree header: " << *thdr;
ClassImp(GNuMcMainFrame) GNuMcMainFrame
#define LOG(stream, priority)
A macro that returns the requested log4cpp::Category appending a string (using the FILE,...
Generated Event Record. It is a GHepRecord object that can accept / be visited by EventRecordVisitorI...
Is a concrete implementation of the QELFormFactorsModelI: Form Factors for Quasi Elastic CC vN Delta ...
TGPictureButton * fNextEventButton
void BuildMainFrames(void)
NtpMCEventRecord * fMCRecord
TGCompositeFrame * fLowerFrame
MCTruthDisplay * fTruthDisplay
TGCompositeFrame * fFeynmanTab
void BuildMCTruthTab(void)
const char * Icon(const char *name)
TGPictureButton * fFileOpenButton
TGMatrixLayout * fButtonMatrixLayout
void BuildStatusBar(void)
TGLayoutHints * fFeynmanTabLayout
TGLayoutHints * fStatusBarLayout
unsigned int fViewTabWidth
GNuMcMainFrame(const TGWindow *p, UInt_t w, UInt_t h)
TGCompositeFrame * fUpperFrame
unsigned int fViewTabHeight
TGCompositeFrame * fMainFrame
TGLayoutHints * fViewerTabsLayout
void ShowEvent(EventRecord *ev_rec)
TGLayoutHints * fGHepTabLayout
TGGroupFrame * fImgButtonGroupFrame
TRootEmbeddedCanvas * fEmbeddedCanvas
TGGroupFrame * BuildImageButtonFrame(void)
void BuildFastSimCherenkovTab(void)
void BuildFastSimScintCaloTab(void)
virtual ~GNuMcMainFrame()
TGPictureButton * fExitButton
TGCompositeFrame * fGHepTab
void BuildGUI(const TGWindow *p, UInt_t w, UInt_t h)
THE MAIN GENIE PROJECT NAMESPACE