6 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
12 if 'outputlevel' not in configMy.jobConfig: configMy.jobConfig[
'outputlevel'] = 3
13 if 'maxEvents' not in configMy.jobConfig: configMy.jobConfig[
'maxEvents'] = -1
14 if 'skipEvents' not in configMy.jobConfig: configMy.jobConfig[
'skipEvents'] = 0
15 if 'MsgLimit' not in configMy.jobConfig: configMy.jobConfig[
'MsgLimit'] = 20
17 if 'outputfileprefix' not in configMy.jobConfig: configMy.jobConfig[
'outputfileprefix'] =
''
18 if 'outputfile' not in configMy.jobConfig: configMy.jobConfig[
'outputfile'] = configMy.jobConfig[
'outputfileprefix']+
'beamspot.db'
19 if 'histfile' not in configMy.jobConfig: configMy.jobConfig[
'histfile'] = configMy.jobConfig[
'outputfileprefix']+
'nt.root'
20 if 'monfile' not in configMy.jobConfig: configMy.jobConfig[
'monfile'] = configMy.jobConfig[
'outputfileprefix']+
'beamspotmonitoring.root'
21 if 'jobpostprocsteps' not in configMy.jobConfig: configMy.jobConfig[
'jobpostprocsteps'] =
'MergeNt PlotBeamSpot LinkResults AveBeamSpot DQBeamSpot'
24 if 'beamspottag' not in configMy.jobConfig: configMy.jobConfig[
'beamspottag'] =
''
25 if 'MinTracksPerVtx' not in configMy.jobConfig: configMy.jobConfig[
'MinTracksPerVtx'] = 5
26 if 'MinTrackPt' not in configMy.jobConfig: configMy.jobConfig[
'MinTrackPt'] = 500.
27 if 'useBeamSpot' not in configMy.jobConfig:
29 configMy.jobConfig[
'useBeamSpot'] = configMy.jobConfig.get(
'beamspottag',
'')!=
'' or configMy.jobConfig.get(
'beamspotfile',
'')!=
''
32 print(
"Job configuration: ")
33 for option
in configMy.jobConfig:
34 print(
" ",option,
': ',configMy.jobConfig[option])
37 flags.Exec.OutputLevel = configMy.jobConfig[
'outputlevel']
38 flags.Exec.SkipEvents = configMy.jobConfig[
'skipEvents']
39 flags.Exec.MaxEvents = configMy.jobConfig[
'maxEvents']
41 flags.Input.Files = []
42 for path
in configMy.jobConfig[
'inputfiles']:
44 print(
"glob: ",glob(path))
45 flags.Input.Files += glob(path)
47 flags.Trigger.triggerConfig =
"DB"
48 flags.DQ.enableLumiAccess =
False
49 flags.Output.HISTFileName = configMy.jobConfig[
'monfile']
50 flags.Exec.EventPrintoutInterval = 10000
54 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
56 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
58 acc.getService(
"MessageSvc").defaultLimit = configMy.jobConfig[
'MsgLimit']
60 if configMy.jobConfig[
'beamspottag']:
61 from IOVDbSvc.IOVDbSvcConfig
import addOverride
62 acc.merge(
addOverride(flags,
"/Indet/Beampos", configMy.jobConfig[
'beamspottag']))
64 from AthenaMonitoring
import AthMonitorCfgHelper
65 helper = AthMonitorCfgHelper(flags,
"BeamSpotMonitoring")
66 from InDetGlobalMonitoringRun3Test.InDetGlobalBeamSpotMonAlgCfg
import (
67 InDetGlobalBeamSpotMonAlgCfg )
69 acc.merge(helper.result())
71 acc.printConfig(withDetails=
True)
78 sys.exit(
not sc.isSuccess())