turn off vis in batch

This commit is contained in:
Jan Kieseler
2023-09-20 23:36:10 +02:00
parent 287f4762b9
commit 181af0f356
+5 -1
View File
@@ -111,7 +111,10 @@ void G4System::run_visualize(const std::string& partSpecies, double minEnergy, d
for(const auto& c : commands){ for(const auto& c : commands){
UImanager->ApplyCommand(c); UImanager->ApplyCommand(c);
} }
run_batch(1, partSpecies, minEnergy, maxEnergy); G4String partSpec = partSpecies;
G4cout << "running visualisation with particle species " << partSpec << G4endl;
actionInitialization->setGeneratorProperties(minEnergy, maxEnergy, partSpec);
runManager->BeamOn(1);
} }
void G4System::run_gui(){ void G4System::run_gui(){
@@ -132,6 +135,7 @@ void G4System::run_batch(int nEvents,const std::string& partSpecies, double minE
G4String partSpec = partSpecies; G4String partSpec = partSpecies;
G4cout << "running with particle species " << partSpec << G4endl; G4cout << "running with particle species " << partSpec << G4endl;
UImanager->ApplyCommand("/run/initialize"); UImanager->ApplyCommand("/run/initialize");
UImanager->ApplyCommand("/vis/disable");
actionInitialization->setGeneratorProperties(minEnergy, maxEnergy, partSpec); actionInitialization->setGeneratorProperties(minEnergy, maxEnergy, partSpec);
runManager->BeamOn(nEvents); runManager->BeamOn(nEvents);
} }