Esempio n. 1
0
    def setMaxEventsOutput(self, maxEv, moduleName=None):
        """
        _setMaxEventsOutput_
        """
        value = CfgTypes.untracked(CfgTypes.int32(maxEv))

        if moduleName == None:
            self.data.output = value
            return

        cfgType = getattr(self.data, "output", None)
        if cfgType.__class__.__name__ == "VPSet":
            # is a VPset so we append to that
            self.data.output.append(
                CfgTypes.untracked(CfgTypes.PSet(moduleName=value)))
        else:
            # add new VPset
            self.data.output = CfgTypes.untracked(
                CfgTypes.VPSet(
                    CfgTypes.untracked(CfgTypes.PSet(moduleName=value))))
        return