ATLAS Offline Software
Loading...
Searching...
No Matches
python.RDOMerge_Skeleton Namespace Reference

Functions

 fromRunArgs (runArgs)

Variables

 jobPropertiesDisallowed

Function Documentation

◆ fromRunArgs()

python.RDOMerge_Skeleton.fromRunArgs ( runArgs)

Definition at line 12 of file RDOMerge_Skeleton.py.

12def fromRunArgs(runArgs):
13 from AthenaCommon.Logging import logging
14 log = logging.getLogger('RDOMerge_tf')
15 log.info('****************** STARTING RDO MERGING *****************')
16
17 log.info('**** Transformation run arguments')
18 log.info(str(runArgs))
19
20 log.info('**** Setting-up configuration flags')
21 from AthenaConfiguration.AllConfigFlags import initConfigFlags
22 flags = initConfigFlags()
23
24 commonRunArgsToFlags(runArgs, flags)
25
26 if hasattr(runArgs, "PileUpPresampling"):
27 from AthenaConfiguration.Enums import ProductionStep
28 flags.Common.ProductionStep = ProductionStep.PileUpPresampling
29
30 if hasattr(runArgs, 'inputRDOFile'):
31 flags.Input.Files = runArgs.inputRDOFile
32 else:
33 raise RuntimeError('No input RDO file defined')
34
35 if hasattr(runArgs, 'outputRDO_MRGFile'):
36 if runArgs.outputRDO_MRGFile == 'None':
37 flags.Output.RDOFileName = ''
38 # TODO decide if we need a specific RDO_MRGFileName flag
39 else:
40 flags.Output.RDOFileName = runArgs.outputRDO_MRGFile
41 else:
42 raise RuntimeError('No outputRDO_MRGFile defined')
43
44 # Autoconfigure enabled subdetectors
45 if hasattr(runArgs, 'detectors'):
46 detectors = runArgs.detectors
47 else:
48 detectors = None
49
50 from AthenaConfiguration.DetectorConfigFlags import setupDetectorFlags
51 setupDetectorFlags(flags, detectors, use_metadata=True, toggle_geometry=True)
52
53 # Setup perfmon flags from runargs
54 from PerfMonComps.PerfMonConfigHelpers import setPerfmonFlagsFromRunArgs
55 setPerfmonFlagsFromRunArgs(flags, runArgs)
56
57 # Pre-include
58 processPreInclude(runArgs, flags)
59
60 # Pre-exec
61 processPreExec(runArgs, flags)
62
63 # To respect --athenaopts
64 flags.fillFromArgs()
65
66 # Lock flags
67 flags.lock()
68
69 from AthenaConfiguration.MainServicesConfig import MainServicesCfg
70 cfg = MainServicesCfg(flags)
71
72 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
73 cfg.merge(PoolReadCfg(flags))
74
75 # Geometry dependencies
76 if flags.Detector.EnablePixel:
77 from PixelGeoModel.PixelGeoModelConfig import PixelReadoutGeometryCfg
78 cfg.merge(PixelReadoutGeometryCfg(flags))
79 if flags.Detector.EnableSCT:
80 from SCT_GeoModel.SCT_GeoModelConfig import SCT_ReadoutGeometryCfg
81 cfg.merge(SCT_ReadoutGeometryCfg(flags))
82 if flags.Detector.EnableTRT:
83 from TRT_GeoModel.TRT_GeoModelConfig import TRT_ReadoutGeometryCfg
84 cfg.merge(TRT_ReadoutGeometryCfg(flags))
85
86 if flags.Detector.EnableITkPixel:
87 from PixelGeoModelXml.ITkPixelGeoModelConfig import ITkPixelReadoutGeometryCfg
88 cfg.merge(ITkPixelReadoutGeometryCfg(flags))
89 if flags.Detector.EnableITkStrip:
90 from StripGeoModelXml.ITkStripGeoModelConfig import ITkStripReadoutGeometryCfg
91 cfg.merge(ITkStripReadoutGeometryCfg(flags))
92
93 if flags.Detector.EnableHGTD:
94 if flags.HGTD.Geometry.useGeoModelXml:
95 from HGTD_GeoModelXml.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
96 else:
97 from HGTD_GeoModel.HGTD_GeoModelConfig import HGTD_ReadoutGeometryCfg
98 cfg.merge(HGTD_ReadoutGeometryCfg(flags))
99
100 if flags.Detector.EnableLAr:
101 from LArGeoAlgsNV.LArGMConfig import LArGMCfg
102 cfg.merge(LArGMCfg(flags))
103 if flags.Detector.EnableTile:
104 from TileGeoModel.TileGMConfig import TileGMCfg
105 cfg.merge(TileGMCfg(flags))
106 from TileConditions.TileCablingSvcConfig import TileCablingSvcCfg
107 cfg.merge(TileCablingSvcCfg(flags))
108
109 if flags.Detector.EnableMuon:
110 from MuonConfig.MuonGeometryConfig import MuonGeoModelCfg
111 cfg.merge(MuonGeoModelCfg(flags))
112
113 from OutputStreamAthenaPool.OutputStreamConfig import OutputStreamCfg
114 cfg.merge(OutputStreamCfg(flags, 'RDO', takeItemsFromInput = True, extendProvenanceRecord = False))
115
116 from xAODMetaDataCnv.InfileMetaDataConfig import SetupMetaDataForStreamCfg
117 cfg.merge(SetupMetaDataForStreamCfg(flags, 'RDO'))
118
119 # Silence HepMcParticleLink warnings
120 from DigitizationConfig.DigitizationSteering import DigitizationMessageSvcCfg
121 cfg.merge(DigitizationMessageSvcCfg(flags))
122
123 # Post-include
124 processPostInclude(runArgs, flags, cfg)
125
126 # Post-exec
127 processPostExec(runArgs, flags, cfg)
128
129 # Write AMI tag into in-file metadata
130 from PyUtils.AMITagHelperConfig import AMITagCfg
131 cfg.merge(AMITagCfg(flags, runArgs))
132
133 import time
134 tic = time.time()
135 # Run the final accumulator
136 sc = cfg.run()
137 log.info("Ran RDOMerge_tf in " + str(time.time()-tic) + " seconds")
138
139 sys.exit(not sc.isSuccess())

Variable Documentation

◆ jobPropertiesDisallowed

python.RDOMerge_Skeleton.jobPropertiesDisallowed

Definition at line 9 of file RDOMerge_Skeleton.py.