DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
channelmap.cpp
Go to the documentation of this file.
1
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
37 py::class_<TPCChannelMap, std::shared_ptr<TPCChannelMap>>(m, "TPCChannelMap")
38 .def("get_offline_channel_from_det_crate_slot_stream_chan", &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
45 m.def("make_tpc_map", &make_tpc_map);
46
47
48 py::class_<PDSChannelMap::PDSChannelInfo>(m, "PDSChannelInfo")
49 .def(py::init<uint, uint, uint, uint>())
50 .def_readwrite("detector", &PDSChannelMap::PDSChannelInfo::detector)
51 .def_readwrite("crate", &PDSChannelMap::PDSChannelInfo::crate)
52 .def_readwrite("slot", &PDSChannelMap::PDSChannelInfo::slot)
53 .def_readwrite("stream", &PDSChannelMap::PDSChannelInfo::stream)
54 .def_readwrite("channel", &PDSChannelMap::PDSChannelInfo::channel)
55 .def_readwrite("element", &PDSChannelMap::PDSChannelInfo::element)
56 ;
57
58 py::class_<PDSChannelMap, std::shared_ptr<PDSChannelMap>>(m, "PDSChannelMap")
59 .def("get_offline_channel_from_det_crate_slot_stream_chan", &PDSChannelMap::get_offline_channel_from_det_crate_slot_stream_chan)
60 .def("get_element_from_offline_channel", &PDSChannelMap::get_element_from_offline_channel)
61 .def("get_element_name_from_offline_channel", &PDSChannelMap::get_element_name_from_offline_channel)
62 .def("get_det_crate_slot_fiber_chan_from_offline_channel", &PDSChannelMap::get_det_crate_slot_fiber_chan_from_offline_channel)
63 ;
64
65 m.def("make_pds_map", &make_pds_map);
66
67}
68
69} // namespace python
70} // namespace detchannelmaps
71} // namespace dunedaq
void register_maps(py::module &m)
The DUNE-DAQ namespace.
Definition DataStore.hpp:57