Skip to content

Commit df0ebbe

Browse files
authored
[PWGHF] Add PCH for PWGHF (#18308)
1 parent a1cb915 commit df0ebbe

11 files changed

Lines changed: 186 additions & 0 deletions

File tree

‎PWGHF/ALICE3/TableProducer/CMakeLists.txt‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,79 +13,94 @@
1313

1414
o2physics_add_dpl_workflow(candidate-creator-chic
1515
SOURCES candidateCreatorChic.cxx
16+
REUSE_FROM HfCandidatesPCH
1617
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter
1718
COMPONENT_NAME Analysis)
1819

1920
o2physics_add_dpl_workflow(candidate-creator-x
2021
SOURCES candidateCreatorX.cxx
22+
REUSE_FROM HfCandidatesPCH
2123
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter
2224
COMPONENT_NAME Analysis)
2325

2426
o2physics_add_dpl_workflow(candidate-creator-xicc
2527
SOURCES candidateCreatorXicc.cxx
28+
REUSE_FROM HfCandidatesPCH
2629
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter
2730
COMPONENT_NAME Analysis)
2831

2932
# Candidate selectors
3033

3134
o2physics_add_dpl_workflow(candidate-selector-chic-to-jpsi-gamma
3235
SOURCES candidateSelectorChicToJpsiGamma.cxx
36+
REUSE_FROM HfCandidatesPCH
3337
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
3438
COMPONENT_NAME Analysis)
3539

3640
o2physics_add_dpl_workflow(candidate-selector-d0-alice3-barrel
3741
SOURCES candidateSelectorD0Alice3Barrel.cxx
42+
REUSE_FROM HfCandidatesPCH
3843
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
3944
COMPONENT_NAME Analysis)
4045

4146
o2physics_add_dpl_workflow(candidate-selector-d0-alice3-forward
4247
SOURCES candidateSelectorD0Alice3Forward.cxx
48+
REUSE_FROM HfCandidatesPCH
4349
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
4450
COMPONENT_NAME Analysis)
4551

4652
o2physics_add_dpl_workflow(candidate-selector-d0-parametrized-pid
4753
SOURCES candidateSelectorD0ParametrizedPid.cxx
54+
REUSE_FROM HfCandidatesPCH
4855
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
4956
COMPONENT_NAME Analysis)
5057

5158
o2physics_add_dpl_workflow(candidate-selector-jpsi
5259
SOURCES candidateSelectorJpsi.cxx
60+
REUSE_FROM HfCandidatesPCH
5361
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
5462
COMPONENT_NAME Analysis)
5563

5664
o2physics_add_dpl_workflow(candidate-selector-lc-alice3
5765
SOURCES candidateSelectorLcAlice3.cxx
66+
REUSE_FROM HfCandidatesPCH
5867
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
5968
COMPONENT_NAME Analysis)
6069

6170
o2physics_add_dpl_workflow(candidate-selector-lc-parametrized-pid
6271
SOURCES candidateSelectorLcParametrizedPid.cxx
72+
REUSE_FROM HfCandidatesPCH
6373
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
6474
COMPONENT_NAME Analysis)
6575

6676
o2physics_add_dpl_workflow(candidate-selector-x-to-jpsi-pi-pi
6777
SOURCES candidateSelectorXToJpsiPiPi.cxx
78+
REUSE_FROM HfCandidatesPCH
6879
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
6980
COMPONENT_NAME Analysis)
7081

7182
o2physics_add_dpl_workflow(candidate-selector-xicc-to-p-k-pi-pi
7283
SOURCES candidateSelectorXiccToPKPiPi.cxx
84+
REUSE_FROM HfCandidatesPCH
7385
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
7486
COMPONENT_NAME Analysis)
7587

7688
# Tree creators
7789

7890
o2physics_add_dpl_workflow(tree-creator-chic-to-jpsi-gamma
7991
SOURCES treeCreatorChicToJpsiGamma.cxx
92+
REUSE_FROM HfCandidatesPCH
8093
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
8194
COMPONENT_NAME Analysis)
8295

8396
o2physics_add_dpl_workflow(tree-creator-x-to-jpsi-pi-pi
8497
SOURCES treeCreatorXToJpsiPiPi.cxx
98+
REUSE_FROM HfCandidatesPCH
8599
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
86100
COMPONENT_NAME Analysis)
87101

88102
o2physics_add_dpl_workflow(tree-creator-xicc-to-p-k-pi-pi
89103
SOURCES treeCreatorXiccToPKPiPi.cxx
104+
REUSE_FROM HfCandidatesPCH
90105
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
91106
COMPONENT_NAME Analysis)

‎PWGHF/ALICE3/Tasks/CMakeLists.txt‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,36 +11,43 @@
1111

1212
o2physics_add_dpl_workflow(task-chic
1313
SOURCES taskChic.cxx
14+
REUSE_FROM HfCandidatesPCH
1415
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
1516
COMPONENT_NAME Analysis)
1617

1718
o2physics_add_dpl_workflow(task-d0-alice3-barrel
1819
SOURCES taskD0Alice3Barrel.cxx
20+
REUSE_FROM HfCandidatesPCH
1921
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
2022
COMPONENT_NAME Analysis)
2123

2224
o2physics_add_dpl_workflow(task-d0-alice3-forward
2325
SOURCES taskD0Alice3Forward.cxx
26+
REUSE_FROM HfCandidatesPCH
2427
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
2528
COMPONENT_NAME Analysis)
2629

2730
o2physics_add_dpl_workflow(task-d0-parametrized-pid
2831
SOURCES taskD0ParametrizedPid.cxx
32+
REUSE_FROM HfCandidatesPCH
2933
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
3034
COMPONENT_NAME Analysis)
3135

3236
o2physics_add_dpl_workflow(task-jpsi
3337
SOURCES taskJpsi.cxx
38+
REUSE_FROM HfCandidatesPCH
3439
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
3540
COMPONENT_NAME Analysis)
3641

3742
o2physics_add_dpl_workflow(task-lc-alice3
3843
SOURCES taskLcAlice3.cxx
44+
REUSE_FROM HfCandidatesPCH
3945
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
4046
COMPONENT_NAME Analysis)
4147

4248
o2physics_add_dpl_workflow(task-lc-parametrized-pid
4349
SOURCES taskLcParametrizedPid.cxx
50+
REUSE_FROM HfCandidatesPCH
4451
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
4552
COMPONENT_NAME Analysis)
4653

@@ -51,10 +58,12 @@ o2physics_add_dpl_workflow(task-qa-pid-rejection
5158

5259
o2physics_add_dpl_workflow(task-x
5360
SOURCES taskX.cxx
61+
REUSE_FROM HfCandidatesPCH
5462
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
5563
COMPONENT_NAME Analysis)
5664

5765
o2physics_add_dpl_workflow(task-xicc
5866
SOURCES taskXicc.cxx
67+
REUSE_FROM HfCandidatesPCH
5968
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
6069
COMPONENT_NAME Analysis)

‎PWGHF/Core/CMakeLists.txt‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,22 @@
1212
o2physics_add_library(HfMlCore
1313
SOURCES HfMlResponse.cxx
1414
PUBLIC_LINK_LIBRARIES O2Physics::MLCore)
15+
16+
# Precompiled header shared across PWGHF. Percentages are the share of the
17+
# group's workflow translation units that include the header, measured over the tree.
18+
# D2H already has its own carrier (D2HReducedPCH); those targets keep it.
19+
#
20+
# runDataProcessing.h is deliberately NOT precompiled: it requires each workflow's
21+
# customize() to be declared before it is included, so precompiling it silently
22+
# unregisters every option (the binary aborts at --dump-workflow, but links fine).
23+
#
24+
# Skipped under recc, which caches compilations remotely instead.
25+
add_library(HfCandidatesPCH OBJECT hfCandidatesPCH.cxx)
26+
target_link_libraries(HfCandidatesPCH PUBLIC O2::Framework O2Physics::AnalysisCore)
27+
if(NOT DEFINED ENV{USE_RECC})
28+
target_precompile_headers(HfCandidatesPCH PRIVATE
29+
[["PWGHF/DataModel/CandidateReconstructionTables.h"]] # 78%, 2479 lines
30+
[["PWGHF/DataModel/CandidateSelectionTables.h"]] # 72%
31+
[["Common/Core/RecoDecay.h"]] # 65%, 1523 lines
32+
)
33+
endif()

‎PWGHF/Core/hfCandidatesPCH.cxx‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
// Carrier for the HfCandidatesPCH precompiled header; see this directory's
13+
// CMakeLists.txt. It exists only to own the PCH, so it has no code of its own.

‎PWGHF/D2H/Core/d2hReducedPCH.cxx‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// Copyright 2019-2026 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
12+
// Carrier for the precompiled header shared by the D2H reduced-data-model
13+
// workflows; see D2HReducedPCH in this directory's CMakeLists.txt. It exists
14+
// only to own the PCH, so it has no code of its own.

‎PWGHF/D2H/TableProducer/CMakeLists.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,5 +118,6 @@ o2physics_add_dpl_workflow(converter-reduced-3-prongs-ml
118118

119119
o2physics_add_dpl_workflow(tree-creator-dstar-spin-align-mixing
120120
SOURCES treeCreatorDstarSpinAlignMixing.cxx
121+
REUSE_FROM HfCandidatesPCH
121122
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
122123
COMPONENT_NAME Analysis)

‎PWGHF/D2H/Tasks/CMakeLists.txt‎

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
o2physics_add_dpl_workflow(task-b0
1313
SOURCES taskB0.cxx
14+
REUSE_FROM HfCandidatesPCH
1415
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
1516
COMPONENT_NAME Analysis)
1617

@@ -26,6 +27,7 @@ o2physics_add_dpl_workflow(task-b0-to-jpsi-k0-star-reduced
2627

2728
o2physics_add_dpl_workflow(task-bplus
2829
SOURCES taskBplus.cxx
30+
REUSE_FROM HfCandidatesPCH
2931
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
3032
COMPONENT_NAME Analysis)
3133

@@ -51,16 +53,19 @@ o2physics_add_dpl_workflow(task-bs-to-jpsi-phi-reduced
5153

5254
o2physics_add_dpl_workflow(task-bs
5355
SOURCES taskBs.cxx
56+
REUSE_FROM HfCandidatesPCH
5457
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
5558
COMPONENT_NAME Analysis)
5659

5760
o2physics_add_dpl_workflow(task-cd
5861
SOURCES taskCd.cxx
62+
REUSE_FROM HfCandidatesPCH
5963
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
6064
COMPONENT_NAME Analysis)
6165

6266
o2physics_add_dpl_workflow(task-charm-polarisation
6367
SOURCES taskCharmPolarisation.cxx
68+
REUSE_FROM HfCandidatesPCH
6469
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
6570
COMPONENT_NAME Analysis)
6671

@@ -76,41 +81,49 @@ o2physics_add_dpl_workflow(task-charm-reso-to-d-trk-reduced
7681

7782
o2physics_add_dpl_workflow(task-d0
7883
SOURCES taskD0.cxx
84+
REUSE_FROM HfCandidatesPCH
7985
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::SGCutParHolder O2Physics::EventFilteringUtils
8086
COMPONENT_NAME Analysis)
8187

8288
o2physics_add_dpl_workflow(task-directed-flow-charm-hadrons
8389
SOURCES taskDirectedFlowCharmHadrons.cxx
90+
REUSE_FROM HfCandidatesPCH
8491
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
8592
COMPONENT_NAME Analysis)
8693

8794
o2physics_add_dpl_workflow(task-dplus
8895
SOURCES taskDplus.cxx
96+
REUSE_FROM HfCandidatesPCH
8997
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::SGCutParHolder O2Physics::EventFilteringUtils
9098
COMPONENT_NAME Analysis)
9199

92100
o2physics_add_dpl_workflow(task-ds
93101
SOURCES taskDs.cxx
102+
REUSE_FROM HfCandidatesPCH
94103
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
95104
COMPONENT_NAME Analysis)
96105

97106
o2physics_add_dpl_workflow(task-dstar-to-d0-pi
98107
SOURCES taskDstarToD0Pi.cxx
108+
REUSE_FROM HfCandidatesPCH
99109
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
100110
COMPONENT_NAME Analysis)
101111

102112
o2physics_add_dpl_workflow(task-flattenicity-d0-lc
103113
SOURCES taskFlattenicityD0Lc.cxx
114+
REUSE_FROM HfCandidatesPCH
104115
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::AnalysisCCDB O2Physics::SGCutParHolder O2Physics::EventFilteringUtils
105116
COMPONENT_NAME Analysis)
106117

107118
o2physics_add_dpl_workflow(task-flow-charm-hadrons
108119
SOURCES taskFlowCharmHadrons.cxx
120+
REUSE_FROM HfCandidatesPCH
109121
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
110122
COMPONENT_NAME Analysis)
111123

112124
o2physics_add_dpl_workflow(task-lb
113125
SOURCES taskLb.cxx
126+
REUSE_FROM HfCandidatesPCH
114127
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
115128
COMPONENT_NAME Analysis)
116129

@@ -121,61 +134,73 @@ o2physics_add_dpl_workflow(task-lb-reduced
121134

122135
o2physics_add_dpl_workflow(task-lc
123136
SOURCES taskLc.cxx
137+
REUSE_FROM HfCandidatesPCH
124138
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::SGCutParHolder O2Physics::EventFilteringUtils
125139
COMPONENT_NAME Analysis)
126140

127141
o2physics_add_dpl_workflow(task-upc-lc
128142
SOURCES taskUpcLc.cxx
143+
REUSE_FROM HfCandidatesPCH
129144
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::SGCutParHolder O2Physics::EventFilteringUtils
130145
COMPONENT_NAME Analysis)
131146

132147
o2physics_add_dpl_workflow(task-lc-to-k0s-p
133148
SOURCES taskLcToK0sP.cxx
149+
REUSE_FROM HfCandidatesPCH
134150
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
135151
COMPONENT_NAME Analysis)
136152

137153
o2physics_add_dpl_workflow(task-net-charm-fluctuations
138154
SOURCES taskNetCharmFluctuations.cxx
155+
REUSE_FROM HfCandidatesPCH
139156
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
140157
COMPONENT_NAME Analysis)
141158

142159
o2physics_add_dpl_workflow(task-omegac0-to-omega-pi
143160
SOURCES taskOmegac0ToOmegaPi.cxx
161+
REUSE_FROM HfCandidatesPCH
144162
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
145163
COMPONENT_NAME Analysis)
146164

147165
o2physics_add_dpl_workflow(task-omegac0-to-omega-pi-qa
148166
SOURCES taskOmegac0ToOmegaPiQa.cxx
167+
REUSE_FROM HfCandidatesPCH
149168
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
150169
COMPONENT_NAME Analysis)
151170

152171
o2physics_add_dpl_workflow(task-pt-fluc-charm-hadrons
153172
SOURCES taskPtFlucCharmHadrons.cxx
173+
REUSE_FROM HfCandidatesPCH
154174
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils
155175
COMPONENT_NAME Analysis)
156176

157177
o2physics_add_dpl_workflow(task-sigmac
158178
SOURCES taskSigmac.cxx
179+
REUSE_FROM HfCandidatesPCH
159180
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
160181
COMPONENT_NAME Analysis)
161182

162183
o2physics_add_dpl_workflow(task-sigmac-to-cascade
163184
SOURCES taskSigmacToCascade.cxx
185+
REUSE_FROM HfCandidatesPCH
164186
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
165187
COMPONENT_NAME Analysis)
166188

167189
o2physics_add_dpl_workflow(task-xic
168190
SOURCES taskXic.cxx
191+
REUSE_FROM HfCandidatesPCH
169192
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
170193
COMPONENT_NAME Analysis)
171194

172195
o2physics_add_dpl_workflow(task-xic-to-xi-pi-pi
173196
SOURCES taskXicToXiPiPi.cxx
197+
REUSE_FROM HfCandidatesPCH
174198
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
175199
COMPONENT_NAME Analysis)
176200

177201
o2physics_add_dpl_workflow(task-xic0-to-xi-pi
178202
SOURCES taskXic0ToXiPi.cxx
203+
REUSE_FROM HfCandidatesPCH
179204
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore
180205
COMPONENT_NAME Analysis)
181206

0 commit comments

Comments
 (0)