ATLAS Offline Software
Functions | Variables
python.BStoRDO_Skeleton Namespace Reference

Functions

def fromRunArgs (runArgs)
 

Variables

 jobPropertiesDisallowed
 

Function Documentation

◆ fromRunArgs()

def python.BStoRDO_Skeleton.fromRunArgs (   runArgs)

Definition at line 14 of file BStoRDO_Skeleton.py.

14 def fromRunArgs(runArgs):
15  from AthenaCommon.Logging import logging
16  log = logging.getLogger('BStoRDO')
17  log.info('****************** STARTING BStoRDO *****************')
18 
19  log.info('**** Transformation run arguments')
20  log.info(str(runArgs))
21 
22  log.info('**** Setting-up configuration flags')
23  from AthenaConfiguration.AllConfigFlags import initConfigFlags
24  flags = initConfigFlags()
25 
26  commonRunArgsToFlags(runArgs, flags)
27 
28  flags.Common.ProductionStep = ProductionStep.MinbiasPreprocessing
29 
30  flags.Reco.EnableHI = True
31  flags.Reco.HIMode = HIMode.HI
32  flags.Tracking.doCaloSeededAmbi = False
33  flags.Tracking.doCaloSeededBrem = False
34 
35  # This is for data overlay
36  flags.Overlay.DataOverlay = True
37  flags.Overlay.ByteStream = True
38 
39  # Setting input/output files
40  if hasattr(runArgs, 'inputBSFile'):
41  flags.Input.Files = runArgs.inputBSFile
42  else:
43  raise ValueError('No input BS file defined')
44 
45  if hasattr(runArgs, 'outputRDO_BKGFile'):
46  flags.Output.RDOFileName = runArgs.outputRDO_BKGFile
47  else:
48  raise RuntimeError('No output RDO file defined')
49 
50  # Autoconfigure enabled subdetectors
51  if hasattr(runArgs, 'detectors'):
52  detectors = runArgs.detectors
53  else:
54  detectors = None
55 
56  # Setup detector flags
57  from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
58  setupDetectorFlags(flags, detectors, use_metadata=True, toggle_geometry=True)
59 
60  # Setup perfmon flags from runargs
61  from PerfMonComps.PerfMonConfigHelpers import setPerfmonFlagsFromRunArgs
62  setPerfmonFlagsFromRunArgs(flags, runArgs)
63 
64  # Pre-include
65  processPreInclude(runArgs, flags)
66 
67  # Pre-exec
68  processPreExec(runArgs, flags)
69 
70  # To respect --athenaopts
71  flags.fillFromArgs()
72 
73  # Lock flags
74  flags.lock()
75 
76  itemList = [] # items to store in RDO
77  acceptAlgs = [] # skimming algs
78 
79  from AthenaConfiguration.MainServicesConfig import MainServicesCfg
80  cfg = MainServicesCfg(flags)
81 
82  from EventBookkeeperTools.EventBookkeeperToolsConfig import CutFlowSvcCfg
83  cfg.merge(CutFlowSvcCfg(flags))
84 
85  from ByteStreamCnvSvc.ByteStreamConfig import ByteStreamReadCfg
86  cfg.merge(ByteStreamReadCfg(flags))
87 
88  from LumiBlockComps.LumiBlockMuWriterConfig import LumiBlockMuWriterCfg
89  cfg.merge(LumiBlockMuWriterCfg(flags))
90 
91  if flags.Detector.EnableBCM:
92  from InDetOverlay.BCMOverlayConfig import BCMRawDataProviderAlgCfg
93  cfg.merge(BCMRawDataProviderAlgCfg(flags))
94  itemList.append(f'BCM_RDO_Container#{flags.Overlay.BkgPrefix}BCM_RDOs')
95 
96  if flags.Detector.EnablePixel:
97  from PixelRawDataByteStreamCnv.PixelRawDataByteStreamCnvConfig import PixelRawDataProviderAlgCfg
98  cfg.merge(PixelRawDataProviderAlgCfg(flags))
99  itemList.append(f'PixelRDO_Container#{flags.Overlay.BkgPrefix}PixelRDOs')
100  itemList.append('IDCInDetBSErrContainer#PixelByteStreamErrs')
101 
102  if flags.Detector.EnableSCT:
103  from SCT_RawDataByteStreamCnv.SCT_RawDataByteStreamCnvConfig import SCTRawDataProviderCfg, SCTEventFlagWriterCfg
104  cfg.merge(SCTRawDataProviderCfg(flags))
105  cfg.merge(SCTEventFlagWriterCfg(flags))
106  itemList.append(f'SCT_RDO_Container#{flags.Overlay.BkgPrefix}SCT_RDOs')
107  itemList.append('IDCInDetBSErrContainer#SCT_ByteStreamErrs')
108 
109  if flags.Detector.EnableTRT:
110  from TRT_RawDataByteStreamCnv.TRT_RawDataByteStreamCnvConfig import TRTRawDataProviderCfg
111  cfg.merge(TRTRawDataProviderCfg(flags))
112  itemList.append(f'TRT_RDO_Container#{flags.Overlay.BkgPrefix}TRT_RDOs')
113  itemList.append('TRT_BSErrContainer#TRT_ByteStreamErrs')
114 
115  if flags.Detector.EnableLAr:
116  from LArByteStream.LArRawDataReadingConfig import LArRawDataReadingCfg
117  cfg.merge(LArRawDataReadingCfg(flags))
118  itemList.append(f'LArDigitContainer#{flags.Overlay.BkgPrefix}LArDigitContainer_data')
119  itemList.append('LArFebHeaderContainer#LArFebHeader')
120 
121  if flags.Detector.EnableTile:
122  from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
123  cfg.merge(TileRawDataReadingCfg(flags, readMuRcv=False))
124  itemList.append(f'TileRawChannelContainer#{flags.Overlay.BkgPrefix}TileRawChannelCnt')
125  itemList.append(f'TileDigitsContainer#{flags.Overlay.BkgPrefix}TileDigitsCnt')
126 
127  if flags.Detector.EnableCSC:
128  from MuonConfig.MuonBytestreamDecodeConfig import CscBytestreamDecodeCfg
129  cfg.merge(CscBytestreamDecodeCfg(flags))
130  itemList.append(f'CscRawDataContainer#{flags.Overlay.BkgPrefix}CSCRDO')
131 
132  if flags.Detector.EnableMDT:
133  from MuonConfig.MuonBytestreamDecodeConfig import MdtBytestreamDecodeCfg
134  cfg.merge(MdtBytestreamDecodeCfg(flags))
135  itemList.append(f'MdtCsmContainer#{flags.Overlay.BkgPrefix}MDTCSM')
136 
137  if flags.Detector.EnableRPC:
138  from MuonConfig.MuonBytestreamDecodeConfig import RpcBytestreamDecodeCfg
139  cfg.merge(RpcBytestreamDecodeCfg(flags))
140  itemList.append(f'RpcPadContainer#{flags.Overlay.BkgPrefix}RPCPAD')
141 
142  if flags.Detector.EnableTGC:
143  from MuonConfig.MuonBytestreamDecodeConfig import TgcBytestreamDecodeCfg
144  cfg.merge(TgcBytestreamDecodeCfg(flags))
145  itemList.append(f'TgcRdoContainer#{flags.Overlay.BkgPrefix}TGCRDO')
146 
147  if flags.Detector.EnablesTGC:
148  from MuonConfig.MuonBytestreamDecodeConfig import sTgcBytestreamDecodeCfg
149  cfg.merge(sTgcBytestreamDecodeCfg(flags))
150  itemList.append(f'Muon::STGC_RawDataContainer#{flags.Overlay.BkgPrefix}sTGCRDO')
151 
152  if flags.Detector.EnableMM:
153  from MuonConfig.MuonBytestreamDecodeConfig import MmBytestreamDecodeCfg
154  cfg.merge(MmBytestreamDecodeCfg(flags))
155  itemList.append(f'Muon::MM_RawDataContainer#{flags.Overlay.BkgPrefix}MMRDO')
156 
157  if flags.Reco.EnableTracking:
158  from InDetConfig.TrackRecoConfig import InDetTrackRecoCfg
159  cfg.merge(InDetTrackRecoCfg(flags))
160  itemList.append(f'xAOD::VertexContainer#{flags.Overlay.BkgPrefix}PrimaryVertices')
161  itemList.append(f'xAOD::VertexAuxContainer#{flags.Overlay.BkgPrefix}PrimaryVerticesAux.x.y.z')
162 
163  from OverlayUtilities.OverlayUtilitiesConfig import OverlayVertexSkimmingAlgCfg
164  cfg.merge(OverlayVertexSkimmingAlgCfg(flags))
165  acceptAlgs.append('OverlayVertexSkimmingAlg')
166 
167  from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
168  cfg.merge(OutputStreamCfg(flags, 'RDO', itemList, AcceptAlgs=acceptAlgs))
169 
170  from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
171  cfg.merge(SetupMetaDataForStreamCfg(flags, 'RDO', AcceptAlgs=acceptAlgs,
172  createMetadata=[MetadataCategory.IOVMetaData,
173  MetadataCategory.CutFlowMetaData]))
174 
175  # Post-include
176  processPostInclude(runArgs, flags, cfg)
177 
178  # Post-exec
179  processPostExec(runArgs, flags, cfg)
180 
181  # Write AMI tag into in-file metadata
182  from PyUtils.AMITagHelperConfig import AMITagCfg
183  cfg.merge(AMITagCfg(flags, runArgs))
184 
185  # Run the final configuration
186  sc = cfg.run()
187  sys.exit(not sc.isSuccess())

