The Gaudi Framework
master (9f3f8895)
Toggle main menu visibility
Loading...
Searching...
No Matches
AlgTools.py
Go to the documentation of this file.
1
14
from
Configurables
import
GaudiTestSuiteCommonConf, MyAlgorithm, MyTool
15
from
Gaudi.Configuration
import
*
16
17
GaudiTestSuiteCommonConf()
18
19
myalg =
MyAlgorithm
(
"MyAlg"
)
20
21
myalg.addTool(
MyTool
(Int=101, Double=101.1e10, String=
"hundred one"
, Bool=
False
))
22
23
gtool =
MyTool
(
24
"MyTool"
,
25
Int=201,
26
Double=201.1e10,
27
String=
"two hundred and one"
,
28
Bool=
True
,
29
OutputLevel=INFO,
30
)
31
32
tool_conf1 =
MyTool
(
33
"MyTool_conf1"
, Int=1, Double=2, String=
"three"
, Bool=
True
, OutputLevel=INFO
34
)
35
36
tool_conf2 =
MyTool
(
37
"MyTool_conf2"
, Int=10, Double=20, String=
"xyz"
, Bool=
False
, OutputLevel=INFO
38
)
39
40
myToolWithName = myalg.addTool(tool_conf2,
"ToolWithName"
)
41
42
myalg.ToolWithName.String =
"xyz"
43
44
assert
myToolWithName.String ==
"xyz"
45
assert
myalg.ToolWithName == myToolWithName
46
47
myToolWithName.String =
"abc"
48
49
myalg.PrivToolHandle.String =
"Is a private tool"
50
51
pubtool =
MyTool
(
"TestPubToolHandle"
, String=
"Is a public tool"
)
52
myalg.PubToolHandle = pubtool
53
54
# disable a ToolHandle
55
myalg.InvalidToolHandle =
""
56
57
ApplicationMgr
(EvtMax=10, EvtSel=
"NONE"
, HistogramPersistency=
"NONE"
, TopAlg=[myalg])
58
# --------------------------------------------------------------
59
# Test circular tool dependencies (by Chris Jones)
60
# --------------------------------------------------------------
61
from
Configurables
import
TestTool, TestToolAlg
62
63
tA =
TestTool
(
"ToolA"
, Tools=[
"TestTool/ToolB"
], OutputLevel=DEBUG)
64
tB =
TestTool
(
"ToolB"
, Tools=[
"TestTool/ToolA"
], OutputLevel=DEBUG)
65
testalg =
TestToolAlg
(Tools=[
"TestTool/ToolA"
])
66
ApplicationMgr
().TopAlg += [testalg]
ApplicationMgr
The Application Manager class.
Definition
ApplicationMgr.h:54
MyAlgorithm
Trivial Algorithm for tutorial purposes.
Definition
MyAlgorithm.h:21
MyTool
This is an interface class for a example tool.
Definition
MyTool.h:23
TestToolAlg
Definition
TestToolAlg.h:26
TestTool
Definition
TestTool.h:24
Gaudi.Configuration
Definition
Configuration.py:1
GaudiTestSuite
options
AlgTools.py
Generated on
for The Gaudi Framework by
1.17.0