14 *******************************************************************************
16 * Simple example (identical to C++ Properties.opts) which illustrated *
17 * the basic job-properties and theinr C++/Python intercommunication *
19 *******************************************************************************
21 from __future__
import print_function
24 __author__ =
"Vanya BELYAEV ibelyaev@physics.syr.edu"
35 SUCCESS = gaudimodule.SUCCESS
42 """the configurtaion of the job"""
49 gaudi.config(files=[
"../options/Common.opts"])
53 gaudi.TopAlg = [
"PropertyAlg"]
56 gaudi.TopAlg += [
"PropertyAlg",
"PropertyProxy"]
59 gaudi.TopAlg.remove(
"PropertyAlg")
63 msgSvc = gaudi.service(
"MessageSvc")
64 msgSvc.OutputLevel = 3
68 gaudi.HistogramPersistency =
"NONE"
72 alg = gaudi.algorithm(
"PropertyAlg")
78 alg.String =
"hundred one"
81 alg.IntArray = [1, 2, 3, 5]
82 alg.DoubleArray = [-11.0, 2.0, 3.3, 0.4e-03]
83 alg.StringArray = [
"one",
"two",
"four"]
84 alg.BoolArray = [
False,
True,
False]
89 alg.PString =
"hundred one"
92 alg.PIntArray = [1, 2, 3, 5]
93 alg.PDoubleArray = [1.1, 2.0, 3.3]
94 alg.PStringArray = [
"one",
"two",
"four"]
95 alg.PBoolArray = [
True,
False,
True,
False]
97 proxy = gaudi.algorithm(
"PropertyProxy")
98 proxy.String =
"This is set by the proxy"
100 msgSvc.setDebug = [
"EventLoopMgr"]
101 msgSvc.setVerbose = [
"MsgTest"]
111 if "__main__" == __name__:
113 print(__doc__, __author__)
119 alg = gaudi.algorithm(
"PropertyAlg")
121 props = alg.properties()
122 print(
"Properties of %s " % alg.name())
125 print(
"Python: Name/Value: '%s' / '%s' " % (p, v))