From 99ab9d9e53004ff22342cc14f51cd7dc969e4beb Mon Sep 17 00:00:00 2001 From: Andre Sailer <andre.philippe.sailer@cern.ch> Date: Mon, 23 Nov 2015 16:19:37 +0000 Subject: [PATCH] DDSim: add raising exception just in case we let an unknown input file trough again --- DDSim/DD4hepSimulation.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DDSim/DD4hepSimulation.py b/DDSim/DD4hepSimulation.py index 2998a585b..0cf75503a 100644 --- a/DDSim/DD4hepSimulation.py +++ b/DDSim/DD4hepSimulation.py @@ -316,6 +316,9 @@ class DD4hepSimulation(object): elif inputFile.endswith(".hepmc"): gen = DDG4.GeneratorAction(kernel,"Geant4InputAction/hepmc1") gen.Input="Geant4EventReaderHepMC|"+inputFile + else: + ##this should never happen because we already check at the top, but in case of some LogicError... + raise RuntimeError( "Unknown input file type: %s" % inputFile ) gen.Sync = self.skipNEvents gen.Mask = index actionList.append(gen) -- GitLab