forked from UCATLAS/xAODAnaHelpers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
136 lines (124 loc) · 7 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
################################################################################
# Package: xAODAnaHelpers
################################################################################
# Declare the package name:
atlas_subdir( xAODAnaHelpers )
set( release_libs xAODTriggerCnvLib )
if( AnalysisBase_VERSION AND AnalysisBase_VERSION VERSION_GREATER 21.0 )
# 21.X
set( release_libs xAODTriggerCnvLib )
elseif( AnalysisTop_VERSION AND AnalysisTop_VERSION VERSION_GREATER 21.0 )
# AnalysisTop 21.X
set( release_libs xAODTriggerCnvLib )
else()
# 2.6.X
set( release_libs xAODTriggerCnv )
endif()
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthContainers
Control/AthToolSupport/AsgTools
Control/xAODRootAccess
DataQuality/GoodRunsLists
Event/xAOD/xAODBase
Event/xAOD/xAODCaloEvent
Event/xAOD/xAODCutFlow
Event/xAOD/xAODEgamma
Event/xAOD/xAODEventInfo
Event/xAOD/xAODJet
Event/xAOD/xAODMetaDataCnv
Event/xAOD/xAODMissingET
Event/xAOD/xAODMuon
Event/xAOD/xAODTau
Event/xAOD/xAODTracking
Event/xAOD/xAODTrigger
Event/xAOD/xAODTriggerCnv
Event/xAOD/xAODTruth
PhysicsAnalysis/D3PDTools/EventLoop
PhysicsAnalysis/D3PDTools/EventLoopGrid
InnerDetector/InDetRecTools/InDetTrackSelectionTool
PhysicsAnalysis/AnalysisCommon/AssociationUtils
PhysicsAnalysis/AnalysisCommon/IsolationSelection
PhysicsAnalysis/AnalysisCommon/PATInterfaces
PhysicsAnalysis/AnalysisCommon/PMGTools
PhysicsAnalysis/AnalysisCommon/PileupReweighting
PhysicsAnalysis/D3PDTools/RootCoreUtils
PhysicsAnalysis/D3PDTools/SampleHandler
PhysicsAnalysis/ElectronPhotonID/ElectronEfficiencyCorrection
PhysicsAnalysis/ElectronPhotonID/ElectronPhotonFourMomentumCorrection
PhysicsAnalysis/ElectronPhotonID/ElectronPhotonSelectorTools
PhysicsAnalysis/ElectronPhotonID/IsolationCorrections
PhysicsAnalysis/ElectronPhotonID/ElectronPhotonShowerShapeFudgeTool
PhysicsAnalysis/ElectronPhotonID/PhotonEfficiencyCorrection
PhysicsAnalysis/JetMissingEtID/JetSelectorTools
PhysicsAnalysis/Interfaces/FTagAnalysisInterfaces
PhysicsAnalysis/Interfaces/JetAnalysisInterfaces
PhysicsAnalysis/Interfaces/MuonAnalysisInterfaces
PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonMomentumCorrections
PhysicsAnalysis/MuonID/MuonIDAnalysis/MuonEfficiencyCorrections
PhysicsAnalysis/TauID/TauAnalysisTools
Reconstruction/Jet/JetAnalysisTools/JetTileCorrection
Reconstruction/Jet/JetCalibTools
Reconstruction/Jet/JetJvtEfficiency
Reconstruction/Jet/JetMomentTools
Reconstruction/Jet/JetResolution
Reconstruction/Jet/JetSubStructureUtils
Reconstruction/Jet/JetUncertainties
Reconstruction/MET/METInterface
Reconstruction/MET/METUtilities
Tools/PathResolver
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigAnalysis/TriggerMatchingTool
Trigger/TrigConfiguration/TrigConfxAOD
${release_depends}
)
# Find the needed external(s):
find_package( ROOT COMPONENTS Core RIO Hist Tree )
# build a dictionary for the library
atlas_add_root_dictionary ( xAODAnaHelpersLib xAODAnaHelpersDictSource
ROOT_HEADERS xAODAnaHelpers/*.h Root/LinkDef.h
EXTERNAL_PACKAGES ROOT
)
# build a shared library
atlas_add_library( xAODAnaHelpersLib xAODAnaHelpers/*.h Root/*.h Root/*.cxx ${xAODAnaHelpersDictSource}
PUBLIC_HEADERS xAODAnaHelpers
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} EventLoop xAODBase xAODRootAccess
xAODEventInfo GoodRunsListsLib PileupReweightingLib PATInterfaces
PathResolver xAODTau xAODJet xAODMuon xAODEgamma
xAODTracking xAODTruth MuonMomentumCorrectionsLib
MuonEfficiencyCorrectionsLib MuonSelectorToolsLib JetCalibToolsLib
JetSelectorToolsLib AthContainers
ElectronPhotonFourMomentumCorrectionLib
ElectronEfficiencyCorrectionLib ElectronPhotonSelectorToolsLib
IsolationSelectionLib IsolationCorrectionsLib
ElectronPhotonShowerShapeFudgeToolLib
FTagAnalysisInterfacesLib JetAnalysisInterfacesLib MuonAnalysisInterfacesLib
PhotonEfficiencyCorrectionLib METUtilitiesLib METInterface
TauAnalysisToolsLib AsgTools xAODMissingET JetResolutionLib
AssociationUtilsLib JetEDM JetUncertaintiesLib
JetCPInterfaces xAODBTaggingEfficiencyLib TrigConfxAODLib
TrigDecisionToolLib xAODCutFlow JetMomentToolsLib
TriggerMatchingToolLib xAODMetaDataCnv xAODMetaData
JetJvtEfficiencyLib PMGToolsLib JetSubStructureUtils JetTileCorrectionLib BoostedJetTaggersLib
${release_libs}
)
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_scripts( scripts/*.py )
atlas_install_data( data/* )
### Install python packages
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
include(SetupPythonPackage)
# Install argcomplete:
setup_python_package( argcomplete
"https://pypi.python.org/packages/3b/db/c524f0d72842b44b179cc50d4257f1e72f447fef0919556e8b28a9b0f80f/argcomplete-1.9.2.tar.gz"
"13243e0b88102f13f7537f5aa70a48c0"
PATCH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/patch-setup.cfg setup.cfg
)
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/xAH_env_copied
COMMAND cat ${CMAKE_CURRENT_SOURCE_DIR}/cmake/setup.sh >> ${CMAKE_BINARY_DIR}/${ATLAS_PLATFORM}/setup.sh
COMMAND ${CMAKE_COMMAND} -E touch ${CMAKE_BINARY_DIR}/xAH_env_copied
)
add_custom_target(Setup_xAH_Environment ALL DEPENDS ${CMAKE_BINARY_DIR}/xAH_env_copied)
execute_process(COMMAND ${CMAKE_COMMAND} -E remove ${CMAKE_BINARY_DIR}/xAH_env_copied)