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

Merge branch 'trigmon_cmake' into 'master'

TrigMonitoring: cmake/package cleanup

See merge request atlas/athena!34849
parents 02db8d56 a37ad856
No related branches found
No related tags found
No related merge requests found
Showing
with 81 additions and 460 deletions
################################################################################
# Package: TrigCostMonitor
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigCostMonitor )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/AthenaMonitoring
Control/StoreGate
Database/CoolLumiUtilities
Event/xAOD/xAODEventInfo
GaudiKernel
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigConfiguration/TrigConfInterfaces
Trigger/TrigConfiguration/TrigConfJobOptData
Trigger/TrigEvent/TrigMonitoringEvent
Trigger/TrigSteer/TrigSteering
Trigger/TrigTools/TrigTimeAlgs
PRIVATE
Control/AthenaKernel
Generators/GenAnalysisTools/TruthHelper
Generators/GeneratorObjects
Tools/PathResolver
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigConfiguration/TrigConfL1Data
Trigger/TrigConfiguration/TrigConfStorage
Trigger/TrigDataAccess/TrigDataAccessMonitoring
Trigger/TrigDataAccess/TrigSerializeResult
Trigger/TrigEvent/TrigNavigation
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigSteer/TrigInterfaces
Trigger/TrigT1/TrigT1Interfaces
Trigger/TrigT1/TrigT1Result )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
find_package( COOL COMPONENTS CoolKernel CoolApplication )
find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
find_package( tdaq-common )
find_package( CORAL COMPONENTS CoralBase CoralKernel )
find_package( ROOT COMPONENTS Core Tree )
find_package( tdaq-common COMPONENTS CTPfragment )
# Component(s) in the package:
......@@ -48,9 +14,9 @@ atlas_add_library( TrigCostMonitorLib
src/*.cxx
PUBLIC_HEADERS TrigCostMonitor
INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS}
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps xAODEventInfo GaudiKernel TrigConfJobOptData TrigMonitoringEvent AthenaMonitoringLib StoreGateLib SGtests CoolLumiUtilitiesLib TrigDecisionToolLib TrigSteeringLib TrigTimeAlgsLib TrigDataAccessMonitoringLib TrigSerializeResultLib TrigNavigationLib TrigInterfacesLib
PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} ${CORAL_LIBRARIES} AthenaKernel TruthHelper GeneratorObjects PathResolver TrigConfHLTData TrigConfL1Data TrigConfStorage TrigSteeringEvent TrigT1Interfaces TrigT1Result )
PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
LINK_LIBRARIES ${COOL_LIBRARIES} AthenaBaseComps AthenaMonitoringLib CoolLumiUtilitiesLib GaudiKernel StoreGateLib TrigConfInterfaces TrigConfJobOptData TrigDecisionToolLib TrigMonitoringEvent TrigSteeringLib TrigTimeAlgsLib xAODEventInfo
PRIVATE_LINK_LIBRARIES ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthenaKernel GeneratorObjects PathResolver TrigConfHLTData TrigConfL1Data TrigConfStorage TrigDataAccessMonitoringLib TrigInterfacesLib TrigNavigationLib TrigSerializeResultLib TrigSteeringEvent TrigT1Interfaces TrigT1Result TruthHelper )
atlas_add_component( TrigCostMonitor
src/components/*.cxx
......@@ -62,6 +28,6 @@ atlas_add_dictionary( TrigCostMonitorDict
LINK_LIBRARIES TrigCostMonitorLib )
# Install files from the package:
atlas_install_python_modules( python/TrigCost*.py )
atlas_install_python_modules( python/TrigCost*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from __future__ import print_function
from TrigCostMonitor.TrigCostMonitorConf import *
import TrigCostMonitor.TrigCostMonitorConf as Conf
from AthenaCommon.Logging import logging
#----------------------------------------------------------------------
......@@ -15,11 +15,11 @@ steeringHLT_online_doOperationalInfo=10 # frequency of operartional info collec
#----------------------------------------------------------------------
# Base class which defines target() method used by TrigSteer config
#
class TrigCostTool_Target(TrigCostTool):
class TrigCostTool_Target(Conf.TrigCostTool):
__slots__ = []
def __init__(self, name):
super(TrigCostTool, self).__init__(name)
super(Conf.TrigCostTool, self).__init__(name)
from TrigSteering.TrigSteeringConfig import RandomScaler
self.scalerTool = RandomScaler('TrigCostScaler')
......@@ -72,20 +72,20 @@ def prepareCostTool(target):
tool.execPrescale = 1.0
tool.doConfigReduction = True # Online, only send config info from 1/50 PU nodes to reduce wasted bandwidth (only 1 copy needed at T0)
tool.toolConf = Trig__TrigNtConfTool('Conf'+target)
tool.toolEBWeight = Trig__TrigNtEBWeightTool('Ebwt'+target)
tool_elem = Trig__TrigNtElemTool('Elem'+target) # Not currently utilised
tool_exec = Trig__TrigNtExecTool('Exec'+target)
tool_lvl1 = Trig__TrigNtLvl1Tool('Lvl1'+target)
tool_hlt2 = Trig__TrigNtHltRTool('Hlt2'+target)
tool_robs = Trig__TrigNtRobsTool('Robs'+target)
tool.toolConf = Conf.Trig__TrigNtConfTool('Conf'+target)
tool.toolEBWeight = Conf.Trig__TrigNtEBWeightTool('Ebwt'+target)
tool_elem = Conf.Trig__TrigNtElemTool('Elem'+target) # Not currently utilised
tool_exec = Conf.Trig__TrigNtExecTool('Exec'+target)
tool_lvl1 = Conf.Trig__TrigNtLvl1Tool('Lvl1'+target)
tool_hlt2 = Conf.Trig__TrigNtHltRTool('Hlt2'+target)
tool_robs = Conf.Trig__TrigNtRobsTool('Robs'+target)
#
# Add TrigNtSaveTool tool for offline running of athenaMT/PT/HLT
#
if useSaveTools:
save_cost = Trig__TrigNtSaveTool('SaveCost_'+target)
save_rate = Trig__TrigNtSaveTool('SaveRate_'+target)
save_cost = Conf.Trig__TrigNtSaveTool('SaveCost_'+target)
save_rate = Conf.Trig__TrigNtSaveTool('SaveRate_'+target)
#
save_cost.fileName = 'TrigCost'+tool.level+'.root'
save_cost.writeFile = True
......@@ -210,7 +210,7 @@ def prepareCostRun(name, option = 'hlt'):
from TrigEDMConfig.TriggerEDM import EDMLibraries
from TrigNavigation.TrigNavigationConfig import HLTNavigationOnline
run = TrigCostRun(name)
run = Conf.TrigCostRun(name)
run.printEvent = True
run.keyStream = ''
......@@ -239,13 +239,13 @@ def prepareCostRun(name, option = 'hlt'):
if option.count('hlt'):
run.doHLT = True
run.navigation = HLTNavigationOnline()
run.navigation.ReferenceAllClasses = False
run.navigation.Dlls = EDMLibraries
tool_conf = Trig__TrigNtConfTool('RunCostConf')
tool_post = Trig__TrigNtPostTool('RunCostPost')
tool_conf = Conf.Trig__TrigNtConfTool('RunCostConf')
tool_post = Conf.Trig__TrigNtPostTool('RunCostPost')
tool_conf.printConfig = False
tool_conf.useDB = True
......@@ -261,14 +261,14 @@ def prepareCostRun(name, option = 'hlt'):
svcMgr.THistSvc.Output += ["TrigCostReadBS DATAFILE='TrigCostReadBS.root' OPT='RECREATE'"]
save_cost = Trig__TrigNtSaveTool('RunCostSave_full')
save_cost = Conf.Trig__TrigNtSaveTool('RunCostSave_full')
save_cost.writeFile = False
save_cost.fileName = ''
save_cost.streamConfig = 'TrigCostReadBS'
save_cost.streamEvent = 'TrigCostReadBS'
save_cost.writeRateOnly = False
save_rate = Trig__TrigNtSaveTool('RunCostSave_rate')
save_rate = Conf.Trig__TrigNtSaveTool('RunCostSave_rate')
save_rate.writeFile = False
save_rate.fileName = ''
save_rate.streamConfig = ''
......@@ -291,7 +291,7 @@ def prepareCostRun(name, option = 'hlt'):
log.info('Picked up HLT tool: RunCost2IS')
run.tools = [tool_2is]
except:
except Exception:
log.info('HLT tools are not available... continue without them')
log.info('Prepared TrigCostRun algorithm instance: '+run.getName())
......@@ -313,16 +313,16 @@ def prepareReadOnlineAlg(name, suffix):
from GaudiSvc.GaudiSvcConf import THistSvc
svcMgr += THistSvc()
alg = TrigCostAlg(name)
alg = Conf.TrigCostAlg(name)
alg.mergeEvent = True
alg.printEvent = True
conf_tool = Trig__TrigNtConfTool('CostNtConf_'+suffix)
lvl1_tool = Trig__TrigNtLvl1Tool('CostNtLvl1_'+suffix)
hlt2_tool = Trig__TrigNtHltRTool('CostNtHlt2_'+suffix)
hlt3_tool = Trig__TrigNtHltRTool('CostNtHlt3_'+suffix)
post_tool = Trig__TrigNtPostTool('CostNtPost_'+suffix)
save_tool = Trig__TrigNtSaveTool('CostNtSave_'+suffix)
conf_tool = Conf.Trig__TrigNtConfTool('CostNtConf_'+suffix)
lvl1_tool = Conf.Trig__TrigNtLvl1Tool('CostNtLvl1_'+suffix)
hlt2_tool = Conf.Trig__TrigNtHltRTool('CostNtHlt2_'+suffix)
hlt3_tool = Conf.Trig__TrigNtHltRTool('CostNtHlt3_'+suffix)
post_tool = Conf.Trig__TrigNtPostTool('CostNtPost_'+suffix)
save_tool = Conf.Trig__TrigNtSaveTool('CostNtSave_'+suffix)
conf_tool.useDB = True
hlt2_tool.keyResult = 'HLTResult_L2'
......@@ -338,6 +338,7 @@ def prepareReadOnlineAlg(name, suffix):
#
# Add all tools. If using combined trigger - then no HLT l3
#
from TriggerJobOpts.TriggerFlags import TriggerFlags
if not TriggerFlags.doHLT():
alg.tools += [conf_tool, lvl1_tool, hlt2_tool, hlt3_tool, post_tool, save_tool]
else:
......@@ -352,8 +353,7 @@ def prepareReadOnlineAlg(name, suffix):
def setupCostExtras(config = ''):
log = logging.getLogger('setupCostExtras')
from AthenaCommon.AppMgr import theApp
from AthenaCommon.AppMgr import ServiceMgr as svcMgr
if not hasattr(svcMgr, "AthenaEventLoopMgr"):
......@@ -463,14 +463,13 @@ def setupCostJob(config = 'OPI ROB NOPS'):
from AthenaCommon.Include import include
include('TrigDataAccessMonitoring/MonROBDataProviderSvc.py')
log.info('Setup "online" monitoring for ROBDataProvider')
except:
except Exception:
log.warning('Failed to setup "online" version of ROBDataProvider')
try:
from ByteStreamCnvSvcBase.ByteStreamCnvSvcBaseConf import ROBDataProviderSvc
svcMgr.ROBDataProviderSvc.doDetailedROBMonitoring = True
log.info('Set ROBDataProviderSvc.doDetailedROBMonitoring=True')
except:
except Exception:
log.warning('Failed to set ROBDataProviderSvc.doDetailedROBMonitoring')
#----------------------------------------------------------------------
......@@ -484,7 +483,7 @@ def setSteerDebug(name, option, log):
if hasattr(topSeq, name):
trigSteer = getattr(topSeq, name)
if not 'OPITools' in trigSteer.properties():
if 'OPITools' not in trigSteer.properties():
return
for tool in trigSteer.OPITools:
......@@ -554,9 +553,9 @@ def postSetupOnlineCost():
steeringL2_online_doOperationalInfo=1
steeringEF_online_doOperationalInfo=1
steeringHLT_online_doOperationalInfo=1
log.info('Set global flag for L2: doOperationalInfo=%d' %steeringL2_online_doOperationalInfo)
log.info('Set global flag for EF: doOperationalInfo=%d' %steeringEF_online_doOperationalInfo)
log.info('Set global flag for HLT: doOperationalInfo=%d' %steeringHLT_online_doOperationalInfo)
log.info('Set global flag for L2: doOperationalInfo=%d', steeringL2_online_doOperationalInfo)
log.info('Set global flag for EF: doOperationalInfo=%d', steeringEF_online_doOperationalInfo)
log.info('Set global flag for HLT: doOperationalInfo=%d', steeringHLT_online_doOperationalInfo)
if hasattr(topSeq, 'TrigSteer_L2'):
topSeq.TrigSteer_L2.doOperationalInfo=steeringL2_online_doOperationalInfo
......@@ -612,9 +611,9 @@ def preSetupCostForCAF():
steeringEF_online_doOperationalInfo=1
steeringHLT_online_doOperationalInfo=1
log.info('Set global flag for L2: doOperationalInfo=%d' %steeringL2_online_doOperationalInfo)
log.info('Set global flag for EF: doOperationalInfo=%d' %steeringEF_online_doOperationalInfo)
log.info('Set global flag for HLT: doOperationalInfo=%d' %steeringHLT_online_doOperationalInfo)
log.info('Set global flag for L2: doOperationalInfo=%d', steeringL2_online_doOperationalInfo)
log.info('Set global flag for EF: doOperationalInfo=%d', steeringEF_online_doOperationalInfo)
log.info('Set global flag for HLT: doOperationalInfo=%d', steeringHLT_online_doOperationalInfo)
#----------------------------------------------------------------------
# Set options for running cost on CAF - used together with CostExecL2/EF options!!!
......@@ -687,7 +686,7 @@ def postSetupEBWeighting():
def readInputFiles(filename = 'input_files.txt', file_key = 'RDO'):
log = logging.getLogger('TrigCostMonitor:readInputFiles')
import os, string, sys
import os
filelist = []
try:
......@@ -709,7 +708,7 @@ def readInputFiles(filename = 'input_files.txt', file_key = 'RDO'):
log.info('Added input file: '+file)
mylist.close()
except:
except Exception:
log.warning('Exception when reading file: '+filename)
return filelist
################################################################################
# Package: TrigIDTPMonitor
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigIDTPMonitor )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PRIVATE
Control/AthLinks
Event/EventInfo
Event/xAOD/xAODEgamma
Event/xAOD/xAODCaloEvent
Event/xAOD/xAODEventInfo
Event/xAOD/xAODMuon
Event/xAOD/xAODTracking
Event/xAOD/xAODTrigBphys
GaudiKernel
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigEvent/TrigBphysicsEvent
Trigger/TrigEvent/TrigParticle
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigSteer/TrigInterfaces )
# Component(s) in the package:
atlas_add_component( TrigIDTPMonitor
src/*.cxx
src/components/*.cxx
LINK_LIBRARIES AthLinks EventInfo xAODEgamma xAODCaloEvent xAODEventInfo xAODMuon xAODTracking xAODTrigBphys GaudiKernel TrigConfHLTData TrigBphysicsEvent TrigParticle TrigSteeringEvent TrigInterfacesLib )
LINK_LIBRARIES AthLinks EventInfo GaudiKernel TrigBphysicsEvent TrigConfHLTData TrigInterfacesLib TrigParticle TrigSteeringEvent xAODCaloEvent xAODEgamma xAODEventInfo xAODMuon xAODTracking xAODTrigBphys )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from TrigIDTPMonitor.TrigIDTPMonitorConf import TrigIDTPMonitor, TrigIDTPMonitorElectron
from AthenaCommon.AppMgr import ToolSvc
class IDTPMonitor (TrigIDTPMonitor):
__slots__ = []
def __init__(self, name = "IDTPMonitor"):
......
################################################################################
# Package: TrigIDtrkMonitoring
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigIDtrkMonitoring )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Calorimeter/CaloEvent
Calorimeter/CaloGeoHelpers
Control/AthenaMonitoring
Control/StoreGate
GaudiKernel
Reconstruction/Particle
Reconstruction/RecoTools/RecoToolInterfaces
Reconstruction/egamma/egammaEvent
Reconstruction/egamma/egammaInterfaces
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigEvent/TrigCaloEvent
Trigger/TrigEvent/TrigInDetEvent
Trigger/TrigMonitoring/TrigHLTMonitoring
Trigger/TrigTools/TrigInDetToolInterfaces
PRIVATE
Event/EventInfo
Trigger/TrigEvent/TrigParticle
Trigger/TrigEvent/TrigSteeringEvent )
# External dependencies:
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
find_package( ROOT COMPONENTS Core MathCore Hist )
# Component(s) in the package:
atlas_add_component( TrigIDtrkMonitoring
src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} CaloEvent CaloGeoHelpers GaudiKernel Particle RecoToolInterfaces
egammaEvent TrigCaloEvent TrigInDetEvent AthenaMonitoringLib StoreGateLib SGtests TrigDecisionToolLib
TrigHLTMonitoringLib EventInfo TrigParticle TrigSteeringEvent )
LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaMonitoringLib CaloEvent CaloGeoHelpers EventInfo GaudiKernel Particle RecoToolInterfaces StoreGateLib TrigCaloEvent TrigDecisionToolLib TrigHLTMonitoringLib TrigInDetEvent TrigInDetToolInterfacesLib TrigParticle TrigSteeringEvent egammaEvent egammaInterfacesLib )
# Install files from the package:
atlas_install_python_modules( python/*.py )
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_joboptions( share/*.py )
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
def TrigIDPhysValMonitoringTool( legacy_monitoring=False ):
from AthenaCommon.Constants import INFO,ERROR,FALSE,TRUE,DEBUG,VERBOSE
# dataTypes: userDefined = 0, monteCarlo, collisions, cosmics
if not 'DQMonFlags' in dir():
from AthenaMonitoring.DQMonFlags import DQMonFlags
dataType = DQMonFlags.monManDataType()
if 'DQMonFlags' not in dir():
from AthenaMonitoring.DQMonFlags import DQMonFlags # noqa: F401
# disable everything
outputlist = []
if not 'rec' in dir():
if 'rec' not in dir():
from RecExConfig.RecFlags import rec
from TriggerJobOpts.HLTTriggerResultGetter import EDMDecodingVersion
......@@ -34,30 +31,29 @@ def TrigIDPhysValMonitoringTool( legacy_monitoring=False ):
Monname = "TestIDPhysValMon" + name
TestIDPhysValMon = TrigTestPhysValMon(name=Monname)
TestIDPhysValMon.SliceTag = "HLT/IDMon/" + name
TestIDPhysValMon.OutputLevel = INFO
TestIDPhysValMon.UseHighestPT = useHighestPT
try:
TestIDPhysValMon.EnableLumi = False
except:
except Exception:
pass
TestIDPhysValMon.buildNtuple = False
TestIDPhysValMon.AnalysisConfig = "Tier0" #T0 Analysis
# TestIDPhysValMon.AnalysisConfig = "nTuple" #nTuple Analysis
if (useOffline or rec.doTruth == False):
if (useOffline or rec.doTruth is False):
TestIDPhysValMon.mcTruth = False
TestIDPhysValMon.ntupleChainNames = ['Offline',name]
# use default values ?
# TestIDPhysValMon.sctHitsOffline = 1
# TestIDPhysValMon.pixHitsOffline = 1
if (doFS == True):
if (doFS is True):
TestIDPhysValMon.sctHitsOffline = 6
TestIDPhysValMon.pixHitsOffline = 4
TestIDPhysValMon.blayerHitsOffline = 1
TestIDPhysValMon.pixHolesOffline = 1
elif (rec.doTruth == True):
elif (rec.doTruth is True):
TestIDPhysValMon.mcTruth = True
TestIDPhysValMon.ntupleChainNames = ['Truth']
TestIDPhysValMon.sctHitsOffline = -1
......
################################################################################
# Package: TrigMonitorBase
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigMonitorBase )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaBaseComps
Control/AthenaMonitoring
GaudiKernel
Trigger/TrigSteer/TrigInterfaces )
# External dependencies:
find_package( Boost COMPONENTS thread )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( Boost )
find_package( ROOT COMPONENTS Core Tree MathCore Hist )
# Component(s) in the package:
atlas_add_library( TrigMonitorBaseLib
src/*.cxx
PUBLIC_HEADERS TrigMonitorBase
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps GaudiKernel AthenaMonitoringLib TrigInterfacesLib )
LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaBaseComps AthenaMonitoringLib GaudiKernel TrigInterfacesLib )
atlas_add_component( TrigMonitorBase
src/components/*.cxx
......@@ -32,5 +23,4 @@ atlas_add_test( LBNHist_test
LINK_LIBRARIES TrigMonitorBaseLib )
# Install files from the package:
atlas_install_python_modules( python/__init__.py python/TrigGenericMonitoringToolConfig.py )
atlas_install_python_modules( python/*.py )
################################################################################
# Package: TrigMuonMonitoring
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigMuonMonitoring )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Trigger/TrigAnalysis/TrigAnalysisInterfaces
Trigger/TrigEvent/TrigInDetEvent
Trigger/TrigEvent/TrigMuonEvent
Trigger/TrigMonitoring/TrigHLTMonitoring
PRIVATE
Control/AthenaMonitoring
Event/EventInfo
Event/xAOD/xAODMuon
Event/xAOD/xAODPrimitives
Event/xAOD/xAODTracking
Event/xAOD/xAODTrigMuon
Event/xAOD/xAODTrigger
GaudiKernel
PhysicsAnalysis/AnalysisTrigger/AnalysisTriggerEvent
Reconstruction/MuonIdentification/muonEvent
Tracking/TrkEvent/VxVertex
Trigger/TrigAnalysis/TrigDecisionTool
Trigger/TrigAnalysis/TrigObjectMatching
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigSteer/DecisionHandling )
# External dependencies:
find_package( Boost )
find_package( CLHEP )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint Graf Graf3d Gpad Html Postscript Gui GX11TTF GX11 )
find_package( ROOT COMPONENTS Core MathCore )
# Component(s) in the package:
atlas_add_component( TrigMuonMonitoring
src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} TrigInDetEvent TrigMuonEvent TrigHLTMonitoringLib
AthenaMonitoringLib TrigDecisionToolLib TrigObjectMatchingLib EventInfo xAODMuon xAODPrimitives
xAODTracking xAODTrigMuon xAODTrigger GaudiKernel AnalysisTriggerEvent muonEvent VxVertex
TrigConfHLTData TrigSteeringEvent DecisionHandlingLib )
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
LINK_LIBRARIES ${CLHEP_LIBRARIES} ${ROOT_LIBRARIES} AnalysisTriggerEvent AthenaMonitoringLib EventInfo GaudiKernel StoreGateLib TrigAnalysisInterfaces TrigConfHLTData TrigDecisionToolLib TrigHLTMonitoringLib TrigMuonEvent TrigObjectMatchingLib TrigSteeringEvent VxVertex muonEvent xAODMuon xAODPrimitives xAODTracking xAODTrigMuon xAODTrigger xAODTruth )
# Install files from the package:
atlas_install_python_modules( python/*.py )
......
################################################################################
# Package: TrigSteerMonitor
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigSteerMonitor )
# Declare the package's dependencies:
atlas_depends_on_subdirs(
PRIVATE
GaudiKernel
Control/AthenaInterprocess
Control/AthenaKernel
Control/AthenaMonitoring
Event/EventInfo
Trigger/TrigConfiguration/TrigConfInterfaces
Trigger/TrigDataAccess/TrigDataAccessMonitoring
Trigger/TrigMonitoring/TrigMonitorBase
Trigger/TrigSteer/TrigSteering
Trigger/TrigSteer/DecisionHandling
Trigger/TrigSteer/TrigCompositeUtils
Control/StoreGate
Event/xAOD/xAODEventInfo
MagneticField/MagFieldInterfaces
LumiBlock/LumiBlockData
Trigger/TrigConfiguration/TrigConfHLTData
Trigger/TrigConfiguration/TrigConfData
Trigger/TrigConfiguration/TrigConfL1Data
Trigger/TrigEvent/TrigNavigation
Trigger/TrigEvent/TrigSteeringEvent
Trigger/TrigSteer/TrigInterfaces
Trigger/TrigT1/TrigT1Interfaces
Trigger/TrigT1/TrigT1Result )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( ROOT COMPONENTS Core Tree MathCore Hist )
find_package( tdaq-common )
# Component(s) in the package:
atlas_add_component( TrigSteerMonitor
src/*.h src/*.cxx src/components/*.cxx
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
${TDAQ-COMMON_INCLUDE_DIRS}
PRIVATE_LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES}
${TDAQ-COMMON_LIBRARIES} AthenaInterprocess AthenaKernel AthenaMonitoringLib EventInfo
GaudiKernel TrigDataAccessMonitoringLib TrigMonitorBaseLib TrigSteeringLib
StoreGateLib MagFieldInterfaces LumiBlockData TrigConfHLTData TrigConfData
TrigConfL1Data TrigNavigationLib TrigSteeringEvent TrigInterfacesLib
TrigT1Interfaces TrigT1Result DecisionHandlingLib TrigCompositeUtilsLib )
INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${TDAQ-COMMON_INCLUDE_DIRS}
LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} ${TDAQ-COMMON_LIBRARIES} AthenaBaseComps AthenaInterprocess AthenaKernel AthenaMonitoringKernelLib AthenaMonitoringLib EventInfo GaudiKernel StoreGateLib TrigCompositeUtilsLib TrigConfData TrigConfHLTData TrigConfInterfaces TrigConfL1Data TrigDataAccessMonitoringLib TrigInterfacesLib TrigMonitorBaseLib TrigNavigationLib TrigSteeringEvent TrigSteeringLib TrigT1Interfaces TrigT1Result xAODEventInfo xAODTrigger )
# Install files from the package:
atlas_install_python_modules( python/*.py )
################################################################################
# Package: TrigTimeMonitor
################################################################################
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrigTimeMonitor )
# Declare the package's dependencies:
atlas_depends_on_subdirs( PUBLIC
Control/AthenaMonitoring
GaudiKernel
Trigger/TrigMonitoring/TrigMonitorBase
Trigger/TrigTools/TrigTimeAlgs )
# External dependencies:
find_package( Boost COMPONENTS filesystem thread system )
find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
find_package( Boost COMPONENTS regex )
find_package( ROOT COMPONENTS Core MathCore Hist )
# Component(s) in the package:
atlas_add_component( TrigTimeMonitor
......@@ -24,7 +15,4 @@ atlas_add_component( TrigTimeMonitor
LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaMonitoringLib GaudiKernel TrigMonitorBaseLib TrigTimeAlgsLib )
# Install files from the package:
atlas_install_headers( TrigTimeMonitor )
atlas_install_python_modules( python/*.py )
atlas_install_joboptions( share/jobOfragment_TrigTimeMonitor.py )
#**************************************************************
#
# jopOptions file for Benchmarking using TrigTimeMonitor
#
#==============================================================
theApp.Dlls +=["TrigTimeMonitor" ]
theApp.Dlls += [ "AthenaMonitoring" ]
# In order to run the tools they must be inserted in the
# algorithms AthenaMon is one of those which run
# just tools inserted in it
#theApp.topAlg += [ "AthenaMon/AthenaMonForTime" ]
#AthenaMonForTime = Algorithm( "AthenaMonForTime" )
##############################################################
# Save timers in the N-tuple
#
#AthenaMonForTime.AthenaMonTools += ["TrigTimeTreeTool" ]
#TrigTimeTreeTool = Algorithm('ToolSvc.TrigTimeTreeTool')
# Here you change booking path
#
# TrigTimeTreeTool.BookingDir = "/EXMON/TrigTimeTree/"
#
# use this to save certain time marks
#
#TrigTimeTreeTool.Key = "sometimername"
#
# To record absolute time marks
# TrigTimeTreeTool.DoStamps = True
#
##############################################################
# Save timers in form of histograms
#
#AthenaMonForTime.AthenaMonTools += ["TrigTimeHistTool" ]
#TrigTimeHistTool = Algorithm('ToolSvc.TrigTimeHistTool')
# Here you change booking path
#
# TrigTimeHistTool.BookingDir = "/EXMON/AlgorithmsPerformanceHist/"
#
#
#TrigTimeTreeTool.Key = ""
#
# number of bins and limits of the histogram
#
#TrigTimeHistTool.NumberOfHistBins = 50
#TrigTimeHistTool.TimerHistLimits = [0, 200]
# for histograms made from timer/proprty value
# sort of "per object" timing
#
# it also can be used to histogram under certain condition.
# Namely enabling it and setting property value to 1
# for interesting events will yield the histogram with all
# events in (default one, defined above) and
# histogram with interesting events in timing per object histogram
#
#TrigTimeHistTool.DoPerObjHist = True
#TrigTimeHistTool.TimerPerObjHistLimits = [0, 200]
/**
* @autor Tomasz.Bold@cern.ch
* @brief NetLogger output generation script
* This is a ROOT script (which can be compiled).
* It produces a text file which can be read in by the "nlv"
* NetLogger visyalisation tool.
* It should be tun as in example below:
* root -l -b to_netlog.C $rootfile "TIMER_NTUPLES/Lvl1Conversion_L2" Lvl1Conversion_L2.netlog
* where:
* root -l -b -- is standard ROOT execution without splash screen (-l) in batch (-b)
* "TIMER_NTUPLES/Lvl1Conversion_L2" -- is full name of the timing tree in the file
* Lvl1Conversion_L2.netlog -- is a output file name
*/
#include <TTree.h>
#include <TApplication.h>
#include <iostream>
#include <fstream>
// format date
TString datestring ( UInt_t* t) {
char buf[50];
strftime(buf, 50, "%Y%m%d%H%M%S", localtime((time_t*)t));
TString s;
s.Form("DATE=%s.%06d",buf, t[1]);
return s;
}
// process given tree
bool process(TTree *tt, const char* fname)
{
TObjArray brAbs;
TIter next(tt->GetListOfBranches());
TBranch::ResetCount();
TBranch *branch;
while ((branch = (TBranch*)next())) {
// TString contains maybe?
TString brname = branch->GetName();
if ( brname.Index("absolute", 8) != kNPOS ) {
brAbs.Add(branch);
}
}
if ( brAbs.GetSize() == 0 ) {
cerr << "No absolute time stamps available in this tree" << endl;
return false;
}
// allocate an array of timval
UInt_t **tvArray = new UInt_t*[brAbs.GetEntries()];
// fix addressing
int i;
for ( i = 0 ; i < brAbs.GetEntries(); i++ ) {
tvArray[i] = new UInt_t [4];
tt->SetBranchAddress( brAbs.At(i)->GetName(), tvArray[i] );
// cout << brAbs.At(i)->GetName() << endl;
}
// handle presence of Lvl1Id
//
int isPassInfo = 0;
Int_t passInfo[2];
Int_t &Lvl1Id = passInfo[0];
Int_t &RoIId = passInfo[1];
if ( tt->GetBranch("PassInfo") ) {
tt->SetBranchAddress("PassInfo", &passInfo );
isPassInfo = 1;
cerr << "PassInfo (Lvl1Id & RoIId) available" << endl;
}
// ouput file
ofstream fout;
fout.open(fname);
Long64_t nEntries = tt->GetEntries();
TString s;
for ( Long64_t event = 0; event < nEntries; event++ ) {
tt->GetEntry(event);
for ( i = 0 ; i < brAbs.GetEntries(); i++ ) {
s.Resize(0);
s += datestring(tvArray[i]);
s += " NL.EVNT=START_";
s += brAbs.At(i)->GetName();
if ( isPassInfo ) {
s += " NL.Lvl1Id=";
s += Lvl1Id;
s += " NL.RoIId=";
s += RoIId;
}
fout << s << endl;
s.Resize(0);
s += datestring(&tvArray[i][2]);
s += " NL.EVNT=STOP_";
s += brAbs.At(i)->GetName();
if ( isPassInfo ) {
s += " NL.Lvl1Id=";
s += Lvl1Id;
s += " NL.RoIId=";
s += RoIId;
}
fout << s << endl;
}
}
return true;
}
// main of this script
// preparation, file opening, tree access etc.
void to_netlog() {
using namespace std;
cerr << "Opening file: " << gApplication->Argv()[gApplication->Argc()-3] << " ";
TFile f(gApplication->Argv()[gApplication->Argc()-3]);
if ( f.IsOpen() )
cerr << "Success" << endl;
else {
cerr << "Failed, check file name and path, exitting now ..." << endl;
gROOT->ProcessLine(".q");
}
cerr << "Getting TTree: " << gApplication->Argv()[gApplication->Argc()-2] << " ";
TTree *t = (TTree*)f.Get(gApplication->Argv()[gApplication->Argc()-2]);
if ( t )
if ( t->Class() == TTree::Class() )
cerr << "Success" << endl;
else {
cerr << "Failed, " << gApplication->Argv()[gApplication->Argc()-2] <<" not a TTree, exitting now ..." << endl;
gROOT->ProcessLine(".q");
}
else {
cerr << "Failed, check the name and path, exitting now ..." << endl;
gROOT->ProcessLine(".q");
}
// gROOT->ProcessLine(".L to_netlog.C+");
cerr << "Producing output to file: " << gApplication->Argv()[gApplication->Argc()-1] << endl;
process(t, gApplication->Argv()[gApplication->Argc()-1]);
gROOT->ProcessLine(".q");
}
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