Skip to content

Commit 2854a0d

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents 1a9ecd6 + 9f6486e commit 2854a0d

File tree

205 files changed

+24259
-13724
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+24259
-13724
lines changed

.github/workflows/o2-linter.yml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# Find issues in O2 code
33
name: O2 linter
44

5-
'on': [pull_request, push]
5+
"on": [pull_request_target, push]
66
permissions: {}
77
env:
8-
MAIN_BRANCH: master
8+
BRANCH_MAIN: master
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
@@ -15,20 +15,47 @@ jobs:
1515
o2-linter:
1616
name: O2 linter
1717
runs-on: ubuntu-24.04
18+
permissions:
19+
pull-requests: write
1820
steps:
21+
- name: Set branches
22+
run: |
23+
if [[ "${{ github.event_name }}" == "push" ]]; then
24+
branch_head="${{ github.ref }}"
25+
branch_base="${{ env.BRANCH_MAIN }}"
26+
else
27+
branch_head="refs/pull/${{ github.event.pull_request.number }}/merge"
28+
branch_base="${{ github.event.pull_request.base.ref }}"
29+
fi
30+
echo BRANCH_HEAD="$branch_head" >> "$GITHUB_ENV"
31+
echo BRANCH_BASE="$branch_base" >> "$GITHUB_ENV"
1932
- name: Checkout Code
2033
uses: actions/checkout@v4
2134
with:
35+
ref: ${{ env.BRANCH_HEAD }}
2236
fetch-depth: 0 # needed to get the full history
2337
- name: Run tests
38+
id: linter
2439
run: |
25-
# Diff against the common ancestor of the source branch and the main branch.
26-
readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.MAIN_BRANCH }}...)
40+
# Diff against the common ancestor of the source (head) branch and the target (base) branch.
41+
echo "Diffing ${{ env.BRANCH_HEAD }} against ${{ env.BRANCH_BASE }}."
42+
readarray -t files < <(git diff --diff-filter d --name-only origin/${{ env.BRANCH_BASE }}...)
2743
if [ ${#files[@]} -eq 0 ]; then
2844
echo "::notice::No files to lint."
45+
echo "linter_ran=0" >> "$GITHUB_OUTPUT"
2946
exit 0
3047
fi
31-
[ ${{ github.event_name }} == 'pull_request' ] && options="-g"
48+
echo "linter_ran=1" >> "$GITHUB_OUTPUT"
49+
[[ "${{ github.event_name }}" == "pull_request_target" ]] && options="-g"
3250
# shellcheck disable=SC2086 # Ignore unquoted options.
3351
python3 Scripts/o2_linter.py $options "${files[@]}"
3452
echo "Tip: If you allow actions in your fork repository, O2 linter will run when you push commits."
53+
- name: Comment PR
54+
if: (success() || failure()) && (github.event_name == 'pull_request_target' && steps.linter.outputs.linter_ran == 1)
55+
uses: thollander/actions-comment-pull-request@v3
56+
with:
57+
comment-tag: o2-linter
58+
message: "**O2 linter results:**
59+
❌ ${{ steps.linter.outputs.n_issues }} errors,
60+
⚠️ ${{ steps.linter.outputs.n_tolerated }} warnings,
61+
🔕 ${{ steps.linter.outputs.n_disabled }} disabled"

ALICE3/TableProducer/OTF/onTheFlyTracker.cxx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ struct OnTheFlyTracker {
323323
histos.add("h2dVerticesVsContributors", "h2dVerticesVsContributors", kTH2F, {axes.axisMultiplicity, axes.axisNVertices});
324324
histos.add("hRecoVsSimMultiplicity", "hRecoVsSimMultiplicity", kTH2F, {axes.axisMultiplicity, axes.axisMultiplicity});
325325
histos.add("h2dDCAxy", "h2dDCAxy", kTH2F, {axes.axisMomentum, axes.axisDCA});
326+
histos.add("h2dDCAz", "h2dDCAz", kTH2F, {axes.axisMomentum, axes.axisDCA});
326327

327328
histos.add("hSimTrackX", "hSimTrackX", kTH1F, {axes.axisX});
328329
histos.add("hRecoTrackX", "hRecoTrackX", kTH1F, {axes.axisX});
@@ -1042,6 +1043,7 @@ struct OnTheFlyTracker {
10421043
}
10431044
if (doExtraQA && (!extraQAwithoutDecayDaughters || (extraQAwithoutDecayDaughters && !trackParCov.isDecayDau))) {
10441045
histos.fill(HIST("h2dDCAxy"), trackParametrization.getPt(), dcaXY * 1e+4); // in microns, please
1046+
histos.fill(HIST("h2dDCAz"), trackParametrization.getPt(), dcaZ * 1e+4); // in microns, please
10451047
histos.fill(HIST("hTrackXatDCA"), trackParametrization.getX());
10461048
}
10471049
if (cascadeDecaySettings.doXiQA) {
@@ -1107,6 +1109,7 @@ struct OnTheFlyTracker {
11071109
}
11081110
if (doExtraQA && (!extraQAwithoutDecayDaughters || (extraQAwithoutDecayDaughters && !trackParCov.isDecayDau))) {
11091111
histos.fill(HIST("h2dDCAxy"), trackParametrization.getPt(), dcaXY * 1e+4); // in microns, please
1112+
histos.fill(HIST("h2dDCAz"), trackParametrization.getPt(), dcaZ * 1e+4); // in microns, please
11101113
histos.fill(HIST("hTrackXatDCA"), trackParametrization.getX());
11111114
}
11121115
tracksDCA(dcaXY, dcaZ);

ALICE3/TableProducer/alice3-multicharm.cxx

Lines changed: 105 additions & 29 deletions
Large diffs are not rendered by default.

Common/DataModel/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ o2physics_add_header_only_library(DataModel
1616
FT0Corrected.h
1717
Multiplicity.h
1818
PIDResponse.h
19+
PIDResponseITS.h
20+
PIDResponseTOF.h
21+
PIDResponseTPC.h
1922
CollisionAssociationTables.h
2023
TrackSelectionTables.h
2124
McCollisionExtra.h

0 commit comments

Comments
 (0)