ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExBasics
python
ReadTriggerDecisionConfig.py
Go to the documentation of this file.
1
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
2
# Configure the ReadTriggerDecision algorithm
3
# For guidelines on writing configuration scripts see the following pages:
4
# https://atlas-software.docs.cern.ch/athena/configuration/
5
6
# Imports of the configuration machinery
7
from
AthenaConfiguration.ComponentFactory
import
CompFactory
8
from
AthenaConfiguration.ComponentAccumulator
import
ComponentAccumulator
9
10
def
ReadTriggerDecisionCfg
(flags):
11
'''Method to configure the ReadTriggerDecision algorithm'''
12
acc = ComponentAccumulator()
13
14
# Trigger decision tool configuration
15
# https://twiki.cern.ch/twiki/bin/viewauth/Atlas/TrigDecisionTool
16
from
TrigDecisionTool.TrigDecisionToolConfig
import
TrigDecisionToolCfg
17
tdt = acc.getPrimaryAndMerge(TrigDecisionToolCfg(flags))
18
19
# Configure the algorithm.... note that the tool from above is passed
20
# Then add the algorithm to the accumulator
21
acc.addEventAlgo(CompFactory.ReadTriggerDecision(name =
"ReadTriggerDecision"
,
22
TriggerName =
"HLT_e5_idperf_tight_L1EM3"
,
23
TriggerDecisionTool = tdt))
24
return
acc
25
26
# Lines to allow the script to be run stand-alone via python
27
if
__name__ ==
"__main__"
:
28
29
from
AthenaConfiguration.MainServicesConfig
import
MainServicesCfg
30
from
AthenaConfiguration.AllConfigFlags
import
initConfigFlags
31
import
sys
32
# Configuration flags
33
flags = initConfigFlags()
34
# Obtain default test files (user can provide their own as well)
35
from
AthenaConfiguration.TestDefaults
import
defaultTestFiles
36
37
# Set the input file - can also use command line via --files
38
flags.Input.Files = defaultTestFiles.AOD_RUN3_MC
39
40
# Number of events to process
41
flags.Exec.MaxEvents = 1000
42
flags.fillFromArgs()
43
flags.lock()
44
45
# Configure the file reading machinery
46
cfg = MainServicesCfg(flags)
47
from
AthenaPoolCnvSvc.PoolReadConfig
import
PoolReadCfg
48
cfg.merge(PoolReadCfg(flags))
49
50
# Run the job
51
cfg.merge(
ReadTriggerDecisionCfg
(flags))
52
sys.exit(cfg.run().isFailure())
53
ReadTriggerDecisionConfig.ReadTriggerDecisionCfg
ReadTriggerDecisionCfg(flags)
Definition
ReadTriggerDecisionConfig.py:10
Generated on
for ATLAS Offline Software by
1.17.0