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
23 __author__ =
'Vanya BELYAEV ibelyaev@physics.syr.edu'
34 SUCCESS = gaudimodule.SUCCESS
41 """ the configurtaion of the job """
48 gaudi.config(files=[
'../options/Common.opts'])
52 gaudi.TopAlg = [
'PropertyAlg']
55 gaudi.TopAlg += [
"PropertyAlg",
"PropertyProxy"]
58 gaudi.TopAlg.remove(
"PropertyAlg")
62 msgSvc = gaudi.service(
'MessageSvc')
63 msgSvc.OutputLevel = 3
67 gaudi.HistogramPersistency =
'NONE'
71 alg = gaudi.algorithm(
'PropertyAlg')
76 alg.Double = 101.1e+10
77 alg.String =
"hundred one"
80 alg.IntArray = [1, 2, 3, 5]
81 alg.DoubleArray = [-11.0, 2., 3.3, 0.4e-03]
82 alg.StringArray = [
"one",
"two",
"four"]
83 alg.BoolArray = [
False,
True,
False]
88 alg.PString =
"hundred one"
91 alg.PIntArray = [1, 2, 3, 5]
92 alg.PDoubleArray = [1.1, 2., 3.3]
93 alg.PStringArray = [
"one",
"two",
"four"]
94 alg.PBoolArray = [
True,
False,
True,
False]
96 proxy = gaudi.algorithm(
"PropertyProxy")
97 proxy.String =
"This is set by the proxy"
99 msgSvc.setDebug = [
"EventLoopMgr"]
100 msgSvc.setVerbose = [
"MsgTest"]
110 if '__main__' == __name__:
112 print(__doc__, __author__)
118 alg = gaudi.algorithm(
'PropertyAlg')
120 props = alg.properties()
121 print(
'Properties of %s ' % alg.name())
124 print(
"Python: Name/Value: '%s' / '%s' " % (p, v))