Public Member Functions | |
def | __init__ (self, caseFunctionDict, kargs) |
def | __setattr__ (self, name, value) |
def | appendToProcessDescLists_ (self, modules, aliases, myname) |
def | caseLabel_ (self, name, case) |
def | clone (self, params) |
def | dumpPython (self, options=PrintOptions()) |
def | insertInto (self, parameterSet, myname) |
def | moduleLabel_ (self, myname) |
def | nameInProcessDesc_ (self, myname) |
Public Member Functions inherited from Modules.EDProducer | |
def | __init__ (self, type_, arg, kargs) |
Public Member Functions inherited from Modules._Module | |
def | __init__ (self, type_, arg, kargs) |
def | insertInto (self, parameterSet, myname) |
def | setPrerequisites (self, libs) |
Public Member Functions inherited from Mixins._TypedParameterizable | |
def | __init__ (self, type_, arg, kargs) |
def | appendToProcessDescList_ (self, lst, myname) |
def | clone (self, args, params) |
def | copy (self) |
def | dumpConfig (self, options=PrintOptions()) |
def | dumpPython (self, options=PrintOptions()) |
def | dumpPythonAttributes (self, myname, options) |
def | insertInto (self, parameterSet, myname) |
def | moduleLabel_ (self, myname) |
def | nameInProcessDesc_ (self, myname) |
def | type_ (self) |
Public Member Functions inherited from Mixins._Parameterizable | |
def | __delattr__ (self, name) |
def | __init__ (self, arg, kargs) |
def | __repr__ (self) |
def | __setattr__ (self, name, value) |
def | dumpPython (self, options=PrintOptions()) |
def | getParameter (self, params) |
def | hasParameter (self, params) |
def | insertContentsInto (self, parameterSet) |
def | isFrozen (self) |
def | isModified (self) |
def | parameterNames_ (self) |
def | parameters_ (self) |
def | setIsFrozen (self) |
Public Member Functions inherited from Mixins._Labelable | |
def | __str__ (self) |
def | dumpSequenceConfig (self) |
def | dumpSequencePython (self, options=PrintOptions()) |
def | hasLabel_ (self) |
def | label (self) |
def | label_ (self) |
def | setLabel (self, label) |
Public Member Functions inherited from SequenceTypes._SequenceLeaf | |
def | __init__ (self) |
def | isLeaf (self) |
Public Member Functions inherited from SequenceTypes._Sequenceable | |
def | __add__ (self, rhs) |
def | __init__ (self) |
def | __invert__ (self) |
def | __mul__ (self, rhs) |
def | isLeaf (self) |
def | isOperation (self) |
def | resolve (self, processDict, keepIfCannotResolve=False) |
def | visitNode (self, visitor) |
Static Public Member Functions | |
def | getCpu () |
Private Member Functions | |
def | __addParameter (self, name, value) |
def | __setParameters (self, parameters) |
def | _chooseCase (self) |
def | _clonesequence (self, lookuptable) |
def | _errorstr (self) |
def | _getProducer (self) |
def | _placeImpl (self, name, proc) |
Static Private Member Functions | |
def | __typeIsValid (typ) |
Private Attributes | |
_caseFunctionDict | |
_isModified | |
This purpose class is to provide a switch of EDProducers for a single module/product label. The decision is done at the time when the python configuration is translated to C++. This class is generic, and intended to be inherited for concrete switches. Example: class SwitchProducerFoo(SwitchProducer): def __init__(self, **kargs): super(SwitchProducerFoo,self).__init__( dict(case1 = case1Func, case2 = case2Func), **kargs ) foo = SwitchProducerFoo( case1 = EDProducer("Producer1"), case2 = EDProducer("Producer2") ) Here case1Func and case2Func are functions that return a (bool, int) tuple, where the bool tells whether that case is enabled or not, and the int tells the priority of that case. The case with the highest priority among those that are enabled will get chosen. The end result is that the product(s) labeled as "foo" will be produced with one of the producers. It would be good if their output product types and instance names would be the same (or very close).
Definition at line 221 of file Modules.py.
def Modules.SwitchProducer.__init__ | ( | self, | |
caseFunctionDict, | |||
kargs | |||
) |
Definition at line 250 of file Modules.py.
|
private |
Definition at line 281 of file Modules.py.
References Modules.SwitchProducer.__typeIsValid(), Modules.SwitchProducer._caseFunctionDict, Mixins._ParameterTypeBase._isModified, Mixins._SimpleParameterTypeBase._isModified, Mixins._Parameterizable._isModified, editorTools.UserCodeTool.dumpPython(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.dumpPython(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool.dumpPython(), Mixins._ParameterTypeBase.dumpPython(), ConfigToolBase.ConfigToolBase.dumpPython(), Mixins.UsingBlock.dumpPython(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.dumpPython(), Mixins._Parameterizable.dumpPython(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.dumpPython(), Config.Process.dumpPython(), Config.SubProcess.dumpPython(), and join().
def Modules.SwitchProducer.__setattr__ | ( | self, | |
name, | |||
value | |||
) |
Definition at line 299 of file Modules.py.
References Mixins._Parameterizable.__addParameter(), Modules.SwitchProducer.__typeIsValid(), Mixins._ParameterTypeBase._isModified, Mixins._SimpleParameterTypeBase._isModified, Mixins._Parameterizable._isModified, editorTools.UserCodeTool.dumpPython(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ImportTool.dumpPython(), Vispa.Plugins.ConfigEditor.ToolDataAccessor.ApplyTool.dumpPython(), Mixins._ParameterTypeBase.dumpPython(), ConfigToolBase.ConfigToolBase.dumpPython(), Mixins.UsingBlock.dumpPython(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController.dumpPython(), Mixins._Parameterizable.dumpPython(), Vispa.Plugins.ConfigEditor.ConfigDataAccessor.ConfigDataAccessor.dumpPython(), Config.Process.dumpPython(), Config.SubProcess.dumpPython(), Mixins._ParameterTypeBase.isFrozen(), and Mixins._Parameterizable.isFrozen().
Referenced by GenObject.GenObject.setValue().
|
private |
Definition at line 295 of file Modules.py.
References Mixins._Parameterizable.__addParameter().
|
staticprivate |
Definition at line 278 of file Modules.py.
Referenced by Modules.SwitchProducer.__addParameter(), and Modules.SwitchProducer.__setattr__().
|
private |
Returns the name of the chosen case.
Definition at line 261 of file Modules.py.
References Modules.SwitchProducer._caseFunctionDict, Mixins._Parameterizable.parameterNames_(), and str.
Referenced by Modules.SwitchProducer._getProducer(), and Modules.SwitchProducer.insertInto().
|
private |
Definition at line 405 of file Modules.py.
References Modules._Module._errorstr(), and triggerObjects_cff.id.
|
private |
Definition at line 410 of file Modules.py.
|
private |
Returns the EDroducer of the chosen case
Definition at line 273 of file Modules.py.
References Modules.SwitchProducer._chooseCase().
|
private |
Definition at line 390 of file Modules.py.
Referenced by SequenceTypes._ModuleSequenceType._place(), and Mixins._TypedParameterizable._place().
def Modules.SwitchProducer.appendToProcessDescLists_ | ( | self, | |
modules, | |||
aliases, | |||
myname | |||
) |
Definition at line 368 of file Modules.py.
References Modules.SwitchProducer.caseLabel_(), and Mixins._Parameterizable.parameterNames_().
def Modules.SwitchProducer.caseLabel_ | ( | self, | |
name, | |||
case | |||
) |
Definition at line 366 of file Modules.py.
Referenced by Modules.SwitchProducer.appendToProcessDescLists_(), and Modules.SwitchProducer.insertInto().
def Modules.SwitchProducer.clone | ( | self, | |
params | |||
) |
Definition at line 324 of file Modules.py.
References cmsPerfStripChart.dict, Mixins._Parameterizable.parameterNames_(), and Mixins.saveOrigin().
def Modules.SwitchProducer.dumpPython | ( | self, | |
options = PrintOptions() |
|||
) |
Definition at line 347 of file Modules.py.
References Mixins._Parameterizable.parameterNames_().
|
static |
Returns a function that returns the priority for a CPU "computing device". Intended to be used by deriving classes.
Definition at line 257 of file Modules.py.
def Modules.SwitchProducer.insertInto | ( | self, | |
parameterSet, | |||
myname | |||
) |
Definition at line 378 of file Modules.py.
References Modules.SwitchProducer._chooseCase(), Modules.SwitchProducer.caseLabel_(), FWJobMetadataManager::Data.moduleLabel_, PFMatchedCandidateRefExtractor.moduleLabel_, edm::ModuleLabelMatch.moduleLabel_, GBRForestWriter.moduleLabel_, MuonMETcorrInputProducer.moduleLabel_, edm::BranchKey.moduleLabel_, SysShiftMETcorrInputProducer.moduleLabel_, ShiftedJetProducerByMatchedObjectT< T >.moduleLabel_, Type0PFMETcorrInputProducer.moduleLabel_, PFCandMETcorrInputProducer.moduleLabel_, NoPileUpPFMEtProducer.moduleLabel_, PFchsMETcorrInputProducer.moduleLabel_, ShiftedPFCandidateProducerForPFMVAMEt.moduleLabel_, MultShiftMETcorrInputProducer.moduleLabel_, MultShiftMETcorrDBInputProducer.moduleLabel_, ShiftedParticleProducer.moduleLabel_, RecoTauDiscriminantCutMultiplexer.moduleLabel_, PATTauDiscriminantCutMultiplexer.moduleLabel_, NoPileUpPFMEtDataProducer.moduleLabel_, ShiftedPFCandidateProducerForPFNoPUMEt.moduleLabel_, BoostedTauSeedsProducer.moduleLabel_, RecoTauGenericJetRegionProducer< JetType, CandType >.moduleLabel_, PATTauDiscriminationAgainstElectronMVA6.moduleLabel_, TauDiscriminationAgainstElectronDeadECAL< TauType, TauDiscriminator >.moduleLabel_, SubjetFilterAlgorithm.moduleLabel_, pat::TauJetCorrFactorsProducer.moduleLabel_, PFRecoTauDiscriminationAgainstElectronMVA6.moduleLabel_, PFRecoTauDiscriminationAgainstElectronMVA5.moduleLabel_, ObjectViewMatcher< T1, T2 >.moduleLabel_, ObjectViewCleaner< T >.moduleLabel_, PFRecoTauDiscriminationAgainstMuonSimple.moduleLabel_, JetIdSelector< T >.moduleLabel_, PFRecoTauChargedHadronProducer.moduleLabel_, edm::ProductSelectorRules::Rule.moduleLabel_, PFRecoTauDiscriminationAgainstMuon2.moduleLabel_, TauTagValidation.moduleLabel_, MinMETProducerT< T >.moduleLabel_, edm::ModuleDescription.moduleLabel_, ShiftedParticleProducerT< T >.moduleLabel_, TauDiscriminationProducerBase< TauType, TauDiscriminator >.moduleLabel_, PFRecoTauDiscriminationAgainstMuonMVA.moduleLabel_, HLTMuonMatchAndPlot.moduleLabel_, CorrectedMETProducerT< T >.moduleLabel_, PFRecoTauDiscriminationByIsolationMVA2.moduleLabel_, edm::test::TestProcessorConfig::ProduceEntry.moduleLabel_, reco::tau::PFRecoTauDiscriminationByMVAIsolationRun2.moduleLabel_, reco::tau::PATTauDiscriminationByMVAIsolationRun2.moduleLabel_, VirtualJetProducer.moduleLabel_, ShiftedJetProducerT< T, Textractor >.moduleLabel_, edm::PoolOutputModule.moduleLabel_, CaloJetMETcorrInputProducerT< T, Textractor >.moduleLabel_, PFRecoTauDiscriminationByIsolation.moduleLabel_, edm::BranchDescription.moduleLabel_, JetCleanerForType1METT< T, Textractor >.moduleLabel_, PFJetMETcorrInputProducerT< T, Textractor >.moduleLabel_, edm::ProductResolverIndexHelper::Item.moduleLabel_, Mixins._TypedParameterizable.moduleLabel_(), Mixins._TypedParameterizable.nameInProcessDesc_(), Config.SubProcess.nameInProcessDesc_(), and Mixins._Parameterizable.parameterNames_().
def Modules.SwitchProducer.moduleLabel_ | ( | self, | |
myname | |||
) |
Definition at line 364 of file Modules.py.
Referenced by ExternalGeneratorFilter.ExternalGeneratorFilter.insertInto().
def Modules.SwitchProducer.nameInProcessDesc_ | ( | self, | |
myname | |||
) |
Definition at line 362 of file Modules.py.
Referenced by Types.EDAlias.appendToProcessDescList_(), ExternalGeneratorFilter.ExternalGeneratorFilter.insertInto(), and Types.EDAlias.insertInto().
|
private |
Definition at line 252 of file Modules.py.
Referenced by Modules.SwitchProducer.__addParameter(), and Modules.SwitchProducer._chooseCase().
|
private |
Definition at line 254 of file Modules.py.