ATLAS Offline Software
Loading...
Searching...
No Matches
TrigBphysMonitorAlgorithm.py
Go to the documentation of this file.
2# Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3#
4
5def TrigBphysMonConfig(inputFlags):
6 '''Function to configures some algorithms in the monitoring system.'''
7
8 # The following class will make a sequence, configure algorithms, and link
9 # them to GenericMonitoringTools
10 from AthenaMonitoring import AthMonitorCfgHelper
11 helper = AthMonitorCfgHelper(inputFlags,'TrigBphysAthMonitorCfg')
12
13 from TrigBphysMonitoring.TrigBphysMonitoringConfig import TrigBphysMonAlgBuilder
14 monAlgCfg = TrigBphysMonAlgBuilder( helper, useMonGroups = True )
15
16 # build monitor and book histograms
17 monAlgCfg.configure()
18
19 return helper.result()
20
21
22if __name__=='__main__':
23 # Set the Athena configuration flags
24 from AthenaConfiguration.AllConfigFlags import initConfigFlags
25 nightly = '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs/'
26 file = 'data16_13TeV.00311321.physics_Main.recon.AOD.r9264/AOD.11038520._000001.pool.root.1'
27
28 flags = initConfigFlags()
29 flags.Input.Files = [nightly+file]
30 flags.Input.isMC = False
31 flags.Output.HISTFileName = 'TrigBphysMonitorOutput.root'
32
33 flags.lock()
34
35 # Initialize configuration object, add accumulator, merge, and run.
36 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
37 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
38 cfg = MainServicesCfg(flags)
39 cfg.merge(PoolReadCfg(flags))
40
41 trigBphysMonitorAcc = TrigBphysMonConfig(flags)
42 cfg.merge(trigBphysMonitorAcc)
43
44 # If you want to turn on more detailed messages ...
45 #trigBphysMonitorAcc.getEventAlgo('TrigBphysMonAlg').OutputLevel = 2 # DEBUG
46 cfg.printConfig(withDetails=True) # set True for exhaustive info
47
48 cfg.run() #use cfg.run(20) to only run on first 20 events
49