Skip to content

[PWGHF] Fix MC flagging for c-deuteron#16953

Merged
fgrosa merged 3 commits into
AliceO2Group:masterfrom
fgrosa:cdeu
Jul 7, 2026
Merged

[PWGHF] Fix MC flagging for c-deuteron#16953
fgrosa merged 3 commits into
AliceO2Group:masterfrom
fgrosa:cdeu

Conversation

@fgrosa

@fgrosa fgrosa commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

@github-actions github-actions Bot added the pwghf PWG-HF label Jul 7, 2026
@github-actions github-actions Bot changed the title Fix MC flagging for c-deuteron [PWGHF] Fix MC flagging for c-deuteron Jul 7, 2026
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 3 warnings, 🔕 9 disabled

@vkucera

vkucera commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

@fgrosa Please fix the warnings introduced in #16871

@alibuild

alibuild commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 5795b0e at 2026-07-07 17:11:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGHF/TableProducer/candidateCreator3Prong.cxx:1362:18: error: statement has no effect [-Werror=unused-value]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGHF/TableProducer/candidateCreator3Prong.cxx:1362:18: error: statement has no effect [-Werror=unused-value]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGHF/TableProducer/candidateCreator3Prong.cxx:1362:18: error: statement has no effect [-Werror=unused-value]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 5795b0e at 2026-07-07 17:12:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGHF/TableProducer/candidateCreator3Prong.cxx:1362:18: error: statement has no effect [-Werror=unused-value]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGHF/TableProducer/candidateCreator3Prong.cxx:1362:18: error: statement has no effect [-Werror=unused-value]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGHF/TableProducer/candidateCreator3Prong.cxx:1362:18: error: statement has no effect [-Werror=unused-value]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 5795b0e at 2026-07-07 17:16:

++ set -euo pipefail
++ [[ -d /sw/slc9_x86-64/Clang/v20.1.7-20 ]]
+++ realpath /sw/BUILD/316b6ab7651f1a41edf34f09b7069572ef75944e/O2Physics-code-check/../../O2Physics-latest/O2Physics
++ O2PHYSICS_BUILDDIR=/sw/BUILD/1bec7d837a4180d27f297db4ed975cea024fcced/O2Physics
++ cp /sw/BUILD/1bec7d837a4180d27f297db4ed975cea024fcced/O2Physics/compile_commands.json .
+++ python3 -c 'import json, os; print(os.path.commonpath([x["file"] for x in json.loads(open("compile_commands.json").read()) if "sw/BUILD" not in x["file"] and "G__" not in x["file"] and x["file"].endswith(".cxx")]))'
++ O2PHYSICS_SRC=/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0
++ pushd /sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0
/sw/SPECS/slc9_x86-64/O2Physics-code-check/1.0-local60/O2Physics-code-check.sh: line 16: pushd: /sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0: No such file or directory

Full log here.

Comment thread PWGHF/Utils/utilsMcMatching.h Outdated
Comment on lines +163 to +165
static const std::array<int, 2> statusCodeCDeuteronToDeKstar0{-85, -95};
static const std::array<int, 2> statusCodeCDeuteronToNeDeltaplusK{-86, -96};
static const std::array<int, 2> statusCodeCDeuteronToNeL1520Pi{-87, -97};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These used to be constexpr constants. Why are they not any more?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was not necessary to have them constexpr in first place, but if you want I can revert them. What about all the other variables that are const (the maps)? Is there any advantage of having them constexpr?

@vkucera vkucera Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought it was not necessary to have them constexpr in first place, but if you want I can revert them.

Yes, please.

What about all the other variables that are const (the maps)? Is there any advantage of having them constexpr?

I don't remember if they can be constexpr but if yes, it would be better for compile-time checks and optimisations. I will check later.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently unordered_map cannot be constexpr in C++17 / C++20 / C++23

@alibuild

alibuild commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for d6b4b86 at 2026-07-07 17:47:

++ set -euo pipefail
++ [[ -d /sw/slc9_x86-64/Clang/v20.1.7-20 ]]
+++ realpath /sw/BUILD/f1fb2996cacb1ee52c420ddf5efe18afbe2a5bc9/O2Physics-code-check/../../O2Physics-latest/O2Physics
++ O2PHYSICS_BUILDDIR=/sw/BUILD/1bec7d837a4180d27f297db4ed975cea024fcced/O2Physics
++ cp /sw/BUILD/1bec7d837a4180d27f297db4ed975cea024fcced/O2Physics/compile_commands.json .
+++ python3 -c 'import json, os; print(os.path.commonpath([x["file"] for x in json.loads(open("compile_commands.json").read()) if "sw/BUILD" not in x["file"] and "G__" not in x["file"] and x["file"].endswith(".cxx")]))'
++ O2PHYSICS_SRC=/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0
++ pushd /sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0
/sw/SPECS/slc9_x86-64/O2Physics-code-check/1.0-local133/O2Physics-code-check.sh: line 16: pushd: /sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0: No such file or directory

Full log here.

@alibuild

alibuild commented Jul 7, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for fcc840e at 2026-07-07 18:44:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 17 errors and 0 warnings.'
Found 17 errors and 0 warnings.
++ [[ 17 -gt 0 ]]
++ cat /sw/BUILD/80d0695e129355fb22062d8d73aaa6e721c150f7/O2Physics-code-check/errors.txt
PWGHF/TableProducer/candidateCreator3Prong.cxx:146:93: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:505:7: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:518:37: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:578:13: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:580:28: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:582:13: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:584:28: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:588:13: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:590:29: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:594:13: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:596:28: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:598:13: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:600:28: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:612:13: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:614:27: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:617:13: error: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays,-warnings-as-errors]
PWGHF/TableProducer/candidateCreator3Prong.cxx:619:27: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
++ [[ 0 -gt 0 ]]
++ [[ 17 -gt 0 ]]
++ exit 1
--

Full log here.

@fgrosa fgrosa enabled auto-merge (squash) July 7, 2026 20:23

@alibuild alibuild left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approving on behalf of @fgrosa.

@fgrosa fgrosa merged commit f86101a into AliceO2Group:master Jul 7, 2026
13 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

3 participants