From ee4f89a0f4df598834d6ee84149f2d3fad33a59b Mon Sep 17 00:00:00 2001 From: Erik Wallin Date: Sat, 15 Nov 2025 01:51:27 +0000 Subject: [PATCH 1/6] Added derived classes PyTargetHCal and PyTargetECal, for when they need individual interfaces --- src/pflib/python/bindings.cxx | 112 ++++++++++++++++++++++++++++------ 1 file changed, 95 insertions(+), 17 deletions(-) diff --git a/src/pflib/python/bindings.cxx b/src/pflib/python/bindings.cxx index cebf30e36..add9df243 100644 --- a/src/pflib/python/bindings.cxx +++ b/src/pflib/python/bindings.cxx @@ -27,14 +27,11 @@ * here in order to ease passage of configuration between rogue and us. */ class PyTarget { + protected: /// our handle to the pflib::Target std::shared_ptr tgt_; - public: - /// construct a PyTarget given some arbitrary Python dict of parameters - PyTarget(bp::dict config) { - // where we std::make_shared a dervied type of pflib::Target - // depending on the setup + void parse_config(bp::dict config){ std::cout << "creating { "; for (auto it = bp::stl_input_iterator(config.items()); it != bp::stl_input_iterator(); it++) { @@ -44,38 +41,50 @@ class PyTarget { std::cout << key << ": " << val << ", "; } std::cout << "}" << std::endl; - - tgt_.reset( - pflib::makeTargetHcalBackplaneZCU(0 /*ilink*/, 0xf /*boardmask*/)); } + public: + /// construct a PyTarget given some arbitrary Python dict of parameters + //virtual PyTarget(bp::dict config) { + PyTarget(bp::dict config){ + parse_config(config); + }; void configure() { // apply configuration stuff std::cout << "configure" << std::endl; } - void trigger_align() { std::cout << "trigger_align" << std::endl; } - void ror_latency() { std::cout << "ror_latency" << std::endl; } void pre_start() { // prepare to collect data std::cout << "start_run" << std::endl; tgt_->setup_run(1 /*run*/, pflib::Target::DaqFormat::ECOND_SW_HEADERS, 42 /* contrib_id */); } - void go() { std::cout << "go" << std::endl; } - void stop() { std::cout << "stop" << std::endl; } - void reset() { std::cout << "reset" << std::endl; } + virtual void trigger_align() { std::cout << "PyTarget trigger_align()" << std::endl; } + virtual void ror_latency() { std::cout << "PyTarget ror_latency()" << std::endl; } + virtual void go() { std::cout << "PyTarget go()" << std::endl; } + virtual void stop() { std::cout << "PyTarget stop()" << std::endl; } + virtual void reset() { std::cout << "PyTarget reset()" << std::endl; } + /// should not use in actual DAQ std::vector grab_pedestals() { tgt_->fc().sendL1A(); usleep(100); return tgt_->read_event(); } + void dump_roc(int iroc, bp::str fname){ + + std::string sfname = bp::extract(fname); + std::cout << iroc << std::endl; + std::cout << sfname << std::endl; + + //auto roc = tgt->hcal().roc(iroc); + //roc.dumpSettings(fname, false); + } + }; static const char* PyTarget__doc__ = R"DOC(Hold a pflib::Target -This class holds a C++ pflib::Target that we can then do -run commands on. The main configuration parameters are passed -into the object via a Python dict. +Parent class to PyTargetHCal and PyTargetECal. )DOC"; static const char* PyTarget__init____doc__ = R"DOC(construct a pflib::Target @@ -93,6 +102,67 @@ Hopefully, we will remember to remove it as the software progresses, but if its still around it should not be present in any Rogue Run Control code. )DOC"; +static const char* PyTarget_dump_roc__doc__ = + R"DOC( + +Dumps ROC registers to file +)DOC"; + + +class PyTargetHCal : public PyTarget { +protected: + void makeTarget() { + tgt_.reset( + pflib::makeTargetFiberless()); + } +public: + PyTargetHCal(bp::dict config) : PyTarget(config){ + makeTarget(); + } + + /* + * HCal specific state transitions + */ + //virtual void trigger_align() { std::cout << "PyTargetHCal trigger_align()" << std::endl; } + //virtual void ror_latency() { std::cout << "PyTargeHCal ror_latency()" << std::endl; } + //virtual void go() { std::cout << "PyTargetHCal go()" << std::endl; } + //virtual void stop() { std::cout << "PyTargetHCal stop()" << std::endl; } + //virtual void reset() { std::cout << "PyTargetHCal reset()" << std::endl; } + + void read_sipm_bias(int iroc, int ch) { + std::cout << "WIP" << std::endl; + } + void set_sipm_bias(int iroc, int ch, int dac) { + std::cout << "WIP" << std::endl; + } +}; + + +/* +class PyTargetECal : PyTarget { +}; +*/ + +static const char* PyTargetHCal__doc__ = + R"DOC( + +This class holds a C++ pflib::Target that we can then do +run commands on. The main configuration parameters are passed +into the object via a Python dict. +)DOC"; + +static const char* PyTargetHCal_read_sipm_bias__doc__ = + R"DOC( + +Reads SiPM bias +)DOC"; + +static const char* PyTargetHCal_set_sipm_bias__doc__ = + R"DOC( + +Sets SiPM bias +)DOC"; + BOOST_PYTHON_MODULE(pypflib) { setup_version(); setup_logging(); @@ -109,5 +179,13 @@ BOOST_PYTHON_MODULE(pypflib) { .def("stop", &PyTarget::stop) .def("reset", &PyTarget::reset) .def("grab_pedestals", &PyTarget::grab_pedestals, - PyTarget_grab_pedestals__doc__); + PyTarget_grab_pedestals__doc__) + .def("dump_roc", &PyTarget::dump_roc, + PyTarget_dump_roc__doc__); + + bp::class_>("PyTargetHCal", PyTargetHCal__doc__, + bp::init(PyTarget__init____doc__, + (bp::arg("config") = bp::dict()))) + .def("read_sipm_bias", &PyTargetHCal::read_sipm_bias) + .def("set_sipm_bias", &PyTargetHCal::set_sipm_bias); } From 4aaded7d7e200411d218b9640bea944ffef36eea Mon Sep 17 00:00:00 2001 From: Erik Wallin Date: Sun, 16 Nov 2025 00:57:33 +0000 Subject: [PATCH 2/6] Added load/dump ROC configs and read/set SiPM bias in HCal --- src/pflib/python/bindings.cxx | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/src/pflib/python/bindings.cxx b/src/pflib/python/bindings.cxx index add9df243..5d7f52e6e 100644 --- a/src/pflib/python/bindings.cxx +++ b/src/pflib/python/bindings.cxx @@ -58,6 +58,7 @@ class PyTarget { tgt_->setup_run(1 /*run*/, pflib::Target::DaqFormat::ECOND_SW_HEADERS, 42 /* contrib_id */); } + virtual void trigger_align() { std::cout << "PyTarget trigger_align()" << std::endl; } virtual void ror_latency() { std::cout << "PyTarget ror_latency()" << std::endl; } virtual void go() { std::cout << "PyTarget go()" << std::endl; } @@ -71,15 +72,15 @@ class PyTarget { return tgt_->read_event(); } void dump_roc(int iroc, bp::str fname){ - std::string sfname = bp::extract(fname); - std::cout << iroc << std::endl; - std::cout << sfname << std::endl; - - //auto roc = tgt->hcal().roc(iroc); - //roc.dumpSettings(fname, false); + auto roc = tgt_->hcal().roc(iroc); + roc.dumpSettings(sfname, false); + } + void load_roc(int iroc, bp::str fname){ + std::string sfname = bp::extract(fname); + auto roc = tgt_->hcal().roc(iroc); + roc.loadRegisters(sfname); } - }; static const char* PyTarget__doc__ = R"DOC(Hold a pflib::Target @@ -123,17 +124,19 @@ class PyTargetHCal : public PyTarget { /* * HCal specific state transitions */ - //virtual void trigger_align() { std::cout << "PyTargetHCal trigger_align()" << std::endl; } - //virtual void ror_latency() { std::cout << "PyTargeHCal ror_latency()" << std::endl; } - //virtual void go() { std::cout << "PyTargetHCal go()" << std::endl; } - //virtual void stop() { std::cout << "PyTargetHCal stop()" << std::endl; } - //virtual void reset() { std::cout << "PyTargetHCal reset()" << std::endl; } - - void read_sipm_bias(int iroc, int ch) { - std::cout << "WIP" << std::endl; + //void trigger_align() { std::cout << "PyTargetHCal trigger_align()" << std::endl; } + //void ror_latency() { std::cout << "PyTargeHCal ror_latency()" << std::endl; } + //void go() { std::cout << "PyTargetHCal go()" << std::endl; } + //void stop() { std::cout << "PyTargetHCal stop()" << std::endl; } + //void reset() { std::cout << "PyTargetHCal reset()" << std::endl; } + + int read_sipm_bias(int iroc, int ch) { + pflib::Bias bias = tgt_->hcal().bias(iroc); + return bias.readSiPM(ch); } void set_sipm_bias(int iroc, int ch, int dac) { - std::cout << "WIP" << std::endl; + pflib::Bias bias = tgt_->hcal().bias(iroc); + bias.setSiPM(ch, dac); } }; From 0fa2e6693a66c3a6178846cd815fb69d6b2b6a17 Mon Sep 17 00:00:00 2001 From: Erik Wallin Date: Sun, 16 Nov 2025 01:32:21 +0000 Subject: [PATCH 3/6] Added PyTargetECal --- src/pflib/python/bindings.cxx | 50 +++++++++++++++++++++++++++++------ 1 file changed, 42 insertions(+), 8 deletions(-) diff --git a/src/pflib/python/bindings.cxx b/src/pflib/python/bindings.cxx index 5d7f52e6e..56fe71767 100644 --- a/src/pflib/python/bindings.cxx +++ b/src/pflib/python/bindings.cxx @@ -109,6 +109,12 @@ static const char* PyTarget_dump_roc__doc__ = Dumps ROC registers to file )DOC"; +static const char* PyTarget_load_roc__doc__ = + R"DOC( + +Loads ROC registers from .yaml file +)DOC"; + class PyTargetHCal : public PyTarget { protected: @@ -122,7 +128,7 @@ class PyTargetHCal : public PyTarget { } /* - * HCal specific state transitions + * HCal specific state transitions if needed */ //void trigger_align() { std::cout << "PyTargetHCal trigger_align()" << std::endl; } //void ror_latency() { std::cout << "PyTargeHCal ror_latency()" << std::endl; } @@ -140,12 +146,6 @@ class PyTargetHCal : public PyTarget { } }; - -/* -class PyTargetECal : PyTarget { -}; -*/ - static const char* PyTargetHCal__doc__ = R"DOC( @@ -166,6 +166,34 @@ static const char* PyTargetHCal_set_sipm_bias__doc__ = Sets SiPM bias )DOC"; +class PyTargetECal : public PyTarget { +protected: + void makeTarget() { + //tgt_.reset( + // pflib::makeTargetECal()); + } +public: + PyTargetECal(bp::dict config) : PyTarget(config){ + makeTarget(); + } + /* + * ECal specific state transitions if needed + */ + //void trigger_align() { std::cout << "PyTargetECal trigger_align()" << std::endl; } + //void ror_latency() { std::cout << "PyTargeECal ror_latency()" << std::endl; } + //void go() { std::cout << "PyTargetECal go()" << std::endl; } + //void stop() { std::cout << "PyTargetECal stop()" << std::endl; } + //void reset() { std::cout << "PyTargetECal reset()" << std::endl; } +}; + +static const char* PyTargetECal__doc__ = + R"DOC( + +This class holds a C++ pflib::Target that we can then do +run commands on. The main configuration parameters are passed +into the object via a Python dict. +)DOC"; + BOOST_PYTHON_MODULE(pypflib) { setup_version(); setup_logging(); @@ -184,11 +212,17 @@ BOOST_PYTHON_MODULE(pypflib) { .def("grab_pedestals", &PyTarget::grab_pedestals, PyTarget_grab_pedestals__doc__) .def("dump_roc", &PyTarget::dump_roc, - PyTarget_dump_roc__doc__); + PyTarget_dump_roc__doc__) + .def("load_roc", &PyTarget::load_roc, + PyTarget_load_roc__doc__); bp::class_>("PyTargetHCal", PyTargetHCal__doc__, bp::init(PyTarget__init____doc__, (bp::arg("config") = bp::dict()))) .def("read_sipm_bias", &PyTargetHCal::read_sipm_bias) .def("set_sipm_bias", &PyTargetHCal::set_sipm_bias); + + bp::class_>("PyTargetECal", PyTargetECal__doc__, + bp::init(PyTarget__init____doc__, + (bp::arg("config") = bp::dict()))); } From 78a768cb22ae04658faac978e411abb076d67cb8 Mon Sep 17 00:00:00 2001 From: Erik Wallin Date: Mon, 17 Nov 2025 19:27:22 +0000 Subject: [PATCH 4/6] Dump ROC configs --- src/pflib/python/bindings.cxx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/pflib/python/bindings.cxx b/src/pflib/python/bindings.cxx index 56fe71767..b1dea824f 100644 --- a/src/pflib/python/bindings.cxx +++ b/src/pflib/python/bindings.cxx @@ -71,13 +71,20 @@ class PyTarget { usleep(100); return tgt_->read_event(); } - void dump_roc(int iroc, bp::str fname){ - std::string sfname = bp::extract(fname); - auto roc = tgt_->hcal().roc(iroc); - roc.dumpSettings(sfname, false); + // Dumps the configs of all active ROCs to file + void dump_rocs(bp::str fname_prefix){ + std::string sfname_prefix = bp::extract(fname_prefix); + std::vector roc_ids{tgt_->roc_ids()}; + for (int iroc : roc_ids) { + std::string sfname = sfname_prefix + "_iroc_" + std::to_string(iroc) + ".yaml"; + //Refactor + auto roc = tgt_->hcal().roc(iroc); + roc.dumpSettings(sfname, false); + } } void load_roc(int iroc, bp::str fname){ std::string sfname = bp::extract(fname); + //Refactor auto roc = tgt_->hcal().roc(iroc); roc.loadRegisters(sfname); } @@ -103,10 +110,10 @@ Hopefully, we will remember to remove it as the software progresses, but if its still around it should not be present in any Rogue Run Control code. )DOC"; -static const char* PyTarget_dump_roc__doc__ = +static const char* PyTarget_dump_rocs__doc__ = R"DOC( -Dumps ROC registers to file +Dumps ROC registers to file from all atcive ROCs )DOC"; static const char* PyTarget_load_roc__doc__ = @@ -211,8 +218,8 @@ BOOST_PYTHON_MODULE(pypflib) { .def("reset", &PyTarget::reset) .def("grab_pedestals", &PyTarget::grab_pedestals, PyTarget_grab_pedestals__doc__) - .def("dump_roc", &PyTarget::dump_roc, - PyTarget_dump_roc__doc__) + .def("dump_rocs", &PyTarget::dump_rocs, + PyTarget_dump_rocs__doc__) .def("load_roc", &PyTarget::load_roc, PyTarget_load_roc__doc__); From b342a94dd556d963918325a28f23b632d16aa217 Mon Sep 17 00:00:00 2001 From: Erik Wallin Date: Tue, 18 Nov 2025 03:34:25 +0000 Subject: [PATCH 5/6] Target refactoring changes --- src/pflib/python/bindings.cxx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pflib/python/bindings.cxx b/src/pflib/python/bindings.cxx index b1dea824f..ca26e49b5 100644 --- a/src/pflib/python/bindings.cxx +++ b/src/pflib/python/bindings.cxx @@ -8,6 +8,8 @@ #include "logging.h" #include "packing.h" #include "pflib/Target.h" +#include "pflib/HcalBackplane.h" +#include "pflib/Bias.h" #include "version.h" /** @@ -78,14 +80,14 @@ class PyTarget { for (int iroc : roc_ids) { std::string sfname = sfname_prefix + "_iroc_" + std::to_string(iroc) + ".yaml"; //Refactor - auto roc = tgt_->hcal().roc(iroc); + auto roc = tgt_->roc(iroc); roc.dumpSettings(sfname, false); } } void load_roc(int iroc, bp::str fname){ std::string sfname = bp::extract(fname); //Refactor - auto roc = tgt_->hcal().roc(iroc); + auto roc = tgt_->roc(iroc); roc.loadRegisters(sfname); } }; @@ -125,8 +127,10 @@ Loads ROC registers from .yaml file class PyTargetHCal : public PyTarget { protected: + void makeTarget() { tgt_.reset( + //TODO Change to Bittware target pflib::makeTargetFiberless()); } public: @@ -144,11 +148,11 @@ class PyTargetHCal : public PyTarget { //void reset() { std::cout << "PyTargetHCal reset()" << std::endl; } int read_sipm_bias(int iroc, int ch) { - pflib::Bias bias = tgt_->hcal().bias(iroc); + pflib::Bias bias = std::dynamic_pointer_cast(tgt_)->bias(iroc); return bias.readSiPM(ch); } void set_sipm_bias(int iroc, int ch, int dac) { - pflib::Bias bias = tgt_->hcal().bias(iroc); + pflib::Bias bias = std::dynamic_pointer_cast(tgt_)->bias(iroc); bias.setSiPM(ch, dac); } }; @@ -175,6 +179,7 @@ Sets SiPM bias class PyTargetECal : public PyTarget { protected: + void makeTarget() { //tgt_.reset( // pflib::makeTargetECal()); From e95e65d1f77b139ee4ce27cf3939898f50d36b39 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 18 Nov 2025 03:50:24 +0000 Subject: [PATCH 6/6] Apply clang-format --style=Google --- src/pflib/python/bindings.cxx | 107 +++++++++++++++++----------------- 1 file changed, 54 insertions(+), 53 deletions(-) diff --git a/src/pflib/python/bindings.cxx b/src/pflib/python/bindings.cxx index ca26e49b5..b75626736 100644 --- a/src/pflib/python/bindings.cxx +++ b/src/pflib/python/bindings.cxx @@ -7,9 +7,9 @@ #include "logging.h" #include "packing.h" -#include "pflib/Target.h" -#include "pflib/HcalBackplane.h" #include "pflib/Bias.h" +#include "pflib/HcalBackplane.h" +#include "pflib/Target.h" #include "version.h" /** @@ -33,7 +33,7 @@ class PyTarget { /// our handle to the pflib::Target std::shared_ptr tgt_; - void parse_config(bp::dict config){ + void parse_config(bp::dict config) { std::cout << "creating { "; for (auto it = bp::stl_input_iterator(config.items()); it != bp::stl_input_iterator(); it++) { @@ -44,12 +44,11 @@ class PyTarget { } std::cout << "}" << std::endl; } + public: /// construct a PyTarget given some arbitrary Python dict of parameters - //virtual PyTarget(bp::dict config) { - PyTarget(bp::dict config){ - parse_config(config); - }; + // virtual PyTarget(bp::dict config) { + PyTarget(bp::dict config) { parse_config(config); }; void configure() { // apply configuration stuff std::cout << "configure" << std::endl; @@ -61,12 +60,16 @@ class PyTarget { 42 /* contrib_id */); } - virtual void trigger_align() { std::cout << "PyTarget trigger_align()" << std::endl; } - virtual void ror_latency() { std::cout << "PyTarget ror_latency()" << std::endl; } + virtual void trigger_align() { + std::cout << "PyTarget trigger_align()" << std::endl; + } + virtual void ror_latency() { + std::cout << "PyTarget ror_latency()" << std::endl; + } virtual void go() { std::cout << "PyTarget go()" << std::endl; } virtual void stop() { std::cout << "PyTarget stop()" << std::endl; } virtual void reset() { std::cout << "PyTarget reset()" << std::endl; } - + /// should not use in actual DAQ std::vector grab_pedestals() { tgt_->fc().sendL1A(); @@ -74,19 +77,20 @@ class PyTarget { return tgt_->read_event(); } // Dumps the configs of all active ROCs to file - void dump_rocs(bp::str fname_prefix){ + void dump_rocs(bp::str fname_prefix) { std::string sfname_prefix = bp::extract(fname_prefix); std::vector roc_ids{tgt_->roc_ids()}; for (int iroc : roc_ids) { - std::string sfname = sfname_prefix + "_iroc_" + std::to_string(iroc) + ".yaml"; - //Refactor + std::string sfname = + sfname_prefix + "_iroc_" + std::to_string(iroc) + ".yaml"; + // Refactor auto roc = tgt_->roc(iroc); roc.dumpSettings(sfname, false); } } - void load_roc(int iroc, bp::str fname){ + void load_roc(int iroc, bp::str fname) { std::string sfname = bp::extract(fname); - //Refactor + // Refactor auto roc = tgt_->roc(iroc); roc.loadRegisters(sfname); } @@ -124,35 +128,34 @@ static const char* PyTarget_load_roc__doc__ = Loads ROC registers from .yaml file )DOC"; - class PyTargetHCal : public PyTarget { -protected: - + protected: void makeTarget() { tgt_.reset( - //TODO Change to Bittware target + // TODO Change to Bittware target pflib::makeTargetFiberless()); } -public: - PyTargetHCal(bp::dict config) : PyTarget(config){ - makeTarget(); - } + + public: + PyTargetHCal(bp::dict config) : PyTarget(config) { makeTarget(); } /* * HCal specific state transitions if needed */ - //void trigger_align() { std::cout << "PyTargetHCal trigger_align()" << std::endl; } - //void ror_latency() { std::cout << "PyTargeHCal ror_latency()" << std::endl; } - //void go() { std::cout << "PyTargetHCal go()" << std::endl; } - //void stop() { std::cout << "PyTargetHCal stop()" << std::endl; } - //void reset() { std::cout << "PyTargetHCal reset()" << std::endl; } + // void trigger_align() { std::cout << "PyTargetHCal trigger_align()" << + // std::endl; } void ror_latency() { std::cout << "PyTargeHCal ror_latency()" + // << std::endl; } void go() { std::cout << "PyTargetHCal go()" << std::endl; + // } void stop() { std::cout << "PyTargetHCal stop()" << std::endl; } void + // reset() { std::cout << "PyTargetHCal reset()" << std::endl; } int read_sipm_bias(int iroc, int ch) { - pflib::Bias bias = std::dynamic_pointer_cast(tgt_)->bias(iroc); + pflib::Bias bias = + std::dynamic_pointer_cast(tgt_)->bias(iroc); return bias.readSiPM(ch); } void set_sipm_bias(int iroc, int ch, int dac) { - pflib::Bias bias = std::dynamic_pointer_cast(tgt_)->bias(iroc); + pflib::Bias bias = + std::dynamic_pointer_cast(tgt_)->bias(iroc); bias.setSiPM(ch, dac); } }; @@ -178,24 +181,22 @@ Sets SiPM bias )DOC"; class PyTargetECal : public PyTarget { -protected: - + protected: void makeTarget() { - //tgt_.reset( - // pflib::makeTargetECal()); - } -public: - PyTargetECal(bp::dict config) : PyTarget(config){ - makeTarget(); + // tgt_.reset( + // pflib::makeTargetECal()); } + + public: + PyTargetECal(bp::dict config) : PyTarget(config) { makeTarget(); } /* * ECal specific state transitions if needed */ - //void trigger_align() { std::cout << "PyTargetECal trigger_align()" << std::endl; } - //void ror_latency() { std::cout << "PyTargeECal ror_latency()" << std::endl; } - //void go() { std::cout << "PyTargetECal go()" << std::endl; } - //void stop() { std::cout << "PyTargetECal stop()" << std::endl; } - //void reset() { std::cout << "PyTargetECal reset()" << std::endl; } + // void trigger_align() { std::cout << "PyTargetECal trigger_align()" << + // std::endl; } void ror_latency() { std::cout << "PyTargeECal ror_latency()" + // << std::endl; } void go() { std::cout << "PyTargetECal go()" << std::endl; + // } void stop() { std::cout << "PyTargetECal stop()" << std::endl; } void + // reset() { std::cout << "PyTargetECal reset()" << std::endl; } }; static const char* PyTargetECal__doc__ = @@ -223,18 +224,18 @@ BOOST_PYTHON_MODULE(pypflib) { .def("reset", &PyTarget::reset) .def("grab_pedestals", &PyTarget::grab_pedestals, PyTarget_grab_pedestals__doc__) - .def("dump_rocs", &PyTarget::dump_rocs, - PyTarget_dump_rocs__doc__) - .def("load_roc", &PyTarget::load_roc, - PyTarget_load_roc__doc__); + .def("dump_rocs", &PyTarget::dump_rocs, PyTarget_dump_rocs__doc__) + .def("load_roc", &PyTarget::load_roc, PyTarget_load_roc__doc__); - bp::class_>("PyTargetHCal", PyTargetHCal__doc__, + bp::class_>( + "PyTargetHCal", PyTargetHCal__doc__, bp::init(PyTarget__init____doc__, - (bp::arg("config") = bp::dict()))) - .def("read_sipm_bias", &PyTargetHCal::read_sipm_bias) - .def("set_sipm_bias", &PyTargetHCal::set_sipm_bias); + (bp::arg("config") = bp::dict()))) + .def("read_sipm_bias", &PyTargetHCal::read_sipm_bias) + .def("set_sipm_bias", &PyTargetHCal::set_sipm_bias); - bp::class_>("PyTargetECal", PyTargetECal__doc__, + bp::class_>( + "PyTargetECal", PyTargetECal__doc__, bp::init(PyTarget__init____doc__, - (bp::arg("config") = bp::dict()))); + (bp::arg("config") = bp::dict()))); }