def orderLattice(self, beamline):
        """ ordering element type appearance sequence for each element of beamline
            e.g. after getFullBeamline,
            lattice list ['q','Q01', 'B11', 'Q02', 'B22'] will return:
            [(u'q',   u'CHARGE',   1),
             (u'q01', u'QUAD',     1),
             (u'b11', u'CSRCSBEN', 1),
             (u'q02', u'QUAD',     2),
             (u'b12', u'CSRCSBEN', 2)]

        """
        ele_name_list = self.getFullBeamline(beamline, extend=True)
        ele_type_list = [self.getElementType(ele) for ele in ele_name_list]
        order_list = [0] * len(ele_name_list)
        ele_type_dict_uniq = dict(zip(ele_type_list, order_list))
        for idx in xrange(len(ele_name_list)):
            etype = ele_type_list[idx]
            ele_type_dict_uniq[etype] += 1
            order_list[idx] = ele_type_dict_uniq[etype]

        return zip(ele_name_list, ele_type_list, order_list)
ordering element type appearance sequence for each element of beamline
            e.g. after getFullBeamline,
            lattice list ['q','Q01', 'B11', 'Q02', 'B22'] will return:
            [(u'q',   u'CHARGE',   1),
             (u'q01', u'QUAD',     1),
             (u'b11', u'CSRCSBEN', 1),
             (u'q02', u'QUAD',     2),
             (u'b12', u'CSRCSBEN', 2)]