Public Member Functions | |
def | __init__ |
def | copy |
def | dumpPythonAs |
def | moduleLabel_ |
def | nameInProcessDesc_ |
def | targetLabel_ |
Private Member Functions | |
def | _placeImpl |
Private Attributes | |
_targetLabel |
Used to set which EventSetup provider should provide a particular data item in the case where multiple providers are capable of delivering the data. The first argument specifies the C++ class type of the prodiver. If the provider has been given a label, you must specify that label as the second argument. Additional 'vstring' arguments maybe used to specify exactly which EventSetup Records are being preferred and optionally which data items within that Record. E.g., #prefer all data in record 'OrangeRecord' from 'juicer' ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring()) or #prefer only "Orange" data in "OrangeRecord" from "juicer" ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("ExtraPulp")) or #prefer only "Orange" data with label "ExtraPulp" in "OrangeRecord" from "juicer" ESPrefer("ESJuicerProd", OrangeRecord=cms.vstring("Orange/ExtraPulp"))
Definition at line 55 of file Modules.py.
def Modules::ESPrefer::__init__ | ( | self, | |
type_, | |||
targetLabel = '' , |
|||
arg, | |||
kargs | |||
) |
Definition at line 72 of file Modules.py.
00073 : 00074 super(ESPrefer,self).__init__(type_,*arg,**kargs) 00075 self._targetLabel = targetLabel 00076 if targetLabel is None: 00077 self._targetLabel = str('') 00078 if kargs: 00079 for k,v in kargs.iteritems(): 00080 if not isinstance(v,vstring): raise RuntimeError('ESPrefer only allows vstring attributes. "'+k+'" is a '+str(type(v)))
def Modules::ESPrefer::_placeImpl | ( | self, | |
name, | |||
proc | |||
) | [private] |
Definition at line 81 of file Modules.py.
def Modules::ESPrefer::copy | ( | self | ) |
Reimplemented from Mixins::_TypedParameterizable.
Definition at line 86 of file Modules.py.
def Modules::ESPrefer::dumpPythonAs | ( | self, | |
label, | |||
options = PrintOptions() |
|||
) |
Definition at line 94 of file Modules.py.
00095 : 00096 result = options.indentation() 00097 basename = self._targetLabel 00098 if basename == '': 00099 basename = self.type_() 00100 if options.isCfg: 00101 # do either type or label 00102 result += 'process.prefer("'+basename+'"' 00103 if self.parameterNames_(): 00104 result += ",\n"+_Parameterizable.dumpPython(self,options)+options.indentation() 00105 result +=')\n' 00106 else: 00107 # use the base class Module 00108 result += 'es_prefer_'+basename+' = cms.ESPrefer("'+self.type_()+'"' 00109 if self._targetLabel != '': 00110 result += ',"'+self._targetLabel+'"' 00111 if self.parameterNames_(): 00112 result += ",\n"+_Parameterizable.dumpPython(self,options)+options.indentation() 00113 result += ')\n' 00114 return result
def Modules::ESPrefer::moduleLabel_ | ( | self, | |
myname | |||
) |
Reimplemented from Mixins::_TypedParameterizable.
Definition at line 90 of file Modules.py.
def Modules::ESPrefer::nameInProcessDesc_ | ( | self, | |
myname | |||
) |
Reimplemented from Mixins::_TypedParameterizable.
Definition at line 83 of file Modules.py.
def Modules::ESPrefer::targetLabel_ | ( | self | ) |
Definition at line 92 of file Modules.py.
Modules::ESPrefer::_targetLabel [private] |
Definition at line 72 of file Modules.py.