Commit 6a76985f authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'cmake_trigger18' into 'master'

TrigCost+TrigSteering: cmake cleanup

See merge request !35067
parents fe37a84e 4a8d36aa
################################################################################
# Package: EnhancedBiasWeighter
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( EnhancedBiasWeighter )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthToolSupport/AsgTools
Event/xAOD/xAODEventInfo
GaudiKernel
PhysicsAnalysis/DerivationFramework/DerivationFrameworkInterfaces
Trigger/TrigAnalysis/TrigAnalysisInterfaces
PRIVATE
AtlasTest/TestTools
Tools/PathResolver )
# External dependencies:
find_package( COOL COMPONENTS CoolKernel CoolApplication )
find_package( CORAL COMPONENTS CoralKernel )
find_package( ROOT COMPONENTS XMLIO XMLParser Core )
find_package( LibXml2 )
# tag NEEDS_CORAL_BASE was not recognized in automatic conversion in cmt2cmake
# Component(s) in the package:
atlas_add_library( EnhancedBiasWeighterLib
Root/*.cxx
PUBLIC_HEADERS EnhancedBiasWeighter
INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} AsgTools xAODEventInfo GaudiKernel ${LIBXML2_LIBRARIES}
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} TestTools PathResolver )
PRIVATE_INCLUDE_DIRS ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${LIBXML2_LIBRARIES} AsgTools DerivationFrameworkInterfaces GaudiKernel TrigAnalysisInterfaces xAODEventInfo
PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} PathResolver )
atlas_add_component( EnhancedBiasWeighter
src/components/*.cxx
INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR}
LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${LIBXML2_LIBRARIES} AsgTools xAODEventInfo GaudiKernel TestTools PathResolver EnhancedBiasWeighterLib )
LINK_LIBRARIES EnhancedBiasWeighterLib )
atlas_add_dictionary( EnhancedBiasWeighterDict
EnhancedBiasWeighter/EnhancedBiasWeighterDict.h
EnhancedBiasWeighter/selection.xml
INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR}
LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${LIBXML2_LIBRARIES} AsgTools xAODEventInfo GaudiKernel TestTools PathResolver EnhancedBiasWeighterLib )
# No tests at the moment
#atlas_add_test( ut_EnhancedBiasWeighter_test
# SOURCES
# test/ut_EnhancedBiasWeighter_test.cxx
# INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR}
# LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} ${LIBXML2_LIBRARIES} AsgTools xAODEventInfo GaudiKernel TestTools PathResolver EnhancedBiasWeighterLib )
LINK_LIBRARIES EnhancedBiasWeighterLib )
################################################################################
# Package: RatesAnalysis
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( RatesAnalysis )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthAnalysisBaseComps
GaudiKernel
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigCost/EnhancedBiasWeighter
PRIVATE
Event/xAOD/xAODEventInfo
Trigger/TrigConfiguration/TrigConfL1Data )
# External dependencies:
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
......@@ -24,18 +12,18 @@ atlas_add_library( RatesAnalysisLib
PUBLIC_HEADERS RatesAnalysis
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthAnalysisBaseCompsLib TrigDecisionToolLib EnhancedBiasWeighterLib
PRIVATE_LINK_LIBRARIES xAODEventInfo )
PRIVATE_LINK_LIBRARIES AthenaBaseComps EventInfo TrigConfL1Data xAODEventInfo )
# Component(s) in the package:
atlas_add_component( RatesAnalysis
src/FullMenu.cxx
src/components/RatesAnalysis_entries.cxx
LINK_LIBRARIES GaudiKernel RatesAnalysisLib TrigConfL1Data )
LINK_LIBRARIES RatesAnalysisLib )
atlas_add_test( RatesAnalysis_test
SOURCES test/RatesAnalysis_test.cxx
LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthAnalysisBaseCompsLib RatesAnalysisLib TrigDecisionToolLib EnhancedBiasWeighterLib xAODEventInfo )
LINK_LIBRARIES RatesAnalysisLib )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_scripts( share/RatesAnalysisFullMenu.py share/RatesAnalysisPostProcessing.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_scripts( share/RatesAnalysisFullMenu.py share/RatesAnalysisPostProcessing.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
......@@ -7,8 +7,7 @@
@brief Accumulator class to buffer data for a single trigger and export this to JSON or CSV
'''
import ROOT
import math
import math
from enum import Enum
class RatesBins(Enum):
......
......@@ -37,8 +37,8 @@ def toJson(fileName, metadata, L1Triggers, HLTTriggers):
def getMetadata(inputFile):
metatree = inputFile.Get("metadata");
if metatree == None:
metatree = inputFile.Get("metadata")
if metatree is None:
return None
metatree.GetEntry(0)
......
......@@ -39,7 +39,6 @@ if __name__=='__main__':
# Set the Athena configuration flags
from AthenaConfiguration.AllConfigFlags import ConfigFlags
from AthenaConfiguration.AutoConfigFlags import GetFileMD
# Set the Athena configuration flags
ConfigFlags.Input.Files = ["root://eosatlas.cern.ch//eos/atlas/atlasdatadisk/rucio/data16_13TeV/8d/de/AOD.10654269._000566.pool.root.1"]
......@@ -74,7 +73,6 @@ if __name__=='__main__':
cfgsvc = CompFactory.TrigConf.xAODConfigSvc('xAODConfigSvc')
cfg.addService(cfgsvc)
from TrigEDMConfig.TriggerEDM import EDMLibraries
tdt = CompFactory.Trig.TrigDecisionTool('TrigDecisionTool')
tdt.TrigConfigSvc = cfgsvc
tdt.NavigationFormat = "TrigComposite"
......
......@@ -11,12 +11,10 @@
'''
import ROOT
from RatesAnalysis.RatesTrigger import RatesTrigger
from RatesAnalysis.Util import getMetadata, populateTriggers, getGlobalGroup, toJson
from AthenaCommon.Logging import logging
def main():
import sys
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument('--file', default='RatesHistograms.root',
......@@ -43,7 +41,6 @@ def main():
metadata['n_evts'] = normHist.GetBinContent(2)
HLTGlobalGroup = getGlobalGroup(inputFile, 'Main')
HLTExpressGroup = getGlobalGroup(inputFile, 'Express')
L1GlobalGroup = getGlobalGroup(inputFile, 'L1')
L1Triggers = populateTriggers(inputFile, metadata, L1GlobalGroup, 'L1_')
......
################################################################################
# Package: TrigCostAnalysis
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigCostAnalysis )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthAnalysisBaseComps
GaudiKernel
PRIVATE
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigCost/EnhancedBiasWeighter
Event/xAOD/xAODEventInfo
Trigger/TrigConfiguration/TrigConfData )
# External dependencies:
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( Boost )
find_package( ROOT COMPONENTS Core Hist RIO )
# Athena algorithm to do cost analysis and produce histograms
atlas_add_component( TrigCostAnalysis
src/*.cxx src/monitors/*.cxx src/counters/*.cxx src/components/TrigCostAnalysis_entries.cxx
src/*.cxx src/monitors/*.cxx src/counters/*.cxx src/components/TrigCostAnalysis_entries.cxx
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel AthAnalysisBaseCompsLib TrigDecisionToolLib EnhancedBiasWeighterLib xAODEventInfo PathResolver TrigConfData )
# Small helper library used by trigCostHistToCSV
......@@ -29,12 +16,11 @@ atlas_add_library( TrigCostAnalysisLib
TrigCostAnalysis/*.h Root/*.cxx TrigCostAnalysis/TableConstructors/*.h Root/TableConstructors/*.cxx
PUBLIC_HEADERS TrigCostAnalysis
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel)
LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthenaBaseComps )
# Lightweight post processing of cost histograms to produce CSV output
atlas_add_executable( trigCostHistToCSV
util/trigCostHistToCSV.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel TrigCostAnalysisLib )
LINK_LIBRARIES ${ROOT_LIBRARIES} AsgTools AthenaBaseComps TrigCostAnalysisLib )
atlas_install_joboptions( share/*.py )
################################################################################
# Package: TrigCostRootAnalysis
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigCostRootAnalysis )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Trigger/TrigCost/TrigCostD3PD
PRIVATE
Tools/PathResolver
Trigger/TrigAnalysis/TrigRootAnalysis )
# External dependencies:
find_package( ROOT COMPONENTS Graf Gpad MathCore XMLIO XMLParser Core Tree
Hist RIO )
......@@ -26,13 +17,11 @@ atlas_add_library( TrigCostRootAnalysisLib
atlas_add_executable( RunTrigCostD3PD
util/RunTrigCostD3PD.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} TrigCostRootAnalysisLib )
LINK_LIBRARIES TrigCostRootAnalysisLib )
atlas_add_executable( TrigCostD3PD_UserSkeleton
util/TrigCostD3PD_UserSkeleton.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} PathResolver TrigCostRootAnalysisLib )
LINK_LIBRARIES PathResolver TrigCostRootAnalysisLib )
# Install files from the package:
atlas_install_runtime( data/*.xml )
......
################################################################################
# Package: TrigSteering
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigSteering )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/AthenaKernel
Control/AthenaMonitoring
Control/AthContainers
Control/StoreGate
Event/EventInfo
Event/xAOD/xAODEventInfo
GaudiKernel
Trigger/TrigConfiguration/TrigConfBase
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigConfiguration/TrigConfInterfaces
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigT1/L1Topo/L1TopoAlgorithms
Trigger/TrigT1/L1Topo/L1TopoCoreSim
Trigger/TrigT1/L1Topo/L1TopoEvent
Trigger/TrigT1/L1Topo/L1TopoSimulation
Trigger/TrigT1/TrigT1CaloEvent
Trigger/TrigT1/TrigT1CaloToolInterfaces
Trigger/TrigT1/TrigT1Result
Trigger/TrigTools/TrigTimeAlgs
PRIVATE
AtlasTest/TestTools
Event/ByteStreamCnvSvcBase
Event/xAOD/xAODTrigger
Trigger/TrigConfiguration/TrigConfL1Data
Trigger/TrigDataAccess/TrigSerializeResult
Trigger/TrigEvent/TrigNavigation
Trigger/TrigEvent/TrigStorageDefinitions
Trigger/TrigMonitoring/TrigMonitorBase
Trigger/TrigSteer/TrigInterfaces
Trigger/TrigT1/L1Topo/L1TopoCommon
Trigger/TrigT1/L1Topo/L1TopoConfig
Trigger/TrigT1/TrigT1Interfaces )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
find_package( CLHEP )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( tdaq-common COMPONENTS CTPfragment )
# tag NEEDS_CORAL_BASE was not recognized in automatic conversion in cmt2cmake
# tag NEEDS_COOL_FACTORY was not recognized in automatic conversion in cmt2cmake
# Component(s) in the package:
atlas_add_library( TrigSteeringLib
src/*.cxx
PUBLIC_HEADERS TrigSteering
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
LINK_LIBRARIES AthenaBaseComps AthenaKernel AthContainers EventInfo xAODEventInfo GaudiKernel TrigConfBase TrigConfHLTData TrigSteeringEvent L1TopoAlgorithms L1TopoCoreSim L1TopoEvent TrigT1CaloToolInterfaces TrigT1Result AthenaMonitoringLib StoreGateLib SGtests L1TopoSimulationLib TrigT1CaloEventLib TrigTimeAlgsLib ByteStreamCnvSvcBaseLib TrigSerializeResultLib TrigNavigationLib TrigMonitorBaseLib TrigInterfacesLib
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} TestTools xAODTrigger TrigConfL1Data TrigStorageDefinitions L1TopoCommon L1TopoConfig TrigT1Interfaces )
LINK_LIBRARIES AthContainers AthenaBaseComps AthenaKernel AthenaMonitoringLib ByteStreamCnvSvcBaseLib EventInfo GaudiKernel L1TopoAlgorithms L1TopoCoreSim L1TopoEvent L1TopoSimulationLib TrigConfBase TrigConfHLTData TrigConfInterfaces TrigNavigationLib TrigSteeringEvent TrigT1CaloEventLib TrigT1CaloToolInterfaces TrigT1Result TrigTimeAlgsLib xAODEventInfo TrigInterfacesLib
PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthenaMonitoringKernelLib L1TopoCommon L1TopoConfig TrigConfL1Data TrigMonitorBaseLib TrigSerializeResultLib TrigStorageDefinitions TrigT1Interfaces xAODTrigger )
atlas_add_component( TrigSteering
src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthenaMonitoringLib AthContainers StoreGateLib SGtests EventInfo xAODEventInfo GaudiKernel TrigConfBase TrigConfHLTData TrigSteeringEvent L1TopoAlgorithms L1TopoCoreSim L1TopoEvent L1TopoSimulationLib TrigT1CaloEventLib TrigT1CaloToolInterfaces TrigT1Result TrigTimeAlgsLib TestTools ByteStreamCnvSvcBaseLib xAODTrigger TrigConfL1Data TrigSerializeResultLib TrigNavigationLib TrigStorageDefinitions TrigMonitorBaseLib TrigInterfacesLib L1TopoCommon L1TopoConfig TrigT1Interfaces TrigSteeringLib )
LINK_LIBRARIES TrigSteeringLib )
atlas_add_dictionary( TrigSteeringDict
TrigSteering/TrigSteeringDict.h
TrigSteering/selection.xml
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthenaMonitoringLib AthContainers StoreGateLib SGtests EventInfo xAODEventInfo GaudiKernel TrigConfBase TrigConfHLTData TrigSteeringEvent L1TopoAlgorithms L1TopoCoreSim L1TopoEvent L1TopoSimulationLib TrigT1CaloEventLib TrigT1CaloToolInterfaces TrigT1Result TrigTimeAlgsLib TestTools ByteStreamCnvSvcBaseLib xAODTrigger TrigConfL1Data TrigSerializeResultLib TrigNavigationLib TrigStorageDefinitions TrigMonitorBaseLib TrigInterfacesLib L1TopoCommon L1TopoConfig TrigT1Interfaces TrigSteeringLib )
LINK_LIBRARIES TrigSteeringLib )
# Tests in the package:
atlas_add_test( Signature_test
SOURCES
test/Signature_test.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthenaMonitoringLib AthContainers StoreGateLib SGtests EventInfo xAODEventInfo GaudiKernel TrigConfBase TrigConfHLTData TrigSteeringEvent L1TopoAlgorithms L1TopoCoreSim L1TopoEvent L1TopoSimulationLib TrigT1CaloEventLib TrigT1CaloToolInterfaces TrigT1Result TrigTimeAlgsLib TestTools ByteStreamCnvSvcBaseLib xAODTrigger TrigConfL1Data TrigSerializeResultLib TrigNavigationLib TrigStorageDefinitions TrigMonitorBaseLib TrigInterfacesLib L1TopoCommon L1TopoConfig TrigT1Interfaces TrigSteeringLib
LINK_LIBRARIES TestTools TrigSteeringLib
POST_EXEC_SCRIPT nopost.sh )
atlas_add_test( SteeringChain_test
SOURCES
test/SteeringChain_test.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps AthenaKernel AthenaMonitoringLib AthContainers StoreGateLib SGtests EventInfo xAODEventInfo GaudiKernel TrigConfBase TrigConfHLTData TrigSteeringEvent L1TopoAlgorithms L1TopoCoreSim L1TopoEvent L1TopoSimulationLib TrigT1CaloEventLib TrigT1CaloToolInterfaces TrigT1Result TrigTimeAlgsLib TestTools ByteStreamCnvSvcBaseLib xAODTrigger TrigConfL1Data TrigSerializeResultLib TrigNavigationLib TrigStorageDefinitions TrigMonitorBaseLib TrigInterfacesLib L1TopoCommon L1TopoConfig TrigT1Interfaces TrigSteeringLib
LINK_LIBRARIES TestTools TrigSteeringLib
POST_EXEC_SCRIPT nopost.sh )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/*.py share/Lvl1Results.txt )
......
################################################################################
# Package: TrigSteeringTest
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigSteeringTest )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
GaudiKernel
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigSteer/TrigInterfaces
PRIVATE
Control/AthenaKernel
Control/AthContainers
Event/xAOD/xAODTrigger
Trigger/TrigEvent/TrigNavigation
Trigger/TrigT1/TrigT1Interfaces
Trigger/TrigTools/TrigTimeAlgs )
# Component(s) in the package:
atlas_add_component( TrigSteeringTest
src/*.cxx
......@@ -25,6 +10,5 @@ atlas_add_component( TrigSteeringTest
LINK_LIBRARIES GaudiKernel TrigSteeringEvent TrigInterfacesLib AthenaKernel AthContainers xAODTrigger TrigNavigationLib TrigT1Interfaces TrigTimeAlgsLib )
# Install files from the package:
atlas_install_headers( TrigSteeringTest )
atlas_install_python_modules( python/*.py )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment