CMS 3D CMS Logo

Classes | Functions
MassReplace Namespace Reference

Classes

class  MassSearchParamVisitor
 
class  MassSearchReplaceAnyInputTagVisitor
 
class  MassSearchReplaceParamVisitor
 
class  TestModuleCommand
 

Functions

def massReplaceInputTag (process, old="rawDataCollector", new="rawDataRepacker", verbose=False, moduleLabelOnly=False, skipLabelTest=False)
 
def massReplaceParameter (process, name="label", old="rawDataCollector", new="rawDataRepacker", verbose=False)
 
def massSearchReplaceAnyInputTag (sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
 
def massSearchReplaceParam (sequence, paramName, paramOldValue, paramValue, verbose=False)
 

Function Documentation

def MassReplace.massReplaceInputTag (   process,
  old = "rawDataCollector",
  new = "rawDataRepacker",
  verbose = False,
  moduleLabelOnly = False,
  skipLabelTest = False 
)

Definition at line 77 of file MassReplace.py.

References relativeConstraints.keys, massSearchReplaceAnyInputTag(), and mathSSE.return().

Referenced by MassReplace.TestModuleCommand.testMassReplaceInputTag().

77 def massReplaceInputTag(process,old="rawDataCollector",new="rawDataRepacker",verbose=False,moduleLabelOnly=False,skipLabelTest=False):
78  for s in process.paths_().keys():
79  massSearchReplaceAnyInputTag(getattr(process,s), old, new, verbose, moduleLabelOnly, skipLabelTest)
80  for s in process.endpaths_().keys():
81  massSearchReplaceAnyInputTag(getattr(process,s), old, new, verbose, moduleLabelOnly, skipLabelTest)
82  if process.schedule_() is not None:
83  for task in process.schedule_()._tasks:
84  massSearchReplaceAnyInputTag(task, old, new, verbose, moduleLabelOnly, skipLabelTest)
85  return(process)
86 
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:73
return((rh^lh)&mask)
def massReplaceInputTag(process, old="rawDataCollector", new="rawDataRepacker", verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:77
def MassReplace.massReplaceParameter (   process,
  name = "label",
  old = "rawDataCollector",
  new = "rawDataRepacker",
  verbose = False 
)

Definition at line 120 of file MassReplace.py.

References relativeConstraints.keys, massSearchReplaceParam(), and mathSSE.return().

Referenced by customiseHybrid.runOnHybridZS(), and MassReplace.TestModuleCommand.testMassReplaceParam().

120 def massReplaceParameter(process,name="label",old="rawDataCollector",new="rawDataRepacker",verbose=False):
121  for s in process.paths_().keys():
122  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
123  for s in process.endpaths_().keys():
124  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
125  if process.schedule_() is not None:
126  for task in process.schedule_()._tasks:
127  massSearchReplaceParam(task, name, old, new, verbose)
128  return(process)
129 
def massSearchReplaceParam(sequence, paramName, paramOldValue, paramValue, verbose=False)
Definition: MassReplace.py:117
return((rh^lh)&mask)
def massReplaceParameter(process, name="label", old="rawDataCollector", new="rawDataRepacker", verbose=False)
Definition: MassReplace.py:120
def MassReplace.massSearchReplaceAnyInputTag (   sequence,
  oldInputTag,
  newInputTag,
  verbose = False,
  moduleLabelOnly = False,
  skipLabelTest = False 
)
Replace InputTag oldInputTag with newInputTag, at any level of nesting within PSets, VPSets, VInputTags...

Definition at line 73 of file MassReplace.py.

Referenced by boostedHPSPFTaus_cfi.addBoostedTaus(), extraSlimmedMETs_MuEGFixMoriond2017.addExtraMETCollections(), extraJets_MuEGFixMoriond2017.backupJetsSecondStep(), patMuonsWithTrigger_cff.changeRecoMuonInput(), HiHelperTools.CloneSequenceVisitor.clonedSequence(), helpers.CloneSequenceVisitor.clonedSequence(), helpers.extendWithPrePostfix(), massReplaceInputTag(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), MassReplace.TestModuleCommand.testMassSearchReplaceAnyInputTag(), and patMuonsWithTrigger_cff.useExistingPATMuons().

73 def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag,verbose=False,moduleLabelOnly=False,skipLabelTest=False) :
74  """Replace InputTag oldInputTag with newInputTag, at any level of nesting within PSets, VPSets, VInputTags..."""
75  sequence.visit(MassSearchReplaceAnyInputTagVisitor(oldInputTag,newInputTag,verbose=verbose,moduleLabelOnly=moduleLabelOnly,skipLabelTest=skipLabelTest))
76 
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:73
def MassReplace.massSearchReplaceParam (   sequence,
  paramName,
  paramOldValue,
  paramValue,
  verbose = False 
)

Definition at line 117 of file MassReplace.py.

Referenced by massReplaceParameter(), pfTools.reconfigurePF2PATTaus(), switchMVAtoDB_cfi.switchMVAtoDB(), and MassReplace.TestModuleCommand.testMassSearchReplaceParam().

117 def massSearchReplaceParam(sequence,paramName,paramOldValue,paramValue,verbose=False):
118  sequence.visit(MassSearchReplaceParamVisitor(paramName,paramOldValue,paramValue,verbose))
119 
def massSearchReplaceParam(sequence, paramName, paramOldValue, paramValue, verbose=False)
Definition: MassReplace.py:117