diff --git a/Detectors/ITSMFT/ITS/tracking/include/ITStracking/Tracklet.h b/Detectors/ITSMFT/ITS/tracking/include/ITStracking/Tracklet.h index 5bdceca64303b..4996caa05d5da 100644 --- a/Detectors/ITSMFT/ITS/tracking/include/ITStracking/Tracklet.h +++ b/Detectors/ITSMFT/ITS/tracking/include/ITStracking/Tracklet.h @@ -84,7 +84,7 @@ GPUhdi() Tracklet::Tracklet(const int idx0, const int idx1, float tanL, float ph // Nothing to do } -GPUhdi() unsigned char Tracklet::operator<(const Tracklet & t) const +GPUhdi() unsigned char Tracklet::operator<(const Tracklet& t) const { if (isEmpty()) { return false; diff --git a/Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/RawPixelDecoder.h b/Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/RawPixelDecoder.h index 683292221a62d..b10f60c749f7c 100644 --- a/Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/RawPixelDecoder.h +++ b/Detectors/ITSMFT/common/reconstruction/include/ITSMFTReconstruction/RawPixelDecoder.h @@ -1,4 +1,4 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// Copyright 2019-2026 CERN and copyright holders of ALICE O2. // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. // All rights not expressly granted are reserved. // @@ -14,6 +14,7 @@ #ifndef ALICEO2_ITSMFT_RAWPIXELDECODER_H_ #define ALICEO2_ITSMFT_RAWPIXELDECODER_H_ +#include #include #include #include "Framework/Logger.h" @@ -30,7 +31,6 @@ #include "DataFormatsITSMFT/ROFRecord.h" #include "ITSMFTReconstruction/PixelData.h" #include "ITSMFTReconstruction/GBTWord.h" -#include namespace o2 { @@ -57,7 +57,7 @@ class RawPixelDecoder final : public PixelReader bool getNextChipData(ChipPixelData& chipData) final; ChipPixelData* getNextChipData(std::vector& chipDataVec) final; void ensureChipOrdering() {} - void startNewTF(o2::framework::InputRecord& inputs, const std::vector& filter); + void startNewTF(o2::framework::InputRecord& inputs); void collectROFCableData(int iru); int decodeNextTrigger() final; @@ -92,6 +92,9 @@ class RawPixelDecoder final : public PixelReader void setVerbosity(int v); int getVerbosity() const { return mVerbosity; } + void setInputFilter(std::vector filter) { mInputFilter = std::move(filter); } + const auto& getInputFilter() const noexcept { return mInputFilter; } + void setAlwaysParseTrigger(bool v) { mAlwaysParseTrigger = v; } bool getAlwaysParseTrigger() const { return mAlwaysParseTrigger; } @@ -139,7 +142,7 @@ class RawPixelDecoder final : public PixelReader void reset(); private: - void setupLinks(o2::framework::InputRecord& inputsm, const std::vector& filter); + void setupLinks(o2::framework::InputRecord& inputsm); int getRUEntrySW(int ruSW) const { return mRUEntry[ruSW]; } RUDecodeData* getRUDecode(int ruSW) { return &mRUDecodeVec[mRUEntry[ruSW]]; } GBTLink* getGBTLink(int i) { return i < 0 ? nullptr : &mGBTLinks[i]; } @@ -147,6 +150,7 @@ class RawPixelDecoder final : public PixelReader static constexpr uint16_t NORUDECODED = 0xffff; // this must be > than max N RUs + std::vector mInputFilter; // input spec filter std::vector mGBTLinks; // active links pool std::unordered_map mSubsSpec2LinkID; // link subspec to link entry in the pool mapping std::vector mRUDecodeVec; // set of active RUs diff --git a/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx b/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx index b61045b3b9f4e..5680986594991 100644 --- a/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx +++ b/Detectors/ITSMFT/common/reconstruction/src/RawPixelDecoder.cxx @@ -1,4 +1,4 @@ -// Copyright 2019-2020 CERN and copyright holders of ALICE O2. +// Copyright 2019-2026 CERN and copyright holders of ALICE O2. // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders. // All rights not expressly granted are reserved. // @@ -40,7 +40,8 @@ RawPixelDecoder::RawPixelDecoder() mTimerDecode.Stop(); mTimerFetchData.Stop(); mSelfName = o2::utils::Str::concat_string(Mapping::getName(), "Decoder"); - DPLRawParser<>::setCheckIncompleteHBF(false); // Disable incomplete HBF checking, see ErrPacketCounterJump check in GBTLink.cxx + DPLRawParser<>::setCheckIncompleteHBF(false); // Disable incomplete HBF checking, see ErrPacketCounterJump check in GBTLink.cxx + mInputFilter = {InputSpec{"filter", ConcreteDataTypeMatcher{Mapping::getOrigin(), o2::header::gDataDescriptionRawData}}}; // by default take all raw data } ///______________________________________________________________ @@ -102,8 +103,7 @@ int RawPixelDecoder::decodeNextTrigger() } #ifdef WITH_OPENMP -#pragma omp parallel for schedule(dynamic) num_threads(mNThreads) reduction(+ \ - : mNChipsFiredROF, mNPixelsFiredROF) +#pragma omp parallel for schedule(dynamic) num_threads(mNThreads) reduction(+ : mNChipsFiredROF, mNPixelsFiredROF) #endif for (int iru = 0; iru < nru; iru++) { auto& ru = mRUDecodeVec[iru]; @@ -136,7 +136,7 @@ int RawPixelDecoder::decodeNextTrigger() ///______________________________________________________________ /// prepare for new TF template -void RawPixelDecoder::startNewTF(InputRecord& inputs, const std::vector& filter) +void RawPixelDecoder::startNewTF(InputRecord& inputs) { mTimerTFStart.Start(false); for (auto& link : mGBTLinks) { @@ -149,7 +149,7 @@ void RawPixelDecoder::startNewTF(InputRecord& inputs, const std::vector ru.linkHBFToDump.clear(); ru.nLinksDone = 0; } - setupLinks(inputs, filter); + setupLinks(inputs); mNLinksDone = 0; mExtTriggers.clear(); mTimerTFStart.Stop(); @@ -226,7 +226,7 @@ bool RawPixelDecoder::doIRMajorityPoll() ///______________________________________________________________ /// Setup links checking the very RDH of every input template -void RawPixelDecoder::setupLinks(InputRecord& inputs, const std::vector& filter) +void RawPixelDecoder::setupLinks(InputRecord& inputs) { constexpr uint32_t ROF_RAMP_FLAG = 0x1 << 4; constexpr uint32_t LINK_RECOVERY_FLAG = 0x1 << 5; @@ -235,6 +235,9 @@ void RawPixelDecoder::setupLinks(InputRecord& inputs, const std::vector 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 descriptions with user + mInputFilter = {InputSpec{"filter", ConcreteDataTypeMatcher{origin, datadesc}}}; // TODO: for now assume all are requested and no explicit filter was set + } // 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 @@ -257,7 +260,7 @@ void RawPixelDecoder::setupLinks(InputRecord& inputs, const std::vector contDeadBeef = 0; // if good data, reset the counter } mROFRampUpStage = false; - DPLRawParser parser(inputs, filter, o2::conf::VerbosityConfig::Instance().rawParserSeverity); + DPLRawParser parser(inputs, mInputFilter, o2::conf::VerbosityConfig::Instance().rawParserSeverity); parser.setMaxFailureMessages(o2::conf::VerbosityConfig::Instance().maxWarnRawParser); static size_t cntParserFailures = 0; parser.setExtFailureCounter(&cntParserFailures); diff --git a/Detectors/ITSMFT/common/workflow/include/ITSMFTWorkflow/STFDecoderSpec.h b/Detectors/ITSMFT/common/workflow/include/ITSMFTWorkflow/STFDecoderSpec.h index 93b6f04ede0e6..29b9f75bcbc4e 100644 --- a/Detectors/ITSMFT/common/workflow/include/ITSMFTWorkflow/STFDecoderSpec.h +++ b/Detectors/ITSMFT/common/workflow/include/ITSMFTWorkflow/STFDecoderSpec.h @@ -109,7 +109,6 @@ class STFDecoder : public Task std::vector>> mDecoder; std::unique_ptr mClusterer; std::shared_ptr mGGCCDBRequest; - std::vector> mRawFilter; }; using STFDecoderITS = STFDecoder; diff --git a/Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx b/Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx index 6666ac71bb27f..34c1d511a3def 100644 --- a/Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx +++ b/Detectors/ITSMFT/common/workflow/src/STFDecoderSpec.cxx @@ -135,13 +135,12 @@ void STFDecoder::init(InitContext& ic) if (mDoStaggering) { Mapping map; for (uint32_t iLayer{0}; iLayer < mLayers; ++iLayer) { - auto& filter = mRawFilter.emplace_back(); + 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); } - } else { - mRawFilter.push_back({InputSpec{"filter", ConcreteDataTypeMatcher{Mapping::getOrigin(), o2::header::gDataDescriptionRawData}}}); } } @@ -201,9 +200,9 @@ void STFDecoder::run(ProcessingContext& pc) } try { - mDecoder[iLayer]->startNewTF(pc.inputs(), mRawFilter[iLayer]); - + mDecoder[iLayer]->startNewTF(pc.inputs()); mDecoder[iLayer]->setDecodeNextAuto(false); + o2::InteractionRecord lastIR{}; int nTriggersProcessed = mDecoder[iLayer]->getNROFsProcessed(); static long lastErrReportTS = 0;