def gofr_group(conn,sname):

    res_t = conn.execute("select dsets.key from dsets,comps where dsets.sname = ? and dsets.key = comps.dset_key and comps.function = 'Iden' and dsets.dtype = 't'",(sname,)).fetchall()

    res_z = conn.execute("select dsets.key from dsets,comps where dsets.sname = ? and dsets.key = comps.dset_key and comps.function = 'Iden' and dsets.dtype = 'z'",(sname,)).fetchall()
    for r in res_t:
        print r[0]
        cw.do_gofr(r[0],conn)
    for r in res_z:
        continue
        print r[0]
        cw.do_gofr(r[0],conn)
        cw.do_link3D(r[0],conn)
        cw.do_gofr3D(r[0],conn)
def gofr_date(conn,date):

    ## res_t = conn.execute("select key from dsets where date = ? and dtype = 't'",(date,)).fetchall()


    ## for r in res_t:
    ##     print r[0]
    ##     cw.do_gofr(r[0],conn)

    res_z = conn.execute("select key from dsets where date = ? and dtype = 'z'",(date,)).fetchall()
    for r in res_z:
        print r[0]
        #cw.do_gofr(r[0],conn)
        #cw.do_link3D(r[0],conn)
        cw.do_gofr3D(r[0],conn)