13 def TPCnvTest(infile, keys, useGeoModelSvc=False, useIOVDbSvc=False, doPixel=False, doSCT=False, doTRT=False, doLAr=False, doTile=False, doMuon=False, doTracks=False, configOnly=False, adjustMessageSvc=True):
17 ROOT.GaudiPython.CallbackStreamBuf
20 if os.path.exists (
'PoolFileCatalog.xml'):
21 os.remove (
'PoolFileCatalog.xml')
23 if (
'ATLAS_REFERENCE_TAG' not in globals()
and
24 'ATLAS_REFERENCE_TAG' in os.environ):
25 ATLAS_REFERENCE_TAG = os.environ[
'ATLAS_REFERENCE_TAG']
27 refpaths = [os.environ.get (
'ATLAS_REFERENCE_DATA',
None),
28 '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art',
29 '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CommonInputs',
30 '/afs/cern.ch/atlas/maxidisk/d33/referencefiles']
32 if infile.startswith (
'rtt:'):
34 infile = find_file (infile, refpaths)
38 flags.Input.Files = [infile]
39 flags.GeoModel.Run = LHCPeriod.Run1
40 from AthenaConfiguration.TestDefaults
import defaultGeometryTags
41 flags.GeoModel.AtlasVersion = defaultGeometryTags.RUN1_2012
43 flags.GeoModel.Align.Dynamic =
False
44 flags.Detector.GeometryPixel = doPixel
45 flags.Detector.GeometrySCT = doSCT
46 flags.Detector.GeometryTRT = doTRT
47 flags.Detector.GeometryLAr = doLAr
48 flags.Detector.GeometryTile = doTile
49 flags.Detector.GeometryMuon = doMuon
55 acc.setAppProperty(
'PrintAlgsSequence',
False, overwrite=
True)
59 EventCnvSuperTool =
None
61 if flags.Detector.GeometryPixel:
62 from PixelGeoModel.PixelGeoModelConfig
import PixelReadoutGeometryCfg
64 if flags.Detector.GeometrySCT:
65 from SCT_GeoModel.SCT_GeoModelConfig
import SCT_ReadoutGeometryCfg
67 if flags.Detector.GeometryTRT:
68 from TRT_GeoModel.TRT_GeoModelConfig
import TRT_ReadoutGeometryCfg
70 if flags.Detector.GeometryITkPixel:
71 from PixelGeoModelXml.ITkPixelGeoModelConfig
import ITkPixelReadoutGeometryCfg
73 if flags.Detector.GeometryITkStrip:
74 from StripGeoModelXml.ITkStripGeoModelConfig
import ITkStripReadoutGeometryCfg
76 if flags.Detector.GeometryLAr:
77 from LArGeoAlgsNV.LArGMConfig
import LArGMCfg
79 if flags.Detector.GeometryTile:
80 from TileGeoModel.TileGMConfig
import TileGMCfg
82 if flags.Detector.GeometryMuon:
83 from MuonConfig.MuonGeometryConfig
import MuonGeoModelCfg
86 from AtlasGeoModel.GeoModelConfig
import GeoModelCfg
88 acc.getService(
"GeoModelSvc").IgnoreTagDifference =
True
91 Trk_EventCnvSuperTool=CompFactory.Trk.EventCnvSuperTool
92 EventCnvSuperTool = Trk_EventCnvSuperTool(
'EventCnvSuperTool', MaxErrorCount=10)
93 acc.addEventAlgo(Dumper (
'dumper', flags.Input.Files[0], keys, refpaths),
'AthAlgSeq')
95 acc.getService(
"MessageSvc").enableSuppression =
True
96 acc.getService(
"MessageSvc").Format =
"% F%18W%S%7W%R%T %0W%M"
97 if EventCnvSuperTool
is not None:
98 acc.addPublicTool(EventCnvSuperTool)
100 f =
open(
'new.pkl',
'wb')
104 return acc.run(maxEvents=10)