Skip to content

Commit

Permalink
Merge pull request #4 from DUNE-DAQ/readout_breakout
Browse files Browse the repository at this point in the history
Readout breakout
  • Loading branch information
jcfreeman2 authored Nov 15, 2021
2 parents b5ce7b5 + cb67a53 commit 18d8b30
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 11 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion cmake/sspmodulesConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@)

Expand Down
4 changes: 2 additions & 2 deletions plugins/SSPCardReader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions src/SSPCardWrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <nlohmann/json.hpp>

Expand Down Expand Up @@ -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<bool> m_run_marker;
Expand Down
4 changes: 2 additions & 2 deletions src/anlBoard/DeviceInterface.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define SSPMODULES_SRC_ANLBOARD_DEVICEINTERFACE_CXX_

#include "appfwk/app/Nljs.hpp"
#include "readout/ReadoutTypes.hpp"
#include "fdreadoutlibs/FDReadoutTypes.hpp"
#include "sspmodules/sspcardreader/Nljs.hpp"

#include "DeviceInterface.hpp"
Expand Down Expand Up @@ -284,7 +284,7 @@ dunedaq::sspmodules::DeviceInterface::HardwareReadLoop()
// Push event onto deque. //
/////////////////////////////////////////////////////////

dunedaq::readout::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());
Expand Down
4 changes: 2 additions & 2 deletions src/anlBoard/DeviceInterface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down Expand Up @@ -40,7 +40,7 @@ class DeviceInterface{
public:

// RS: queues here... I know...
using sink_t = dunedaq::appfwk::DAQSink<dunedaq::readout::types::SSP_FRAME_STRUCT>;
using sink_t = dunedaq::appfwk::DAQSink<dunedaq::fdreadoutlibs::types::SSP_FRAME_STRUCT>;
std::map<unsigned, std::unique_ptr<sink_t>> m_sink_queues;


Expand Down

0 comments on commit 18d8b30

Please sign in to comment.