From f85c65919f67409d24cce6be4354b11ffedaac1b Mon Sep 17 00:00:00 2001 From: Giovanna Lehmann Miotto Date: Wed, 10 Jul 2024 18:48:15 +0200 Subject: [PATCH 1/2] always get the last timestamp from timestamp estimator --- plugins/RandomTCMakerModule.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/plugins/RandomTCMakerModule.cpp b/plugins/RandomTCMakerModule.cpp index f7f1ac8a..74f8fec6 100644 --- a/plugins/RandomTCMakerModule.cpp +++ b/plugins/RandomTCMakerModule.cpp @@ -45,7 +45,7 @@ RandomTCMakerModule::RandomTCMakerModule(const std::string& name) { register_command("conf", &RandomTCMakerModule::do_configure); register_command("start", &RandomTCMakerModule::do_start); - register_command("stop", &RandomTCMakerModule::do_stop); + register_command("stop_trigger_sources", &RandomTCMakerModule::do_stop); register_command("scrap", &RandomTCMakerModule::do_scrap); } @@ -196,18 +196,15 @@ RandomTCMakerModule::send_trigger_candidates() } dfmessages::timestamp_t initial_timestamp = m_timestamp_estimator->get_timestamp_estimate(); - dfmessages::timestamp_t first_interval = get_interval(gen); - // Round up to the next multiple of trigger_interval_ticks - dfmessages::timestamp_t next_trigger_timestamp = (initial_timestamp / first_interval + 1) * first_interval; - TLOG_DEBUG(1) << get_name() << " initial timestamp estimate is " << initial_timestamp - << ", next_trigger_timestamp is " << next_trigger_timestamp; + dfmessages::timestamp_t next_trigger_timestamp = initial_timestamp; + TLOG_DEBUG(1) << get_name() << " initial timestamp estimate is " << initial_timestamp; while (m_running_flag.load()) { if (m_timestamp_estimator->wait_for_timestamp(next_trigger_timestamp, m_running_flag) == utilities::TimestampEstimatorBase::kInterrupted) { break; } - + next_trigger_timestamp = m_timestamp_estimator->get_timestamp_estimate(); triggeralgs::TriggerCandidate candidate = create_candidate(next_trigger_timestamp); TLOG_DEBUG(1) << get_name() << " at timestamp " << m_timestamp_estimator->get_timestamp_estimate() From 3417a584061a3618be6cac8190c2963b5ea6f499 Mon Sep 17 00:00:00 2001 From: Giovanna Lehmann Miotto Date: Wed, 10 Jul 2024 18:49:31 +0200 Subject: [PATCH 2/2] bumped version to v2.0.3 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e5139795..96c31be6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.12) -project(trigger VERSION 2.0.2) +project(trigger VERSION 2.0.3) find_package(daq-cmake REQUIRED)