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