Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions PWGJE/Core/MlResponseHfTagging.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
// Fill the map of available input features
// the key is the feature's name (std::string)
// the value is the corresponding value in EnumInputFeatures
#define FILL_MAP_BJET(FEATURE) \
{ \
#FEATURE, static_cast<uint8_t>(InputFeaturesBTag::FEATURE)}
#define FILL_MAP_BJET(FEATURE) \
{ \
#FEATURE, static_cast<uint8_t>(InputFeaturesBTag::FEATURE) \
}

// Check if the index of mCachedIndices (index associated to a FEATURE)
// matches the entry in EnumInputFeatures associated to this FEATURE
Expand Down Expand Up @@ -207,7 +208,7 @@
static int replaceNaN(std::vector<T>& vec, T value)
{
int numNaN = 0;
for (auto& el : vec) {

Check failure on line 211 in PWGJE/Core/MlResponseHfTagging.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (std::isnan(el) || std::isinf(el)) {
el = value;
++numNaN;
Expand Down Expand Up @@ -407,7 +408,7 @@
static int replaceNaN(std::vector<T>& vec, T value)
{
int numNaN = 0;
for (auto& el : vec) { // o2-linter: disable=const-ref-in-for-loop

Check failure on line 411 in PWGJE/Core/MlResponseHfTagging.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (std::isnan(el)) {
el = value;
++numNaN;
Expand Down Expand Up @@ -453,7 +454,7 @@
std::vector<int64_t> featShape{nNodes, nJetFeat + nTrkFeat};

int numNaN = replaceNaN(jetFeat, 0.f);
for (auto& aTrkFeat : trkFeat) { // o2-linter: disable=const-ref-in-for-loop

Check failure on line 457 in PWGJE/Core/MlResponseHfTagging.h

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
for (size_t i = 0; i < jetFeat.size(); ++i)
feat.push_back(jetFeatureTransform(jetFeat[i], i));
numNaN += replaceNaN(aTrkFeat, 0.f);
Expand Down
Loading