Skip to content

Commit 1a48c05

Browse files
authored
[PWGCF] Fix code check errors in femto framework (#18518)
1 parent e1b125c commit 1a48c05

7 files changed

Lines changed: 433 additions & 397 deletions

File tree

‎PWGCF/Femto/Core/baseSelection.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class BaseSelection
292292
/// \brief Evaluate a single observable against its configured selections.
293293
/// \param observableIndex Index of the observable.
294294
/// \param values Vector of values of the observable.
295-
void evaluateObservable(int observableIndex, std::vector<T> values)
295+
void evaluateObservable(int observableIndex, std::vector<T> const& values)
296296
{
297297
// if there are no selections configured, bail out
298298
if (mSelectionContainers.at(observableIndex).isEmpty()) {

‎PWGCF/Femto/Core/collisionBuilder.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class CollisionSelection : public baseselection::BaseSelection<float, o2::analys
334334
}
335335

336336
template <typename T>
337-
void setSphericity(T tracks)
337+
void setSphericity(T const& tracks)
338338
{
339339
mSphericity = computeSphericity(tracks);
340340
}

‎PWGCF/Femto/Core/mcBuilder.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ class McBuilder
556556
int64_t mcMotherRow = -1;
557557
if (mProduceMcMothers && mcParticle.has_mothers()) {
558558
auto mothers = mcParticle.template mothers_as<T2>();
559-
auto motherParticle = mothers.front();
559+
auto const& motherParticle = mothers.front();
560560
auto mcMotherIndex = motherParticle.globalIndex();
561561

562562
auto itM = mMcMotherMap.find(mcMotherIndex);

‎PWGCF/Femto/Core/trackBuilder.h‎

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@
2727
#include <Framework/AnalysisHelpers.h>
2828
#include <Framework/Configurable.h>
2929
#include <Framework/HistogramRegistry.h>
30+
#include <Framework/HistogramSpec.h>
3031
#include <Framework/Logger.h>
3132

33+
#include <TH1.h>
34+
35+
#include <array>
3236
#include <cmath>
3337
#include <cstdint>
3438
#include <string>
@@ -684,10 +688,17 @@ class TrackBuilder
684688
auto hSlotAssignment = registry->get<TH1>(HIST("hPuritySlotAssignment"));
685689
for (int i = 0; i < PuritySpeciesLast; i++) {
686690
std::string bitPosition = mPuritySlot[i] >= 0 ? std::to_string(mPuritySlot[i]) : "X";
687-
std::string value = mPuritySlot[i] >= 0 ? ("Slot " + std::to_string(mPuritySlot[i])) : "Not configured";
688-
std::string label = std::string("SelectionName___") + PuritySpeciesName[i] +
689-
":::MinimalCut___0:::OptionalCut___0:::BitPosition___" + bitPosition +
690-
":::Value___" + value;
691+
std::string value = "Not configured";
692+
if (mPuritySlot[i] >= 0) {
693+
value = "Slot ";
694+
value += std::to_string(mPuritySlot[i]);
695+
}
696+
std::string label = "SelectionName___";
697+
label += PuritySpeciesName[i];
698+
label += ":::MinimalCut___0:::OptionalCut___0:::BitPosition___";
699+
label += bitPosition;
700+
label += ":::Value___";
701+
label += value;
691702
hSlotAssignment->GetXaxis()->SetBinLabel(i + 1, label.c_str());
692703
hSlotAssignment->Fill(i, 1);
693704
}

‎PWGCF/Femto/Core/trackHistManager.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#include <TH1.h>
3030

3131
#include <array>
32+
#include <cmath>
3233
#include <cstddef>
3334
#include <map>
3435
#include <string>

‎PWGCF/Femto/TableProducer/femtoProducer.cxx‎

Lines changed: 187 additions & 178 deletions
Large diffs are not rendered by default.

‎PWGCF/Femto/TableProducer/femtoProducerDerivedToDerived.cxx‎

Lines changed: 227 additions & 212 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)