km3pipe.io.daq

Pumps for the DAQ data formats.

Module Contents

Classes

TimesliceParser() Preliminary parser for DAQTimeslice
DAQPump() A pump for binary DAQ files.
DAQProcessor()
DAQPreamble(byte_data=None, file_obj=None) Wrapper for the JDAQPreamble binary format.
DAQHeader(byte_data=None, file_obj=None) Wrapper for the JDAQHeader binary format.
DAQSummaryslice(file_obj) Wrapper for the JDAQSummarySlice binary format.
DAQEvent(file_obj) Wrapper for the JDAQEvent binary format.
TMCHData(file_obj, version=None) Monitoring Channel data.
TMCHRepump() Takes a IO_MONIT raw dump and replays it.
DMMonitor(host, port=1302, base=’‘) A class which provides access to the Detector Manager parameters.

Functions

is_3dshower(trigger_mask)
is_mxshower(trigger_mask)
is_3dmuon(trigger_mask)
km3pipe.io.daq.log[source]
km3pipe.io.daq.DATA_TYPES[source]
km3pipe.io.daq.MINIMAL_RATE_HZ = 2000.0[source]
km3pipe.io.daq.MAXIMAL_RATE_HZ = 2000000.0[source]
class km3pipe.io.daq.TimesliceParser[source]

Bases:km3pipe.core.Module

Preliminary parser for DAQTimeslice

process(self, blob)[source]
class km3pipe.io.daq.DAQPump[source]

Bases:km3pipe.core.Pump

A pump for binary DAQ files.

configure(self)[source]
next_blob(self)[source]

Get the next frame from file

seek_to_frame(self, index)[source]

Move file pointer to the frame with given index.

get_blob(self, index)[source]

Return blob at given index.

determine_frame_positions(self)[source]

Record the file pointer position of each frame

process(self, blob)[source]

Pump the next blob to the modules

finish(self)[source]

Clean everything up

class km3pipe.io.daq.DAQProcessor[source]

Bases:km3pipe.core.Module

configure(self)[source]
process(self, blob)[source]
process_event(self, data, blob)[source]
process_summaryslice(self, data, blob)[source]
process_online_reco(self, data, blob)[source]
km3pipe.io.daq.RecoTrack[source]
km3pipe.io.daq.RecoShower[source]
class km3pipe.io.daq.DAQPreamble(byte_data=None, file_obj=None)[source]

Bases: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'
size = 8[source]
class km3pipe.io.daq.DAQHeader(byte_data=None, file_obj=None)[source]

Bases: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.
size = 20[source]
class km3pipe.io.daq.DAQSummaryslice(file_obj)[source]

Bases: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.

class km3pipe.io.daq.DAQEvent(file_obj)[source]

Bases: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)
class km3pipe.io.daq.TMCHData(file_obj, version=None)[source]

Bases:object

Monitoring Channel data.

class km3pipe.io.daq.TMCHRepump[source]

Bases:km3pipe.core.Pump

Takes a IO_MONIT raw dump and replays it.

configure(self)[source]
process(self, blob)[source]
blob_generator(self)[source]
finish(self)[source]
class km3pipe.io.daq.DMMonitor(host, port=1302, base='')[source]

Bases:object

A class which provides access to the Detector Manager parameters.

available_parameters[source]
get(self, path)[source]
start_session(self, name, paths, interval=10)[source]
km3pipe.io.daq.is_3dshower(trigger_mask)[source]
km3pipe.io.daq.is_mxshower(trigger_mask)[source]
km3pipe.io.daq.is_3dmuon(trigger_mask)[source]