ATLAS Offline Software
test_pyathena.py
Go to the documentation of this file.
1 
2 import AthenaCommon.AtlasUnixStandardJob
3 import AthenaCommon.SystemOfUnits as Units
4 import AthenaCommon.Constants as Lvl
5 
6 from AthenaCommon.AlgSequence import AlgSequence, AthSequencer
7 job = AlgSequence()
8 
9 from AthenaPython.tests.PyTestsLib import MyAlg, MySvc, MyTool, MyNameAud
10 job += MyAlg( "alg1", eta = 2.5 )
11 job.alg1.pt = 42.
12 
13 job += MyAlg( name="alg2", eta = 5.1, pt = 20.*Units.GeV )
14 job += MyAlg( "alg3", eta = 5.1, pt = 20.*Units.GeV )
15 job.alg3 += MyTool( "mytool", counter = 50, parent="alg3" )
16 
17 job += MyAlg( eta = 5.2,
18  px = 20.*Units.GeV,
19  mytool = MyTool( "mytool", counter = 30,
20  parent="MyAlg",
21  OutputLevel = Lvl.VERBOSE ),
22  )
23 
24 from AthenaCommon.AppMgr import ServiceMgr as svcMgr
25 svcMgr += MySvc()
26 
27 from AthenaCommon.AppMgr import theApp
28 theApp.EvtMax = 2
29 
30 theApp.CreateSvc += [ svcMgr.MySvc.getFullName() ]
31 theApp.AuditAlgorithms = True
32 theApp.AuditServices = True
33 theApp.AuditTools = True
34 svcMgr.AuditorSvc += MyNameAud(name="MyNameAuditor", OutputLevel = Lvl.VERBOSE)
35 
36 
37 job += AthSequencer("MySeq")
38 job.MySeq += MyAlg( "seqalg1", filterPassed=True )
39 job.MySeq += MyAlg( "seqalg2", filterPassed=False )
40 job.MySeq += MyAlg( "seqalg3", filterPassed=True )
41 
42 
43 job += AthSequencer("MultSeq")
44 job.MultSeq += AthSequencer("SubSeq1")
45 job.MultSeq.SubSeq1 += MyAlg("sub1alg1")
46 job.MultSeq.SubSeq1 += MyAlg("sub1alg2",filterPassed=False)
47 job.MultSeq.SubSeq1 += MyAlg("sub1alg3")
48 
49 job.MultSeq += AthSequencer("SubSeq2")
50 job.MultSeq.SubSeq2 += MyAlg("sub2alg1")
51 job.MultSeq.SubSeq2 += MyAlg("sub2alg2")
52 job.MultSeq.SubSeq2 += MyAlg("sub2alg3")
53 
SystemOfUnits
python.AlgSequence.AlgSequence
AlgSequence
Definition: PhysicsAnalysis/D3PDTools/AnaAlgorithm/python/AlgSequence.py:7
Constants
some useful constants -------------------------------------------------—
python.AlgSequence.AthSequencer
AthSequencer
Definition: Control/AthenaCommon/python/AlgSequence.py:64