Main program of the field/field05 example.
More...
#include <unistd.h>
#include "F05SteppingVerbose.hh"
#include "G4RunManager.hh"
#include "F05PhysicsList.hh"
#include "F05DetectorConstruction.hh"
#include "F05ActionInitialization.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
Go to the source code of this file.
|
int | main (int argc, char **argv) |
|
Main program of the field/field05 example.
Definition in file field05.cc.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 67 of file field05.cc.
71 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
74 if (argc > 2) myseed = atoi(argv[argc-1]);
78 #ifdef G4MULTITHREADED 79 G4MTRunManager * runManager =
new G4MTRunManager;
81 G4VSteppingVerbose::SetInstance(
new F05SteppingVerbose);
82 G4RunManager * runManager =
new G4RunManager;
85 G4Random::setTheSeed(myseed);
90 runManager->SetUserInitialization(
new F05DetectorConstruction());
92 runManager->SetUserInitialization(
new F05PhysicsList());
94 runManager->SetUserInitialization(
new F05ActionInitialization());
98 runManager->Initialize();
103 G4VisManager* visManager =
new G4VisExecutive;
106 visManager->Initialize();
111 G4UImanager* UImanager = G4UImanager::GetUIpointer();
115 G4String command =
"/control/execute ";
117 UImanager->ApplyCommand(command+fileName);
122 G4UIExecutive* ui =
new G4UIExecutive(argc, argv);
124 UImanager->ApplyCommand(
"/control/execute vis.mac");
126 UImanager->ApplyCommand(
"/control/execute field05.in");
129 UImanager->ApplyCommand(
"/control/execute gui.mac");