From c7199f10b2e13ff7eaae9a01bdcce8dc370315cc Mon Sep 17 00:00:00 2001 From: Ernst Hellbar Date: Thu, 7 May 2026 11:58:26 +0200 Subject: [PATCH 1/2] ITSMFT: replace input filter of decoder with DataSpecUtils::dataDescriptorMatcherFrom --- .../ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx b/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx index 7158551e02e20..df397b9323408 100644 --- a/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx +++ b/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx @@ -237,10 +237,7 @@ void RawPixelDecoder::setupLinks(InputRecord& inputs) auto datadesc = (mUserDataDescription == o2::header::gDataDescriptionInvalid) ? o2::header::gDataDescriptionRawData : mUserDataDescription; if (mUserDataDescription != o2::header::gDataDescriptionInvalid) { // overwrite data filter origin&descriptions with user defined ones if possible for (auto& filt : mInputFilter) { - if (std::holds_alternative(filt.matcher)) { - std::get(filt.matcher).origin = origin; - std::get(filt.matcher).description = datadesc; - } + filt.matcher = o2::framework::DataSpecUtils::dataDescriptorMatcherFrom(ConcreteDataTypeMatcher(origin, datadesc)); } } From f4258c400e2119288cfe8004579afcbb9eb997c6 Mon Sep 17 00:00:00 2001 From: Ernst Hellbar Date: Thu, 7 May 2026 11:58:27 +0200 Subject: [PATCH 2/2] ITSMFT: simplify setting of input filter of the decoder --- .../reconstruction/src/RawPixelDecoder.cxx | 6 ----- .../common/workflow/src/STFDecoderSpec.cxx | 22 +++++++++---------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx b/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx index df397b9323408..df877cd38c578 100644 --- a/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx +++ b/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx @@ -235,12 +235,6 @@ void RawPixelDecoder::setupLinks(InputRecord& inputs) auto nLinks = mGBTLinks.size(); auto origin = (mUserDataOrigin == o2::header::gDataOriginInvalid) ? mMAP.getOrigin() : mUserDataOrigin; auto datadesc = (mUserDataDescription == o2::header::gDataDescriptionInvalid) ? o2::header::gDataDescriptionRawData : mUserDataDescription; - if (mUserDataDescription != o2::header::gDataDescriptionInvalid) { // overwrite data filter origin&descriptions with user defined ones if possible - for (auto& filt : mInputFilter) { - filt.matcher = o2::framework::DataSpecUtils::dataDescriptorMatcherFrom(ConcreteDataTypeMatcher(origin, datadesc)); - } - } - // if we see requested data type input with 0xDEADBEEF subspec and 0 payload this means that the "delayed message" // mechanism created it in absence of real data from upstream. Processor should send empty output to not block the workflow { diff --git a/Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx b/Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx index 8fb6ba4e6aa97..3cc88752d290c 100644 --- a/Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx +++ b/Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx @@ -72,11 +72,22 @@ void STFDecoder::init(InitContext& ic) header::DataDescription dataDesc; dataOrig.runtimeInit(v1[0].c_str()); dataDesc.runtimeInit(v2[0].c_str()); + Mapping map; for (int iLayer{0}; iLayer < mLayers; ++iLayer) { auto& dec = mDecoder.emplace_back(std::make_unique>()); dec->setUserDataOrigin(dataOrig); dec->setUserDataDescription(dataDesc); dec->init(); // is this no-op? + + if (mDoStaggering) { + std::vector filter; + for (const auto feeID : map.getLayer2FEEIDs(iLayer)) { + filter.emplace_back("filter", ConcreteDataMatcher{dataOrig, dataDesc, (o2::header::DataHeader::SubSpecificationType)feeID}); + } + dec->setInputFilter(filter); + } else { + dec->setInputFilter({InputSpec{"filter", ConcreteDataTypeMatcher(dataOrig, dataDesc)}}); + } } } catch (const std::exception& e) { LOG(error) << "exception was thrown in decoder creation: " << e.what(); @@ -131,17 +142,6 @@ void STFDecoder::init(InitContext& ic) mClusterer = std::make_unique(); mClusterer->setNChips(Mapping::getNChips()); } - - if (mDoStaggering) { - Mapping map; - for (uint32_t iLayer{0}; iLayer < mLayers; ++iLayer) { - std::vector filter; - for (const auto feeID : map.getLayer2FEEIDs(iLayer)) { - filter.emplace_back("filter", ConcreteDataMatcher{Mapping::getOrigin(), o2::header::gDataDescriptionRawData, (o2::header::DataHeader::SubSpecificationType)feeID}); - } - mDecoder[iLayer]->setInputFilter(filter); - } - } } ///_______________________________________