def _tree_store_link(self, node_in_traj, link, hdf5_group):
        """Creates a soft link.
        
        :param node_in_traj: parental node
        :param store_data: how to store data
        :param link: name of link
        :param hdf5_group: current parental hdf5 group
        """

        if hasattr(hdf5_group, link):
            return

        linked_traj_node = node_in_traj._links[link]
        linking_name = linked_traj_node.v_full_name.replace('.','/')
        linking_name = '/' + self._trajectory_name + '/' + linking_name
        try:
            to_link_hdf5_group = self._hdf5file.get_node(where=linking_name)
        except pt.NoSuchNodeError:
            self._logger.debug('Could not store link `%s` under `%s` immediately, '
                               'need to store `%s` first. '
                               'Will store the link right after.' % (link,
                                                                     node_in_traj.v_full_name,
                                                                     linked_traj_node.v_full_name))
            root = node_in_traj._nn_interface._root_instance
            self._tree_store_sub_branch(root, linked_traj_node.v_full_name,
                                        store_data=pypetconstants.STORE_DATA_SKIPPING,
                                        with_links=False, recursive=False,
                                        hdf5_group=self._trajectory_group)
            to_link_hdf5_group = self._hdf5file.get_node(where=linking_name)
        self._hdf5file.create_soft_link(where=hdf5_group,
                                  name=link,
                                  target=to_link_hdf5_group)
def _tree_store_link(self, node_in_traj, link, hdf5_group):
        """Creates a soft link.
        
        :param node_in_traj: parental node
        :param store_data: how to store data
        :param link: name of link
        :param hdf5_group: current parental hdf5 group
        """

        if hasattr(hdf5_group, link):
            return

        linked_traj_node = node_in_traj._links[link]
        linking_name = linked_traj_node.v_full_name.replace('.','/')
        linking_name = '/' + self._trajectory_name + '/' + linking_name
        try:
            to_link_hdf5_group = self._hdf5file.get_node(where=linking_name)
        except pt.NoSuchNodeError:
            self._logger.debug('Could not store link `%s` under `%s` immediately, '
                               'need to store `%s` first. '
                               'Will store the link right after.' % (link,
                                                                     node_in_traj.v_full_name,
                                                                     linked_traj_node.v_full_name))
            root = node_in_traj._nn_interface._root_instance
            self._tree_store_sub_branch(root, linked_traj_node.v_full_name,
                                        store_data=pypetconstants.STORE_DATA_SKIPPING,
                                        with_links=False, recursive=False,
                                        hdf5_group=self._trajectory_group)
            to_link_hdf5_group = self._hdf5file.get_node(where=linking_name)
        self._hdf5file.create_soft_link(where=hdf5_group,
                                  name=link,
                                  target=to_link_hdf5_group)
def _tree_store_link ( self , node_in_traj , link , hdf5_group ) : if hasattr ( hdf5_group , link ) : return linked_traj_node = node_in_traj . _links [ link ] linking_name = linked_traj_node . v_full_name . replace ( '.' , '/' ) linking_name = '/' + self . _trajectory_name + '/' + linking_name try : to_link_hdf5_group = self . _hdf5file . get_node ( where = linking_name ) except pt . NoSuchNodeError : self . _logger . debug ( 'Could not store link `%s` under `%s` immediately, ' 'need to store `%s` first. ' 'Will store the link right after.' % ( link , node_in_traj . v_full_name , linked_traj_node . v_full_name ) ) root = node_in_traj . _nn_interface . _root_instance self . _tree_store_sub_branch ( root , linked_traj_node . v_full_name , store_data = pypetconstants . STORE_DATA_SKIPPING , with_links = False , recursive = False , hdf5_group = self . _trajectory_group ) to_link_hdf5_group = self . _hdf5file . get_node ( where = linking_name ) self . _hdf5file . create_soft_link ( where = hdf5_group , name = link , target = to_link_hdf5_group )
Creates a soft link.
        
        :param node_in_traj: parental node
        :param store_data: how to store data
        :param link: name of link
        :param hdf5_group: current parental hdf5 group
Creates a soft link . : param node_in_traj : parental node : param store_data : how to store data : param link : name of link : param hdf5_group : current parental hdf5 group