Skip to content

Commit

Permalink
JCF: for DUNE-DAQ/daq-release#379, change DataLinkHandler to RawDataH…
Browse files Browse the repository at this point in the history
…andler
  • Loading branch information
John Freeman committed Jun 27, 2024
1 parent 5841862 commit 99a1762
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @file DataLinkHandlerBase.hpp Implements standard
* @file RawDataHandlerBase.hpp Implements standard
* module functionalities, requires the setup of a readout
* creator function. This class is meant to be inherited
* to specify which readout specialization to load.
Expand Down Expand Up @@ -31,20 +31,20 @@
namespace dunedaq {
namespace datahandlinglibs {

class DataLinkHandlerBase
class RawDataHandlerBase
{
public:
/**
* @brief DataLinkHandlerBase Constructor
* @param name Instance name for this DataLinkHandlerBase instance
* @brief RawDataHandlerBase Constructor
* @param name Instance name for this RawDataHandlerBase instance
*/
explicit DataLinkHandlerBase(const std::string& name);
virtual ~DataLinkHandlerBase() {}
explicit RawDataHandlerBase(const std::string& name);
virtual ~RawDataHandlerBase() {}

DataLinkHandlerBase(const DataLinkHandlerBase&) = delete; ///< DataLinkHandlerBase is not copy-constructible
DataLinkHandlerBase& operator=(const DataLinkHandlerBase&) = delete; ///< DataLinkHandlerBase is not copy-assignable
DataLinkHandlerBase(DataLinkHandlerBase&&) = delete; ///< DataLinkHandlerBase is not move-constructible
DataLinkHandlerBase& operator=(DataLinkHandlerBase&&) = delete; ///< DataLinkHandlerBase is not move-assignable
RawDataHandlerBase(const RawDataHandlerBase&) = delete; ///< RawDataHandlerBase is not copy-constructible
RawDataHandlerBase& operator=(const RawDataHandlerBase&) = delete; ///< RawDataHandlerBase is not copy-assignable
RawDataHandlerBase(RawDataHandlerBase&&) = delete; ///< RawDataHandlerBase is not move-constructible
RawDataHandlerBase& operator=(RawDataHandlerBase&&) = delete; ///< RawDataHandlerBase is not move-assignable

void init(std::shared_ptr<appfwk::ModuleConfiguration> cfg);
void get_info(opmonlib::InfoCollector& ci, int level);
Expand Down Expand Up @@ -81,6 +81,6 @@ class DataLinkHandlerBase
} // namespace dunedaq

// Declarations
#include "detail/DataLinkHandlerBase.hxx"
#include "detail/RawDataHandlerBase.hxx"

#endif // DATAHANDLINGLIBS_INCLUDE_DATAHANDLINGLIBS_DATALINKHANDLERBASE_HPP_
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
namespace dunedaq {
namespace datahandlinglibs {

DataLinkHandlerBase::DataLinkHandlerBase(const std::string& name)
RawDataHandlerBase::RawDataHandlerBase(const std::string& name)
: m_configured(false)
, m_name(name)
, m_readout_impl(nullptr)
, m_run_marker{ false }
{
/*
register_command("conf", &DataLinkHandlerBase::do_conf);
register_command("scrap", &DataLinkHandlerBase::do_scrap);
register_command("start", &DataLinkHandlerBase::do_start);
register_command("stop_trigger_sources", &DataLinkHandlerBase::do_stop);
register_command("record", &DataLinkHandlerBase::do_record);
register_command("conf", &RawDataHandlerBase::do_conf);
register_command("scrap", &RawDataHandlerBase::do_scrap);
register_command("start", &RawDataHandlerBase::do_start);
register_command("stop_trigger_sources", &RawDataHandlerBase::do_stop);
register_command("record", &RawDataHandlerBase::do_record);
*/
}


void
DataLinkHandlerBase::init(std::shared_ptr<appfwk::ModuleConfiguration> cfg)
RawDataHandlerBase::init(std::shared_ptr<appfwk::ModuleConfiguration> cfg)
{

TLOG_DEBUG(dunedaq::datahandlinglibs::logging::TLVL_ENTER_EXIT_METHODS) << get_dlh_name() << ": Entering init() method";
Expand All @@ -36,13 +36,13 @@ DataLinkHandlerBase::init(std::shared_ptr<appfwk::ModuleConfiguration> cfg)
}

void
DataLinkHandlerBase::get_info(opmonlib::InfoCollector& ci, int level)
RawDataHandlerBase::get_info(opmonlib::InfoCollector& ci, int level)
{
m_readout_impl->get_info(ci, level);
}

void
DataLinkHandlerBase::do_conf(const nlohmann::json& args)
RawDataHandlerBase::do_conf(const nlohmann::json& args)
{
TLOG_DEBUG(dunedaq::datahandlinglibs::logging::TLVL_ENTER_EXIT_METHODS) << get_dlh_name() << ": Entering do_conf() method";
m_readout_impl->conf(args);
Expand All @@ -51,15 +51,15 @@ DataLinkHandlerBase::do_conf(const nlohmann::json& args)
}

void
DataLinkHandlerBase::do_scrap(const nlohmann::json& args)
RawDataHandlerBase::do_scrap(const nlohmann::json& args)
{
TLOG_DEBUG(dunedaq::datahandlinglibs::logging::TLVL_ENTER_EXIT_METHODS) << get_dlh_name() << ": Entering do_scrap() method";
m_readout_impl->scrap(args);
m_configured = false;
TLOG_DEBUG(dunedaq::datahandlinglibs::logging::TLVL_ENTER_EXIT_METHODS) << get_dlh_name() << ": Exiting do_scrap() method";
}
void
DataLinkHandlerBase::do_start(const nlohmann::json& args)
RawDataHandlerBase::do_start(const nlohmann::json& args)
{
TLOG_DEBUG(dunedaq::datahandlinglibs::logging::TLVL_ENTER_EXIT_METHODS) << get_dlh_name() << ": Entering do_start() method";
m_run_marker.store(true);
Expand All @@ -71,7 +71,7 @@ DataLinkHandlerBase::do_start(const nlohmann::json& args)
}

void
DataLinkHandlerBase::do_stop(const nlohmann::json& args)
RawDataHandlerBase::do_stop(const nlohmann::json& args)
{
TLOG_DEBUG(dunedaq::datahandlinglibs::logging::TLVL_ENTER_EXIT_METHODS) << get_dlh_name() << ": Entering do_stop() method";
m_run_marker.store(false);
Expand All @@ -81,7 +81,7 @@ DataLinkHandlerBase::do_stop(const nlohmann::json& args)
}

void
DataLinkHandlerBase::do_record(const nlohmann::json& args)
RawDataHandlerBase::do_record(const nlohmann::json& args)
{
TLOG_DEBUG(dunedaq::datahandlinglibs::logging::TLVL_ENTER_EXIT_METHODS) << get_dlh_name() << ": Entering do_issue_recording() method";
m_readout_impl->record(args);
Expand Down

0 comments on commit 99a1762

Please sign in to comment.