ATLAS Offline Software
Functions
python.MuonConfigUtils Namespace Reference

Functions

def SetupMuonStandaloneConfigFlags (default_input=['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/ESD.16747874._000011_100events.pool.root'])
 
def SetupMuonStandaloneCA (args, flags)
 
def SetupMuonStandaloneOutput (cfg, flags, itemsToRecord)
 

Function Documentation

◆ SetupMuonStandaloneCA()

def python.MuonConfigUtils.SetupMuonStandaloneCA (   args,
  flags 
)

Definition at line 41 of file MuonConfigUtils.py.

41 def SetupMuonStandaloneCA(args,flags):
42  # When running from a pickled file, athena inserts some services automatically. So only use this if running now.
43  if not args.config_only:
44  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
45  cfg = MainServicesCfg(flags)
46  msgService = cfg.getService('MessageSvc')
47  msgService.Format = "S:%s E:%e % F%128W%S%7W%R%T %0W%M"
48  else:
50 
51  from AthenaConfiguration.Enums import Format
52  if flags.Input.Format is Format.POOL:
53  from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
54  cfg.merge(PoolReadCfg(flags))
55  else:
56  from MuonConfig.MuonBytestreamDecodeConfig import MuonByteStreamDecodersCfg
57  cfg.merge(MuonByteStreamDecodersCfg(flags))
58 
59  if flags.Input.isMC:
60  from xAODTruthCnv.xAODTruthCnvConfig import GEN_AOD2xAODCfg
61  cfg.merge(GEN_AOD2xAODCfg(flags))
62 
63  return cfg
64 

◆ SetupMuonStandaloneConfigFlags()

def python.MuonConfigUtils.SetupMuonStandaloneConfigFlags (   default_input = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/ESD.16747874._000011_100events.pool.root'])
Setup flags necessary for Muon standalone.

Definition at line 6 of file MuonConfigUtils.py.

6 def SetupMuonStandaloneConfigFlags( default_input = ['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/ESD.16747874._000011_100events.pool.root']):
7  """
8  Setup flags necessary for Muon standalone.
9  """
10  from AthenaConfiguration.AllConfigFlags import initConfigFlags
11  flags = initConfigFlags()
12  flags.Detector.GeometryMDT = True
13  flags.Detector.GeometryTGC = True
14 
15  flags.Detector.GeometryRPC = True
16  # TODO: disable these for now, to be determined if needed
17  flags.Detector.GeometryCalo = False
18  flags.Detector.GeometryID = False
19 
20  # FIXME This is temporary. I think it can be removed with some other refactoring
21  flags.Muon.makePRDs = False
22 
23  flags.Exec.MaxEvents = 20 # Set default to 20 if not overridden
24  args = flags.fillFromArgs()
25 
26  if flags.Input.Files == ['_ATHENA_GENERIC_INPUTFILE_NAME_'] :
27  # If something is set from an arg (i.e. the command line), this takes priority
28  flags.Input.Files = default_input
29 
30  from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
31  setupDetectorFlags(flags)
32 
33  if flags.Output.ESDFileName == '':
34  flags.Output.ESDFileName='newESD.pool.root'
35  else:
36  print('ESD = ', flags.Output.ESDFileName )
37  flags.lock()
38  flags.dump()
39  return args, flags
40 

◆ SetupMuonStandaloneOutput()

def python.MuonConfigUtils.SetupMuonStandaloneOutput (   cfg,
  flags,
  itemsToRecord 
)

Definition at line 65 of file MuonConfigUtils.py.

65 def SetupMuonStandaloneOutput(cfg, flags, itemsToRecord):
66  # Set up output
67  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg, outputStreamName
68 
69  cfg.merge( OutputStreamCfg( flags, 'ESD', ItemList=itemsToRecord) )
70  outstream = cfg.getEventAlgo(outputStreamName("ESD"))
71  outstream.ForceRead = True
72 
73  # Fix for ATLASRECTS-5151
74  from TrkEventCnvTools.TrkEventCnvToolsConfig import (
75  TrkEventCnvSuperToolCfg)
76  cfg.merge(TrkEventCnvSuperToolCfg(flags))
77 
AthenaPoolExample_WriteCond.outputStreamName
string outputStreamName
Definition: AthenaPoolExample_WriteCond.py:21
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
xAODTruthCnvConfig.GEN_AOD2xAODCfg
def GEN_AOD2xAODCfg(flags, name="GEN_AOD2xAOD", **kwargs)
Definition: xAODTruthCnvConfig.py:20
python.MuonConfigUtils.SetupMuonStandaloneCA
def SetupMuonStandaloneCA(args, flags)
Definition: MuonConfigUtils.py:41
python.TrkEventCnvToolsConfig.TrkEventCnvSuperToolCfg
def TrkEventCnvSuperToolCfg(flags, name='EventCnvSuperTool', **kwargs)
Definition: TrkEventCnvToolsConfig.py:51
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.DetectorConfigFlags.setupDetectorFlags
def setupDetectorFlags(flags, custom_list=None, use_metadata=False, toggle_geometry=False, validate_only=False, keep_beampipe=False)
Definition: DetectorConfigFlags.py:289
python.MuonConfigUtils.SetupMuonStandaloneOutput
def SetupMuonStandaloneOutput(cfg, flags, itemsToRecord)
Definition: MuonConfigUtils.py:65
python.MuonConfigUtils.SetupMuonStandaloneConfigFlags
def SetupMuonStandaloneConfigFlags(default_input=['/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/RecExRecoTest/ESD.16747874._000011_100events.pool.root'])
Definition: MuonConfigUtils.py:6
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
python.PoolReadConfig.PoolReadCfg
def PoolReadCfg(flags)
Definition: PoolReadConfig.py:69
python.MuonBytestreamDecodeConfig.MuonByteStreamDecodersCfg
def MuonByteStreamDecodersCfg(flags)
Definition: MuonBytestreamDecodeConfig.py:400