From 2f7074333b537e62cc20bbe61330220b07590b0c Mon Sep 17 00:00:00 2001 From: Roman Lietava Date: Wed, 25 Mar 2026 13:09:20 +0100 Subject: [PATCH 1/2] two fixes --- Modules/CTP/include/CTP/RawDataQcTask.h | 11 ++++++----- Modules/CTP/src/RawDataQcTask.cxx | 12 +++++++----- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Modules/CTP/include/CTP/RawDataQcTask.h b/Modules/CTP/include/CTP/RawDataQcTask.h index a5f7e3bec2..a25148e491 100644 --- a/Modules/CTP/include/CTP/RawDataQcTask.h +++ b/Modules/CTP/include/CTP/RawDataQcTask.h @@ -24,6 +24,7 @@ #include "CTPReconstruction/RawDataDecoder.h" #include "Common/TH1Ratio.h" #include +#include class TH1D; @@ -61,11 +62,10 @@ class CTPRawDataReaderTask final : public TaskInterface std::unique_ptr mHistoBCMinBias1 = nullptr; // histogram of BC positions to check LHC filling scheme std::unique_ptr mHistoBCMinBias2 = nullptr; // histogram of BC positions to check LHC filling scheme std::unique_ptr mHistoDecodeError = nullptr; // histogram of erros from decoder - static constexpr int mUsedInputsMax = 18; - std::array mHisInputs = {}; ///< Array of input histograms, all BCs - std::array mHisInputsYesLHC = {}; ///< Array of input histograms, LHC BCs - std::array mHisInputsNotLHC = {}; ///< Array of input histograms, not LHC BCs - std::array shiftBC = {}; ///< Array of shifts for the BCs for each input + std::array mHisInputs = {}; ///< Array of input histograms, all BCs + std::array mHisInputsYesLHC = {}; ///< Array of input histograms, LHC BCs + std::array mHisInputsNotLHC = {}; ///< Array of input histograms, not LHC BCs + std::array shiftBC = {}; ///< Array of shifts for the BCs for each input int mRunNumber; int indexMB1 = -1; int indexMB2 = -1; @@ -86,6 +86,7 @@ class CTPRawDataReaderTask final : public TaskInterface bool mPerformConsistencyCheck = false; std::bitset mLHCBCs; /// LHC filling scheme bool lhcDataFileFound = true; + std::unordered_set mListOfUsedInputs = {1,2,3, 4,5,6,7,8,9,10,13,15,16,17,18,25,26}; }; } // namespace o2::quality_control_modules::ctp diff --git a/Modules/CTP/src/RawDataQcTask.cxx b/Modules/CTP/src/RawDataQcTask.cxx index 1bb246756a..472b7992d8 100644 --- a/Modules/CTP/src/RawDataQcTask.cxx +++ b/Modules/CTP/src/RawDataQcTask.cxx @@ -88,9 +88,11 @@ void CTPRawDataReaderTask::initialize(o2::framework::InitContext& /*ctx*/) mHisInputsNotLHC[i]->SetLineColor(kRed + 1); mHisInputsNotLHC[i]->SetFillColor(kRed + 1); - getObjectsManager()->startPublishing(mHisInputs[i]); - getObjectsManager()->startPublishing(mHisInputsYesLHC[i]); - // getObjectsManager()->startPublishing(mHisInputsNotLHC[i]); + if(mListOfUsedInputs.count(i + 1)) { + getObjectsManager()->startPublishing(mHisInputs[i]); + getObjectsManager()->startPublishing(mHisInputsYesLHC[i]); + // getObjectsManager()->startPublishing(mHisInputsNotLHC[i]); + } } mDecoder.setDoLumi(1); @@ -289,7 +291,7 @@ void CTPRawDataReaderTask::monitorData(o2::framework::ProcessingContext& ctx) static constexpr double sOrbitLengthInMS = o2::constants::lhc::LHCOrbitMUS / 1000; auto nOrbitsPerTF = 32.; // get the input - std::vector filter{ o2::framework::InputSpec{ "filter", o2::framework::ConcreteDataTypeMatcher{ "DS", "RAWDATA" }, o2::framework::Lifetime::Timeframe } }; + std::vector filter{ o2::framework::InputSpec{ "filter", o2::framework::ConcreteDataTypeMatcher{ "DS", "CTPRAWDATA" }, o2::framework::Lifetime::Timeframe } }; std::vector lumiPointsHBF1; std::vector outputDigits; @@ -342,7 +344,7 @@ void CTPRawDataReaderTask::monitorData(o2::framework::ProcessingContext& ctx) for (auto const digit : outputDigits) { uint16_t bcid = digit.intRecord.bc; if (digit.CTPInputMask.count()) { - for (int i = 0; i < mUsedInputsMax; i++) { + for (int i = 0; i < o2::ctp::CTP_NINPUTS; i++) { if (digit.CTPInputMask[i]) { mHistoInputs->getNum()->Fill(i); mHistoInputRatios->getNum()->Fill(i); From bfb69098f0bd23cca165a062c17136758b5237cb Mon Sep 17 00:00:00 2001 From: Roman Lietava Date: Wed, 25 Mar 2026 13:10:21 +0100 Subject: [PATCH 2/2] clang --- Modules/CTP/include/CTP/RawDataQcTask.h | 2 +- Modules/CTP/src/RawDataQcTask.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules/CTP/include/CTP/RawDataQcTask.h b/Modules/CTP/include/CTP/RawDataQcTask.h index a25148e491..9dba257ad8 100644 --- a/Modules/CTP/include/CTP/RawDataQcTask.h +++ b/Modules/CTP/include/CTP/RawDataQcTask.h @@ -86,7 +86,7 @@ class CTPRawDataReaderTask final : public TaskInterface bool mPerformConsistencyCheck = false; std::bitset mLHCBCs; /// LHC filling scheme bool lhcDataFileFound = true; - std::unordered_set mListOfUsedInputs = {1,2,3, 4,5,6,7,8,9,10,13,15,16,17,18,25,26}; + std::unordered_set mListOfUsedInputs = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 15, 16, 17, 18, 25, 26 }; }; } // namespace o2::quality_control_modules::ctp diff --git a/Modules/CTP/src/RawDataQcTask.cxx b/Modules/CTP/src/RawDataQcTask.cxx index 472b7992d8..9ae14234fd 100644 --- a/Modules/CTP/src/RawDataQcTask.cxx +++ b/Modules/CTP/src/RawDataQcTask.cxx @@ -88,7 +88,7 @@ void CTPRawDataReaderTask::initialize(o2::framework::InitContext& /*ctx*/) mHisInputsNotLHC[i]->SetLineColor(kRed + 1); mHisInputsNotLHC[i]->SetFillColor(kRed + 1); - if(mListOfUsedInputs.count(i + 1)) { + if (mListOfUsedInputs.count(i + 1)) { getObjectsManager()->startPublishing(mHisInputs[i]); getObjectsManager()->startPublishing(mHisInputsYesLHC[i]); // getObjectsManager()->startPublishing(mHisInputsNotLHC[i]);