diff --git a/PWGHF/D2H/Core/CMakeLists.txt b/PWGHF/D2H/Core/CMakeLists.txt index 813de3e001e..f9d1f56bf34 100644 --- a/PWGHF/D2H/Core/CMakeLists.txt +++ b/PWGHF/D2H/Core/CMakeLists.txt @@ -12,3 +12,48 @@ o2physics_add_library(HfDataCreationCharmReso SOURCES DataCreationCharmReso.cxx PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore KFParticle::KFParticle) + +# Precompiled header shared by the D2H reduced-data-model workflows. 28 of them +# include ReducedDataModel.h, which alone reaches CandidateReconstructionTables.h, +# RecoDecay.h, the PID/EventSelection/Centrality models and AnalysisDataModel.h, +# so precompiling it covers most of what the family parses. +# +# Defined in Core because it is added before TableProducer and Tasks, and a +# REUSE_FROM target must exist before the targets that name it. +# +# Skipped under recc, which caches compilations remotely instead -- the two do +# not combine, as a PCH is a local artefact of one compiler invocation. +add_library(D2HReducedPCH OBJECT d2hReducedPCH.cxx) +target_link_libraries(D2HReducedPCH PUBLIC O2::Framework O2Physics::AnalysisCore) +if(NOT DEFINED ENV{USE_RECC}) + target_precompile_headers(D2HReducedPCH PRIVATE + [["PWGHF/D2H/DataModel/ReducedDataModel.h"]] + [["PWGHF/DataModel/CandidateSelectionTables.h"]] + + + + + + + + + + + # NOT runDataProcessing.h, although all 28 consumers include it and + # PWGJE's carriers do precompile it. It states the contract itself: the + # customize() of a workflow must be declared before it is included. + # Precompiling it makes it the first include in every consumer, so a + # source's customize() is never seen, its options are never registered, + # and the binary aborts at --dump-workflow with "missing option: ...". + # The link succeeds, so this surfaces as a runtime failure with no hint + # that a PCH caused it. + + + + + + + + + ) +endif() diff --git a/PWGHF/D2H/TableProducer/CMakeLists.txt b/PWGHF/D2H/TableProducer/CMakeLists.txt index 3492a98acff..537c28a5464 100644 --- a/PWGHF/D2H/TableProducer/CMakeLists.txt +++ b/PWGHF/D2H/TableProducer/CMakeLists.txt @@ -13,31 +13,37 @@ o2physics_add_dpl_workflow(candidate-creator-b-to-jpsi-reduced SOURCES candidateCreatorBToJpsiReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-b0-reduced SOURCES candidateCreatorB0Reduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-bplus-reduced SOURCES candidateCreatorBplusReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-bs-reduced SOURCES candidateCreatorBsReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-charm-reso-reduced SOURCES candidateCreatorCharmResoReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-creator-lb-reduced SOURCES candidateCreatorLbReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter COMPONENT_NAME Analysis) @@ -45,21 +51,25 @@ o2physics_add_dpl_workflow(candidate-creator-lb-reduced o2physics_add_dpl_workflow(candidate-selector-b0-to-d-pi-reduced SOURCES candidateSelectorB0ToDPiReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-selector-bplus-to-d0-pi-reduced SOURCES candidateSelectorBplusToD0PiReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-selector-bs-to-ds-pi-reduced SOURCES candidateSelectorBsToDsPiReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(candidate-selector-lb-to-lc-pi-reduced SOURCES candidateSelectorLbToLcPiReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore COMPONENT_NAME Analysis) @@ -74,31 +84,37 @@ o2physics_add_dpl_workflow(ml-based-track-selector o2physics_add_dpl_workflow(data-creator-charm-had-pi-reduced SOURCES dataCreatorCharmHadPiReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2::DCAFitter O2Physics::EventFilteringUtils COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(data-creator-charm-reso-to-dstar-reduced SOURCES dataCreatorCharmResoToDstarReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils KFParticle::KFParticle COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(data-creator-charm-reso-to-dplus-reduced SOURCES dataCreatorCharmResoToDplusReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils KFParticle::KFParticle COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(data-creator-charm-reso-to-d0-reduced SOURCES dataCreatorCharmResoToD0Reduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils KFParticle::KFParticle COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(data-creator-jpsi-had-reduced SOURCES dataCreatorJpsiHadReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(data-creator-hidden-charm-reduced SOURCES dataCreatorHiddenCharmReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::EventFilteringUtils COMPONENT_NAME Analysis) @@ -106,11 +122,13 @@ o2physics_add_dpl_workflow(data-creator-hidden-charm-reduced o2physics_add_dpl_workflow(converter-reduced-3-prongs-ml SOURCES converterReduced3ProngsMl.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(converter-reduced-hadron-daus-pid SOURCES converterReducedHadronDausPid.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) diff --git a/PWGHF/D2H/Tasks/CMakeLists.txt b/PWGHF/D2H/Tasks/CMakeLists.txt index 8ce14577196..7b471c3b5c6 100644 --- a/PWGHF/D2H/Tasks/CMakeLists.txt +++ b/PWGHF/D2H/Tasks/CMakeLists.txt @@ -16,11 +16,13 @@ o2physics_add_dpl_workflow(task-b0 o2physics_add_dpl_workflow(task-b0-reduced SOURCES taskB0Reduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(task-b0-to-jpsi-k0-star-reduced SOURCES taskB0ToJpsiK0StarReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore COMPONENT_NAME Analysis) @@ -31,21 +33,25 @@ o2physics_add_dpl_workflow(task-bplus o2physics_add_dpl_workflow(task-bplus-reduced SOURCES taskBplusReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(task-bplus-to-jpsi-k-reduced SOURCES taskBplusToJpsiKReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(task-bs-reduced SOURCES taskBsReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(task-bs-to-jpsi-phi-reduced SOURCES taskBsToJpsiPhiReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore COMPONENT_NAME Analysis) @@ -66,11 +72,13 @@ o2physics_add_dpl_workflow(task-charm-polarisation o2physics_add_dpl_workflow(task-charm-reso-to-d-v0-reduced SOURCES taskCharmResoToDV0Reduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) o2physics_add_dpl_workflow(task-charm-reso-to-d-trk-reduced SOURCES taskCharmResoToDTrkReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) @@ -116,6 +124,7 @@ o2physics_add_dpl_workflow(task-lb o2physics_add_dpl_workflow(task-lb-reduced SOURCES taskLbReduced.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis) @@ -181,6 +190,7 @@ o2physics_add_dpl_workflow(task-xic0-to-xi-pi o2physics_add_dpl_workflow(task-hidden-charm SOURCES taskHiddenCharm.cxx + REUSE_FROM D2HReducedPCH PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore COMPONENT_NAME Analysis)