Skip to content

[PWGDQ] Fix table reservation problem - #17230

Open
JifengDeng wants to merge 2 commits into
AliceO2Group:masterfrom
JifengDeng:fix-reserve-size
Open

[PWGDQ] Fix table reservation problem#17230
JifengDeng wants to merge 2 commits into
AliceO2Group:masterfrom
JifengDeng:fix-reserve-size

Conversation

@JifengDeng

Copy link
Copy Markdown

Fix the reserve size problem in asymmetric pairing of tableReader_withAssoc

In the original code, ditrack table reserves based on the number of tracks rather than on the number of pairs, which may cause the crash of the program.

Adapt the similar strategy as what has been done in same event pairing to fix the problem.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 183 errors, ⚠️ 84 warnings, 🔕 9 disabled

JifengDeng added a commit to JifengDeng/O2Physics that referenced this pull request Jul 28, 2026
Please consider the following formatting changes to AliceO2Group#17230
mcoquet642
mcoquet642 previously approved these changes Jul 29, 2026
@mcoquet642
mcoquet642 enabled auto-merge (squash) July 29, 2026 01:55
@alibuild

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for 92fc771 at 2026-07-29 04:09:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for 92fc771 at 2026-07-29 10:56:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 13 errors and 0 warnings.'
Found 13 errors and 0 warnings.
++ [[ 13 -gt 0 ]]
++ cat /sw/BUILD/46b3c7248d3091e95893a67911c25839ff6fc194/O2Physics-code-check/errors.txt
PWGDQ/Tasks/tableReader_withAssoc.cxx:711:30: 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]
PWGDQ/Tasks/tableReader_withAssoc.cxx:962:29: 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]
PWGDQ/Tasks/tableReader_withAssoc.cxx:1894:5: error: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:3215:29: 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]
PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: parameter 'assocs' is unused [misc-unused-parameters,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [clang-diagnostic-unused-parameter,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:3521:9: error: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:3522:9: error: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:3721:5: error: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:3722:5: error: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:4203:5: error: use auto when initializing with a template cast to avoid duplicating the type name [modernize-use-auto,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:4572:19: error: implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool' [readability-implicit-bool-conversion,-warnings-as-errors]
PWGDQ/Tasks/tableReader_withAssoc.cxx:4620:19: error: implicit conversion 'uint32_t' (aka 'unsigned int') -> 'bool' [readability-implicit-bool-conversion,-warnings-as-errors]
++ [[ 0 -gt 0 ]]
++ [[ 13 -gt 0 ]]
++ exit 1
--

Full log here.

@alibuild

alibuild commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/o2 for 92fc771 at 2026-07-29 11:04:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
/sw/SOURCES/O2Physics/slc9_x86-64-slc9_x86-64/0/PWGDQ/Tasks/tableReader_withAssoc.cxx:3461:106: error: unused parameter 'assocs' [-Werror=unused-parameter]
ninja: build stopped: subcommand failed.

Full log here.

@vkucera
vkucera disabled auto-merge July 29, 2026 12:44
@vkucera
vkucera marked this pull request as draft July 29, 2026 12:44
Jifeng Deng and others added 2 commits July 30, 2026 17:12
…hAssoc

In the original code, ditrack table reserves based on the number of tracks rather than on the number of pairs, which may cause the crash of the program.

Adapt the similar strategy as what has been done in same event pairing to fix the problem.
@JifengDeng
JifengDeng marked this pull request as ready for review July 30, 2026 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants