def store_values_in_register(self, values_dict):
     from share_objects import register
     if register.get(self._name, None) is not None:
         logging.error("register name already set! Choose a unique name for the data table. Current name: {}"
                       .format(self._name))
         raise ValueError
     register[self._name] = values_dict
예제 #2
0
 def store_curves_in_register(self):
     from share_objects import register
     if register.get(self._name, None) is not None:
         logging.error(
             "register name already set! Choose a unique name for the data table. Current name: {}"
             .format(self._name))
         raise ValueError
     register[self._name] = RegisterCalculationData(curves=self._curves)
예제 #3
0
 def store_in_register(self):
     if self._register_name is not None:
         from share_objects import register
         if register.get(self._register_name, None) is not None:
             logging.error("register name already set! Choose a unique name. Current name: {}"
                           .format(self._register_name))
             raise ValueError
         register[self._register_name] = self._store_data
 def store_tables_in_register(self, data_tables):
     from share_objects import register
     for slot in self._slots:
         data_table = data_tables[slot]
         register_name = "{}_{}".format(self._name, slot)
         if register.get(register_name, None) is not None:
             logging.error(
                 "register name already set! Choose a unique name for the data table. Current name: {}"
                 .format(register_name))
             raise ValueError
         register[register_name] = data_table