Exemplo n.º 1
0
    def clone(self, **params):
        returnValue = SwitchProducer.__new__(type(self))

        # Need special treatment as cms.EDProducer is not a valid parameter type (except in this case)
        myparams = dict()
        for name, value in six.iteritems(params):
            if value is None:
                continue
            elif isinstance(value, dict):
                myparams[name] = self.__dict__[name].clone(**value)
            else: # value is an EDProducer
                myparams[name] = value.clone()

        # Add the ones that were not customized
        for name in self.parameterNames_():
            if name not in params:
                myparams[name] = self.__dict__[name].clone()
        returnValue.__init__(**myparams)
        returnValue._isModified = False
        returnValue._isFrozen = False
        saveOrigin(returnValue, 1)
        return returnValue
Exemplo n.º 2
0
 def __init__(self,type_,*arg,**kargs):
     super(ESSource,self).__init__(type_,*arg,**kargs)
     saveOrigin(self, 1)
Exemplo n.º 3
0
 def __init__(self,type_,*arg,**kargs):
     super(_Module,self).__init__(type_,*arg,**kargs)
     if _Module.__isStrict__:
         self.setIsFrozen()
     saveOrigin(self, 2)