Example #1
0
 def dumpPythonAs(self, label, options=PrintOptions()):
    result = options.indentation()
    basename = self._targetLabel
    if basename == '':
        basename = self.type_()
    if options.isCfg:
        # do either type or label
        result += 'process.prefer("'+basename+'"'
        if self.parameterNames_():
            result += ",\n"+_Parameterizable.dumpPython(self,options)+options.indentation()
        result +=')\n'
    else:
        # use the base class Module
        result += 'es_prefer_'+basename+' = cms.ESPrefer("'+self.type_()+'"'
        if self._targetLabel != '':
           result += ',"'+self._targetLabel+'"'
        if self.parameterNames_():
            result += ",\n"+_Parameterizable.dumpPython(self,options)+options.indentation()
        result += ')\n'
    return result
Example #2
0
 def dumpPython(self, options=PrintOptions()):
     return self.pythonTypeName()+"(\n"+_Parameterizable.dumpPython(self, options)+options.indentation()+")"
Example #3
0
 def dumpPython(self, options=PrintOptions()):
     return self.pythonTypeName() + "(\n" + _Parameterizable.dumpPython(
         self, options) + options.indentation() + ")"