71 readCatalog = None):
72 from AthenaConfiguration.MainServicesConfig import \
73 MainServicesCfg, MessageSvcCfg
74 cfg = MainServicesCfg (flags)
75 cfg.merge (MessageSvcCfg (flags))
76 cfg.getService("MessageSvc").debugLimit = 10000
77 cfg.addService (CompFactory.ClassIDSvc (OutputLevel = INFO))
78 cfg.addService (CompFactory.ChronoStatSvc (ChronoPrintOutTable = False,
79 PrintUserTime = False,
80 StatPrintOutTable = False))
81 cfg.addService (CompFactory.DataModelCompatSvc (), create = True)
82
83 if flags.Input.Files == ['_ATHENA_GENERIC_INPUTFILE_NAME_']:
84
85
86 from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
87 mckw = {}
88 if EventsPerLB is not None:
89 mckw['EventsPerLB'] = EventsPerLB
90 if TimeStampInterval is not None:
91 mckw['TimeStampInterval'] = TimeStampInterval
92 cfg.merge (McEventSelectorCfg (flags, **mckw))
93
94 from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
95 cfg.merge (EventInfoCnvAlgCfg (flags, disableBeamSpot = True))
96 elif not flags.Input.Files[0].endswith ('.bs'):
97
98 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
99 cfg.merge (PoolReadCfg (flags))
100
101
102 if loadWriteDicts:
103 cfg.merge (LoadWriteDictsCfg (flags))
104 if loadReadDicts:
105 cfg.merge (LoadReadDictsCfg (flags))
106
107
108 if 'ROOTRNTUPLE' in flags.PoolSvc.DefaultContainerType:
109 testName = testName + '_rntup'
110 fileCatalog = testName + '_catalog.xml'
111 from AthenaPoolCnvSvc.PoolCommonConfig import PoolSvcCfg
112 kw = {'WriteCatalog' : 'file:' + fileCatalog}
113 if readCatalog:
114 kw['ReadCatalog'] = ['file:' + readCatalog]
115 cfg.merge (PoolSvcCfg (flags, **kw))
116 import os
117 try:
118 os.remove (fileCatalog)
119 except OSError:
120 pass
121
122
123 return cfg
124
125
126
127
128