11 """Install the Athena-based TTree event selector and correctly configure
14 from AthenaCommon
import CfgMgr
15 from AthenaCommon.AppMgr
import theApp
16 from AthenaCommon.AppMgr
import ServiceMgr
as svcMgr
17 from AthenaCommon.Logging
import logging
18 from AthenaCommon.AthenaCommonFlags
import athenaCommonFlags
19 msg = logging.getLogger(
'ReadAthenaRoot' )
20 msg.debug(
"Configuring Athena for reading ROOT files (via TChain)...")
23 if hasattr(svcMgr,
'EventSelector'):
24 err =
"svcMgr already configured with another EventSelector: [%s]"%\
25 svcMgr.EventSelector.getFullJobOptName()
27 raise RuntimeError( err )
31 svcMgr += CfgMgr.Athena__RootNtupleEventSelector(
"EventSelector" )
36 if not hasattr(svcMgr,
'THistSvc'): svcMgr += CfgMgr.THistSvc()
37 if not hasattr(svcMgr,
'ProxyProviderSvc'): svcMgr += CfgMgr.ProxyProviderSvc()
38 if not hasattr(svcMgr,
'Athena::NtupleCnvSvc'): svcMgr += CfgMgr.Athena__NtupleCnvSvc()
42 theApp.ExtSvc += [ svcMgr.EventSelector.getFullName() ]
43 theApp.EvtSel =
"EventSelector"
46 svcMgr.EventSelector.InputCollections = athenaCommonFlags.FilesInput()
51 if not hasattr(svcMgr, theApp.EventLoop): svcMgr += getattr(CfgMgr, theApp.EventLoop)()
52 evtloop = getattr(svcMgr, theApp.EventLoop)
54 evtloop.EventPrintoutInterval = 10000
56 msg.info(
'disabling event loop heartbeat... [failed]')
57 msg.info(
'performances might be sub-par... sorry.')
60 msg.debug(
"Configuring Athena for reading ROOT files (via TChain)... [OK]")