Main program of the field/field05 example.
More...
#include <unistd.h>
#include "G4Types.hh"
#include "F05SteppingVerbose.hh"
#include "G4RunManager.hh"
#include "F05PhysicsList.hh"
#include "F05DetectorConstruction.hh"
#include "F05ActionInitialization.hh"
#include "G4UImanager.hh"
#include "Randomize.hh"
#include "G4VisExecutive.hh"
#include "G4UIExecutive.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 63 of file field05.cc.
66 G4UIExecutive* ui =
nullptr;
68 ui =
new G4UIExecutive(argc, argv);
73 G4Random::setTheEngine(
new CLHEP::RanecuEngine);
76 if (argc > 2) myseed = atoi(argv[argc-1]);
80 #ifdef G4MULTITHREADED 81 G4MTRunManager * runManager =
new G4MTRunManager;
83 G4VSteppingVerbose::SetInstance(
new F05SteppingVerbose);
84 G4RunManager * runManager =
new G4RunManager;
87 G4Random::setTheSeed(myseed);
92 runManager->SetUserInitialization(
new F05DetectorConstruction());
94 runManager->SetUserInitialization(
new F05PhysicsList());
96 runManager->SetUserInitialization(
new F05ActionInitialization());
100 G4VisManager* visManager =
new G4VisExecutive;
103 visManager->Initialize();
107 G4UImanager* UImanager = G4UImanager::GetUIpointer();
111 G4String command =
"/control/execute ";
113 UImanager->ApplyCommand(command+fileName);
117 UImanager->ApplyCommand(
"/control/execute init_vis.mac");
119 UImanager->ApplyCommand(
"/control/execute gui.mac");