Skip to content

Commit

Permalink
disble illegal parameters when LHESource is used with steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Norraphat committed May 15, 2020
1 parent 23b3fa3 commit 05ceb2a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,13 +451,13 @@ def filesFromOption(self):
self.process.source.processingMode = cms.untracked.string("RunsAndLumis")

##drop LHEXMLStringProduct on input to save memory if appropriate
if 'GEN' in self.stepMap.keys():
if 'GEN' in self.stepMap.keys() and not self._options.filetype == "LHE":
if self._options.inputCommands:
self._options.inputCommands+=',drop LHEXMLStringProduct_*_*_*,'
else:
self._options.inputCommands='keep *, drop LHEXMLStringProduct_*_*_*,'

if self.process.source and self._options.inputCommands:
if self.process.source and self._options.inputCommands and not self._options.filetype == "LHE":
if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring()
for command in self._options.inputCommands.split(','):
# remove whitespace around the keep/drop statements
Expand Down Expand Up @@ -787,7 +787,6 @@ def dropSecondDropStar(iec):
iec.remove(item)
count+=1


## allow comma separated input eventcontent
if not hasattr(self.process.source,'inputCommands'): self.process.source.inputCommands=cms.untracked.vstring()
for evct in self._options.inputEventContent.split(','):
Expand Down Expand Up @@ -1425,7 +1424,7 @@ def prepare_DIGI(self, sequence = None):
if sequence == 'pdigi_valid' or sequence == 'pdigi_hi':
self.executeAndRemember("process.mix.digitizers = cms.PSet(process.theDigitizersValid)")

if sequence != 'pdigi_nogen' and sequence != 'pdigi_valid_nogen' and sequence != 'pdigi_hi_nogen' and not self.process.source.type_()=='EmptySource':
if sequence != 'pdigi_nogen' and sequence != 'pdigi_valid_nogen' and sequence != 'pdigi_hi_nogen' and not self.process.source.type_()=='EmptySource' and not self._options.filetype == "LHE":
if self._options.inputEventContent=='':
self._options.inputEventContent='REGEN'
else:
Expand Down

0 comments on commit 05ceb2a

Please sign in to comment.