Skip to content
Snippets Groups Projects
Commit 531568ff authored by Adam Edward Barton's avatar Adam Edward Barton
Browse files

Merge branch 'cmake_trigger1' into 'master'

TrigSteer: CMake configuration cleanup

See merge request atlas/athena!33696
parents 53eccca0 aeb94a94
No related branches found
No related tags found
No related merge requests found
################################################################################
# Package: DecisionHandling
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( DecisionHandling )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Event/xAOD/xAODTrigger
GaudiKernel
Control/AthContainers
Control/AthLinks
Trigger/TrigSteer/TrigCompositeUtils
PRIVATE
Control/AthViews
Control/StoreGate
Control/AthenaBaseComps
Control/CxxUtils
Event/xAOD/xAODEgamma
Event/xAOD/xAODMuon
Event/xAOD/xAODBase
AtlasTest/TestTools
Control/StoreGate
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigTools/TrigTimeAlgs
Trigger/TrigMonitoring/TrigCostMonitorMT
Trigger/TrigSteer/TrigCompositeUtils
Control/AthenaMonitoringKernel )
atlas_add_library( DecisionHandlingLib
src/*.cxx
PUBLIC_HEADERS DecisionHandling
LINK_LIBRARIES xAODTrigger GaudiKernel TrigSteeringEvent TrigCompositeUtilsLib
PRIVATE_LINK_LIBRARIES AthenaBaseComps CxxUtils TrigTimeAlgsLib AthenaMonitoringKernelLib TrigCostMonitorMTLib AthViews )
LINK_LIBRARIES AthenaBaseComps AthenaMonitoringKernelLib GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigCostMonitorMTLib TrigSteeringEvent TrigTimeAlgsLib
PRIVATE_LINK_LIBRARIES AthContainers AthViews xAODTrigger )
# Component(s) in the package:
atlas_add_component( DecisionHandling
src/components/*.cxx
LINK_LIBRARIES DecisionHandlingLib TrigCompositeUtilsLib TrigTimeAlgsLib AthenaMonitoringKernelLib TrigCostMonitorMTLib )
atlas_install_python_modules( python/*.py )
LINK_LIBRARIES DecisionHandlingLib )
atlas_add_test( flake8
SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python/*.py
POST_EXEC_SCRIPT nopost.sh )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Note: These definitions shadow those in TrigComposite_v1.cxx
......@@ -13,9 +13,7 @@ def legName(chainName, legCounter):
return ("leg{:03d}_{}".format(legCounter, chainName))
def chainNameFromLegName(legName):
if (isLegId(legName)):
return legName[7:]
return legName
return legName[7:] if isLegId(legName) else legName
def isLegId(chainName):
return chainName.startswith("leg")
......
################################################################################
# Package: L1Decoder
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( L1Decoder )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
AtlasPolicy
GaudiKernel
PRIVATE
Control/AthViews
Control/AthenaBaseComps
Control/AthenaMonitoringKernel
Event/xAOD/xAODTrigger
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigConfiguration/TrigConfData
Trigger/TrigConfiguration/TrigConfInterfaces
Trigger/TrigConfiguration/TrigConfL1Data
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigT1/TrigT1Interfaces
Trigger/TrigT1/TrigT1Result
Trigger/TrigSteer/DecisionHandling
Trigger/TrigSteer/TrigCompositeUtils
Trigger/TrigTools/TrigTimeAlgs
Trigger/TrigMonitoring/TrigCostMonitorMT )
# External dependencies:
find_package( Boost )
find_package( CLHEP )
find_package( nlohmann_json )
# Component(s) in the package:
atlas_add_library( L1DecoderLib
src/*.cxx
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
PUBLIC_HEADERS L1Decoder
LINK_LIBRARIES GaudiKernel AthViews AthenaBaseComps AthenaMonitoringKernelLib
xAODTrigger TrigConfHLTData TrigConfData TrigConfL1Data
TrigSteeringEvent TrigT1Interfaces TrigT1Result DecisionHandlingLib TrigCompositeUtilsLib
LINK_LIBRARIES ${CLHEP_LIBRARIES}
PRIVATE_LINK_LIBRARIES TrigConfInterfaces TrigTimeAlgsLib TrigCostMonitorMTLib
)
INTERFACE )
atlas_add_component( L1Decoder
src/components/*.cxx
INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES L1DecoderLib TrigTimeAlgsLib TrigConfInterfaces TrigCostMonitorMTLib ${CLHEP_LIBRARIES}
)
src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} AthViews AthenaBaseComps AthenaKernel AthenaMonitoringKernelLib GaudiKernel L1DecoderLib StoreGateLib TrigCompositeUtilsLib TrigConfData TrigConfHLTData TrigConfInterfaces TrigConfL1Data TrigCostMonitorMTLib TrigSteeringEvent TrigT1Interfaces TrigT1Result TrigTimeAlgsLib xAODEventInfo xAODTrigger )
atlas_install_python_modules( python/*.py
POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
# Install files from the package:
atlas_install_headers( L1Decoder )
atlas_install_joboptions( share/*.py )
atlas_install_scripts( test/test* )
# Tests:
atlas_add_test( L1DecoderNJOTest SCRIPT python -m L1Decoder.L1DecoderConfig
PROPERTIES TIMEOUT 300 )
atlas_add_test( L1DecoderTest
SCRIPT test/test_l1decoder.sh
PROPERTIES TIMEOUT 1000
)
PROPERTIES TIMEOUT 1000 )
......@@ -3,11 +3,6 @@
# Declare the package name.
atlas_subdir( TrigCompositeUtils )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Trigger/TrigEvent/TrigDecisionInterface
)
# Set up the (non-)standalone compilation.
set( extra_srcs )
set( extra_libs )
......@@ -24,7 +19,7 @@ atlas_add_library( TrigCompositeUtilsLib
LINK_LIBRARIES TrigConfHLTUtilsLib CxxUtils AsgMessagingLib TrigDecisionInterface ${extra_libs} )
# Install files from the package.
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
# Unit test(s).
if( NOT XAOD_STANDALONE )
......@@ -42,9 +37,3 @@ endif()
atlas_add_test( Combinators_test
SOURCES test/Combinators_test.cxx
LINK_LIBRARIES TestTools TrigCompositeUtilsLib )
if( NOT XAOD_STANDALONE )
atlas_add_test( flake8
SCRIPT flake8 --select=ATL,F,E7,E9,W6 ${CMAKE_CURRENT_SOURCE_DIR}/python/*.py
POST_EXEC_SCRIPT nopost.sh )
endif()
################################################################################
# Package: TrigHLTResultByteStream
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigHLTResultByteStream )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/AthenaKernel
Control/StoreGate
Event/ByteStreamCnvSvcBase
Event/ByteStreamData
GaudiKernel
Trigger/TrigEvent/TrigSteeringEvent )
# External dependencies:
find_package( tdaq-common COMPONENTS eformat_write )
......@@ -23,10 +11,9 @@ atlas_add_library( TrigHLTResultByteStreamLib
src/*.cxx
PUBLIC_HEADERS TrigHLTResultByteStream
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps AthenaKernel ByteStreamData GaudiKernel TrigSteeringEvent StoreGateLib SGtests ByteStreamCnvSvcBaseLib ByteStreamData_test )
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps ByteStreamCnvSvcBaseLib ByteStreamData GaudiKernel TrigSteeringEvent
PRIVATE_LINK_LIBRARIES AthenaKernel StoreGateLib )
atlas_add_component( TrigHLTResultByteStream
src/components/*.cxx
INCLUDE_DIRS ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests ByteStreamCnvSvcBaseLib ByteStreamData ByteStreamData_test GaudiKernel TrigSteeringEvent TrigHLTResultByteStreamLib )
LINK_LIBRARIES TrigHLTResultByteStreamLib )
################################################################################
# Package: ViewAlgs
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( ViewAlgs )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Event/xAOD/xAODTrigger
Event/xAOD/xAODTracking
GaudiKernel
Control/AthContainers
Control/AthLinks
Event/xAOD/xAODTrigCalo
Event/xAOD/xAODTrigEgamma
Event/xAOD/xAODJet
Event/xAOD/xAODMuon
PRIVATE
Control/AthViews
Control/StoreGate
Control/AthenaBaseComps
Control/CxxUtils
Reconstruction/MuonIdentification/MuonCombinedEvent
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigSteer/DecisionHandling
Trigger/TrigSteer/TrigCompositeUtils )
# Component(s) in the package:
atlas_add_library( ViewAlgsLib
src/*.cxx
PUBLIC_HEADERS ViewAlgs
LINK_LIBRARIES xAODTrigger xAODTracking GaudiKernel AthViews xAODTrigCalo xAODTrigEgamma xAODJet xAODMuon
PRIVATE_LINK_LIBRARIES AthenaBaseComps CxxUtils MuonCombinedEvent TrigConfHLTData TrigSteeringEvent DecisionHandlingLib TrigCompositeUtilsLib )
INTERFACE
LINK_LIBRARIES AthContainers AthLinks GaudiKernel TrigCompositeUtilsLib xAODTrigger )
atlas_add_component( ViewAlgs
src/components/*.cxx
LINK_LIBRARIES xAODTrigger GaudiKernel AthViews AthenaBaseComps CxxUtils TrigConfHLTData TrigSteeringEvent ViewAlgsLib DecisionHandlingLib TrigCompositeUtilsLib )
src/*.cxx src/components/*.cxx
LINK_LIBRARIES AthViews AthenaBaseComps CxxUtils DecisionHandlingLib MuonCombinedEvent StoreGateLib TrigSteeringEvent ViewAlgsLib xAODJet xAODMuon xAODTracking xAODTrigCalo )
#
# get_files -xmls LVL1config_Physics_pp_v5.xml
# also needed are "data" files: menuData.dat and testData.dat located in L1Bdecoder/share
#
#
## @file L1Topo_ReadBS_test.py
## @brief Example job options file to read BS file to test a converter
## $Id: $
###############################################################
#
# This Job option:
# ----------------
# 1. Read ByteStream test data file and decode the L1Topo part
#
#==============================================================
## basic job configuration
import AthenaCommon.AtlasUnixStandardJob
## get a handle on the ServiceManager
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
## get a handle on the default top-level algorithm sequence
from AthenaCommon.AlgSequence import AlgSequence
topSequence = AlgSequence()
from TrigConfigSvc.TrigConfigSvcConf import TrigConf__LVL1ConfigSvc
l1svc = TrigConf__LVL1ConfigSvc("LVL1ConfigSvc")
l1svc.XMLMenuFile = "LVL1config_Physics_pp_v5.xml"
svcMgr += l1svc
#--------------------------------------------------------------
# Private Application Configuration options
#--------------------------------------------------------------
# Load "user algorithm" top algorithms to be run, and the libraries that house them
def setOutput(obj, prop, name):
setattr(obj, prop, name)
setattr(obj, prop+"Aux", name+"Aux.")
def getOutput(obj, prop):
print "getOutput"
try:
print "getOutput getattr"
return getattr(obj, prop)
except:
print "getOutput getDefaultProperty ", obj.getDefaultProperty(prop)
return obj.getDefaultProperty(prop)
print "Can not read pro"
raise "Error in reading property " + prop + " from " + obj
#Run Fake RoI
from L1Decoder.L1DecoderConf import FakeRoI
fakeRoI = FakeRoI("fakeRoI")
fakeRoI.InputFilename="testData.dat"
setOutput(fakeRoI, "OutputDecisions", "CaloRoIs")
fakeRoI.OutputLevel=DEBUG
topSequence += fakeRoI
from L1Decoder.L1DecoderConf import FakeCTP
fakeCTP = FakeCTP()
fakeCTP.OutputLevel=VERBOSE
fakeCTP.InputFilename="menuData.dat"
fakeCTP.OutputLevel=VERBOSE
topSequence += fakeCTP
from ViewAlgs.ViewAlgsConf import PrescaleDecision
ps = PrescaleDecision("HLTChainsPrescaling")
ps.Prescales=["HLT_e3 20.99", "HLT_e7 2.5"]
ps.InputChainDecisions = getOutput(fakeCTP, "OutputDecisions")
setOutput(ps, "OutputChainDecisions", "ChainsPassingAfterPS")
ps.OutputLevel=DEBUG
topSequence += ps
from ViewAlgs.ViewAlgsConf import DecisionAlg
dropPrescaled = DecisionAlg("DropPrescaled")
dropPrescaled.HypoDecisions = getOutput(fakeRoI, "OutputDecisions")
dropPrescaled.InputChainDecisions = getOutput(ps,"OutputChainDecisions")
setOutput(dropPrescaled, "OutputDecisions", "RelevantEMRoIs")
setOutput(dropPrescaled, "OutputChainDecisions", "ChainsPassingAfterEM")
dropPrescaled.Required=["HLT_e7 = EM7 x 1",
"HLT_2e7 = EM7 x 2",
"HLT_e3 = EM3 x 1"]
topSequence += dropPrescaled
from ViewAlgs.ViewAlgsConf import TestFEXAlg
l2CaloReco = TestFEXAlg("L2CaloReco")
l2CaloReco.RoIsContainer = getOutput(dropPrescaled, "OutputDecisions")
setOutput(l2CaloReco, "Output", "L2CaloFex")
l2CaloReco.OutputLevel=DEBUG
topSequence += l2CaloReco
from ViewAlgs.ViewAlgsConf import TestHypoAlg, TestHypoTool
l2CaloHypo = TestHypoAlg("L1CaloHypo")
l2CaloHypo.OutputLevel=DEBUG
l2CaloHypo.ClusterContainer = getOutput(l2CaloReco,"Output")
setOutput(l2CaloHypo, "Output","L2CaloHypoDecisions")
# cuts
cut3 = TestHypoTool("3GeVCaloEtCut", EtThreshold=0.3)
cut7 = TestHypoTool("7GeVCaloEtCut", EtThreshold=0.7)
cut10 = TestHypoTool("10GeVCaloEtCut", EtThreshold=0.10)
cut12 = TestHypoTool("12GeVCaloEtCut", EtThreshold=0.12)
l2CaloHypo += cut3
l2CaloHypo += cut7
l2CaloHypo += cut10
l2CaloHypo += cut12
l2CaloHypo.Hypotheses = [cut3, cut7, cut10, cut12]
topSequence += l2CaloHypo
from ViewAlgs.ViewAlgsConf import DecisionAlg
caloStep = DecisionAlg("CaloStep")
caloStep.HypoDecisions = l2CaloHypo.Output
caloStep.InputChainDecisions = getOutput(dropPrescaled, "OutputChainDecisions")
setOutput(caloStep, "OutputDecisions", "RelevantEMCaloRoIs")
setOutput(caloStep, "OutputChainDecisions", "ChainsPassingEMCaloStep")
caloStep.Required=["HLT_e7 = 7GeVCaloEtCut x 1",
"HLT_2e7 = 7GeVCaloEtCut x 2",
"HLT_e3 = 3GeVCaloEtCut x 1"]
caloStep.OutputLevel=VERBOSE
topSequence += caloStep
#Dumper
from ViewAlgs.ViewAlgsConf import DumpDecisions
dumper = DumpDecisions("CaloRoIsDumper")
dumper.OutputLevel=VERBOSE
dumper.OutputDecisions=getOutput(l2CaloHypo, "Output")
topSequence += dumper
#--------------------------------------------------------------
# Set output level threshold (2=DEBUG, 3=INFO, 4=WARNING, 5=ERROR, 6=FATAL)
#--------------------------------------------------------------
svcMgr.MessageSvc.OutputLevel = INFO
svcMgr.MessageSvc.Format = "% F%42W%S%7W%R%T %0W%M"
svcMgr.MessageSvc.verboseLimit = 0
svcMgr.StoreGateSvc.OutputLevel = INFO
svcMgr.StoreGateSvc.Dump=True
print svcMgr
MessageSvc.debugLimit=1000000
theApp.EvtMax = 10
print "topSequence dump:", topSequence
#
# End of job options file
#
###############################################################
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment