Skip to content

Commit aa623cb

Browse files
authored
[PWGEM] Fix compilation warnings (#8383)
1 parent 379ea4f commit aa623cb

File tree

2 files changed

+21
-33
lines changed

2 files changed

+21
-33
lines changed

PWGEM/Dilepton/Tasks/eventQC.cxx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -579,16 +579,6 @@ struct eventQC {
579579
return false;
580580
}
581581

582-
uint32_t itsClusterSizes = track.itsClusterSizes();
583-
int total_cluster_size = 0, nl = 0;
584-
for (unsigned int layer = 0; layer < 7; layer++) {
585-
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
586-
if (cluster_size_per_layer > 0) {
587-
nl++;
588-
}
589-
total_cluster_size += cluster_size_per_layer;
590-
}
591-
592582
return true;
593583
}
594584

PWGEM/Dilepton/Tasks/tableReaderBarrel.cxx

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ struct AnalysisTrackSelection {
293293
Configurable<std::string> fConfigRunPeriods{"cfgRunPeriods", "LHC22f", "run periods for used data"};
294294
Configurable<bool> fConfigDummyRunlist{"cfgDummyRunlist", false, "If true, use dummy runlist"};
295295
Configurable<int> fConfigInitRunNumber{"cfgInitRunNumber", 543215, "Initial run number used in run by run checks"};
296-
Configurable<int> fConfigNbTrackCut{"cfgNbTrackCut", 1, "Number of cuts including prefilter cut, need to be below 30"};
296+
Configurable<std::size_t> fConfigNbTrackCut{"cfgNbTrackCut", 1, "Number of cuts including prefilter cut, need to be below 30"};
297297

298298
std::vector<AnalysisCompositeCut> fTrackCuts;
299299
struct : ConfigurableGroup {
@@ -345,10 +345,9 @@ struct AnalysisTrackSelection {
345345
{
346346
fCurrentRun = 0;
347347

348-
int nbofcuts = fConfigNbTrackCut;
349-
if (nbofcuts > 0 && CheckSize()) {
350-
for (unsigned int icut = 0; icut < nbofcuts; ++icut) {
351-
AnalysisCompositeCut* cut = new AnalysisCompositeCut(Form("trackcut%d", icut), Form("trackcut%d", icut));
348+
if (fConfigNbTrackCut > 0 && CheckSize()) {
349+
for (std::size_t icut = 0; icut < fConfigNbTrackCut; ++icut) {
350+
AnalysisCompositeCut* cut = new AnalysisCompositeCut(Form("trackcut%zu", icut), Form("trackcut%zu", icut));
352351
cut->AddCut(GetTrackCut(icut));
353352
cut->AddCut(GetPIDCut(icut));
354353
fTrackCuts.push_back(*cut);
@@ -795,7 +794,7 @@ struct AnalysisEventMixing {
795794
// single particle selection tasks to preserve the correspondence between the track cut name and its
796795
// bit position in the cuts bitmap
797796
// TODO: Create a configurable to specify exactly on which of the bits one should run the event mixing
798-
Configurable<int> fConfigNbTrackCut{"cfgNbTrackCut", 1, "Number of cuts without prefilter cut, need to be consistent with the track selection"};
797+
Configurable<std::size_t> fConfigNbTrackCut{"cfgNbTrackCut", 1, "Number of cuts without prefilter cut, need to be consistent with the track selection"};
799798
Configurable<int> fConfigMixingDepth{"cfgMixingDepth", 100, "Number of Events stored for event mixing"};
800799
Configurable<std::string> fConfigAddEventMixingHistogram{"cfgAddEventMixingHistogram", "", "Comma separated list of histograms"};
801800
Configurable<std::string> ccdburl{"ccdburl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
@@ -832,11 +831,11 @@ struct AnalysisEventMixing {
832831
// Keep track of all the histogram class names to avoid composing strings in the event mixing pairing
833832
TString histNames = "";
834833
if (fConfigNbTrackCut > 0 && fConfigNbTrackCut < 31) {
835-
for (int icut = 0; icut < fConfigNbTrackCut; ++icut) {
834+
for (std::size_t icut = 0; icut < fConfigNbTrackCut; ++icut) {
836835
std::vector<TString> names = {
837-
Form("PairsBarrelMEPM_trackcut%d", icut),
838-
Form("PairsBarrelMEPP_trackcut%d", icut),
839-
Form("PairsBarrelMEMM_trackcut%d", icut)};
836+
Form("PairsBarrelMEPM_trackcut%zu", icut),
837+
Form("PairsBarrelMEPP_trackcut%zu", icut),
838+
Form("PairsBarrelMEMM_trackcut%zu", icut)};
840839
histNames += Form("%s;%s;%s;", names[0].Data(), names[1].Data(), names[2].Data());
841840
fTrackHistNames.push_back(names);
842841
fTwoTrackFilterMask |= (static_cast<uint32_t>(1) << icut);
@@ -952,8 +951,8 @@ struct AnalysisSameEventPairing {
952951
int fCurrentRun; // needed to detect if the run changed and trigger update of calibrations etc.
953952

954953
OutputObj<THashList> fOutputList{"output"};
955-
Configurable<int> fConfigNbTrackCut{"cfgNbTrackCut", 1, "Number of track cuts without prefilter cut, need to be consistent with the track selection"};
956-
Configurable<int> fConfigNbPairCut{"cfgNbPairCut", 1, "Number of pair cuts, need to be below 4 right now"};
954+
Configurable<std::size_t> fConfigNbTrackCut{"cfgNbTrackCut", 1, "Number of track cuts without prefilter cut, need to be consistent with the track selection"};
955+
Configurable<std::size_t> fConfigNbPairCut{"cfgNbPairCut", 1, "Number of pair cuts, need to be below 4 right now"};
957956
Configurable<string> url{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};
958957
Configurable<string> ccdbPath{"ccdb-path", "Users/lm", "base path to the ccdb object"};
959958
Configurable<int64_t> nolaterthan{"ccdb-no-later-than", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "latest acceptable timestamp of creation for the object"};
@@ -1073,28 +1072,27 @@ struct AnalysisSameEventPairing {
10731072
std::vector<TString> names;
10741073

10751074
if (fConfigNbPairCut > 0 && CheckSize()) {
1076-
for (int icut = 0; icut < fConfigNbPairCut; ++icut) {
1075+
for (std::size_t icut = 0; icut < fConfigNbPairCut; ++icut) {
10771076
fPairCuts.push_back(*GetPairCut(icut));
10781077
}
10791078
}
10801079

10811080
if (fConfigNbTrackCut > 0 && fConfigNbTrackCut < 31) { // if track cuts
1082-
for (int icut = 0; icut < fConfigNbTrackCut; ++icut) { // loop over track cuts
1081+
for (std::size_t icut = 0; icut < fConfigNbTrackCut; ++icut) { // loop over track cuts
10831082
fTwoTrackFilterMask |= (static_cast<uint32_t>(1) << icut);
10841083
// no pair cuts
10851084
names = {
1086-
Form("PairsBarrelSEPM_trackcut%d", icut),
1087-
Form("PairsBarrelSEPP_trackcut%d", icut),
1088-
Form("PairsBarrelSEMM_trackcut%d", icut)};
1085+
Form("PairsBarrelSEPM_trackcut%zu", icut),
1086+
Form("PairsBarrelSEPP_trackcut%zu", icut),
1087+
Form("PairsBarrelSEMM_trackcut%zu", icut)};
10891088
histNames += Form("%s;%s;%s;", names[0].Data(), names[1].Data(), names[2].Data());
10901089
fTrackHistNames.push_back(names);
10911090

1092-
unsigned int npaircuts = fPairCuts.size();
1093-
for (int iPairCut = 0; iPairCut < npaircuts; ++iPairCut) { // loop over pair cuts
1091+
for (std::size_t iPairCut = 0; iPairCut < fPairCuts.size(); ++iPairCut) { // loop over pair cuts
10941092
names = {
1095-
Form("PairsBarrelSEPM_trackcut%d_paircut%d", icut, iPairCut),
1096-
Form("PairsBarrelSEPP_trackcut%d_paircut%d", icut, iPairCut),
1097-
Form("PairsBarrelSEMM_trackcut%d_paircut%d", icut, iPairCut)};
1093+
Form("PairsBarrelSEPM_trackcut%zu_paircut%zu", icut, iPairCut),
1094+
Form("PairsBarrelSEPP_trackcut%zu_paircut%zu", icut, iPairCut),
1095+
Form("PairsBarrelSEMM_trackcut%zu_paircut%zu", icut, iPairCut)};
10981096

10991097
histNames += Form("%s;%s;%s;", names[0].Data(), names[1].Data(), names[2].Data());
11001098

@@ -1147,7 +1145,7 @@ struct AnalysisSameEventPairing {
11471145
}
11481146

11491147
int iCut = 0;
1150-
for (int icut = 0; icut < fConfigNbTrackCut; icut++) {
1148+
for (std::size_t icut = 0; icut < fConfigNbTrackCut; icut++) {
11511149
if (twoTrackFilter & (static_cast<uint32_t>(1) << icut)) {
11521150
if (t1.sign() * t2.sign() < 0) {
11531151
fHistMan->FillHistClass(histNames[iCut][0].Data(), VarManager::fgValues);

0 commit comments

Comments
 (0)