DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
unpack.cpp File Reference
#include "fddetdataformats/WIBFrame.hpp"
#include "fddetdataformats/WIB2Frame.hpp"
#include "fddetdataformats/DAPHNEFrame.hpp"
#include "fddetdataformats/WIBEthFrame.hpp"
#include "fddetdataformats/TDEEthFrame.hpp"
#include "daqdataformats/Fragment.hpp"
#include <pybind11/numpy.h>
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>
#include <fmt/core.h>
Include dependency graph for unpack.cpp:

Go to the source code of this file.

Namespaces

namespace  dunedaq
 Including Qt Headers.
 
namespace  dunedaq::rawdatautils
 
namespace  dunedaq::rawdatautils::wib
 
namespace  dunedaq::rawdatautils::wib2
 
namespace  dunedaq::rawdatautils::wibeth
 
namespace  dunedaq::rawdatautils::daphne
 
namespace  dunedaq::rawdatautils::tde
 
namespace  dunedaq::rawdatautils::unpack
 
namespace  dunedaq::rawdatautils::unpack::python
 

Functions

void dunedaq::rawdatautils::print_hex_fragment (daqdataformats::Fragment const &frag)
 
py::array_t< uint16_t > dunedaq::rawdatautils::wib::np_array_adc (daqdataformats::Fragment &frag)
 Unpacks a Fragment containing WIBFrames into a numpy array with the ADC values and dimension (number of WIBFrames in the Fragment, 256)
 
py::array_t< uint16_t > dunedaq::rawdatautils::wib::np_array_adc_data (void *data, int nframes)
 Unpacks data containing WIBFrames into a numpy array with the ADC values and dimension (number of WIBFrames, 256) Warning: It doesn't check that nframes is a sensible value (can read out of bounds)
 
py::array_t< uint64_t > dunedaq::rawdatautils::wib::np_array_timestamp (daqdataformats::Fragment &frag)
 Unpacks the timestamps in a Fragment containing WIBFrames into a numpy array with dimension (number of WIBFrames in the Fragment)
 
py::array_t< uint64_t > dunedaq::rawdatautils::wib::np_array_timestamp_data (void *data, int nframes)
 Unpacks data containing WIBFrames into a numpy array with the timestamps with dimension (number of WIBFrames) Warning: It doesn't check that nframes is a sensible value (can read out of bounds)
 
uint32_t dunedaq::rawdatautils::wib2::get_n_frames (daqdataformats::Fragment const &frag)
 Gets number of WIB2Frames in a fragment.
 
py::array_t< uint16_t > dunedaq::rawdatautils::wib2::np_array_adc (daqdataformats::Fragment const &frag)
 Unpacks a Fragment containing WIB2Frames into a numpy array with the ADC values and dimension (number of WIB2Frames in the Fragment, 256)
 
py::array_t< uint16_t > dunedaq::rawdatautils::wib2::np_array_adc_data (void *data, int nframes)
 Unpacks data containing WIB2Frames into a numpy array with the ADC values and dimension (number of WIB2Frames, 256) Warning: It doesn't check that nframes is a sensible value (can read out of bounds)
 
py::array_t< uint64_t > dunedaq::rawdatautils::wib2::np_array_timestamp (daqdataformats::Fragment const &frag)
 Unpacks the timestamps in a Fragment containing WIBFrames into a numpy array with dimension (number of WIB2Frames in the Fragment)
 
py::array_t< uint64_t > dunedaq::rawdatautils::wib2::np_array_timestamp_data (void *data, int nframes)
 Unpacks data containing WIB2Frames into a numpy array with the timestamps with dimension (number of WIB2Frames) Warning: It doesn't check that nframes is a sensible value (can read out of bounds)
 
uint32_t dunedaq::rawdatautils::wibeth::get_n_frames (daqdataformats::Fragment const &frag)
 Gets number of WIBEthFrames in a fragment.
 
py::array_t< uint16_t > dunedaq::rawdatautils::wibeth::np_array_adc (daqdataformats::Fragment const &frag)
 Unpacks a Fragment containing WIBEthFrames into a numpy array with the ADC values and dimension (number of WIBEthFrames in the Fragment, 64)
 
py::array_t< uint16_t > dunedaq::rawdatautils::wibeth::np_array_adc_data (void *data, uint32_t n_frames)
 Unpacks data containing WIBEthFrames into a numpy array with the ADC values and dimension (number of WIBEthFrames, 64) Warning: It doesn't check that n_frames is a sensible value (can read out of bounds)
 
py::array_t< uint64_t > dunedaq::rawdatautils::wibeth::np_array_timestamp (daqdataformats::Fragment const &frag)
 Unpacks the timestamps in a Fragment containing WIBFrames into a numpy array with dimension (number of WIBEthFrames in the Fragment)
 
py::array_t< uint64_t > dunedaq::rawdatautils::wibeth::np_array_timestamp_data (void *data, uint32_t n_frames)
 Unpacks data containing WIBEthFrames into a numpy array with the timestamps with dimension (number of WIBEthFrames) Warning: It doesn't check that n_frames is a sensible value (can read out of bounds)
 
uint32_t dunedaq::rawdatautils::daphne::get_n_frames (daqdataformats::Fragment const &frag)
 Gets number of DAPHNEFrames in a fragment

 
