14 #include "G4RunManagerFactory.hh"
15 #include "G4VisExecutive.hh"
16 #include "G4UImanager.hh"
17 #include "G4UIExecutive.hh"
21 int main(
int argc,
char** argv)
24 auto runManager = G4RunManagerFactory::CreateRunManager();
30 auto visManager =
new G4VisExecutive(
"Quiet");
31 visManager->Initialize();
34 auto UImanager = G4UImanager::GetUIpointer();
35 G4String searchpath = UImanager->GetMacroSearchPath();
36 if (searchpath!=
"") searchpath +=
":";
43 searchpath += CMAKE_INSTALL_FULL_DATADIR;
44 searchpath +=
"/east";
49 searchpath += G4String(CMAKE_PROJECT_SOURCE_DIR);
53 UImanager->SetMacroSearchPath(searchpath);
54 UImanager->ParseMacroSearchPath();
55 if( UImanager->GetVerboseLevel() >0){
56 G4cout <<
" Search path is " << UImanager->GetMacroSearchPath() << G4endl;
61 G4String command =
"/control/execute ";
62 G4String fileName = argv[1];
63 UImanager->ApplyCommand(command+fileName);
67 auto ui =
new G4UIExecutive(argc, argv);
68 eastInitialization->SetWindowText(ui);
74 delete eastInitialization;