Skip to content

Commit

Permalink
Merge pull request #34452 from srimanob/120_FixIsDataIsMC_includeVali…
Browse files Browse the repository at this point in the history
…adtion

Fix when neither "data" nor "MC" is specified in the cmsDriver.
  • Loading branch information
cmsbuild committed Aug 9, 2021
2 parents 213ad19 + 11e5296 commit 18c8673
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -1848,7 +1848,7 @@ def NFI(index):
if self._options.restoreRNDSeeds==False and not self._options.restoreRNDSeeds==True:
self._options.restoreRNDSeeds=True

if not 'DIGI' in self.stepMap and not self._options.fast:
if not 'DIGI' in self.stepMap and not self._options.isData and not self._options.fast:
self.executeAndRemember("process.mix.playback = True")
self.executeAndRemember("process.mix.digitizers = cms.PSet()")
self.executeAndRemember("for a in process.aliases: delattr(process, a)")
Expand Down
5 changes: 5 additions & 0 deletions Configuration/Applications/python/cmsDriverOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,10 +229,15 @@ def OptionsFromItems(items):
options.isMC=True
if 'SIM' in options.datatier:
options.isMC=True
if 'VALIDATION' in options.trimmedStep:
options.isMC=True
if options.era and 'Phase2' in options.era:
options.isMC=True
if options.isMC:
print('We have determined that this is simulation (if not, rerun cmsDriver.py with --data)')
else:
print('We have determined that this is real data (if not, rerun cmsDriver.py with --mc)')
options.isData=True

if options.profile:
if options.profile and options.prefix:
Expand Down

0 comments on commit 18c8673

Please sign in to comment.