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 76 of file MassReplace.py.

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

Referenced by MassReplace.TestModuleCommand.testMassReplaceInputTag().

76 def massReplaceInputTag(process,old="rawDataCollector",new="rawDataRepacker",verbose=False,moduleLabelOnly=False,skipLabelTest=False):
77  for s in process.paths_().keys():
78  massSearchReplaceAnyInputTag(getattr(process,s), old, new, verbose, moduleLabelOnly, skipLabelTest)
79  for s in process.endpaths_().keys():
80  massSearchReplaceAnyInputTag(getattr(process,s), old, new, verbose, moduleLabelOnly, skipLabelTest)
81  if process.schedule_() is not None:
82  for task in process.schedule_()._tasks:
83  massSearchReplaceAnyInputTag(task, old, new, verbose, moduleLabelOnly, skipLabelTest)
84  return(process)
85 
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:72
def massReplaceInputTag(process, old="rawDataCollector", new="rawDataRepacker", verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:76
return(e1-e2)*(e1-e2)+dp *dp
def MassReplace.massReplaceParameter (   process,
  name = "label",
  old = "rawDataCollector",
  new = "rawDataRepacker",
  verbose = False 
)

Definition at line 119 of file MassReplace.py.

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

Referenced by MassReplace.TestModuleCommand.testMassReplaceParam().

119 def massReplaceParameter(process,name="label",old="rawDataCollector",new="rawDataRepacker",verbose=False):
120  for s in process.paths_().keys():
121  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
122  for s in process.endpaths_().keys():
123  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
124  if process.schedule_() is not None:
125  for task in process.schedule_()._tasks:
126  massSearchReplaceParam(task, name, old, new, verbose)
127  return(process)
128 
def massSearchReplaceParam(sequence, paramName, paramOldValue, paramValue, verbose=False)
Definition: MassReplace.py:116
return(e1-e2)*(e1-e2)+dp *dp
def massReplaceParameter(process, name="label", old="rawDataCollector", new="rawDataRepacker", verbose=False)
Definition: MassReplace.py:119
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 72 of file MassReplace.py.

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

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

Definition at line 116 of file MassReplace.py.

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

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