4 from AthenaConfiguration.ComponentFactory
import CompFactory
5 from AthenaConfiguration.ComponentAccumulator
import ComponentAccumulator
15 from AthenaCommon.Logging
import log
16 log.setLevel(flags.Exec.OutputLevel)
18 condDbFile =
"condDb.txt"
20 for dir
in (
".:"+os.environ.get(
'DATAPATH')).split (
':'):
21 cdb = os.path.join(dir,condDbFile)
22 if (os.path.isfile( cdb ) ) :
27 log.fatal(
'ASCII condDb file \"' + condDbFile +
'\" not found')
30 log.info(
'using ASCIICondDb file from ' + cdb)
32 kwargs.setdefault(
"CondFile",cdb)
34 svc = CompFactory.ASCIICondDbSvc(name,**kwargs)
35 result.addService(svc)
38 if __name__ ==
"__main__":
40 from AthenaConfiguration.AllConfigFlags
import initConfigFlags
42 flags.Input.RunNumbers = [1]
43 flags.Input.TypedCollections = []
44 flags.Exec.MaxEvents = 20
45 flags.Scheduler.ShowControlFlow =
True
46 flags.Scheduler.ShowDataDeps =
True
51 from AthenaCommon.Logging
import log
52 log.setLevel(flags.Exec.OutputLevel)
55 if flags.Concurrency.NumThreads < 1:
56 log.fatal(
'The number of threads must be >0. Did you set the --threads=N option?')
60 from AthenaConfiguration.MainServicesConfig
import MainServicesCfg
62 from McEventSelector.McEventSelectorConfig
import McEventSelectorCfg
72 from xAODEventInfoCnv.xAODEventInfoCnvConfig
import EventInfoCnvAlgCfg
75 cfg.addEventAlgo(CompFactory.AlgA(name=
"AlgA",OutputLevel=DEBUG))
76 cfg.addEventAlgo(CompFactory.AlgB(name=
"AlgB",OutputLevel=DEBUG,Key_R1=
"a1",Key_W1=
"a3"))
77 cfg.addEventAlgo(CompFactory.AlgC(name=
"AlgC1",OutputLevel=DEBUG,Key_R1=
"a2",Key_CH=
"X1"))
78 cfg.addEventAlgo(CompFactory.AlgC(name=
"AlgC2",OutputLevel=DEBUG,Key_R1=
"a1",Key_CH=
"X2"))
79 cfg.addEventAlgo(CompFactory.AlgD(name=
"AlgD1",OutputLevel=DEBUG,Key_R1=
"a3", Key_CH1=
"X1", Key_CH2=
"X2"))
81 cfg.addCondAlgo(CompFactory.CondAlgX(name=
"CondAlgX1",OutputLevel=DEBUG,Key_CH=
"X1",Key_DB=
"X1"))
82 cfg.addCondAlgo(CompFactory.CondAlgX(name=
"CondAlgX2",OutputLevel=DEBUG,Key_CH=
"X2",Key_DB=
"X2"))
83 cfg.addCondAlgo(CompFactory.CondAlgY(name=
"CondAlgY1",OutputLevel=DEBUG,Key_CH1=
"Y1",Key_CH2=
"Y2",Key_DB1=
"Y1",Key_DB2=
"Y2"))
89 sys.exit(cfg.run().isFailure())