:mod:`km3pipe.io.daq` ===================== .. py:module:: km3pipe.io.daq .. autoapi-nested-parse:: Pumps for the DAQ data formats. .. !! processed by numpydoc !! Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: km3pipe.io.daq.TimesliceParser km3pipe.io.daq.DAQPump km3pipe.io.daq.DAQProcessor km3pipe.io.daq.DAQPreamble km3pipe.io.daq.DAQHeader km3pipe.io.daq.DAQSummaryslice km3pipe.io.daq.DAQEvent km3pipe.io.daq.TMCHData km3pipe.io.daq.TMCHRepump km3pipe.io.daq.DMMonitor Functions ~~~~~~~~~ .. autoapisummary:: km3pipe.io.daq.is_3dshower km3pipe.io.daq.is_mxshower km3pipe.io.daq.is_3dmuon .. data:: log .. data:: DATA_TYPES .. data:: MINIMAL_RATE_HZ :annotation: = 2000.0 .. data:: MAXIMAL_RATE_HZ :annotation: = 2000000.0 .. py:class:: TimesliceParser Bases::class:`km3pipe.core.Module` Preliminary parser for DAQTimeslice .. !! processed by numpydoc !! .. method:: process(self, blob) .. py:class:: DAQPump Bases::class:`km3pipe.core.Pump` A pump for binary DAQ files. .. !! processed by numpydoc !! .. method:: configure(self) .. method:: next_blob(self) Get the next frame from file .. !! processed by numpydoc !! .. method:: seek_to_frame(self, index) Move file pointer to the frame with given index. .. !! processed by numpydoc !! .. method:: get_blob(self, index) Return blob at given index. .. !! processed by numpydoc !! .. method:: determine_frame_positions(self) Record the file pointer position of each frame .. !! processed by numpydoc !! .. method:: process(self, blob) Pump the next blob to the modules .. !! processed by numpydoc !! .. method:: finish(self) Clean everything up .. !! processed by numpydoc !! .. py:class:: DAQProcessor Bases::class:`km3pipe.core.Module` .. method:: configure(self) .. method:: process(self, blob) .. method:: process_event(self, data, blob) .. method:: process_summaryslice(self, data, blob) .. method:: process_online_reco(self, data, blob) .. data:: RecoTrack .. data:: RecoShower .. py:class:: DAQPreamble(byte_data=None, file_obj=None) Bases::class:`object` Wrapper for the JDAQPreamble binary format. Args: file_obj (file): The binary file, where the file pointer is at the beginning of the header. Attributes: size (int): The size of the original DAQ byte representation. data_type (int): The data type of the following frame. The coding is stored in the ``DATA_TYPES`` dictionary:: 101: 'DAQSuperFrame' 201: 'DAQSummaryFrame' 1001: 'DAQTimeslice' 2001: 'DAQSummaryslice' 10001: 'DAQEvent' .. !! processed by numpydoc !! .. attribute:: size :annotation: = 8 .. py:class:: DAQHeader(byte_data=None, file_obj=None) Bases::class:`object` Wrapper for the JDAQHeader binary format. Args: file_obj (file): The binary file, where the file pointer is at the beginning of the header. Attributes: size (int): The size of the original DAQ byte representation. .. !! processed by numpydoc !! .. attribute:: size :annotation: = 20 .. py:class:: DAQSummaryslice(file_obj) Bases::class:`object` Wrapper for the JDAQSummarySlice binary format. Args: file_obj (file): The binary file, where the file pointer is at the beginning of the header. Attributes: n_summary_frames (int): The number of summary frames. summary_frames (dict): The PMT rates for each DOM. The key is the DOM identifier and the corresponding value is a sorted list of PMT rates in [Hz]. dom_rates (dict): The overall DOM rate for each DOM. .. !! processed by numpydoc !! .. py:class:: DAQEvent(file_obj) Bases::class:`object` Wrapper for the JDAQEvent binary format. Args: file_obj (file): The binary file, where the file pointer is at the Attributes: trigger_counter (int): Incremental identifier of the occurred trigger. trigger_mask (int): The trigger type(s) satisfied. overlays (int): Number of merged events. n_triggered_hits (int): Number of hits satisfying the trigger conditions. n_snapshot_hits (int): Number of snapshot hits. triggered_hits (list): A list of triggered hits (dom_id, pmt_id, tdc_time, tot, (trigger_mask,)) snapshot_hits (list): A list of snapshot hits (dom_id, pmt_id, tdc_time, tot) .. !! processed by numpydoc !! .. py:class:: TMCHData(file_obj, version=None) Bases::class:`object` Monitoring Channel data. .. !! processed by numpydoc !! .. py:class:: TMCHRepump Bases::class:`km3pipe.core.Pump` Takes a IO_MONIT raw dump and replays it. .. !! processed by numpydoc !! .. method:: configure(self) .. method:: process(self, blob) .. method:: blob_generator(self) .. method:: finish(self) .. py:class:: DMMonitor(host, port=1302, base='') Bases::class:`object` A class which provides access to the Detector Manager parameters. .. !! processed by numpydoc !! .. attribute:: available_parameters .. method:: get(self, path) .. method:: start_session(self, name, paths, interval=10) .. function:: is_3dshower(trigger_mask) .. function:: is_mxshower(trigger_mask) .. function:: is_3dmuon(trigger_mask)