14 *******************************************************************************
16 * Simple example (identical to C++ ExtendedProperties.opts) which illustrates *
17 * the extended job-properties and their C++/Python intercommunication *
19 *******************************************************************************
23 __author__ =
"Vanya BELYAEV ibelyaev@physics.syr.edu"
34 SUCCESS = gaudimodule.SUCCESS
41 """the configurtaion of the job"""
45 gaudi = gaudimodule.AppMgr()
48 gaudi.config(files=[
"../options/Common.opts"])
52 gaudi.TopAlg = [
"ExtendedProperties/xProps"]
54 gaudi.HistogramPersistency =
"NONE"
56 xProps = gaudi.algorithm(
"xProps")
64 xProps.VectorOfPairsDD = [(0, 1), (1, 2), (2, 3), (3, 4)]
67 xProps.VectorOfVectorsString = [[
"a",
"b",
"c"], [
"A",
"B",
"C"]]
70 xProps.VectorOfVectorsDouble = [[0, 1, 2], [0, -0.5, -0.25]]
73 xProps.MapIntDouble = {1: 0.1, 2: 0.2, 3: 0.3}
76 xProps.MapStringString = {
77 "a":
"sddsgsgsdgdggf",
78 "b":
"sddsgsgsdgdggf",
79 "c":
"sddsgsgsdgdggf",
83 xProps.MapStringInt = {
"a": 1,
"b": 2,
"c": 3}
86 xProps.MapStringDouble = {
"aa": 0.1,
"bb": 0.2,
"cc": 3}
89 xProps.MapStringVectorOfStrings = {
90 "aaa": [
"a",
"b",
"c"],
91 "bbb": [
"a",
"b",
"c"],
92 "ccc": [
"a",
"b",
"c"],
96 xProps.MapStringVectorOfDoubles = {
98 "bbb": [1.0, 2.0, 3.0],
99 "ccc": [0.1, 0.2, 0.3],
103 xProps.MapStringVectorOfInts = {
115 if "__main__" == __name__:
116 print(__doc__, __author__)
118 gaudi = gaudimodule.AppMgr()
122 alg = gaudi.algorithm(
"xProps")
131 props = alg.properties()
133 print(
"All Properties of %s " % alg.name())
137 print(
"Python: Name/Value: '%s' / '%s' " % (p, v))
140 print(
"All Properties of %s " % alg.name())
143 properties[p] = props[p].value()
146 print(
"Python: Name/Value: '%s' / '%s' " % (p, properties[p]))