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
82 if flags.Input.Files == ['_ATHENA_GENERIC_INPUTFILE_NAME_']:
83
84
85 from McEventSelector.McEventSelectorConfig import McEventSelectorCfg
86 mckw = {}
87 if EventsPerLB is not None:
88 mckw['EventsPerLB'] = EventsPerLB
89 if TimeStampInterval is not None:
90 mckw['TimeStampInterval'] = TimeStampInterval
91 cfg.merge (McEventSelectorCfg (flags, **mckw))
92
93 from xAODEventInfoCnv.xAODEventInfoCnvConfig import EventInfoCnvAlgCfg
94 cfg.merge (EventInfoCnvAlgCfg (flags, disableBeamSpot = True))
95 elif not flags.Input.Files[0].endswith ('.bs'):
96
97 from AthenaPoolCnvSvc.PoolReadConfig import PoolReadCfg
98 cfg.merge (PoolReadCfg (flags))
99
100
101 if loadWriteDicts:
102 cfg.merge (LoadWriteDictsCfg (flags))
103 if loadReadDicts:
104 cfg.merge (LoadReadDictsCfg (flags))
105
106
107 if 'ROOTRNTUPLE' in flags.Output.StorageTechnology.EventData.values():
108 testName = testName + '_rntup'
109 fileCatalog = testName + '_catalog.xml'
110 from AthenaPoolCnvSvc.PoolCommonConfig import PoolSvcCfg
111 kw = {'WriteCatalog' : 'file:' + fileCatalog}
112 if readCatalog:
113 kw['ReadCatalog'] = ['file:' + readCatalog]
114 cfg.merge (PoolSvcCfg (flags, **kw))
115 import os
116 try:
117 os.remove (fileCatalog)
118 except OSError:
119 pass
120
121
122 return cfg
123
124
125
126
127