ctb adc names (#757)

* first draft of adc names

* fixed tests

* formatting

* added python functions in src

---------

Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com>
This commit is contained in:
2023-05-31 21:07:07 +02:00
committed by GitHub
parent 225e5490d2
commit b9a346a396
12 changed files with 564 additions and 50 deletions

View File

@ -1647,10 +1647,33 @@ void init_det(py::module &m) {
(defs::dacIndex(Detector::*)(const std::string &)) &
Detector::getDacIndex,
py::arg());
CppDetectorApi.def(
"setDacName",
(void (Detector::*)(defs::dacIndex, const std::string &)) &
Detector::setDacName,
py::arg(), py::arg());
CppDetectorApi.def("getDacName",
(std::string(Detector::*)(defs::dacIndex)) &
Detector::getDacName,
py::arg());
CppDetectorApi.def("setAdcNames",
(void (Detector::*)(const std::vector<std::string>)) &
Detector::setAdcNames,
py::arg());
CppDetectorApi.def("getAdcNames",
(std::vector<std::string>(Detector::*)() const) &
Detector::getAdcNames);
CppDetectorApi.def("getAdcIndex",
(int (Detector::*)(const std::string &)) &
Detector::getAdcIndex,
py::arg());
CppDetectorApi.def("setAdcName",
(void (Detector::*)(const int, const std::string &)) &
Detector::setAdcName,
py::arg(), py::arg());
CppDetectorApi.def("getAdcName",
(std::string(Detector::*)(int)) & Detector::getAdcName,
py::arg());
CppDetectorApi.def(
"setPattern",
(void (Detector::*)(const std::string &, sls::Positions)) &