Skip to content

Commit 328dc94

Browse files
author
Norraphat
committed
add protection from non-existing geometry
1 parent b043e2f commit 328dc94

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Configuration/Applications/python/ConfigBuilder.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,6 +817,8 @@ def addStandardSequences(self):
817817
try:
818818
if len(self.stepMap):
819819
self.loadAndRemember(self.GeometryCFF)
820+
if (self.GeometryCFF == 'Configuration/StandardSequences/GeometryRecoDB_cff'):
821+
print("Warning: Default GeometryRecoDB_cff is used. It may not work with your process.")
820822
if ('SIM' in self.stepMap or 'reSIM' in self.stepMap) and not self._options.fast:
821823
self.loadAndRemember(self.SimGeometryCFF)
822824
if self.geometryDBLabel:
@@ -1155,7 +1157,7 @@ def inGeometryKeys(opt):
11551157
if opt in GeometryConf:
11561158
return GeometryConf[opt]
11571159
else:
1158-
return opt
1160+
raise Exception("Geometry "+opt+" does not exist!")
11591161

11601162
geoms=self._options.geometry.split(',')
11611163
if len(geoms)==1: geoms=inGeometryKeys(geoms[0]).split(',')

0 commit comments

Comments
 (0)