Skip to content
5 changes: 2 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ find_package(CLI11 REQUIRED)
daq_protobuf_codegen( opmon/*.proto )

##############################################################################
# Main library
# Main library
set(TRIGGER_DEPENDENCIES
appmodel::appmodel
appfwk::appfwk
Expand Down Expand Up @@ -54,7 +54,7 @@ daq_add_library(
## merge a chance to succeed.
#daq_codegen(
# txbuffer.jsonnet DEP_PKGS datahandlinglibs TEMPLATES Structs.hpp.j2 Nljs.hpp.j2 )

##############################################################################
# Plugins

Expand All @@ -80,7 +80,6 @@ daq_add_application( generate_tpset_from_hdf5 generate_tpset_from_hdf5.cxx TEST
##############################################################################
# Unit Tests

#daq_add_unit_test(TokenManager_test LINK_LIBRARIES trigger)
#daq_add_unit_test(TxSet_test LINK_LIBRARIES trigger)
#daq_add_unit_test(BufferManager_test LINK_LIBRARIES trigger)
#daq_add_unit_test(TriggerObjectOverlay_test LINK_LIBRARIES trigger)
Expand Down
15 changes: 12 additions & 3 deletions plugins/MLTModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ MLTModule::do_configure(const CommandData_t& /*obj*/)
// Get the outputs
for (auto con : m_mtrg->get_outputs()) {
if (con->get_data_type() == datatype_to_string<dfmessages::TriggerDecision>())
m_decision_output = get_iom_sender<dfmessages::TriggerDecision>(con->UID());
m_decision_outputs[con->UID()] = get_iom_sender<dfmessages::TriggerDecision>(con->UID());
}

hdf5libs::HDF5SourceIDHandler::source_id_geo_id_map_t geoidmap =
Expand Down Expand Up @@ -151,7 +151,7 @@ MLTModule::do_scrap(const CommandData_t& /*obj*/)
TLOG_DEBUG(TLVL_ENTER_EXIT_METHODS) << get_name() << ": Entering scrap() method";

m_decision_input.reset();
m_decision_output.reset();
m_decision_outputs.clear();
m_inhibit_input.reset();

m_srcid_detid_map.clear();
Expand Down Expand Up @@ -365,7 +365,11 @@ MLTModule::trigger_decisions_callback(dfmessages::TriggerDecision& decision)
}

try {
m_decision_output->send(std::move(decision), std::chrono::milliseconds(1));
for (auto& [conn_name, sender] : m_decision_outputs) {
auto decision_copy = dfmessages::TriggerDecision(decision);
sender->send(std::move(decision_copy), std::chrono::milliseconds(1));
}
// m_decision_output->send(std::move(decision), std::chrono::milliseconds(1));
m_td_sent_count++;

for (const auto t : trigger_types) {
Expand Down Expand Up @@ -416,6 +420,11 @@ MLTModule::dfo_busy_callback(dfmessages::TriggerInhibit& inhibit)
m_dfo_is_busy = inhibit.busy;
LivetimeCounter::State state = (inhibit.busy) ? LivetimeCounter::State::kDead : LivetimeCounter::State::kLive;
m_livetime_counter->set_state(state);

if (!m_decision_outputs.count(inhibit.decision_destination)) {
m_decision_outputs[inhibit.decision_destination] =
get_iom_sender<dfmessages::TriggerDecision>(inhibit.decision_destination);
}
}
}

Expand Down
3 changes: 1 addition & 2 deletions plugins/MLTModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "trigger/Issues.hpp"
#include "trigger/Latency.hpp"
#include "trigger/LivetimeCounter.hpp"
#include "trigger/TokenManager.hpp"
#include "trigger/opmon/latency_info.pb.h"
#include "trigger/opmon/moduleleveltrigger_info.pb.h"

Expand Down Expand Up @@ -96,7 +95,7 @@ class MLTModule : public dunedaq::appfwk::DAQModule

// Queue sources and sinks
std::shared_ptr<iomanager::ReceiverConcept<dfmessages::TriggerDecision>> m_decision_input;
std::shared_ptr<iomanager::SenderConcept<dfmessages::TriggerDecision>> m_decision_output;
std::map<std::string, std::shared_ptr<iomanager::SenderConcept<dfmessages::TriggerDecision>>> m_decision_outputs;
std::shared_ptr<iomanager::ReceiverConcept<dfmessages::TriggerInhibit>> m_inhibit_input;

/* TD requests
Expand Down
2 changes: 0 additions & 2 deletions plugins/RandomTCMakerModule.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
#ifndef TRIGGER_PLUGINS_RANDOMTRIGGERCANDIDATEMAKER_HPP_
#define TRIGGER_PLUGINS_RANDOMTRIGGERCANDIDATEMAKER_HPP_

#include "trigger/TokenManager.hpp"

#include "appfwk/ConfigurationManager.hpp"
#include "appfwk/DAQModule.hpp"
#include "confmodel/Connection.hpp"
Expand Down
104 changes: 0 additions & 104 deletions src/TokenManager.cpp

This file was deleted.

102 changes: 0 additions & 102 deletions src/trigger/TokenManager.hpp

This file was deleted.

90 changes: 0 additions & 90 deletions unittest/TokenManager_test.cxx

This file was deleted.

Loading