2 #include "G4RunManager.hh"
3 #include "G4UImanager.hh"
4 #include "G4UIterminal.hh"
22 #include "G4UIExecutive.hh"
26 bool exists = access(filename, F_OK) != -1;
28 G4cerr << filename <<
" not found or inaccessible. Exiting" << G4endl;
33 int main(
int argc,
char** argv)
36 G4RunManager* runManager =
new G4RunManager;
39 G4UImanager* UI = G4UImanager::GetUIpointer();
47 UI->ApplyCommand(
"/control/execute macros/tuning_parameters.mac");
53 enum DetConfiguration {wfm=1,fwm=2};
54 G4int WCSimConfiguration = fwm;
59 runManager->SetUserInitialization(WCSimdetector);
68 UI->ApplyCommand(
"/control/execute macros/jobOptions.mac");
72 runManager->SetUserInitialization(physFactory);
75 G4VisManager* visManager =
new WCSimVisManager;
76 visManager->Initialize();
81 runManager->SetUserAction(myGeneratorAction);
91 runManager->SetUserAction(myRunAction);
103 runManager->Initialize();
113 G4UIExecutive * ui =
new G4UIExecutive(argc,argv);
116 UI->ApplyCommand(
"/control/execute WCSim.mac");
129 G4String command =
"/control/execute ";
130 G4String fileName = argv[1];
132 if(fileName ==
"vis.mac"){
133 G4cout <<
"ERROR: Execute without arg for interactive mode" << G4endl;
137 UI->ApplyCommand(command+fileName);
void file_exists(const char *filename)
int main(int argc, char **argv)
void SaveOptionsToOutput(WCSimRootOptions *wcopt)
void SaveOptionsToOutput(WCSimRootOptions *wcopt)
WCSimRootOptions * GetRootOptions()