From 6962715484a825047d204985ed270c421529f903 Mon Sep 17 00:00:00 2001 From: Pengfei Ding Date: Mon, 15 Nov 2021 13:49:07 -0600 Subject: [PATCH 1/2] changes to use readoutlibs and fdreadoutlibs --- CMakeLists.txt | 5 +++-- cmake/sspmodulesConfig.cmake.in | 3 ++- plugins/SSPCardReader.hpp | 4 ++-- src/SSPCardWrapper.hpp | 4 ++-- src/anlBoard/DeviceInterface.cxx | 4 ++-- src/anlBoard/DeviceInterface.hpp | 4 ++-- 6 files changed, 13 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 84a22a1..cba3edc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,12 +13,13 @@ daq_setup_environment() find_package(appfwk REQUIRED) find_package(logging REQUIRED) find_package(detdataformats REQUIRED) -find_package(readout REQUIRED) +find_package(readoutlibs REQUIRED) +find_package(fdreadoutlibs REQUIRED) daq_codegen(sspcardreader.jsonnet TEMPLATES Structs.hpp.j2 Nljs.hpp.j2 ) daq_codegen( *info.jsonnet DEP_PKGS opmonlib TEMPLATES opmonlib/InfoStructs.hpp.j2 opmonlib/InfoNljs.hpp.j2 ) -set(DUNEDAQ_DEPENDENCIES appfwk::appfwk readout::readout detdataformats::detdataformats) +set(DUNEDAQ_DEPENDENCIES appfwk::appfwk readoutlibs::readoutlibs fdreadoutlibs::fdreadoutlibs detdataformats::detdataformats) # Provide override functionality for SSP dependencies #option(WITH_FTD2XX_AS_PACKAGE "SSP external (ftd2xx) as a dunedaq package" OFF) diff --git a/cmake/sspmodulesConfig.cmake.in b/cmake/sspmodulesConfig.cmake.in index a9b520d..245a997 100644 --- a/cmake/sspmodulesConfig.cmake.in +++ b/cmake/sspmodulesConfig.cmake.in @@ -6,7 +6,8 @@ include(CMakeFindDependencyMacro) find_dependency(appfwk) find_dependency(logging) find_dependency(detdataformats) -find_dependency(readout) +find_dependency(readoutlibs) +find_dependency(fdreadoutlibs) if (EXISTS ${CMAKE_SOURCE_DIR}/@PROJECT_NAME@) diff --git a/plugins/SSPCardReader.hpp b/plugins/SSPCardReader.hpp index a2c8c64..cd0bb57 100644 --- a/plugins/SSPCardReader.hpp +++ b/plugins/SSPCardReader.hpp @@ -19,8 +19,8 @@ #include "appfwk/DAQSink.hpp" #include "appfwk/ThreadHelper.hpp" -// From readout -#include "readout/utils/ReusableThread.hpp" +// From readoutlibs +#include "readoutlibs/utils/ReusableThread.hpp" // FELIX Software Suite provided //#include "packetformat/block_format.hpp" diff --git a/src/SSPCardWrapper.hpp b/src/SSPCardWrapper.hpp index 439fc05..c98295f 100644 --- a/src/SSPCardWrapper.hpp +++ b/src/SSPCardWrapper.hpp @@ -15,7 +15,7 @@ #include "SSPIssues.hpp" #include "anlBoard/DeviceInterface.hpp" #include "logging/Logging.hpp" -#include "readout/utils/ReusableThread.hpp" +#include "readoutlibs/utils/ReusableThread.hpp" #include @@ -58,7 +58,7 @@ class SSPCardWrapper // dune::detail::FragmentType const fragment_type_; // Type of fragment (see FragmentType.hh), //KIRBY this is // something I don't know how to transition to the new framework dunedaq::sspmodules::DeviceInterface* m_device_interface; // instance of the SSP device interface class - readout::ReusableThread m_ssp_processor; // reusable thread used to start the work done by the device interface + readoutlibs::ReusableThread m_ssp_processor; // reusable thread used to start the work done by the device interface // module status booleans for transition like init, conf, start, etc std::atomic m_run_marker; diff --git a/src/anlBoard/DeviceInterface.cxx b/src/anlBoard/DeviceInterface.cxx index d953dfa..d249fc5 100644 --- a/src/anlBoard/DeviceInterface.cxx +++ b/src/anlBoard/DeviceInterface.cxx @@ -9,7 +9,7 @@ #define SSPMODULES_SRC_ANLBOARD_DEVICEINTERFACE_CXX_ #include "appfwk/app/Nljs.hpp" -#include "readout/ReadoutTypes.hpp" +#include "fdreadout/FDReadoutTypes.hpp" #include "sspmodules/sspcardreader/Nljs.hpp" #include "DeviceInterface.hpp" @@ -284,7 +284,7 @@ dunedaq::sspmodules::DeviceInterface::HardwareReadLoop() // Push event onto deque. // ///////////////////////////////////////////////////////// - dunedaq::readout::types::SSP_FRAME_STRUCT sspfs; + dunedaq::fdreadout::types::SSP_FRAME_STRUCT sspfs; sspfs.header = newPacket.header; // memcpy(); memcpy(sspfs.data, newPacket.data.data(), newPacket.data.size()); diff --git a/src/anlBoard/DeviceInterface.hpp b/src/anlBoard/DeviceInterface.hpp index d26921e..17de043 100644 --- a/src/anlBoard/DeviceInterface.hpp +++ b/src/anlBoard/DeviceInterface.hpp @@ -9,7 +9,7 @@ #define SSPMODULES_SRC_ANLBOARD_DEVICEINTERFACE_HPP_ #include "appfwk/app/Nljs.hpp" -#include "readout/ReadoutTypes.hpp" +#include "fdreadoutlibs/FDReadoutTypes.hpp" #include "detdataformats/ssp/SSPTypes.hpp" #include "logging/Logging.hpp" @@ -40,7 +40,7 @@ class DeviceInterface{ public: // RS: queues here... I know... - using sink_t = dunedaq::appfwk::DAQSink; + using sink_t = dunedaq::appfwk::DAQSink; std::map> m_sink_queues; From cb67a53e6e635cd4483392c3818ca8317f764623 Mon Sep 17 00:00:00 2001 From: Pengfei Ding Date: Mon, 15 Nov 2021 14:01:57 -0600 Subject: [PATCH 2/2] fixing typo fdreadout-->fdreadoutlibs --- src/anlBoard/DeviceInterface.cxx | 4 ++-- src/anlBoard/DeviceInterface.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/anlBoard/DeviceInterface.cxx b/src/anlBoard/DeviceInterface.cxx index d249fc5..bdb8ead 100644 --- a/src/anlBoard/DeviceInterface.cxx +++ b/src/anlBoard/DeviceInterface.cxx @@ -9,7 +9,7 @@ #define SSPMODULES_SRC_ANLBOARD_DEVICEINTERFACE_CXX_ #include "appfwk/app/Nljs.hpp" -#include "fdreadout/FDReadoutTypes.hpp" +#include "fdreadoutlibs/FDReadoutTypes.hpp" #include "sspmodules/sspcardreader/Nljs.hpp" #include "DeviceInterface.hpp" @@ -284,7 +284,7 @@ dunedaq::sspmodules::DeviceInterface::HardwareReadLoop() // Push event onto deque. // ///////////////////////////////////////////////////////// - dunedaq::fdreadout::types::SSP_FRAME_STRUCT sspfs; + dunedaq::fdreadoutlibs::types::SSP_FRAME_STRUCT sspfs; sspfs.header = newPacket.header; // memcpy(); memcpy(sspfs.data, newPacket.data.data(), newPacket.data.size()); diff --git a/src/anlBoard/DeviceInterface.hpp b/src/anlBoard/DeviceInterface.hpp index 17de043..77b469c 100644 --- a/src/anlBoard/DeviceInterface.hpp +++ b/src/anlBoard/DeviceInterface.hpp @@ -40,7 +40,7 @@ class DeviceInterface{ public: // RS: queues here... I know... - using sink_t = dunedaq::appfwk::DAQSink; + using sink_t = dunedaq::appfwk::DAQSink; std::map> m_sink_queues;