Skip to content

Commit 9692325

Browse files
authored
Merge pull request #47587 from srimanob/151_ProtectNonExistingGeometry
Add protection if non-existent geometry is used
2 parents 9038a30 + d2a32b7 commit 9692325

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Configuration/Applications/python/ConfigBuilder.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -821,6 +821,8 @@ def addStandardSequences(self):
821821
try:
822822
if len(self.stepMap):
823823
self.loadAndRemember(self.GeometryCFF)
824+
if (self.GeometryCFF == 'Configuration/StandardSequences/GeometryRecoDB_cff' and not self.geometryDBLabel):
825+
print("Warning: The default GeometryRecoDB_cff is being used; however, the DB geometry is not applied. You may need to verify your cmsDriver.")
824826
if ('SIM' in self.stepMap or 'reSIM' in self.stepMap) and not self._options.fast:
825827
self.loadAndRemember(self.SimGeometryCFF)
826828
if self.geometryDBLabel:
@@ -1159,7 +1161,10 @@ def inGeometryKeys(opt):
11591161
if opt in GeometryConf:
11601162
return GeometryConf[opt]
11611163
else:
1162-
return opt
1164+
if (opt=='SimDB' or opt.startswith('DB:')):
1165+
return opt
1166+
else:
1167+
raise Exception("Geometry "+opt+" does not exist!")
11631168

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

0 commit comments

Comments
 (0)