 |
ATLAS Offline Software
|
◆ configureCondTag()
| def MuonConfigUtils.configureCondTag |
( |
|
flags | ) |
|
Definition at line 23 of file MuonConfigUtils.py.
24 if not flags.GeoModel.AtlasVersion:
25 raise ValueError(
"No ATLAS version is configured")
27 from AthenaConfiguration.Enums
import LHCPeriod
28 from AthenaConfiguration.TestDefaults
import defaultConditionsTags
29 if flags.GeoModel.Run == LHCPeriod.Run2:
30 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN2_MC
if flags.Input.isMC
else defaultConditionsTags.RUN2_DATA
31 elif flags.GeoModel.Run == LHCPeriod.Run3:
32 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN3_MC
if flags.Input.isMC
else defaultConditionsTags.RUN3_DATA
33 elif flags.GeoModel.Run == LHCPeriod.Run4:
34 flags.IOVDb.GlobalTag = defaultConditionsTags.RUN4_MC
36 raise ValueError(f
"Invalid run period {flags.GeoModel.Run}")
◆ executeTest()
| def MuonConfigUtils.executeTest |
( |
|
cfg | ) |
|
Definition at line 19 of file MuonConfigUtils.py.
20 cfg.printConfig(withDetails=
True, summariseProps=
True)
21 if not cfg.run().isSuccess():
exit(1)
◆ setupHistSvcCfg()
| def MuonConfigUtils.setupHistSvcCfg |
( |
|
flags, |
|
|
str |
outFile, |
|
|
str |
outStream |
|
) |
| |
Configuration snippet to setup the THistSvc.
Definition at line 5 of file MuonConfigUtils.py.
6 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
9 raise ValueError(
"The output file must not be empty")
10 if len(outStream) == 0:
11 raise ValueError(
"The outstream must not be empty")
13 from AthenaConfiguration.ComponentFactory
import CompFactory
14 histSvc = CompFactory.THistSvc(Output=[f
"{outStream} DATAFILE='{outFile}', OPT='RECREATE'"])
15 print(f
"Register new stream {outStream} piped to {outFile}")
16 result.addService(histSvc, primary=
True)
◆ SetupMuonStandaloneCA()
| def MuonConfigUtils.SetupMuonStandaloneCA |
( |
|
flags | ) |
|
Definition at line 83 of file MuonConfigUtils.py.
86 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
88 msgService = cfg.getService(
'MessageSvc')
89 msgService.Format =
"S:%s E:%e % F%128W%S%7W%R%T %0W%M"
90 msgService.debugLimit = 2147483647
91 msgService.verboseLimit = 2147483647
92 msgService.infoLimit = 2147483647
95 from AthenaConfiguration.Enums
import Format
96 if not flags.Input.Files:
99 elif flags.Input.Format
is Format.POOL:
100 from AthenaPoolCnvSvc.PoolReadConfig
import PoolReadCfg
102 elif flags.Input.Format == Format.BS:
103 from ByteStreamCnvSvc.ByteStreamConfig
import ByteStreamReadCfg
107 if (
"TruthEvents" in flags.Input.Collections):
108 from xAODTruthCnv.RedoTruthLinksConfig
import RedoTruthLinksAlgCfg
110 elif (
"TruthEvent" in flags.Input.Collections):
111 from xAODTruthCnv.xAODTruthCnvConfig
import GEN_AOD2xAODCfg
115 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
117 from MuonConfig.MuonGeometryConfig
import MuonIdHelperSvcCfg
◆ SetupMuonStandaloneConfigFlags()
| def MuonConfigUtils.SetupMuonStandaloneConfigFlags |
( |
| ) |
|
Setup flags necessary for Muon standalone.
Definition at line 38 of file MuonConfigUtils.py.
40 Setup flags necessary for Muon standalone.
42 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
44 flags.Detector.GeometryMDT =
True
45 flags.Detector.GeometryTGC =
True
47 flags.Detector.GeometryRPC =
True
49 flags.Detector.GeometryCalo =
False
50 flags.Detector.GeometryID =
False
53 flags.Muon.makePRDs =
False
55 flags.Exec.MaxEvents = 20
56 flags.Scheduler.ShowDataDeps =
True
57 flags.Scheduler.CheckDependencies =
True
58 flags.Scheduler.ShowDataFlow =
True
59 flags.Scheduler.ShowControlFlow =
True
60 flags.Concurrency.NumThreads = 1
61 flags.Concurrency.NumConcurrentEvents = 1
66 if flags.Input.Files == [
'_ATHENA_GENERIC_INPUTFILE_NAME_']
or len(flags.Input.Files) == 0:
68 from AthenaConfiguration.TestDefaults
import defaultTestFiles
69 flags.Input.Files = defaultTestFiles.ESD_RUN3_MC
73 from AthenaConfiguration.DetectorConfigFlags
import setupDetectorFlags
76 if flags.Output.ESDFileName ==
'':
77 flags.Output.ESDFileName=
'newESD.pool.root'
80 flags.dump(evaluate =
True)
◆ SetupMuonStandaloneOutput()
| def MuonConfigUtils.SetupMuonStandaloneOutput |
( |
|
cfg, |
|
|
|
flags, |
|
|
|
itemsToRecord |
|
) |
| |
Definition at line 122 of file MuonConfigUtils.py.
124 from OutputStreamAthenaPool.OutputStreamConfig
import OutputStreamCfg, outputStreamName
128 outstream.ForceRead =
True
131 from TrkEventCnvTools.TrkEventCnvToolsConfig
import (
132 TrkEventCnvSuperToolCfg)
def OutputStreamCfg(flags, streamName, ItemList=None, MetadataItemList=None, disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, keepProvenanceTagsRegEx=None, AcceptAlgs=None, HelperTools=None)
def MuonIdHelperSvcCfg(flags)
def GEN_AOD2xAODCfg(flags, name="GEN_AOD2xAOD", **kwargs)
def ByteStreamReadCfg(flags, type_names=None)
def RedoTruthLinksAlgCfg(flags)
def MuonGeoModelCfg(flags)
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
def SetupMuonStandaloneConfigFlags()
void print(char *figname, TCanvas *c1)
def configureCondTag(flags)
def SetupMuonStandaloneCA(flags)
def SetupMuonStandaloneOutput(cfg, flags, itemsToRecord)
def setupDetectorFlags(flags, custom_list=None, use_metadata=False, toggle_geometry=False, validate_only=False, keep_beampipe=False)
def setupHistSvcCfg(flags, str outFile, str outStream)
Configuration snippet to setup the THistSvc.