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

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

Referenced by MassReplace.TestModuleCommand.testMassReplaceInputTag().

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

Definition at line 118 of file MassReplace.py.

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

Referenced by MassReplace.TestModuleCommand.testMassReplaceParam().

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

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

Definition at line 115 of file MassReplace.py.

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

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