Variable Documentation

◆ jobPropertiesDisallowed

python.BStoRDO_Skeleton.jobPropertiesDisallowed

Definition at line 11 of file BStoRDO_Skeleton.py.

python.TRT_RawDataByteStreamCnvConfig.TRTRawDataProviderCfg
def TRTRawDataProviderCfg(flags, name="TRTRawDataProvider", **kwargs)
Definition: TRT_RawDataByteStreamCnvConfig.py:39
python.SCT_RawDataByteStreamCnvConfig.SCTRawDataProviderCfg
def SCTRawDataProviderCfg(flags, prefix="InDet", suffix="", **kwargs)
Definition: SCT_RawDataByteStreamCnvConfig.py:30
python.TransformUtils.processPreExec
def processPreExec(runArgs, flags)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:41
python.TransformUtils.processPostExec
def processPostExec(runArgs, flags, cfg)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:50
python.OutputStreamConfig.OutputStreamCfg
def OutputStreamCfg(flags, streamName, ItemList=[], MetadataItemList=[], disableEventTag=False, trigNavThinningSvc=None, takeItemsFromInput=False, extendProvenanceRecord=True, AcceptAlgs=[], HelperTools=[])
Definition: OutputStreamConfig.py:12
python.MuonBytestreamDecodeConfig.MmBytestreamDecodeCfg
def MmBytestreamDecodeCfg(flags, name="MmRawDataProvider", **kwargs)
Definition: MuonBytestreamDecodeConfig.py:341
python.LArRawDataReadingConfig.LArRawDataReadingCfg
def LArRawDataReadingCfg(flags, **kwargs)
Definition: LArRawDataReadingConfig.py:11
python.TransformUtils.processPostInclude
def processPostInclude(runArgs, flags, cfg)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:69
python.ByteStreamConfig.ByteStreamReadCfg
def ByteStreamReadCfg(flags, type_names=None)
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:25
PixelRawDataByteStreamCnvConfig.PixelRawDataProviderAlgCfg
def PixelRawDataProviderAlgCfg(flags, **kwargs)
Definition: PixelRawDataByteStreamCnvConfig.py:17
python.TransformUtils.processPreInclude
def processPreInclude(runArgs, flags)
Definition: Tools/PyJobTransforms/python/TransformUtils.py:62
python.LumiBlockMuWriterConfig.LumiBlockMuWriterCfg
def LumiBlockMuWriterCfg(flags, name='LumiBlockMuWriter', seqName="AthAlgSeq")
Definition: LumiBlockMuWriterConfig.py:14
BCMOverlayConfig.BCMRawDataProviderAlgCfg
def BCMRawDataProviderAlgCfg(flags, name="BCMRawDataProvider", **kwargs)
Definition: BCMOverlayConfig.py:10
python.BStoRDO_Skeleton.fromRunArgs
def fromRunArgs(runArgs)
Definition: BStoRDO_Skeleton.py:14
python.MuonBytestreamDecodeConfig.CscBytestreamDecodeCfg
def CscBytestreamDecodeCfg(flags, name="CscRawDataProvider", **kwargs)
Definition: MuonBytestreamDecodeConfig.py:182
python.PerfMonConfigHelpers.setPerfmonFlagsFromRunArgs
def setPerfmonFlagsFromRunArgs(flags, runArgs)
Definition: PerfMonConfigHelpers.py:3
python.MainServicesConfig.MainServicesCfg
def MainServicesCfg(flags, LoopMgr='AthenaEventLoopMgr')
Definition: MainServicesConfig.py:260
python.CommonRunArgsToFlags.commonRunArgsToFlags
def commonRunArgsToFlags(runArgs, configFlags)
Definition: CommonRunArgsToFlags.py:12
python.MuonBytestreamDecodeConfig.RpcBytestreamDecodeCfg
def RpcBytestreamDecodeCfg(flags, name="RpcRawDataProvider", **kwargs)
This configuration function sets up everything for decoding RPC bytestream data into RDOs.
Definition: MuonBytestreamDecodeConfig.py:34
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.MuonBytestreamDecodeConfig.TgcBytestreamDecodeCfg
def TgcBytestreamDecodeCfg(flags, name="TgcRawDataProvider", **kwargs)
Definition: MuonBytestreamDecodeConfig.py:97
python.TrackRecoConfig.InDetTrackRecoCfg
def InDetTrackRecoCfg(flags)
Main ID tracking config #####################.
Definition: TrackRecoConfig.py:804
python.MuonBytestreamDecodeConfig.MdtBytestreamDecodeCfg
def MdtBytestreamDecodeCfg(flags, name="MdtRawDataProvider", **kwargs)
Definition: MuonBytestreamDecodeConfig.py:138
python.AMITagHelperConfig.AMITagCfg
def AMITagCfg(flags, runArgs=None, fixBroken=False)
Definition: AMITagHelperConfig.py:77
python.AllConfigFlags.initConfigFlags
def initConfigFlags()
Definition: AllConfigFlags.py:19
TileByteStreamConfig.TileRawDataReadingCfg
def TileRawDataReadingCfg(flags, readDigits=True, readRawChannel=True, readMuRcv=None, readMuRcvDigits=False, readMuRcvRawCh=False, readBeamElem=None, readLaserObj=None, readDigitsFlx=False, readL2=False, stateless=False, **kwargs)
Definition: TileByteStreamConfig.py:87
python.SCT_RawDataByteStreamCnvConfig.SCTEventFlagWriterCfg
def SCTEventFlagWriterCfg(flags, prefix="InDet", suffix="", **kwargs)
Definition: SCT_RawDataByteStreamCnvConfig.py:69
str
Definition: BTagTrackIpAccessor.cxx:11
InfileMetaDataConfig.SetupMetaDataForStreamCfg
def SetupMetaDataForStreamCfg(flags, streamName="", AcceptAlgs=None, createMetadata=None, propagateMetadataFromInput=True, *args, **kwargs)
Definition: InfileMetaDataConfig.py:222
python.EventBookkeeperToolsConfig.CutFlowSvcCfg
def CutFlowSvcCfg(flags, **kwargs)
Definition: EventBookkeeperToolsConfig.py:24
python.MuonBytestreamDecodeConfig.sTgcBytestreamDecodeCfg
def sTgcBytestreamDecodeCfg(flags, name="sTgcRawDataProvider", **kwargs)
Definition: MuonBytestreamDecodeConfig.py:235
OverlayUtilitiesConfig.OverlayVertexSkimmingAlgCfg
def OverlayVertexSkimmingAlgCfg(flags, name="OverlayVertexSkimmingAlg", **kwargs)
Definition: OverlayUtilitiesConfig.py:6