Skip to content

Commit 57767b0

Browse files
committed
correct megalinter
1 parent 2bd9b2c commit 57767b0

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

PWGMM/Mult/Tasks/mftReassociationValidation.cxx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,7 @@ struct MftReassociationValidation {
337337
o2::parameters::GRPMagField* grpmag = nullptr;
338338
RCTFlagsChecker rctChecker{kFT0Bad, kITSBad, kTPCBadTracking, kTPCBadPID, kMFTBad};
339339
RCTFlagsChecker correlationAnalysisRctChecker{kFT0Bad, kITSBad, kTPCBadTracking, kTPCBadPID, kMFTBad, kITSLimAccMCRepr, kMFTLimAccMCRepr, kTPCLimAccMCRepr};
340+
bool areCorrectionsLoaded = false;
340341
std::array<std::shared_ptr<THnSparse>, MatchedToTrueCollisionStep::NMatchedToTrueCollisionSteps> hZVtxDiffAmbiguousTracks2D;
341342
std::array<std::shared_ptr<THnSparse>, MatchedToTrueCollisionStep::NMatchedToTrueCollisionSteps> hZVtxDiffNonAmbiguousTracks2D;
342343
std::array<std::shared_ptr<THnSparse>, MatchedToTrueCollisionStep::NMatchedToTrueCollisionSteps> hZVtxDiffNotMatchedTracks2D;
@@ -1185,10 +1186,9 @@ struct MftReassociationValidation {
11851186
aod::BCsWithTimestamps const&)
11861187
{
11871188
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
1188-
auto loopCounter = 0;
1189-
if (loopCounter == 0) {
1189+
if (areCorrectionsLoaded == false) {
11901190
loadZVertexShiftCorrection(bc);
1191-
loopCounter++;
1191+
areCorrectionsLoaded = true;
11921192
}
11931193

11941194
if (!(isAcceptedCollision<TwoDimensional>(collision, true))) {
@@ -1265,10 +1265,9 @@ struct MftReassociationValidation {
12651265
aod::BCsWithTimestamps const& /*bcs*/)
12661266
{
12671267
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
1268-
auto loopCounter = 0;
1269-
if (loopCounter == 0) {
1268+
if (areCorrectionsLoaded == false) {
12701269
loadZVertexShiftCorrection(bc);
1271-
loopCounter++;
1270+
areCorrectionsLoaded = true;
12721271
}
12731272

12741273
registry.fill(HIST("MC/2D/hMonteCarloEventCounter"), MonteCarloEventSelectionStep::AllMonteCarloEvents);
@@ -1653,10 +1652,9 @@ struct MftReassociationValidation {
16531652
aod::BCsWithTimestamps const& /*bcs*/)
16541653
{
16551654
auto bc = collision.template bc_as<aod::BCsWithTimestamps>();
1656-
auto loopCounter = 0;
1657-
if (loopCounter == 0) {
1655+
if (areCorrectionsLoaded == false) {
16581656
loadZVertexShiftCorrection(bc);
1659-
loopCounter++;
1657+
areCorrectionsLoaded = true;
16601658
}
16611659

16621660
registry.fill(HIST("MC/3D/hMonteCarloEventCounter"), MonteCarloEventSelectionStep::AllMonteCarloEvents);

0 commit comments

Comments
 (0)