py::array_t< uint16_t > dunedaq::rawdatautils::daphne::np_array_adc (daqdataformats::Fragment &frag)
 Unpacks a Fragment containing DAPHNEFrames into a numpy array with the ADC values and dimension (number of DAPHNEFrames in the Fragment, 320)
 
py::array_t< uint8_t > dunedaq::rawdatautils::daphne::np_array_channels (daqdataformats::Fragment &frag)
 Unpacks channel numbers for Fragment that contains DAPHNEFrames into a numpy array with dimensions

 
py::array_t< uint16_t > dunedaq::rawdatautils::daphne::np_array_adc_data (void *data, int nframes)
 Unpacks data containing DAPHNEFrames into a numpy array with the ADC values and dimension (number of DAPHNEFrames, channels_per_daphne) Warning: It doesn't check that nframes is a sensible value (can read out of bounds)
 
py::array_t< uint64_t > dunedaq::rawdatautils::daphne::np_array_timestamp (daqdataformats::Fragment &frag)
 Unpacks the timestamps in a Fragment containing WIBFrames into a numpy array with dimension (number of DAPHNEFrames in the Fragment)
 
py::array_t< uint64_t > dunedaq::rawdatautils::daphne::np_array_timestamp_data (void *data, int nframes)
 Unpacks data containing DAPHNEFrames into a numpy array with the timestamps with dimension (number of DAPHNEFrames) Warning: It doesn't check that nframes is a sensible value (can read out of bounds)
 
py::array_t< uint8_t > dunedaq::rawdatautils::daphne::np_array_channels_data (void *data, int nframes)
 Unpacks channel numbers for DAPHNEFrames into a numpy array with dimensions (nframes)

 
uint32_t dunedaq::rawdatautils::daphne::get_n_frames_stream (daqdataformats::Fragment const &frag)
 Gets number of DAPHNEStreamFrames in a fragment

 
py::array_t< uint16_t > dunedaq::rawdatautils::daphne::np_array_adc_stream (daqdataformats::Fragment &frag)
 Unpacks a Fragment containing DAPHNEStreamFrames into a numpy array with the
ADC values and dimension (number of DAPHNEStreamFrames in the Fragment, 4)

 
py::array_t< uint8_t > dunedaq::rawdatautils::daphne::np_array_channels_stream (daqdataformats::Fragment &frag)
 Unpacks channel numbers for Fragment that contains DAPHNEStreamFrames into a numpy array with dimensions

 
py::array_t< uint16_t > dunedaq::rawdatautils::daphne::np_array_adc_stream_data (void *data, int nframes)
 Unpacks data containing DAPHNEStreamFrames into a numpy array with the ADC
values and dimension (number of DAPHNEStreamFrames * adcs_per_channel (64), channels_per_frame (4))
Warning: It doesn't check that nframes is a sensible value (can read out of bounds)

 
py::array_t< uint64_t > dunedaq::rawdatautils::daphne::np_array_timestamp_stream (daqdataformats::Fragment &frag)
 Unpacks the timestamps in a Fragment containing DAPHNEStreamFrames into a numpy
array with dimension (number of DAPHNEStreamFrames in the Fragment)

 
py::array_t< uint64_t > dunedaq::rawdatautils::daphne::np_array_timestamp_stream_data (void *data, int nframes)
 Unpacks data containing DAPHNEStreamFrames into a numpy array with the
timestamps with dimension (number of DAPHNEStreamFrames)
Warning: It doesn't check that nframes is a sensible value (can read out of bounds)

 
py::array_t< uint8_t > dunedaq::rawdatautils::daphne::np_array_channels_stream_data (void *data, int nframes)
 Unpacks channel numbers for DAPHNEStreamFrames into a numpy array with dimensions (nframes, s_channels_per_frame)

 
uint32_t dunedaq::rawdatautils::tde::get_n_frames (daqdataformats::Fragment const &frag)
 Gets number of TDEEthFrames in a fragment.
 
py::array_t< uint16_t > dunedaq::rawdatautils::tde::np_array_adc (daqdataformats::Fragment const &frag)
 Unpacks a Fragment containing TDEEthFrames into a numpy array with the ADC values and dimension (number of TDEEthFrames in the Fragment, 64)
 
py::array_t< uint16_t > dunedaq::rawdatautils::tde::np_array_adc_data (void *data, uint32_t n_frames)
 Unpacks data containing TDEEthFrames into a numpy array with the ADC values and dimension (number of TDEEthFrames, 64) Warning: It doesn't check that n_frames is a sensible value (can read out of bounds)
 
py::array_t< long double > dunedaq::rawdatautils::tde::np_array_timestamp (daqdataformats::Fragment const &frag)
 Unpacks the timestamps in a Fragment containing TDEEthFrames into a numpy array with dimension (number of TDEEthFrames in the Fragment)
 
py::array_t< long double > dunedaq::rawdatautils::tde::np_array_timestamp_data (void *data, uint32_t n_frames)
 Unpacks data containing TDEEthFrames into a numpy array with the timestamps with dimension (number of TDEEthFrames) Warning: It doesn't check that n_frames is a sensible value (can read out of bounds)
 
void dunedaq::rawdatautils::unpack::python::register_unpack (py::module &)
 

Detailed Description

Python bindings for python unpackers of data

This is part of the DUNE DAQ Software Suite, copyright 2020. Licensing/copyright details are in the COPYING file that you should have received with this code.

Definition in file unpack.cpp.