Skip to content

[Trigger,PWGCF,PWGEM,PWGLF,PWGUD] Use const& and std::move to avoid copies - #17705

Open
vkucera wants to merge 1 commit into
AliceO2Group:masterfrom
vkucera:const-EventFiltering
Open

[Trigger,PWGCF,PWGEM,PWGLF,PWGUD] Use const& and std::move to avoid copies#17705
vkucera wants to merge 1 commit into
AliceO2Group:masterfrom
vkucera:const-EventFiltering

Conversation

@vkucera

@vkucera vkucera commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Mostly done automatically by Clang-Tidy.

Mostly done automatically by Clang-Tidy.
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 184 errors, ⚠️ 167 warnings, 🔕 0 disabled

@github-actions github-actions Bot changed the title Use const& and std::move to avoid copies [Trigger,PWGCF,PWGEM,PWGLF,PWGUD] Use const& and std::move to avoid copies Sep 1, 2026
@vkucera
vkucera marked this pull request as ready for review September 1, 2026 15:53
@alibuild

alibuild commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for c325a9d at 2026-09-02 21:30:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 105 errors and 254 warnings.'
Found 105 errors and 254 warnings.
++ [[ 105 -gt 0 ]]
++ cat /sw/BUILD/f28461c207ba82a074f0f91207700fff8b641c19/O2Physics-code-check/errors.txt
EventFiltering/PWGCF/CFFilterAll.cxx:150:8: error: constructor does not initialize these fields: ccdb, keepEventTightLimit, keepEventLooseLimit, signalTightLimit, signalLooseLimit [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
EventFiltering/PWGCF/CFFilterAll.cxx:168:56: 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]
EventFiltering/PWGCF/CFFilterAll.cxx:176:49: 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]
EventFiltering/PWGCF/CFFilterAll.cxx:184:44: 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]
EventFiltering/PWGCF/CFFilterAll.cxx:262:55: 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]
EventFiltering/PWGCF/CFFilterAll.cxx:269:47: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:126:8: error: constructor does not initialize these fields: colContainsPCMOmega, colContainsEMCOmega, colContainsPCMEtaPrime [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:145:61: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:147:79: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:151:75: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:157:63: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:172:79: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:173:85: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:178:97: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:179:91: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:180:79: 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]
EventFiltering/PWGEM/HeavyNeutralMesonFilter.cxx:182:79: 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]
EventFiltering/PWGLF/filterdoublephi.cxx:162:12: error: variable 'pt1' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
EventFiltering/PWGLF/filterdoublephi.cxx:162:17: error: variable 'pt2' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
EventFiltering/PWGLF/filterdoublephi.cxx:162:22: error: variable 'pz1' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
EventFiltering/PWGLF/filterdoublephi.cxx:162:27: error: variable 'pz2' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
EventFiltering/PWGLF/filterdoublephi.cxx:162:32: error: variable 'p1' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
EventFiltering/PWGLF/filterdoublephi.cxx:162:36: error: variable 'p2' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
EventFiltering/PWGLF/filterdoublephi.cxx:162:40: error: variable 'angle' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
EventFiltering/PWGLF/filterf1proton.cxx:63:8: error: constructor does not initialize these fields: ccdb [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
EventFiltering/PWGLF/filterf1proton.cxx:177:47: error: narrowing conversion from 'float' to 'int' [bugprone-narrowing-conversions,-warnings-as-errors]
EventFiltering/PWGLF/filterf1proton.cxx:339:107: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
EventFiltering/PWGLF/filterf1proton.cxx:345:107: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
EventFiltering/PWGLF/filterf1proton.cxx:351:107: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
EventFiltering/PWGLF/filterf1proton.cxx:359:141: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
EventFiltering/PWGLF/filterf1proton.cxx:367:79: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
EventFiltering/PWGLF/nucleiFilter.cxx:67:34: error: variable 'metadataInfo' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
EventFiltering/PWGLF/nucleiFilter.cxx:103:22: error: variable 'h2TPCsignal' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
EventFiltering/PWGLF/nucleiFilter.cxx:104:22: error: variable 'h2TPCnSigma' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables,-warnings-as-errors]
EventFiltering/PWGLF/nucleiFilter.cxx:108:8: error: constructor does not initialize these fields: mRunNumber, mBz, ccdb, TriggerType [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
EventFiltering/PWGLF/nucleiFilter.cxx:127:82: 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]
EventFiltering/PWGLF/nucleiFilter.cxx:128:100: 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]
EventFiltering/PWGLF/nucleiFilter.cxx:129:68: 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]
EventFiltering/PWGLF/nucleiFilter.cxx:131:66: 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]
EventFiltering/PWGLF/nucleiFilter.cxx:554:7: error: uninitialized record type: 'dcaInfo' [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
EventFiltering/PWGLF/strangenessFilter.cxx:90:8: error: constructor does not initialize these fields: ccdb, mMeanMultT0C, mMeanMultT0A [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
EventFiltering/PWGLF/strangenessFilter.cxx:246:6: 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 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