DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
dunedaq
sourcecode
detdataformats
pybindsrc
hsi.cpp
Go to the documentation of this file.
1
8
#include "
detdataformats/HSIFrame.hpp
"
9
10
#include <pybind11/pybind11.h>
11
#include <pybind11/stl.h>
12
13
namespace
py = pybind11;
14
15
namespace
dunedaq::detdataformats::python
{
16
17
void
18
register_hsi
(py::module& m)
19
{
20
21
py::class_<HSIFrame> (m,
"HSIFrame"
, py::buffer_protocol())
22
.def(py::init())
23
.def(py::init([](py::capsule capsule) {
24
auto
hsfp = *
static_cast<
HSIFrame
*
>
(capsule.get_pointer());
25
return
hsfp;
26
} ))
27
.def(py::init([](py::bytes bytes){
28
py::buffer_info info(py::buffer(bytes).request());
29
auto
wfp = *
static_cast<
HSIFrame
*
>
(info.ptr);
30
return
wfp;
31
}))
32
.def(
"get_timestamp"
, &
HSIFrame::get_timestamp
)
33
.def_property_readonly(
"version"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
version
;})
34
.def_property_readonly(
"detector_id"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
detector_id
;})
35
.def_property_readonly(
"crate"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
crate
;})
36
.def_property_readonly(
"slot"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
slot
;})
37
.def_property_readonly(
"link"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
link
;})
38
.def_property_readonly(
"input_low"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
input_low
;})
39
.def_property_readonly(
"input_high"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
input_high
;})
40
.def_property_readonly(
"trigger"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
trigger
;})
41
.def_property_readonly(
"sequence"
, [](
const
HSIFrame
& self) -> uint64_t {
return
self.
sequence
;})
42
.def_static(
"sizeof"
, [](){
return
sizeof
(
HSIFrame
); })
43
;
44
}
45
46
}
// namespace dunedaq::detdataformats::python
HSIFrame.hpp
dunedaq::detdataformats::HSIFrame
Definition
HSIFrame.hpp:19
dunedaq::detdataformats::HSIFrame::get_timestamp
uint64_t get_timestamp() const
Definition
HSIFrame.hpp:32
dunedaq::detdataformats::HSIFrame::link
word_t link
Definition
HSIFrame.hpp:24
dunedaq::detdataformats::HSIFrame::version
word_t version
Definition
HSIFrame.hpp:24
dunedaq::detdataformats::HSIFrame::sequence
word_t sequence
Definition
HSIFrame.hpp:30
dunedaq::detdataformats::HSIFrame::slot
word_t slot
Definition
HSIFrame.hpp:24
dunedaq::detdataformats::HSIFrame::trigger
word_t trigger
Definition
HSIFrame.hpp:29
dunedaq::detdataformats::HSIFrame::detector_id
word_t detector_id
Definition
HSIFrame.hpp:24
dunedaq::detdataformats::HSIFrame::input_high
word_t input_high
Definition
HSIFrame.hpp:28
dunedaq::detdataformats::HSIFrame::input_low
word_t input_low
Definition
HSIFrame.hpp:27
dunedaq::detdataformats::HSIFrame::crate
word_t crate
Definition
HSIFrame.hpp:24
dunedaq::detdataformats::python
Definition
daqethheader.cpp:19
dunedaq::detdataformats::python::register_hsi
void register_hsi(py::module &m)
Definition
hsi.cpp:18
Generated on Sat Jun 28 2025 for DUNE-DAQ by
1.12.0