Skip to content

Commit 884d8a4

Browse files
authored
[DPG] Fix compilation warnings (#8380)
1 parent 4b40cbd commit 884d8a4

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

DPG/Tasks/AOTEvent/detectorOccupancyQa.cxx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,6 @@ struct DetectorOccupancyQaTask {
361361
int runNumber = bcs.iteratorAt(0).runNumber();
362362
if (runNumber != lastRunNumber) {
363363
lastRunNumber = runNumber; // do it only once
364-
int64_t tsSOR = 0;
365-
int64_t tsEOR = 1;
366-
uint32_t nOrbitsPerTF = 128; // 128 in 2022, 32 in 2023
367364

368365
if (runNumber >= 500000) {
369366
auto runInfo = o2::parameters::AggregatedRunInfo::buildAggregatedRunInfo(o2::ccdb::BasicCCDBManager::instance(), runNumber);

DPG/Tasks/AOTEvent/eventSelectionQa.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,14 @@ struct EventSelectionQaTask {
336336
}
337337

338338
// bc-based event selection qa
339-
for (auto& bc : bcs) {
339+
for (const auto& bc : bcs) {
340340
for (int iAlias = 0; iAlias < kNaliases; iAlias++) {
341341
histos.fill(HIST("hBcCounterAll"), iAlias, bc.alias_bit(iAlias));
342342
}
343343
}
344344

345345
// collision-based event selection qa
346-
for (auto& col : cols) {
346+
for (const auto& col : cols) {
347347
bool sel1 = col.selection_bit(kIsINT1) && col.selection_bit(kNoBGV0A) && col.selection_bit(kNoBGV0C) && col.selection_bit(kNoTPCLaserWarmUp) && col.selection_bit(kNoTPCHVdip);
348348

349349
for (int iAlias = 0; iAlias < kNaliases; iAlias++) {
@@ -367,7 +367,7 @@ struct EventSelectionQaTask {
367367
histos.fill(HIST("hSelCounter"), i, col.selection_bit(i));
368368
}
369369

370-
auto bc = col.bc_as<BCsRun2>();
370+
const auto& bc = col.bc_as<BCsRun2>();
371371
uint64_t globalBC = bc.globalBC();
372372
// uint64_t orbit = globalBC / nBCsPerOrbit;
373373
int localBC = globalBC % nBCsPerOrbit;
@@ -665,7 +665,7 @@ struct EventSelectionQaTask {
665665
std::vector<uint64_t> vGlobalBCs(nBCs, 0);
666666

667667
// bc-based event selection qa
668-
for (auto& bc : bcs) {
668+
for (const auto& bc : bcs) {
669669
if (!bc.has_ft0())
670670
continue;
671671
float multT0A = bc.ft0().sumAmpA();
@@ -684,7 +684,7 @@ struct EventSelectionQaTask {
684684
}
685685

686686
// bc-based event selection qa
687-
for (auto& bc : bcs) {
687+
for (const auto& bc : bcs) {
688688
for (int iAlias = 0; iAlias < kNaliases; iAlias++) {
689689
histos.fill(HIST("hBcCounterAll"), iAlias, bc.alias_bit(iAlias));
690690
}
@@ -810,7 +810,7 @@ struct EventSelectionQaTask {
810810

811811
// map for pileup checks
812812
std::vector<int> vCollisionsPerBc(bcs.size(), 0);
813-
for (auto& col : cols) {
813+
for (const auto& col : cols) {
814814
if (col.foundBCId() < 0 || col.foundBCId() >= bcs.size())
815815
continue;
816816
vCollisionsPerBc[col.foundBCId()]++;
@@ -826,7 +826,7 @@ struct EventSelectionQaTask {
826826
// to be used for closest TVX (FT0-OR) searches
827827
std::map<int64_t, int32_t> mapGlobalBcWithTVX;
828828
std::map<int64_t, int32_t> mapGlobalBcWithTOR;
829-
for (auto& bc : bcs) {
829+
for (const auto& bc : bcs) {
830830
int64_t globalBC = bc.globalBC();
831831
// skip non-colliding bcs for data and anchored runs
832832
if (runNumber >= 500000 && bcPatternB[globalBC % o2::constants::lhc::LHCMaxBunches] == 0) {
@@ -859,7 +859,7 @@ struct EventSelectionQaTask {
859859
}
860860

861861
// collision-based event selection qa
862-
for (auto& col : cols) {
862+
for (const auto& col : cols) {
863863
for (int iAlias = 0; iAlias < kNaliases; iAlias++) {
864864
if (!col.alias_bit(iAlias)) {
865865
continue;
@@ -893,7 +893,7 @@ struct EventSelectionQaTask {
893893
// count tracks of different types
894894
auto tracksGrouped = tracks.sliceBy(perCollision, col.globalIndex());
895895
int nContributorsAfterEtaTPCCuts = 0;
896-
for (auto& track : tracksGrouped) {
896+
for (const auto& track : tracksGrouped) {
897897
int trackBcDiff = bcDiff + track.trackTime() / o2::constants::lhc::LHCBunchSpacingNS;
898898
if (!track.isPVContributor())
899899
continue;
@@ -1078,7 +1078,7 @@ struct EventSelectionQaTask {
10781078

10791079
void processMCRun3(aod::McCollisions const& mcCols, soa::Join<aod::Collisions, aod::McCollisionLabels, aod::EvSels> const& cols, BCsRun3 const&, aod::FT0s const&)
10801080
{
1081-
for (auto& mcCol : mcCols) {
1081+
for (const auto& mcCol : mcCols) {
10821082
auto bc = mcCol.bc_as<BCsRun3>();
10831083
uint64_t globalBC = bc.globalBC();
10841084
uint64_t orbit = globalBC / nBCsPerOrbit;
@@ -1094,7 +1094,7 @@ struct EventSelectionQaTask {
10941094
}
10951095

10961096
// check fraction of collisions matched to wrong bcs
1097-
for (auto& col : cols) {
1097+
for (const auto& col : cols) {
10981098
if (!col.has_mcCollision()) {
10991099
continue;
11001100
}

DPG/Tasks/FV0/qaFV0.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ struct fv0Qa {
394394

395395
FillConditionHistograms("FV0BC", localCollisionBCFV0);
396396

397-
for (int i = 0; i < fv0.amplitude().size(); i++) {
397+
for (std::size_t i = 0; i < fv0.amplitude().size(); i++) {
398398
FillConditionHistograms("FV0ChannelAmplitude", fv0.amplitude()[i]);
399399
FillConditionHistograms("FV0AmplitudePerChannel", fv0.channel()[i], fv0.amplitude()[i]);
400400
sum(totalAmplitudes, fv0.amplitude()[i]);

0 commit comments

Comments
 (0)