ATLAS Offline Software
Trigger
TrigMonitoring
TrigTauMonitoring
python
TrigTauMonitorAlgorithm.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
3
def
TrigTauMonConfig
(inputFlags):
4
'''Function to configures some algorithms in the monitoring system.'''
5
6
# The following class will make a sequence, configure algorithms, and link
7
# them to GenericMonitoringTools
8
from
AthenaMonitoring
import
AthMonitorCfgHelper
9
helper = AthMonitorCfgHelper(inputFlags,
'TrigTauAthMonitorCfg'
)
10
11
from
TrigTauMonitoring.TrigTauMonitoringConfig
import
TrigTauMonAlgBuilder
12
monAlgCfg = TrigTauMonAlgBuilder( helper )
13
# build monitor and book histograms
14
monAlgCfg.configure()
15
16
21
return
helper.result()
22
23
if
__name__==
'__main__'
:
24
# Setup logs
25
from
AthenaCommon.Logging
import
log
26
from
AthenaCommon.Constants
import
DEBUG
27
log.setLevel(DEBUG)
28
29
# Set the Athena configuration flags
30
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
31
nightly =
'/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/'
32
file =
'data22/AOD/data22_13p6TeV.00431906.physics_Main.merge.AOD.r13928_p5279/1000events.AOD.30220215._001367.pool.root.1'
33
flags =
initConfigFlags
()
34
flags.Input.Files = [nightly+file]
35
flags.Input.isMC =
False
36
flags.Output.HISTFileName =
'TrigTauMonitorOutput.root'
37
38
flags.lock()
39
40
# Initialize configuration object, add accumulator, merge, and run.
41
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
42
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
43
cfg =
MainServicesCfg
(flags)
44
cfg.merge(
PoolReadCfg
(flags))
45
46
trigTauMonitorAcc =
TrigTauMonConfig
(flags)
47
cfg.merge(trigTauMonitorAcc)
48
49
# If you want to turn on more detailed messages ...
50
#trigJetMonitorAcc.getEventAlgo('TrigTauMonAlg').OutputLevel = 2 # DEBUG
51
cfg.printConfig(withDetails=
True
)
# set True for exhaustive info
52
53
sc = cfg.run()
#use cfg.run(20) to only run on first 20 events
54
if
not
sc.isSuccess():
55
import
sys
56
sys.exit(
"Execution failed"
)
57
58
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition:
MainServicesConfig.py:260
Constants
some useful constants -------------------------------------------------—
python.TrigTauMonitorAlgorithm.TrigTauMonConfig
def TrigTauMonConfig(inputFlags)
Definition:
TrigTauMonitorAlgorithm.py:3
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition:
AllConfigFlags.py:19
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition:
PoolReadConfig.py:69
Generated on Sun Dec 22 2024 21:21:22 for ATLAS Offline Software by
1.8.18