diff --git a/DDG4/python/DDSim/DD4hepSimulation.py b/DDG4/python/DDSim/DD4hepSimulation.py index b6e2acbe47ca672a134d2dc40b2539cbc2b82856..da83bd6a847c7aa83b6226492dc964595b9bd75c 100644 --- a/DDG4/python/DDSim/DD4hepSimulation.py +++ b/DDG4/python/DDSim/DD4hepSimulation.py @@ -665,8 +665,8 @@ SIM = DD4hepSimulation() if self.runType == "batch": if not self.numberOfEvents: self._errorMessages.append("ERROR: Batch mode requested, but did not set number of events") - if not self.inputFiles and not self.enableGun: - self._errorMessages.append("ERROR: Batch mode requested, but did not set inputFile(s) or gun") + if not (self.inputFiles or self.enableGun or self.inputConfig.userInputPlugin): + self._errorMessages.append("ERROR: Batch mode requested, but did not set inputFile(s), gun, or userInputPlugin") if self.inputFiles and (self.enableG4Gun or self.enableG4GPS): self._errorMessages.append("ERROR: Cannot use both inputFiles and Geant4Gun or GeneralParticleSource") @@ -674,6 +674,9 @@ SIM = DD4hepSimulation() if self.enableGun and (self.enableG4Gun or self.enableG4GPS): self._errorMessages.append("ERROR: Cannot use both DD4hepGun and Geant4 Gun or GeneralParticleSource") + if self.inputConfig.userInputPlugin and (self.enableG4Gun or self.enableG4GPS): + self._errorMessages.append("ERROR: Cannot use both userInputPlugin and Geant4 Gun or GeneralParticleSource") + if self.numberOfEvents < 0 and not self.inputFiles: self._errorMessages.append("ERROR: Negative number of events only sensible for inputFiles")