diff --git a/Modules/CTP/include/CTP/RawDataQcTask.h b/Modules/CTP/include/CTP/RawDataQcTask.h index a5f7e3bec2..9dba257ad8 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..9ae14234fd 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);