DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
channelmap.cpp
Go to the documentation of this file.
1
8
11
12#include <pybind11/pybind11.h>
13#include <pybind11/stl.h>
14
15#include <iomanip>
16
17namespace py = pybind11;
18
19namespace dunedaq {
20namespace detchannelmaps {
21namespace python {
22
23void
24register_maps(py::module& m)
25{
26
27 py::class_<TPCChannelMap::TPCChannelInfo>(m, "TPCChannelInfo")
28 .def(py::init<uint, uint, uint, uint>())
29 .def_readwrite("detector", &TPCChannelMap::TPCChannelInfo::detector)
30 .def_readwrite("crate", &TPCChannelMap::TPCChannelInfo::crate)
31 .def_readwrite("slot", &TPCChannelMap::TPCChannelInfo::slot)
32 .def_readwrite("stream", &TPCChannelMap::TPCChannelInfo::stream)
33 .def_readwrite("channel", &TPCChannelMap::TPCChannelInfo::channel)
34 .def_readwrite("element", &TPCChannelMap::TPCChannelInfo::element);
35
36 py::class_<TPCChannelMap, std::shared_ptr<TPCChannelMap>>(m, "TPCChannelMap")
37 .def("get_offline_channel_from_det_crate_slot_stream_chan",
38 &TPCChannelMap::get_offline_channel_from_det_crate_slot_stream_chan)
39 .def("get_plane_from_offline_channel", &TPCChannelMap::get_plane_from_offline_channel)
40 .def("get_element_id_from_offline_channel", &TPCChannelMap::get_element_id_from_offline_channel)
41 .def("get_element_name_from_offline_channel", &TPCChannelMap::get_element_name_from_offline_channel)
42 .def("get_channel_info_from_offline_channel", &TPCChannelMap::get_channel_info_from_offline_channel);
43
44 m.def("make_tpc_map", &make_tpc_map);
45
46 py::class_<PDSChannelMap::PDSChannelInfo>(m, "PDSChannelInfo")
47 .def(py::init<uint, uint, uint, uint>())
48 .def_readwrite("detector", &PDSChannelMap::PDSChannelInfo::detector)
49 .def_readwrite("crate", &PDSChannelMap::PDSChannelInfo::crate)
50 .def_readwrite("slot", &PDSChannelMap::PDSChannelInfo::slot)
51 .def_readwrite("stream", &PDSChannelMap::PDSChannelInfo::stream)
52 .def_readwrite("channel", &PDSChannelMap::PDSChannelInfo::channel)
53 .def_readwrite("element", &PDSChannelMap::PDSChannelInfo::element);
54
55 py::class_<PDSChannelMap, std::shared_ptr<PDSChannelMap>>(m, "PDSChannelMap")
56 .def("get_offline_channel_from_det_crate_slot_stream_chan",
57 &PDSChannelMap::get_offline_channel_from_det_crate_slot_stream_chan)
58 .def("get_element_from_offline_channel", &PDSChannelMap::get_element_from_offline_channel)
59 .def("get_element_name_from_offline_channel", &PDSChannelMap::get_element_name_from_offline_channel)
60 .def("get_det_crate_slot_fiber_chan_from_offline_channel",
61 &PDSChannelMap::get_det_crate_slot_fiber_chan_from_offline_channel);
62
63 m.def("make_pds_map", &make_pds_map);
64}
65
66} // namespace python
67} // namespace detchannelmaps
68} // namespace dunedaq
void register_maps(py::module &m)
The DUNE-DAQ namespace.