CMS 3D CMS Logo

Classes | Functions
MassReplace Namespace Reference

Classes

class  MassSearchParamVisitor
 
class  MassSearchReplaceAnyInputTagVisitor
 
class  MassSearchReplaceParamVisitor
 
class  SwitchProducerTest
 
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

◆ massReplaceInputTag()

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

Definition at line 83 of file MassReplace.py.

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

Referenced by CustomConfigs.customiseHLTforHIonRepackedRAW(), CustomConfigs.customiseHLTforHIonRepackedRAWPrime(), and MassReplace.TestModuleCommand.testMassReplaceInputTag().

83 def massReplaceInputTag(process,old="rawDataCollector",new="rawDataRepacker",verbose=False,moduleLabelOnly=False,skipLabelTest=False):
84  for s in process.paths_().keys():
85  massSearchReplaceAnyInputTag(getattr(process,s), old, new, verbose, moduleLabelOnly, skipLabelTest)
86  for s in process.endpaths_().keys():
87  massSearchReplaceAnyInputTag(getattr(process,s), old, new, verbose, moduleLabelOnly, skipLabelTest)
88  if process.schedule_() is not None:
89  for task in process.schedule_()._tasks:
90  massSearchReplaceAnyInputTag(task, old, new, verbose, moduleLabelOnly, skipLabelTest)
91  return(process)
92 
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:79
return((rh ^ lh) &mask)
def massReplaceInputTag(process, old="rawDataCollector", new="rawDataRepacker", verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:83

◆ massReplaceParameter()

def MassReplace.massReplaceParameter (   process,
  name = "label",
  old = "rawDataCollector",
  new = "rawDataRepacker",
  verbose = False 
)

Definition at line 132 of file MassReplace.py.

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

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

132 def massReplaceParameter(process,name="label",old="rawDataCollector",new="rawDataRepacker",verbose=False):
133  for s in process.paths_().keys():
134  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
135  for s in process.endpaths_().keys():
136  massSearchReplaceParam(getattr(process,s),name,old,new,verbose)
137  if process.schedule_() is not None:
138  for task in process.schedule_()._tasks:
139  massSearchReplaceParam(task, name, old, new, verbose)
140  return(process)
141 
return((rh ^ lh) &mask)
def massSearchReplaceParam(sequence, paramName, paramOldValue, paramValue, verbose=False)
Definition: MassReplace.py:129
def massReplaceParameter(process, name="label", old="rawDataCollector", new="rawDataRepacker", verbose=False)
Definition: MassReplace.py:132

◆ massSearchReplaceAnyInputTag()

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

Referenced by boostedHPSPFTaus_cfi.addBoostedTaus(), extraJets_MuEGFixMoriond2017.backupJetsSecondStep(), patMuonsWithTrigger_cff.changeRecoMuonInput(), CustomConfigs.customiseL1TforHIonRepackedRAW(), CustomConfigs.customiseL1TforHIonRepackedRAWPrime(), helpers.extendWithPrePostfix(), massReplaceInputTag(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), MassReplace.TestModuleCommand.testMassSearchReplaceAnyInputTag(), and patMuonsWithTrigger_cff.useExistingPATMuons().

79 def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag,verbose=False,moduleLabelOnly=False,skipLabelTest=False) :
80  """Replace InputTag oldInputTag with newInputTag, at any level of nesting within PSets, VPSets, VInputTags..."""
81  sequence.visit(MassSearchReplaceAnyInputTagVisitor(oldInputTag,newInputTag,verbose=verbose,moduleLabelOnly=moduleLabelOnly,skipLabelTest=skipLabelTest))
82 
def massSearchReplaceAnyInputTag(sequence, oldInputTag, newInputTag, verbose=False, moduleLabelOnly=False, skipLabelTest=False)
Definition: MassReplace.py:79

◆ massSearchReplaceParam()

def MassReplace.massSearchReplaceParam (   sequence,
  paramName,
  paramOldValue,
  paramValue,
  verbose = False 
)

Definition at line 129 of file MassReplace.py.

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

129 def massSearchReplaceParam(sequence,paramName,paramOldValue,paramValue,verbose=False):
130  sequence.visit(MassSearchReplaceParamVisitor(paramName,paramOldValue,paramValue,verbose))
131 
def massSearchReplaceParam(sequence, paramName, paramOldValue, paramValue, verbose=False)
Definition: MassReplace.py:129