Skip to content

Commit 6b4f46f

Browse files
committed
Add PCH for JET tasks
Heavily speeds up compilation
1 parent cd7b04c commit 6b4f46f

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

PWGJE/Tasks/CMakeLists.txt

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,15 @@ if(FastJet_FOUND)
148148
SOURCES jetSubstructureDielectronOutput.cxx
149149
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore
150150
COMPONENT_NAME Analysis)
151+
152+
# PCH for jet substructure HF tasks (makes for much faster compilation)
153+
target_precompile_headers(O2Physicsexe-analysis-je-jet-substructure-d0
154+
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/jetSubstructureHFPCH.h")
155+
foreach(T IN ITEMS dplus ds dstar lc b0 bplus xictoxipipi dielectron)
156+
target_precompile_headers(O2Physicsexe-analysis-je-jet-substructure-${T}
157+
REUSE_FROM O2Physicsexe-analysis-je-jet-substructure-d0)
158+
endforeach()
159+
151160
o2physics_add_dpl_workflow(jet-fragmentation
152161
SOURCES jetFragmentation.cxx
153162
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore
@@ -359,4 +368,4 @@ if(FastJet_FOUND)
359368
SOURCES substructureDebug.cxx
360369
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::PWGJECore O2Physics::AnalysisCore
361370
COMPONENT_NAME Analysis)
362-
endif()
371+
endif()

PWGJE/Tasks/jetSubstructureHFPCH.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
3+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
4+
// All rights not expressly granted are reserved.
5+
//
6+
// This software is distributed under the terms of the GNU General Public
7+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
8+
//
9+
// In applying this license CERN does not waive the privileges and immunities
10+
// granted to it by virtue of its status as an Intergovernmental Organization
11+
// or submit itself to any jurisdiction.
12+
13+
/// \file jetSubstructureHFPCH.h
14+
/// \brief Precompiled header for jet substructure HF tasks. Reduces compilation time significantly.
15+
///
16+
/// \author Sergio Garcia <sergio.garcia@cern.ch>
17+
18+
#ifndef PWGJE_TASKS_JETSUBSTRUCTUREHFPCH_H_
19+
#define PWGJE_TASKS_JETSUBSTRUCTUREHFPCH_H_
20+
21+
// Heavy PWGJE DataModel headers
22+
#include "PWGJE/DataModel/Jet.h"
23+
#include "PWGJE/DataModel/JetSubstructure.h"
24+
#include "PWGJE/DataModel/JetSubtraction.h"
25+
26+
// Main template header
27+
#include "PWGJE/Tasks/jetSubstructureHF.h"
28+
29+
// Framework headers
30+
#include <Framework/ASoA.h>
31+
#include <Framework/AnalysisTask.h>
32+
#include <Framework/ConfigContext.h>
33+
#include <Framework/DataProcessorSpec.h>
34+
#include <Framework/runDataProcessing.h>
35+
36+
// Standard library
37+
#include <vector>
38+
39+
#endif // PWGJE_TASKS_JETSUBSTRUCTUREHFPCH_H_

0 commit comments

Comments
 (0)