Skip to content

Commit 3961e74

Browse files
committed
DPL: drop messages explicitly
Somehow if they remain in the queue the confuse the oldest possible timeframe mechanism.
1 parent 80faf10 commit 3961e74

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Framework/Core/src/DataRelayer.cxx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "Framework/DataDescriptorMatcher.h"
1818
#include "Framework/DataSpecUtils.h"
1919
#include "Framework/DataProcessingHeader.h"
20+
#include "Framework/DataProcessingContext.h"
2021
#include "Framework/DataRef.h"
2122
#include "Framework/InputRecord.h"
2223
#include "Framework/InputSpan.h"
@@ -46,7 +47,6 @@
4647
#include <fmt/format.h>
4748
#include <fmt/ostream.h>
4849
#include <gsl/span>
49-
#include <numeric>
5050
#include <string>
5151

5252
using namespace o2::framework::data_matcher;
@@ -55,6 +55,8 @@ using DataProcessingHeader = o2::framework::DataProcessingHeader;
5555
using Verbosity = o2::monitoring::Verbosity;
5656

5757
O2_DECLARE_DYNAMIC_LOG(data_relayer);
58+
// Stream which keeps track of the calibration lifetime logic
59+
O2_DECLARE_DYNAMIC_LOG(calibration);
5860

5961
namespace o2::framework
6062
{
@@ -480,6 +482,13 @@ DataRelayer::RelayChoice
480482
// We are in calibration mode and the data does not have the calibration bit set.
481483
// We do not store it.
482484
if (services.get<DeviceState>().allowedProcessing == DeviceState::ProcessingType::CalibrationOnly && !isCalibrationData(messages[mi])) {
485+
O2_SIGNPOST_ID_FROM_POINTER(cid, calibration, &services.get<DataProcessorContext>());
486+
O2_SIGNPOST_EVENT_EMIT(calibration, cid, "calibration",
487+
"Dropping incoming %zu messages because they are data processing.", nPayloads);
488+
// Actually dropping messages.
489+
for (size_t i = mi; i < mi + nPayloads + 1; i++) {
490+
auto discard = std::move(messages[i]);
491+
}
483492
mi += nPayloads;
484493
continue;
485494
}

0 commit comments

Comments
 (0)