From 52d0f4a7d1864e8fe534423019bbe3965d0f2ab6 Mon Sep 17 00:00:00 2001 From: Isakov Artem Date: Wed, 14 Aug 2024 10:49:18 +0200 Subject: [PATCH] Added option to vary reset range for FEE reset plots --- Modules/ITS/include/ITS/ITSFeeTask.h | 3 ++- Modules/ITS/itsFee.json | 3 ++- Modules/ITS/src/ITSFeeTask.cxx | 14 +++++++++++--- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Modules/ITS/include/ITS/ITSFeeTask.h b/Modules/ITS/include/ITS/ITSFeeTask.h index 6024635cfe..ea66549dfd 100644 --- a/Modules/ITS/include/ITS/ITSFeeTask.h +++ b/Modules/ITS/include/ITS/ITSFeeTask.h @@ -188,7 +188,8 @@ class ITSFeeTask final : public TaskInterface int mPayloadParseEvery_n_TF = 1; // Use >= 1 values bool mEnableIHWReading = 0; bool mDecodeCDW = 0; - + int nResetCycle = 1; + int nCycleID = 0; TH1I* mTFInfo; // count vs TF ID TH2I* mTriggerVsFeeId; TH2I* mTriggerVsFeeId_reset; diff --git a/Modules/ITS/itsFee.json b/Modules/ITS/itsFee.json index 6f9a277c39..b2d9a35671 100644 --- a/Modules/ITS/itsFee.json +++ b/Modules/ITS/itsFee.json @@ -41,7 +41,8 @@ "EnableIHWReading": "1", "PayloadParsingEvery_n_HBFperTF": "0", "PayloadParsingEvery_n_TF": "1", - "DecodeCDW": "0" + "DecodeCDW": "0", + "nResetCycle": "3" } } }, diff --git a/Modules/ITS/src/ITSFeeTask.cxx b/Modules/ITS/src/ITSFeeTask.cxx index 8f04469641..1b611917cf 100644 --- a/Modules/ITS/src/ITSFeeTask.cxx +++ b/Modules/ITS/src/ITSFeeTask.cxx @@ -393,7 +393,16 @@ void ITSFeeTask::startOfActivity(const Activity& activity) ILOG(Debug, Devel) << "startOfActivity : " << activity.mId << ENDM; } -void ITSFeeTask::startOfCycle() { ILOG(Debug, Devel) << "startOfCycle" << ENDM; } +void ITSFeeTask::startOfCycle() +{ + ILOG(Debug, Devel) << "startOfCycle" << ENDM; + + if (nCycleID % nResetCycle == 0) { + mTrailerCount_reset->Reset(); + mTriggerVsFeeId_reset->Reset(); + } + nCycleID++; +} void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx) { @@ -683,6 +692,7 @@ void ITSFeeTask::getParameters() mPayloadParseEvery_n_TF = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "PayloadParsingEvery_n_TF", mPayloadParseEvery_n_TF); mEnableIHWReading = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "EnableIHWReading", mEnableIHWReading); mDecodeCDW = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "DecodeCDW", mDecodeCDW); + nResetCycle = o2::quality_control_modules::common::getFromConfig(mCustomParameters, "nResetCycle", nResetCycle); } void ITSFeeTask::getStavePoint(int layer, int stave, double* px, double* py) @@ -754,8 +764,6 @@ void ITSFeeTask::resetLanePlotsAndCounters(bool isFullReset) if (mResetPayload || isFullReset) { mPayloadSize->Reset("ICES"); } - mTrailerCount_reset->Reset(); - mTriggerVsFeeId_reset->Reset(); } void ITSFeeTask::reset()