def xrays_active(event):
    """
    Retrieves from Karabo the status of the x-ray beam at XFEL.

    Returns whether the x-ray beam is active for the current frame. Currently Karabo
    provides no information about the status of the x-ray beam at XFEL. Hence, this
    function determines the status of the beam according to information provided in the
    OnDA configuration file.

    * The file must include a entry called 'karabo_frame_ids_with_xrays_active'
      in the 'DataRetrievalLayer' parameter group.

    * The entry must contain a list of frame indexes for which the x-ray beam is
      supposed to be active.

    * If the index of the current frame within the event is included in the list, the
      x-ray beam is considered to be active.

    Arguments:

        event (:class:`~onda.utils.data_event.DataEvent`): an object storing the event
            data.

    Returns:

        bool: True if the x-ray beam is active, False otherwise.
    """
    frame_cell_id = event.data[event.framework_info['data_label']][
        'image.pulseId'][event.current_frame]
    return frame_cell_id in event.framework_info['frames_with_xrays']
