Skip to content

Commit

Permalink
ITS: FHRTask patch (#2071)
Browse files Browse the repository at this point in the history
* Added all objects to reset function for correct SSS

* Fixed crash in FHR Task because of access to non-existing memory space
  • Loading branch information
IsakovAD authored Dec 11, 2023
1 parent 648f093 commit 46cc246
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Modules/ITS/src/ITSFhrTask.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ void ITSFhrTask::initialize(o2::framework::InitContext& /*ctx*/)
{
ILOG(Debug, Devel) << "initialize ITSFhrTask" << ENDM;
getParameters();

mGeneralOccupancy = new TH2Poly();
mGeneralOccupancy->SetTitle("General Occupancy;mm (IB 3x);mm (IB 3x)");
mGeneralOccupancy->SetName("General/General_Occupancy");
Expand Down Expand Up @@ -781,7 +780,6 @@ void ITSFhrTask::reset()
{
resetGeneralPlots();
resetOccupancyPlots();

mGeneralOccupancy->Reset("content");
mGeneralNoisyPixel->Reset("content");
mDecoder->clearStat();
Expand All @@ -797,6 +795,7 @@ void ITSFhrTask::reset()
mHitnumberLane[istave][ichip] = 0;
mOccupancyLane[istave][ichip] = 0;
mHitPixelID_InStave[istave][0][ichip].clear();
mChipStat[istave][ichip] = 0;
}
}
} else {
Expand All @@ -813,13 +812,11 @@ void ITSFhrTask::reset()
mOccupancyLane[istave][2 * ihic + 1] = 0;
for (int ichip = 0; ichip < nChipsPerHic[mLayer]; ichip++) {
mHitPixelID_InStave[istave][ihic][ichip].clear();
mChipStat[istave][ihic * nChipsPerHic[mLayer] + ichip] = 0;
}
}
}
}

mTFCount = 0;
std::fill(&mChipStat[0][0], &mChipStat[0][0] + NStaves[mLayer] * nHicPerStave[mLayer] * nChipsPerHic[mLayer], 0);
std::fill(&mNoisyPixelNumber[0][0], &mNoisyPixelNumber[0][0] + 7 * 48, 0);
ILOG(Debug, Devel) << "Reset" << ENDM;
}
Expand Down

0 comments on commit 46cc246

Please sign in to comment.