Skip to content

Commit 2bf01ea

Browse files
authored
Fixing some warnings (#302)
1 parent c19d54e commit 2bf01ea

10 files changed

Lines changed: 67 additions & 61 deletions

File tree

Common/CCDB/TriggerAliases.cxx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@
1212
#include "Common/CCDB/TriggerAliases.h"
1313
#include "Framework/Logger.h"
1414

15+
const char* aliasLabels[kNaliases] = {
16+
"kINT7",
17+
"kEMC7",
18+
"kINT7inMUON",
19+
"kMuonSingleLowPt7",
20+
"kMuonSingleHighPt7",
21+
"kMuonUnlikeLowPt7",
22+
"kMuonLikeLowPt7",
23+
"kCUP8",
24+
"kCUP9",
25+
"kMUP10",
26+
"kMUP11",
27+
"kALL"};
28+
1529
void TriggerAliases::AddClassIdToAlias(uint32_t aliasId, int classId)
1630
{
1731
if (classId < 0 || classId > 99) {

Common/CCDB/TriggerAliases.h

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,7 @@ enum triggerAliases {
3333
kNaliases
3434
};
3535

36-
static const char* aliasLabels[kNaliases] = {
37-
"kINT7",
38-
"kEMC7",
39-
"kINT7inMUON",
40-
"kMuonSingleLowPt7",
41-
"kMuonSingleHighPt7",
42-
"kMuonUnlikeLowPt7",
43-
"kMuonLikeLowPt7",
44-
"kCUP8",
45-
"kCUP9",
46-
"kMUP10",
47-
"kMUP11",
48-
"kALL"};
36+
extern const char* aliasLabels[kNaliases];
4937

5038
class TriggerAliases
5139
{

Common/DataModel/EventSelection.h

Lines changed: 29 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -72,32 +72,35 @@ enum EventSelectionFlags {
7272
kNsel
7373
};
7474

75-
static const char* eventSelectionLabels[kNsel] = {
76-
"kIsBBV0A",
77-
"kIsBBV0C",
78-
"kIsBBFDA",
79-
"kIsBBFDC",
80-
"kNoBGV0A",
81-
"kNoBGV0C",
82-
"kNoBGFDA",
83-
"kNoBGFDC",
84-
"kIsBBT0A",
85-
"kIsBBT0C",
86-
"kIsBBZNA",
87-
"kIsBBZNC",
88-
"kNoBGZNA",
89-
"kNoBGZNC",
90-
"kNoV0MOnVsOfPileup",
91-
"kNoSPDOnVsOfPileup",
92-
"kNoV0Casymmetry",
93-
"kIsGoodTimeRange",
94-
"kNoIncompleteDAQ",
95-
"kNoTPCLaserWarmUp",
96-
"kNoTPCHVdip",
97-
"kNoPileupFromSPD",
98-
"kNoV0PFPileup",
99-
"kNoSPDClsVsTklBG",
100-
"kNoV0C012vsTklBG"};
75+
// In a struct to avoid warnings if that is not used in all executables which include this file
76+
struct EventSelectionLabels {
77+
static constexpr const char* labels[kNsel] = {
78+
"kIsBBV0A",
79+
"kIsBBV0C",
80+
"kIsBBFDA",
81+
"kIsBBFDC",
82+
"kNoBGV0A",
83+
"kNoBGV0C",
84+
"kNoBGFDA",
85+
"kNoBGFDC",
86+
"kIsBBT0A",
87+
"kIsBBT0C",
88+
"kIsBBZNA",
89+
"kIsBBZNC",
90+
"kNoBGZNA",
91+
"kNoBGZNC",
92+
"kNoV0MOnVsOfPileup",
93+
"kNoSPDOnVsOfPileup",
94+
"kNoV0Casymmetry",
95+
"kIsGoodTimeRange",
96+
"kNoIncompleteDAQ",
97+
"kNoTPCLaserWarmUp",
98+
"kNoTPCHVdip",
99+
"kNoPileupFromSPD",
100+
"kNoV0PFPileup",
101+
"kNoSPDClsVsTklBG",
102+
"kNoV0C012vsTklBG"};
103+
};
101104

102105
// collision-joinable event selection decisions
103106
namespace evsel

Common/Tasks/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ o2physics_add_dpl_workflow(validation
2121

2222
o2physics_add_dpl_workflow(event-selection-qa
2323
SOURCES eventSelectionQa.cxx
24-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase
24+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2::DetectorsBase
2525
COMPONENT_NAME Analysis)
2626

2727
o2physics_add_dpl_workflow(multiplicity-qa

PWGDQ/TableProducer/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111

1212
o2physics_add_dpl_workflow(table-maker
1313
SOURCES tableMaker.cxx
14-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2Physics::AnalysisCore O2Physics::PWGDQCore
14+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2Physics::AnalysisCCDB O2Physics::PWGDQCore
1515
COMPONENT_NAME Analysis)
1616

1717
o2physics_add_dpl_workflow(table-maker-mc
1818
SOURCES tableMakerMC.cxx
19-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2Physics::AnalysisCore O2Physics::PWGDQCore
19+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsBase O2Physics::AnalysisCCDB O2Physics::PWGDQCore
2020
COMPONENT_NAME Analysis)

PWGHF/TableProducer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
o2physics_add_dpl_workflow(track-index-skims-creator
1313
SOURCES HFTrackIndexSkimsCreator.cxx
14-
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2::DetectorsVertexing ROOT::EG
14+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2::DetectorsVertexing ROOT::EG
1515
COMPONENT_NAME Analysis)
1616

1717
o2physics_add_dpl_workflow(candidate-creator-2prong

PWGJE/Core/JetFinder.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ class JetFinder
101101
fastjet::Selector selRho;
102102

103103
/// Default constructor
104-
JetFinder(float eta_Min = -0.9, float eta_Max = 0.9, float phi_Min = 0.0, float phi_Max = 2 * M_PI) : phiMin(phi_Min),
104+
JetFinder(float eta_Min = -0.9, float eta_Max = 0.9, float phi_Min = 0.0, float phi_Max = 2 * M_PI) : bkgSubMode(BkgSubMode::none),
105+
phiMin(phi_Min),
105106
phiMax(phi_Max),
106107
etaMin(eta_Min),
107108
etaMax(eta_Max),
@@ -116,30 +117,29 @@ class JetFinder
116117
ghostEtaMax(eta_Max),
117118
ghostArea(0.005),
118119
ghostRepeatN(1),
119-
ghostktMean(1e-100), //is float precise enough?
120+
ghostktMean(1e-100), // is float precise enough?
120121
gridScatter(1.0),
121122
ktScatter(0.1),
122123
jetBkgR(0.2),
123124
bkgPhiMin(phi_Min),
124125
bkgPhiMax(phi_Max),
125126
bkgEtaMin(eta_Min),
126127
bkgEtaMax(eta_Max),
128+
constSubAlpha(1.0),
129+
constSubRMax(0.6),
130+
isReclustering(false),
127131
algorithm(fastjet::antikt_algorithm),
128132
recombScheme(fastjet::E_scheme),
129133
strategy(fastjet::Best),
130134
areaType(fastjet::active_area),
131135
algorithmBkg(fastjet::JetAlgorithm(fastjet::kt_algorithm)),
132136
recombSchemeBkg(fastjet::RecombinationScheme(fastjet::E_scheme)),
133137
strategyBkg(fastjet::Best),
134-
areaTypeBkg(fastjet::active_area),
135-
bkgSubMode(BkgSubMode::none),
136-
constSubAlpha(1.0),
137-
constSubRMax(0.6),
138-
isReclustering(false)
138+
areaTypeBkg(fastjet::active_area)
139139

140140
{
141141

142-
//default constructor
142+
// default constructor
143143
}
144144

145145
/// Default destructor
@@ -159,19 +159,19 @@ class JetFinder
159159
/// \param inputParticles vector of input particles/tracks
160160
/// \param jets veector of jets to be filled
161161
/// \return ClusterSequenceArea object needed to access constituents
162-
fastjet::ClusterSequenceArea findJets(std::vector<fastjet::PseudoJet>& inputParticles, std::vector<fastjet::PseudoJet>& jets); //ideally find a way of passing the cluster sequence as a reeference
162+
fastjet::ClusterSequenceArea findJets(std::vector<fastjet::PseudoJet>& inputParticles, std::vector<fastjet::PseudoJet>& jets); // ideally find a way of passing the cluster sequence as a reeference
163163

164164
private:
165-
//void setParams();
166-
//void setBkgSub();
165+
// void setParams();
166+
// void setBkgSub();
167167
std::unique_ptr<fastjet::BackgroundEstimatorBase> bkgE;
168168
std::unique_ptr<fastjet::Subtractor> sub;
169169
std::unique_ptr<fastjet::contrib::ConstituentSubtractor> constituentSub;
170170

171171
ClassDefNV(JetFinder, 1);
172172
};
173173

174-
//does this belong here?
174+
// does this belong here?
175175
template <typename T>
176176
void fillConstituents(const T& constituent, std::vector<fastjet::PseudoJet>& constituents)
177177
{

Tutorials/src/eventMixing.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ struct HashTask {
4444
if (colX < xBins[0] || colY < yBins[0]) {
4545
return -1;
4646
}
47-
for (int i = 1; i < xBins.size(); i++) {
47+
for (unsigned int i = 1; i < xBins.size(); i++) {
4848
if (colX < xBins[i]) {
49-
for (int j = 1; j < yBins.size(); j++) {
49+
for (unsigned int j = 1; j < yBins.size(); j++) {
5050
if (colY < yBins[j]) {
5151
return i + j * (xBins.size() + 1);
5252
}
@@ -125,7 +125,7 @@ struct MixedEventsPartitionedTracks {
125125

126126
// Strictly upper categorised collisions
127127
for (auto& [c1, c2] : selfCombinations("fBin", 5, -1, join(hashes, collisions), join(hashes, collisions))) {
128-
//LOGF(info, "Collisions bin: %d pair: %d (%f, %f, %f), %d (%f, %f, %f)", c1.bin(), c1.index(), c1.posX(), c1.posY(), c1.posZ(), c2.index(), c2.posX(), c2.posY(), c2.posZ());
128+
// LOGF(info, "Collisions bin: %d pair: %d (%f, %f, %f), %d (%f, %f, %f)", c1.bin(), c1.index(), c1.posX(), c1.posY(), c1.posZ(), c2.index(), c2.posX(), c2.posY(), c2.posZ());
129129

130130
auto it1 = slicer.begin();
131131
auto it2 = slicer.begin();

Tutorials/src/trackIteration.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct AllTracks {
4848
// count the tracks contained in each data frame
4949
count = 0;
5050
for (auto& track : tracks) {
51+
LOGF(debug, "Track with momentum %f", track.pt());
5152
count++;
5253
}
5354
totalCount += count;

Tutorials/src/tracksCombinations.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ struct HashTask {
5050
// Calculate hash for an element based on 2 properties and their bins.
5151
int getHash(const std::vector<float>& xBins, const std::vector<float>& yBins, float colX, float colY)
5252
{
53-
for (int i = 0; i < xBins.size(); i++) {
53+
for (unsigned int i = 0; i < xBins.size(); i++) {
5454
if (colX < xBins[i]) {
55-
for (int j = 0; j < yBins.size(); j++) {
55+
for (unsigned int j = 0; j < yBins.size(); j++) {
5656
if (colY < yBins[j]) {
5757
return i + j * (xBins.size() + 1);
5858
}
@@ -63,7 +63,7 @@ struct HashTask {
6363
}
6464

6565
// overflow for xBins only
66-
for (int j = 0; j < yBins.size(); j++) {
66+
for (unsigned int j = 0; j < yBins.size(); j++) {
6767
if (colY < yBins[j]) {
6868
return xBins.size() + j * (xBins.size() + 1);
6969
}

0 commit comments

Comments
 (0)