Beispiel #1
0
    def SetConcentrationGateEnd(self, dconc):

        if self.GetOptions() is not None:

            self.GetOptions().dConcentrationGateEnd = dconc

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")
Beispiel #2
0
    def GetConcentrationGateEnd(self):

        if self.GetOptions() is not None:

            return self.GetOptions().dConcentrationGateEnd

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")
Beispiel #3
0
    def GetIntervalEnd(self):

        if self.GetOptions() is not None:

            return self.GetOptions().dIntervalEnd

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")
Beispiel #4
0
    def SetIntervalEnd(self, dend):

        if self.GetOptions() is not None:

            self.GetOptions().dIntervalEnd = dend

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")
Beispiel #5
0
    def SetIntervalEntries(self, entries):

        if self.GetOptions() is not None:

            self.GetOptions().iIntervalEntries = entries

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")
Beispiel #6
0
    def SetSmallTableSize(self, size):

        if self.GetOptions() is not None:

            self.GetOptions().iSmallTableSize = size

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")
Beispiel #7
0
    def SetIntervalStart(self, dstart):

        if self.GetOptions() is not None:

            self.GetOptions().dIntervalStart = dstart

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")
Beispiel #8
0
    def IsActivatorSet(self):

        
        if self.GetOptions() is not None:

            value = self.GetOptions().iActivatorSet

            if value != 0:

                return True

            else:

                return False

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")
Beispiel #9
0
    def Construct(self, model=None):
        """
        @brief Constructs heccer from the options
        """
        if self.GetCore() is not None:

            heccer = self.GetCore()
            
        else:

            from errors import HeccerNotAllocatedError

            raise HeccerNotAllocatedError()



        if self.GetOptions() is not None:

            options = self.GetOptions()

        else:

            from errors import HeccerOptionsError

            raise HeccerOptionsError("Heccer Options are not allocated")


        # Here we connect the model to heccer
        model_source = None

        if model is not None:

            try:

                model_source = model.GetCore()

            except TypeError:
                
                model_source = model

        elif self._model_source is not None:

            try:
                
                model_source = self._model_source.GetCore()

            except TypeError:

                model_source = self._model_source

        else:
            
            from errors import HeccerOptionsError

            raise HeccerOptionsError("Model not found, cannot construct a Heccer")

        # Probably need to check allow options to be passed to the next two
        # args

        model_name = heccer.pcName

        result = heccer_base.HeccerConstruct( heccer,
                                     model_source,
                                     model_name,
                                     None,
                                     None
                                     )

        if result == 1:

            self._is_constructed = True
            
        return result