14 *******************************************************************************
16 * Simple example (identical to C++ ExtendedProperties.opts) which illustrates *
17 * the extended job-properties and their C++/Python intercommunication *
19 *******************************************************************************
22 __author__ =
"Vanya BELYAEV ibelyaev@physics.syr.edu"
33 SUCCESS = gaudimodule.SUCCESS
40 """the configurtaion of the job"""
44 gaudi = gaudimodule.AppMgr()
47 gaudi.config(files=[
"../options/Common.opts"])
51 gaudi.TopAlg = [
"ExtendedProperties/xProps"]
53 gaudi.HistogramPersistency =
"NONE"
55 xProps = gaudi.algorithm(
"xProps")
63 xProps.VectorOfPairsDD = [(0, 1), (1, 2), (2, 3), (3, 4)]
66 xProps.VectorOfVectorsString = [[
"a",
"b",
"c"], [
"A",
"B",
"C"]]
69 xProps.VectorOfVectorsDouble = [[0, 1, 2], [0, -0.5, -0.25]]
72 xProps.MapIntDouble = {1: 0.1, 2: 0.2, 3: 0.3}
75 xProps.MapStringString = {
76 "a":
"sddsgsgsdgdggf",
77 "b":
"sddsgsgsdgdggf",
78 "c":
"sddsgsgsdgdggf",
82 xProps.MapStringInt = {
"a": 1,
"b": 2,
"c": 3}
85 xProps.MapStringDouble = {
"aa": 0.1,
"bb": 0.2,
"cc": 3}
88 xProps.MapStringVectorOfStrings = {
89 "aaa": [
"a",
"b",
"c"],
90 "bbb": [
"a",
"b",
"c"],
91 "ccc": [
"a",
"b",
"c"],
95 xProps.MapStringVectorOfDoubles = {
97 "bbb": [1.0, 2.0, 3.0],
98 "ccc": [0.1, 0.2, 0.3],
102 xProps.MapStringVectorOfInts = {
114 if "__main__" == __name__:
115 print(__doc__, __author__)
117 gaudi = gaudimodule.AppMgr()
121 alg = gaudi.algorithm(
"xProps")
130 props = alg.properties()
132 print(
"All Properties of %s " % alg.name())
136 print(
"Python: Name/Value: '%s' / '%s' " % (p, v))
139 print(
"All Properties of %s " % alg.name())
142 properties[p] = props[p].value()
145 print(
"Python: Name/Value: '%s' / '%s' " % (p, properties[p]))