Skip to content

Commit 27beb07

Browse files
authored
[PWGLF] Fix cpplint errors (#18102)
1 parent 1163fd6 commit 27beb07

10 files changed

Lines changed: 20 additions & 26 deletions

File tree

‎PWGLF/TableProducer/Nuspex/hyhe4builder.cxx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include <cmath>
4848
#include <cstdint>
4949
#include <cstdlib>
50+
#include <string>
5051

5152
using namespace std;
5253
using namespace o2;

‎PWGLF/TableProducer/Resonances/cksspinalignment.cxx‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ struct cksspinalignment {
139139
}
140140

141141
bool keepEvent(uint64_t eventIndex) const
142-
{ /*
143-
if (cfgKeepFraction >= 1.0f) {
144-
return true;
145-
}
146-
*/
142+
{
143+
// if (cfgKeepFraction >= 1.0f) {
144+
// return true;
145+
// }
147146
// SplitMix64 pseudo-random hash
148147
uint64_t x = eventIndex + 0x9e3779b97f4a7c15ULL;
149148
x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9ULL;

‎PWGLF/TableProducer/Strangeness/lambdakzerofinder.cxx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
#include <array>
6262
#include <cmath>
6363
#include <cstdlib>
64+
#include <string>
6465

6566
using namespace o2;
6667
using namespace o2::framework;

‎PWGLF/TableProducer/Strangeness/strangederivedbuilder.cxx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,8 +579,8 @@ struct strangederivedbuilder {
579579
// auto TraCascTable_thisColl = TraCascades.sliceBy(TraCascperCollision, collIdx);
580580
bool strange = V0Table_thisColl.size() > 0 ||
581581
CascTable_thisColl.size() > 0 ||
582-
KFCascTable_thisColl.size() > 0 /* ||
583-
TraCascTable_thisColl.size() > 0*/
582+
KFCascTable_thisColl.size() > 0
583+
// ||TraCascTable_thisColl.size() > 0
584584
;
585585

586586
auto bc = collision.template bc_as<bcType>();

‎PWGLF/Tasks/Nuspex/AntimatterAbsorptionHMPID.cxx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
#include <cmath>
4545
#include <cstdlib>
4646
#include <memory>
47+
#include <string>
4748

4849
using namespace o2;
4950
using namespace o2::framework;

‎PWGLF/Tasks/Nuspex/hypertritonAnalysis.cxx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#include <array>
4848
#include <cmath>
4949
#include <cstdlib>
50+
#include <string>
5051

5152
using namespace o2;
5253
using namespace o2::framework;

‎PWGLF/Tasks/Resonances/lambdav2.cxx‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,26 +209,23 @@ struct lambdav2 {
209209
template <typename T>
210210
bool SelectionPID(const T& candidate, int PID)
211211
{
212-
if (PID == 0) // pion
213-
{
212+
if (PID == 0) { // pion
214213
auto combPIDPi = TMath::Sqrt(TMath::Abs(candidate.tofNSigmaPi() * candidate.tofNSigmaPi() + candidate.tpcNSigmaPi() * candidate.tpcNSigmaPi()));
215214
if (!candidate.hasTOF() && candidate.tpcInnerParam() < 0.6 && TMath::Abs(candidate.tpcNSigmaPi()) < nsigmaCutTPCPi) {
216215
return true;
217216
}
218217
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && combPIDPi < nsigmaCutTOFPi) {
219218
return true;
220219
}
221-
} else if (PID == 1) // kaon
222-
{
220+
} else if (PID == 1) { // kaon
223221
auto combPIDKa = TMath::Sqrt(TMath::Abs(candidate.tofNSigmaKa() * candidate.tofNSigmaKa() + candidate.tpcNSigmaKa() * candidate.tpcNSigmaKa()));
224222
if (!candidate.hasTOF() && candidate.tpcInnerParam() < 0.45 && TMath::Abs(candidate.tpcNSigmaKa()) < nsigmaCutTPCKa) {
225223
return true;
226224
}
227225
if (candidate.hasTOF() && candidate.beta() > cfgCutTOFBeta && combPIDKa < nsigmaCutTOFKa) {
228226
return true;
229227
}
230-
} else // proton
231-
{
228+
} else { // proton
232229
auto combPIDPr = TMath::Sqrt(TMath::Abs(candidate.tofNSigmaPr() * candidate.tofNSigmaPr() + candidate.tpcNSigmaPr() * candidate.tpcNSigmaPr()));
233230
if (!candidate.hasTOF() && candidate.tpcInnerParam() < 0.6 && TMath::Abs(candidate.tpcNSigmaPr()) < nsigmaCutTPCPr) {
234231
return true;

‎PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1303,7 +1303,7 @@ struct PhiStrangeCorrelation {
13031303

13041304
histos.fill(histoKey, collision.posZ(), mcCollision.centFT0M(), assoc.pt(), assoc.y());
13051305
}
1306-
};
1306+
}; // NOLINT(readability/braces)
13071307

13081308
fillRecoAssocSpecies(makeAssocInput<kK0S>(k0sReduced), HIST("k0s/h4K0SMCReco"));
13091309
fillRecoAssocSpecies(makeAssocInput<kLambda>(lambdaReduced), HIST("lambda/h4LambdaMCReco"));
@@ -1337,7 +1337,7 @@ struct PhiStrangeCorrelation {
13371337
for (const auto& mcParticle : mcParticlesThisMcColl) {
13381338
if (std::abs(mcParticle.y()) > yConfigs.cfgYAcceptance) {
13391339
continue;
1340-
};
1340+
}
13411341

13421342
auto fillGenHistos = [&](auto h3Key, auto h4Key) {
13431343
histos.fill(h3Key, mcCollision.centFT0M(), mcParticle.pt(), mcParticle.y());
@@ -1352,7 +1352,7 @@ struct PhiStrangeCorrelation {
13521352
}
13531353

13541354
fillGenHistos(h3Key, h4Key);
1355-
};
1355+
}; // NOLINT(readability/braces)
13561356

13571357
switch (std::abs(mcParticle.pdgCode())) {
13581358
case o2::constants::physics::Pdg::kPhi:
@@ -1404,13 +1404,13 @@ struct PhiStrangeCorrelation {
14041404
for (const auto& mcParticle : mcParticles) {
14051405
if (std::abs(mcParticle.y()) > yConfigs.cfgYAcceptance) {
14061406
continue;
1407-
};
1407+
}
14081408

14091409
auto fillPartCollection = [&]<AssociatedParticleType PartType>() {
14101410
if (activeCorrelationTypes->at(PartType) && isGenSpeciesValid<PartType>(mcParticle, minPtMcGenConfigs.bypassPtCut.value)) {
14111411
assocParticles[PartType].emplace_back(mcParticle.pt(), mcParticle.y(), mcParticle.phi());
14121412
}
1413-
};
1413+
}; // NOLINT(readability/braces)
14141414

14151415
switch (std::abs(mcParticle.pdgCode())) {
14161416
case o2::constants::physics::Pdg::kPhi:

‎PWGLF/Utils/collisionCutsGroupLinkDef.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
///
1818
/// \author Bong-Hwi Lim <bong-hwi.lim@cern.ch>
1919

20-
#ifndef PWGLF_UTILS_COLLISIONCUTSGROUPLINKDEF_H_
21-
#define PWGLF_UTILS_COLLISIONCUTSGROUPLINKDEF_H_
20+
// NOLINT(build/header_guard)
2221

2322
#pragma link off all globals;
2423
#pragma link off all classes;
@@ -30,5 +29,3 @@
3029
#pragma link C++ class std::vector < int> + ;
3130
#pragma link C++ class std::vector < float> + ;
3231
#pragma link C++ class std::vector < bool> + ;
33-
34-
#endif // PWGLF_UTILS_COLLISIONCUTSGROUPLINKDEF_H_

‎PWGLF/Utils/v0SelectionGroupLinkDef.h‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111

12-
#ifndef PWGLF_UTILS_V0SELECTIONGROUPLINKDEF_H_
13-
#define PWGLF_UTILS_V0SELECTIONGROUPLINKDEF_H_
12+
// NOLINT(build/header_guard)
1413

1514
#pragma link off all globals;
1615
#pragma link off all classes;
@@ -21,5 +20,3 @@
2120
#pragma link C++ class std::vector < float> + ;
2221
#pragma link C++ class std::vector < double> + ;
2322
#pragma link C++ class std::vector < bool> + ;
24-
25-
#endif // PWGLF_UTILS_V0SELECTIONGROUPLINKDEF_H_

0 commit comments

Comments
 (0)