def srv_event(token, hits, url=RBA_URL):
    """Serve event to RainbowAlga"""

    if url is None:
        log.error("Please provide a valid RainbowAlga URL.")
        return

    ws_url = url + '/message'

    if isinstance(hits, pd.core.frame.DataFrame):
        pos = [tuple(x) for x in hits[['x', 'y', 'z']].values]
        time = list(hits['time'])
        tot = list(hits['tot'])
    elif isinstance(hits, Table):
        pos = list(zip(hits.pos_x, hits.pos_y, hits.pos_z))
        time = list(hits.time)
        tot = list(hits.tot)
    else:
        log.error(
            "No calibration information found in hits (type: {0})".format(
                type(hits)
            )
        )
        return

    event = {
        "hits": {
            'pos': pos,
            'time': time,
            'tot': tot,
        }
    }

    srv_data(ws_url, token, event, 'event')