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