def get_writetoinput_filenames(writetofile):
    """
    Extract the writeToFile file name(s).
    writeToFile='tmpin_mc16_13TeV.blah:AOD.15760866._000002.pool.root.1'
    -> return 'tmpin_mc16_13TeV.blah'

    :param writetofile: string containing file name information.
    :return: list of file names
    """

    filenames = []
    entries = writetofile.split('^')
    for entry in entries:
        if ':' in entry:
            name = entry.split(":")[0]
            name = name.replace('.pool.root.', '.txt.')  # not necessary?
            filenames.append(name)

    return filenames