DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
channelmap.cpp
Go to the documentation of this file.
1
10
11#include <pybind11/pybind11.h>
12#include <pybind11/stl.h>
13
14#include <iomanip>
15
16namespace py = pybind11;
17
18namespace dunedaq {
19namespace detchannelmaps {
20namespace python {
21
22void
23register_maps(py::module& m)
24{
25
26 py::class_<TPCChannelMap::TPCChannelInfo>(m, "TPCChannelInfo")
27 .def(py::init<uint, uint, uint, uint>())
28 .def_readwrite("detector", &TPCChannelMap::TPCChannelInfo::detector)
29 .def_readwrite("crate", &TPCChannelMap::TPCChannelInfo::crate)
30 .def_readwrite("slot", &TPCChannelMap::TPCChannelInfo::slot)
31 .def_readwrite("stream", &TPCChannelMap::TPCChannelInfo::stream)
32 .def_readwrite("channel", &TPCChannelMap::TPCChannelInfo::channel)
33 .def_readwrite("element", &TPCChannelMap::TPCChannelInfo::element)
34 ;
35
36 py::class_<TPCChannelMap, std::shared_ptr<TPCChannelMap>>(m, "TPCChannelMap")
37 .def("get_offline_channel_from_det_crate_slot_stream_chan", &TPCChannelMap::get_offline_channel_from_det_crate_slot_stream_chan)
38 .def("get_plane_from_offline_channel", &TPCChannelMap::get_plane_from_offline_channel)
39 .def("get_element_id_from_offline_channel", &TPCChannelMap::get_element_id_from_offline_channel)
40 .def("get_element_name_from_offline_channel", &TPCChannelMap::get_element_name_from_offline_channel)
41 .def("get_channel_info_from_offline_channel", &TPCChannelMap::get_channel_info_from_offline_channel)
42 ;
43
44 m.def("make_tpc_map", &make_tpc_map);
45
46}
47
48} // namespace python
49} // namespace detchannelmaps
50} // namespace dunedaq
void register_maps(py::module &m)
Including Qt Headers.