Classes | |
class | CloneSequenceVisitor |
struct | CompositeCandidateMaker |
struct | CompositePtrCandidateMaker |
class | GatherAllModulesVisitor |
class | MassSearchParamVisitor |
class | MassSearchReplaceAnyInputTagVisitor |
class | MassSearchReplaceParamVisitor |
struct | MCTruthPairSelector |
struct | NamedCompositeCandidateMaker |
class | TestModuleCommand |
Functions | |
def | __labelsInSequence |
def | addESProducers |
Helpers to perform some technically boring tasks like looking for all modules with a given parameter and replacing that to a given value. More... | |
def | applyPostfix |
def | cloneProcessingSnippet |
def | contains |
def | extendWithPrePostfix |
def | get_path |
def | get_vars |
def | jetCollectionString |
def | listModules |
def | listSequences |
def | loadWithPostfix |
def | loadWithPrefix |
def | loadWithPrePostfix |
def | massSearchReplaceAnyInputTag |
def | massSearchReplaceParam |
def | removeIfInSequence |
|
private |
Definition at line 91 of file helpers.py.
References listModules(), and listSequences().
Referenced by removeIfInSequence().
def helpers.addESProducers | ( | process, | |
config | |||
) |
Helpers to perform some technically boring tasks like looking for all modules with a given parameter and replacing that to a given value.
Definition at line 7 of file helpers.py.
References dir.
def helpers.applyPostfix | ( | process, | |
label, | |||
postfix | |||
) |
Definition at line 76 of file helpers.py.
Referenced by pfTools.adaptPFMuons(), pfTools.addPFCandidates(), pfTools.reconfigurePF2PATTaus(), pfTools.switchToPFJets(), pfTools.switchToPFMET(), pfTools.tauTypeInPF2PAT(), HiCoreTools.RemoveMCMatching.toolCode(), HiCoreTools.RemoveSpecificPATObjects.toolCode(), HiCoreTools.RemoveCleaning.toolCode(), and pfTools.usePF2PAT().
def helpers.cloneProcessingSnippet | ( | process, | |
sequence, | |||
postfix, | |||
removePostfix = "" , |
|||
noClones = [] |
|||
) |
------------------------------------------------------------------ copy a sequence plus the modules and sequences therein both are renamed by getting a postfix input tags are automatically adjusted ------------------------------------------------------------------
Definition at line 315 of file helpers.py.
Referenced by boostedHPSPFTaus_cfi.addBoostedTaus(), pfIsolation.setupPFIso(), and pfIsolation.setupPFIsoPhoton().
def helpers.contains | ( | sequence, | |
moduleName | |||
) |
------------------------------------------------------------------ return True if a module with name 'module' is contained in the sequence with name 'sequence' and False otherwise. This version is not so nice as it also returns True for any substr of the name of a contained module. sequence : sequence [e.g. process.patDefaultSequence] module : module name as a string ------------------------------------------------------------------
Definition at line 299 of file helpers.py.
References spr.find().
Referenced by helpers.TestModuleCommand.testContains().
def helpers.extendWithPrePostfix | ( | process, | |
other, | |||
prefix, | |||
postfix, | |||
items = () |
|||
) |
Look in other and find types which we can use
Definition at line 30 of file helpers.py.
References cmsPerfStripChart.dict, dir, and massSearchReplaceAnyInputTag().
Referenced by loadWithPrePostfix().
def helpers.get_path | ( | file_in_path | ) |
def helpers.jetCollectionString | ( | prefix = '' , |
|
algo = '' , |
|||
type = '' |
|||
) |
------------------------------------------------------------------ return the string of the jet collection module depending on the input vaules. The default return value will be 'patAK5CaloJets'. algo : indicating the algorithm type of the jet [expected are 'AK5', 'IC5', 'SC7', ...] type : indicating the type of constituents of the jet [expec- ted are 'Calo', 'PFlow', 'JPT', ...] prefix : prefix indicating the type of pat collection module (ex- pected are '', 'selected', 'clean'). ------------------------------------------------------------------
Definition at line 275 of file helpers.py.
References reco.if().
Referenced by helpers.TestModuleCommand.testJetCollectionString(), heavyIonTools.ProductionDefaults.toolCode(), HiCoreTools.RemoveMCMatching.toolCode(), coreTools.RemoveMCMatching.toolCode(), heavyIonTools.SelectionDefaults.toolCode(), and HiCoreTools.RemoveSpecificPATObjects.toolCode().
def helpers.listModules | ( | sequence | ) |
Definition at line 261 of file helpers.py.
Referenced by __labelsInSequence(), trigTools._modulesInPath(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.labelsInSequence(), helpers.TestModuleCommand.testListModules(), HiCoreTools.RemoveCleaning.toolCode(), and HiCoreTools.AddCleaning.toolCode().
def helpers.listSequences | ( | sequence | ) |
Definition at line 266 of file helpers.py.
Referenced by __labelsInSequence(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.labelsInSequence().
def helpers.loadWithPostfix | ( | process, | |
moduleName, | |||
postfix = '' |
|||
) |
Definition at line 21 of file helpers.py.
References loadWithPrePostfix().
Referenced by pfTools.usePF2PAT().
def helpers.loadWithPrefix | ( | process, | |
moduleName, | |||
prefix = '' |
|||
) |
Definition at line 18 of file helpers.py.
References loadWithPrePostfix().
Referenced by jetTools.setupBTagging().
def helpers.loadWithPrePostfix | ( | process, | |
moduleName, | |||
prefix = '' , |
|||
postfix = '' |
|||
) |
Definition at line 24 of file helpers.py.
References extendWithPrePostfix().
Referenced by loadWithPostfix(), and loadWithPrefix().
def helpers.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 271 of file helpers.py.
Referenced by boostedHPSPFTaus_cfi.addBoostedTaus(), patMuonsWithTrigger_cff.changeRecoMuonInput(), customiseForPremixingInput.customiseForPreMixingInput(), extendWithPrePostfix(), CustomConfigs.MassReplaceInputTag(), ConfigBuilder.MassReplaceInputTag(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), helpers.TestModuleCommand.testMassSearchReplaceAnyInputTag(), and patMuonsWithTrigger_cff.useExistingPATMuons().
def helpers.massSearchReplaceParam | ( | sequence, | |
paramName, | |||
paramOldValue, | |||
paramValue, | |||
verbose = False |
|||
) |
Definition at line 258 of file helpers.py.
Referenced by CustomConfigs.MassReplaceParameter(), pfTools.reconfigurePF2PATTaus(), switchMVAtoDB_cfi.switchMVAtoDB(), and helpers.TestModuleCommand.testMassSearchReplaceParam().
def helpers.removeIfInSequence | ( | process, | |
target, | |||
sequenceLabel, | |||
postfix = "" |
|||
) |
Definition at line 84 of file helpers.py.
References __labelsInSequence(), and MatrixUtil.remove().
Referenced by HiCoreTools.RemoveSpecificPATObjects.toolCode().