km3pipe.io.daq

Pumps for the DAQ data formats.

Module Contents

Classes

TimesliceParser

Preliminary parser for DAQTimeslice

RePump

A pump for binary DAQ files.

DAQPump

A pump for binary DAQ files. Deprecated!

DAQProcessor

The module which can be attached to the pipeline

DAQPreamble

Wrapper for the JDAQPreamble binary format.

DAQHeader

Wrapper for the JDAQHeader binary format.

DAQSummaryslice

Wrapper for the JDAQSummarySlice binary format.

DAQEvent

Wrapper for the JDAQEvent binary format.

TMCHData

Monitoring Channel data.

TMCHRepump

Takes a IO_MONIT raw dump and replays it.

DMMonitor

A class which provides access to the Detector Manager parameters.

Attributes

log

DATA_TYPES

MINIMAL_RATE_HZ

MAXIMAL_RATE_HZ

RecoTrack

RecoShower

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(name=None, **parameters)[source]

Preliminary parser for DAQTimeslice

configure()[source]

Configure module, like instance variables etc.

process(blob)[source]

Knead the blob and return it

class km3pipe.io.daq.RePump(name=None, **parameters)[source]

A pump for binary DAQ files.

This pump can be used to replay raw dumps e.g. created with the daqsample tool. It creates the same structures as the kp.io.ch.CHPump and thus suited to test online processing pipelines with offline files.

configure()[source]

Configure module, like instance variables etc.

process(blob)[source]

Knead the blob and return it

finish()[source]

Clean everything up.

class km3pipe.io.daq.DAQPump(name=None, **parameters)[source]

A pump for binary DAQ files. Deprecated!

configure()[source]

Configure module, like instance variables etc.

next_blob()[source]

Get the next frame from file

seek_to_frame(index)[source]

Move file pointer to the frame with given index.

get_blob(index)[source]

Return blob at given index.

determine_frame_positions()[source]

Record the file pointer position of each frame

process(blob)[source]

Pump the next blob to the modules

finish()[source]

Clean everything up

class km3pipe.io.daq.DAQProcessor(name=None, **parameters)[source]

The module which can be attached to the pipeline

configure()[source]

Configure module, like instance variables etc.

process(blob)[source]

Knead the blob and return it

process_event(data, blob)[source]
process_summaryslice(data, blob)[source]
process_online_reco(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]

Wrapper for the JDAQPreamble binary format.

Parameters:
byte_databytes (optional)

The binary file, where the file pointer is at the beginning of the header.

file_objfile (optional)

The binary file, where the file pointer is at the beginning of the header.

Attributes:
sizeint

The size of the original DAQ byte representation.

data_typeint

The data type of the following frame. The coding is stored in the DATA_TYPES.

size = 8[source]
class km3pipe.io.daq.DAQHeader(byte_data=None, file_obj=None)[source]

Wrapper for the JDAQHeader binary format.

Parameters:
byte_databytes (optional)

The binary file, where the file pointer is at the beginning of the header.

file_objfile (optional)

The binary file, where the file pointer is at the beginning of the header.

Attributes:
sizeint

The size of the original DAQ byte representation.

size = 20[source]
class km3pipe.io.daq.DAQSummaryslice(file_obj, legacy=False)[source]

Wrapper for the JDAQSummarySlice binary format.

Parameters:
file_objfile (optional)

The binary file, where the file pointer is at the beginning of the header.

Attributes:
n_summary_framesint

The number of summary frames.

summary_framesdict

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_ratesdict

The overall DOM rate for each DOM.

class km3pipe.io.daq.DAQEvent(file_obj, legacy=False)[source]

Wrapper for the JDAQEvent binary format.

Parameters:
file_objfile

The binary file, where the file pointer is at the beginning of the header.

Attributes:
trigger_counterint

Incremental identifier of the occurred trigger.

trigger_maskint

The trigger type(s) satisfied.

overlaysint

Number of merged events.

n_triggered_hitsint

Number of hits satisfying the trigger conditions.

n_snapshot_hitsint

Number of snapshot hits.

triggered_hitsnp.recarray

Array of triggered hits (fields: dom_id, pmt_id, tdc_time, tot, trigger_mask)

snapshot_hitsnp.recarray

A list of snapshot hits (fields: dom_id, pmt_id, tdc_time, tot)

triggered_hits_dt[source]
triggered_hits_dt_final[source]
snapshot_hits_dt[source]
snapshot_hits_dt_final[source]
class km3pipe.io.daq.TMCHData(file_obj, version=None)[source]

Monitoring Channel data.

class km3pipe.io.daq.TMCHRepump(name=None, **parameters)[source]

Takes a IO_MONIT raw dump and replays it.

configure()[source]

Configure module, like instance variables etc.

process(blob)[source]

Knead the blob and return it

blob_generator()[source]
finish()[source]

Clean everything up.

class km3pipe.io.daq.DMMonitor(host, port=1302, base='')[source]

A class which provides access to the Detector Manager parameters.

Examples

>>> import km3pipe as kp
>>> dmm = kp.io.daq.DMMonitor('192.168.0.120', base='clb/outparams')
>>> session = dmm.start_session('test', ['wr_mu/1/0','wr_mu/1/1'])
>>> for values in session:
        print(values)
property available_parameters[source]
get(path)[source]
start_session(name, paths, interval=10)[source]