Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LXe.cc File Reference

Main program of the optical/LXe example. More...

#include "G4RunManager.hh"
#include "G4UImanager.hh"
#include "G4String.hh"
#include "LXePhysicsList.hh"
#include "LXeDetectorConstruction.hh"
#include "LXeActionInitialization.hh"
#include "LXeRecorderBase.hh"
Include dependency graph for LXe.cc:

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Detailed Description

Main program of the optical/LXe example.

Definition in file LXe.cc.

Function Documentation

int main ( int  argc,
char **  argv 
)

Definition at line 59 of file LXe.cc.

60 {
61 #ifdef G4MULTITHREADED
62  G4MTRunManager * runManager = new G4MTRunManager;
63 #else
64  G4RunManager * runManager = new G4RunManager;
65 #endif
66 
68  runManager->SetUserInitialization(new LXePhysicsList());
69 
70  LXeRecorderBase* recorder = NULL; //No recording is done in this example
71 
72  runManager->SetUserInitialization(new LXeActionInitialization(recorder));
73 
74 #ifdef G4VIS_USE
75  G4VisManager* visManager = new G4VisExecutive;
76  // G4VisExecutive can take a verbosity argument - see /vis/verbose guidance.
77  // G4VisManager* visManager = new G4VisExecutive("Quiet");
78  visManager->Initialize();
79 #endif
80 
81  // runManager->Initialize();
82 
83  // get the pointer to the UI manager and set verbosities
85 
86  if(argc==1){
87 #ifdef G4UI_USE
88  G4UIExecutive* ui = new G4UIExecutive(argc, argv);
89 #ifdef G4VIS_USE
90  UImanager->ApplyCommand("/control/execute vis.mac");
91 #endif
92  if (ui->IsGUI())
93  UImanager->ApplyCommand("/control/execute gui.mac");
94  ui->SessionStart();
95  delete ui;
96 #endif
97  }
98  else{
99  G4String command = "/control/execute ";
100  G4String filename = argv[1];
101  UImanager->ApplyCommand(command+filename);
102  }
103 
104 // if(recorder)delete recorder;
105 
106 #ifdef G4VIS_USE
107  delete visManager;
108 #endif
109 
110  // job termination
111  delete runManager;
112  return 0;
113 }
virtual void SetUserInitialization(G4VUserDetectorConstruction *userInit)
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:59
void Initialize()
G4bool IsGUI() const
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:447

Here is the call graph for this function: