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"
4647#include < fmt/format.h>
4748#include < fmt/ostream.h>
4849#include < gsl/span>
49- #include < numeric>
5050#include < string>
5151
5252using namespace o2 ::framework::data_matcher;
@@ -55,6 +55,8 @@ using DataProcessingHeader = o2::framework::DataProcessingHeader;
5555using Verbosity = o2::monitoring::Verbosity;
5656
5757O2_DECLARE_DYNAMIC_LOG (data_relayer);
58+ // Stream which keeps track of the calibration lifetime logic
59+ O2_DECLARE_DYNAMIC_LOG (calibration);
5860
5961namespace 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