Skip to content

[PWGCF,PWGDQ,Tutorials] Do not depend on the character-pack type of HIST names - #18584

Open
ktf wants to merge 1 commit into
AliceO2Group:masterfrom
ktf:pr18584
Open

ktf wants to merge 1 commit into
AliceO2Group:masterfrom
ktf:pr18584

Conversation

@ktf

@ktf ktf commented Nov 4, 2026

Copy link
Copy Markdown
Member

O2's HIST() is changing from ConstStr<'a','b',...>, one template argument per
character, to ConstStr<"ab">. Helpers that took const ConstStr<chars...>& now
take the name as a template parameter constrained by is_const_str, and
partNumFluc's C_CS/C_SV build names with HIST() instead of spelling out the old
type. Compiles against the current O2 and the new one.

@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 92 warnings, 🔕 13 disabled

@alibuild

alibuild commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 66758a6 at 2026-11-04 16:28:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'To reproduce the results below locally, run: '\''aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'\''.'
To reproduce the results below locally, run: 'aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'.
++ echo 'To apply all automatic fixes, add the '\''-e O2PHYSICS_CHECKER_FIX=1'\'' option.'
To apply all automatic fixes, add the '-e O2PHYSICS_CHECKER_FIX=1' option.
++ echo 'See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.'
See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.
++ echo 'Found 12 errors and 1175 warnings.'
Found 12 errors and 1175 warnings.
++ [[ 12 -gt 0 ]]
++ cat /sw/BUILD/1f08c128584536b2af514a3bc1be8b7d743168ff/O2Physics-code-check/errors.txt
PWGCF/EbyEFluctuations/Tasks/partNumFluc.cxx:41:1: error: included header StringHelpers.h is not used directly [misc-include-cleaner,-warnings-as-errors]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:241:152: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/flowPbpbPikp.cxx:153:289: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/flowQa.cxx:463:21: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
PWGCF/Flow/Tasks/pidFlowPtCorr.cxx:568:33: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/pidFlowPtCorr.cxx:576:65: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/pidFlowPtCorr.cxx:604:96: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/pidFlowPtCorr.cxx:897:92: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/resonancesGfwFlow.cxx:244:289: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx:367:27: error: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx:773:23: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx:898:7: error: Variable 'ihit' with floating point type 'float' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter,-warnings-as-errors]
++ [[ 1175 -gt 0 ]]
++ cat /sw/BUILD/1f08c128584536b2af514a3bc1be8b7d743168ff/O2Physics-code-check/warnings.txt
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:77:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:77:27: warning: variable 'refc22' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:78:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:78:27: warning: variable 'refc24' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:79:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:79:27: warning: variable 'refc22Full' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:80:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:80:27: warning: variable 'refc32' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:81:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:81:29: warning: variable 'k0sc22' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:82:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:82:29: warning: variable 'k0sc24' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:83:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:83:29: warning: variable 'k0sc22Full' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:84:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:84:29: warning: variable 'k0sc32' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:85:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:85:29: warning: variable 'lambdac22' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:86:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:86:29: warning: variable 'lambdac24' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:87:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:87:29: warning: variable 'lambdac22Full' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
[0 more errors; see full log]

Full log here.

…IST names

O2's HIST() is changing from ConstStr<'a','b',...>, one template argument per
character, to ConstStr<"ab">. Helpers that took const ConstStr<chars...>& now
take the name as a template parameter constrained by is_const_str, and
partNumFluc's C_CS/C_SV build names with HIST() instead of spelling out the old
type. Compiles against the current O2 and the new one.
@alibuild

alibuild commented Nov 4, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for e15c5c9 at 2026-11-04 19:08:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'To reproduce the results below locally, run: '\''aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'\''.'
To reproduce the results below locally, run: 'aliBuild build O2Physics-code-check -e ALIBUILD_BASE_HASH=upstream/master'.
++ echo 'To apply all automatic fixes, add the '\''-e O2PHYSICS_CHECKER_FIX=1'\'' option.'
To apply all automatic fixes, add the '-e O2PHYSICS_CHECKER_FIX=1' option.
++ echo 'See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.'
See the documentation for more details at: <https://aliceo2group.github.io/analysis-framework/docs/tools/#running-with-o2physics-code-check>.
++ echo 'Found 11 errors and 1175 warnings.'
Found 11 errors and 1175 warnings.
++ [[ 11 -gt 0 ]]
++ cat /sw/BUILD/a5ce448ecdbca25ca9cbd37e9f58a6716084f734/O2Physics-code-check/errors.txt
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:241:152: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/flowPbpbPikp.cxx:153:289: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/flowQa.cxx:463:21: error: do not use static_cast to downcast from a base to a derived class; use dynamic_cast instead [cppcoreguidelines-pro-type-static-cast-downcast,-warnings-as-errors]
PWGCF/Flow/Tasks/pidFlowPtCorr.cxx:568:33: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/pidFlowPtCorr.cxx:576:65: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/pidFlowPtCorr.cxx:604:96: error: redundant explicit casting to the same type 'int64_t' (aka 'long') as the sub-expression, remove this casting [readability-redundant-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/pidFlowPtCorr.cxx:897:92: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGCF/Flow/Tasks/resonancesGfwFlow.cxx:244:289: error: C-style casts are discouraged; use static_cast [google-readability-casting,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx:367:27: error: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx:773:23: error: do not use reinterpret_cast [cppcoreguidelines-pro-type-reinterpret-cast,-warnings-as-errors]
PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx:898:7: error: Variable 'ihit' with floating point type 'float' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter,-warnings-as-errors]
++ [[ 1175 -gt 0 ]]
++ cat /sw/BUILD/a5ce448ecdbca25ca9cbd37e9f58a6716084f734/O2Physics-code-check/warnings.txt
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:77:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:77:27: warning: variable 'refc22' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:78:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:78:27: warning: variable 'refc24' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:79:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:79:27: warning: variable 'refc22Full' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:80:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:80:27: warning: variable 'refc32' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:81:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:81:29: warning: variable 'k0sc22' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:82:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:82:29: warning: variable 'k0sc24' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:83:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:83:29: warning: variable 'k0sc22Full' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:84:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:84:29: warning: variable 'k0sc32' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:85:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:85:29: warning: variable 'lambdac22' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:86:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:86:29: warning: variable 'lambdac24' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:87:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:87:29: warning: variable 'lambdac22Full' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]
PWGCF/Flow/Tasks/flowGfwOmegaXi.cxx:88:1: warning: do not declare C-style arrays, use 'std::array' instead [modernize-avoid-c-arrays]
[0 more errors; see full log]

Full log here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants