check
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ void makeSystemBuilder(M& m, std::string name){
|
||||
py::class_<SystemBuilder>(m, name.data()).def(py::init())
|
||||
.def("init", &SystemBuilder::init, py::arg("cw"), py::arg("gui")=false)
|
||||
.def("run_gui", &SystemBuilder::run_gui)
|
||||
.def("run_batch", &SystemBuilder::run_batch)
|
||||
.def("run_batch", &SystemBuilder::run_batch, py::arg("nEvents"), py::arg("partSpecies"), py::arg("minEnergy"), py::arg("maxEnergy"))
|
||||
.def("visualize", &SystemBuilder::visualize);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +60,8 @@ void SystemBuilder::run_gui(){
|
||||
}
|
||||
|
||||
void SystemBuilder::run_batch(int nEvents, std::string partSpecies, double minEnergy, double maxEnergy){
|
||||
G4String partSpec = (G4String)partSpecies;
|
||||
G4cout << "running with particle species " << partSpec << G4endl;
|
||||
actionInitialization->setGeneratorProperties(minEnergy, maxEnergy, (G4String)partSpecies);
|
||||
UImanager->ApplyCommand("/run/initialize");
|
||||
runManager->BeamOn(nEvents);
|
||||
|
||||
Reference in New Issue
Block a user