Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

argparse migration for cmsDriver and FWCore #43042

Merged
merged 7 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions Configuration/Applications/python/ConfigBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class Options:
defaultOptions.eventcontent = None
defaultOptions.datatier = None
defaultOptions.inlineEventContent = True
defaultOptions.inlineObjets =''
defaultOptions.inlineObjects =''
defaultOptions.hideGen=False
from Configuration.StandardSequences.VtxSmeared import VtxSmearedDefaultKey,VtxSmearedHIDefaultKey
defaultOptions.beamspot=None
Expand Down Expand Up @@ -793,7 +793,7 @@ def addStandardSequences(self):
#the file is local
self.process.load(mixingDict['file'])
print("inlining mixing module configuration")
self._options.inlineObjets+=',mix'
self._options.inlineObjects+=',mix'
else:
self.loadAndRemember(mixingDict['file'])

Expand Down Expand Up @@ -1403,7 +1403,7 @@ def prepare_LHE(self, stepSpec = None):
__import__(loadFragment)
self.process.load(loadFragment)
##inline the modules
self._options.inlineObjets+=','+stepSpec
self._options.inlineObjects+=','+stepSpec

getattr(self.process,stepSpec).nEvents = int(self._options.number)

Expand Down Expand Up @@ -1452,13 +1452,13 @@ def prepare_GEN(self, stepSpec = None):
for name in genModules:
theObject = getattr(generatorModule,name)
if isinstance(theObject, cmstypes._Module):
self._options.inlineObjets=name+','+self._options.inlineObjets
self._options.inlineObjects=name+','+self._options.inlineObjects
if theObject.type_() in noConcurrentLumiGenerators:
print("Setting numberOfConcurrentLuminosityBlocks=1 because of generator {}".format(theObject.type_()))
self._options.nConcurrentLumis = "1"
self._options.nConcurrentIOVs = "1"
elif isinstance(theObject, cms.Sequence) or isinstance(theObject, cmstypes.ESProducer):
self._options.inlineObjets+=','+name
self._options.inlineObjects+=','+name

if stepSpec == self.GENDefaultSeq or stepSpec == 'pgen_genonly' or stepSpec == 'pgen_smear':
if 'ProductionFilterSequence' in genModules and ('generator' in genModules):
Expand Down Expand Up @@ -1708,8 +1708,8 @@ def leave(self,v): pass

expander=PrintAllModules()
getattr(self.process,filterSeq).visit( expander )
self._options.inlineObjets+=','+expander.inliner
self._options.inlineObjets+=','+filterSeq
self._options.inlineObjects+=','+expander.inliner
self._options.inlineObjects+=','+filterSeq

## put the filtering path in the schedule
self.scheduleSequence(filterSeq,'filtering_step')
Expand Down Expand Up @@ -2285,7 +2285,7 @@ def prepare(self, doChecking = False):
self.pythonCfgCode += command + "\n"

#comma separated list of objects that deserve to be inlined in the configuration (typically from a modified config deep down)
for object in self._options.inlineObjets.split(','):
for object in self._options.inlineObjects.split(','):
if not object:
continue
if not hasattr(self.process,object):
Expand Down
Loading