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 | extendWithPostfix |
def | jetCollectionString |
def | listModules |
def | listSequences |
def | loadWithPostfix |
def | massSearchReplaceAnyInputTag |
def | massSearchReplaceParam |
def | removeIfInSequence |
|
private |
Definition at line 85 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 70 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 = "" |
|||
) |
------------------------------------------------------------------ copy a sequence plus the modules and sequences therein both are renamed by getting a postfix input tags are automatically adjusted ------------------------------------------------------------------
Definition at line 306 of file helpers.py.
Referenced by 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 290 of file helpers.py.
References spr.find().
Referenced by helpers.TestModuleCommand.testContains().
def helpers.extendWithPostfix | ( | process, | |
other, | |||
postfix, | |||
items = () |
|||
) |
Look in other and find types which we can use
Definition at line 24 of file helpers.py.
References python.multivaluedict.dict, dir, and massSearchReplaceAnyInputTag().
Referenced by loadWithPostfix().
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 266 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 252 of file helpers.py.
Referenced by __labelsInSequence(), trigTools._modulesInPath(), helpers.TestModuleCommand.testListModules(), HiCoreTools.RemoveCleaning.toolCode(), and HiCoreTools.AddCleaning.toolCode().
def helpers.listSequences | ( | sequence | ) |
Definition at line 257 of file helpers.py.
Referenced by __labelsInSequence().
def helpers.loadWithPostfix | ( | process, | |
moduleName, | |||
postfix = '' |
|||
) |
Definition at line 18 of file helpers.py.
References extendWithPostfix().
Referenced by pfTools.usePF2PAT().
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 262 of file helpers.py.
Referenced by patMuonsWithTrigger_cff.changeRecoMuonInput(), extendWithPostfix(), ConfigBuilder.MassReplaceInputTag(), ConfigBuilder.ConfigBuilder.renameInputTagsInSequence(), helpers.TestModuleCommand.testMassSearchReplaceAnyInputTag(), and patMuonsWithTrigger_cff.useExistingPATMuons().
def helpers.massSearchReplaceParam | ( | sequence, | |
paramName, | |||
paramOldValue, | |||
paramValue, | |||
verbose = False |
|||
) |
Definition at line 249 of file helpers.py.
Referenced by pfTools.reconfigurePF2PATTaus(), and helpers.TestModuleCommand.testMassSearchReplaceParam().
def helpers.removeIfInSequence | ( | process, | |
target, | |||
sequenceLabel, | |||
postfix = "" |
|||
) |
Definition at line 78 of file helpers.py.
References __labelsInSequence(), and python.multivaluedict.remove().
Referenced by HiCoreTools.RemoveSpecificPATObjects.toolCode().