@classmethod
def _analyseOneLoop(cls, fields, start_idx):
    """Processes one loop in the data extraction of the CIF file
        :param list fields: list of all the words contained in the cif file
        :param int start_idx: the starting index corresponding to the "loop_" key
        :return: the list of loop dictionaries, the length of the data
            extracted from the fields and the list of all the keys of the loop.
        :rtype: tuple
        """
    loop = []
    keys = []
    i = start_idx + 1
    finished = False
    while not finished:
        if fields[i][0] == cls.UNDERSCORE:
            keys.append(fields[i])
            i += 1
        else:
            finished = True
    data = []
    while True:
        if i >= len(fields):
            break
        elif len(fields[i]) == 0:
            break
        elif fields[i][0] == cls.UNDERSCORE:
            break
        elif fields[i] in (cls.LOOP, cls.STOP, cls.GLOBAL, cls.DATA, cls.SAVE):
            break
        else:
            data.append(fields[i])
            i += 1
    k = 0
    if len(data) < len(keys):
        element = {}
        for j in keys:
            if k < len(data):
                element[j] = data[k]
            else:
                element[j] = cls.QUESTIONMARK
            k += 1
        loop.append(element)
    else:
        for i in range(len(data) // len(keys)):
            element = {}
            for j in keys:
                element[j] = data[k]
                k += 1
            loop.append(element)
    return loop, 1 + len(keys) + len(data), keys
