Skip to content

Commit fa7a91a

Browse files
authored
Added all objects to reset function for correct SSS (#2055)
1 parent ee01a94 commit fa7a91a

4 files changed

Lines changed: 21 additions & 6 deletions

File tree

Modules/ITS/include/ITS/ITSFeeTask.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class ITSFeeTask final : public TaskInterface
128128
void setPlotsFormat();
129129
void drawLayerName(TH2* histo2D);
130130
void resetGeneralPlots();
131-
void resetLanePlotsAndCounters();
131+
void resetLanePlotsAndCounters(bool isFullReset = false);
132132
static constexpr int NLayer = 7;
133133
const int NStaves[NLayer] = { 12, 16, 20, 24, 30, 42, 48 };
134134
static constexpr int NLayerIB = 3;

Modules/ITS/src/ITSFeeTask.cxx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ void ITSFeeTask::monitorData(o2::framework::ProcessingContext& ctx)
359359

360360
DPLRawParser parser(ctx.inputs());
361361

362-
resetLanePlotsAndCounters(); // action taken depending on mResetLaneStatus and mResetPayload
362+
resetLanePlotsAndCounters(false); // not full reset // action taken depending on mResetLaneStatus and mResetPayload
363363

364364
// manual call of DPL data iterator to catch exceptoin:
365365
try {
@@ -648,9 +648,9 @@ void ITSFeeTask::resetGeneralPlots()
648648
mTrigger->Reset();
649649
}
650650

651-
void ITSFeeTask::resetLanePlotsAndCounters()
651+
void ITSFeeTask::resetLanePlotsAndCounters(bool isFullReset)
652652
{
653-
if (mResetLaneStatus) {
653+
if (mResetLaneStatus || isFullReset) {
654654
mRDHSummary->Reset("ICES"); // option ICES is to not remove layer lines and labels
655655
mFlag1Check->Reset();
656656
mLaneStatusSummaryIB->Reset();
@@ -668,14 +668,26 @@ void ITSFeeTask::resetLanePlotsAndCounters()
668668

669669
memset(mStatusFlagNumber, 0, sizeof(mStatusFlagNumber)); // reset counters
670670
}
671-
if (mResetPayload) {
671+
if (mResetPayload || isFullReset) {
672672
mPayloadSize->Reset("ICES");
673673
}
674674
}
675675

676676
void ITSFeeTask::reset()
677677
{
678+
// it is expected that this reset function will be executed only at the end of run
678679
resetGeneralPlots();
680+
resetLanePlotsAndCounters(true); // full reset of all plots
681+
mTimeFrameId = 0;
682+
mDecodingCheck->Reset();
683+
mRDHSummaryCumulative->Reset();
684+
mTrailerCount->Reset();
685+
mActiveLanes->Reset();
686+
for (int i = 0; i < NFlags; i++) {
687+
mLaneStatusCumulative[i]->Reset("ICES");
688+
}
689+
mProcessingTime->Reset();
690+
mProcessingTime2->Reset();
679691
ILOG(Debug, Devel) << "Reset" << ENDM;
680692
}
681693

Modules/ITS/src/ITSFhrTask.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,9 @@ void ITSFhrTask::reset()
818818
}
819819
}
820820

821+
mTFCount = 0;
822+
std::fill(&mChipStat[0][0], &mChipStat[0][0] + NStaves[mLayer] * nHicPerStave[mLayer] * nChipsPerHic[mLayer], 0);
823+
std::fill(&mNoisyPixelNumber[0][0], &mNoisyPixelNumber[0][0] + 7 * 48, 0);
821824
ILOG(Debug, Devel) << "Reset" << ENDM;
822825
}
823826

Modules/ITS/src/ITSTrackTask.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ void ITSTrackTask::reset()
406406
hTrackEta->Reset();
407407
hVerticesRof->Reset();
408408
nVertices = 0;
409-
409+
mNRofs = 0;
410410
hVertexCoordinates->Reset();
411411
hVertexRvsZ->Reset();
412412
hVertexZ->Reset();

0 commit comments

Comments
 (0)