14 *******************************************************************************
16 * Simple example which illustrate the extended job-properties and their *
18 *******************************************************************************
21 __author__ =
"Vanya BELYAEV ibelyaev@physics.syr.edu"
25 from Configurables
import ApplicationMgr
26 from Configurables
import Gaudi__Examples__ExtendedProperties2
as EP2
36 isWin = sys.platform.startswith(
"win")
38 ep2 = EP2(
"xProps2", Point3D=(10, 40, 55), Points3D=[(10, 40, 55), (1, 2, 3)])
40 ApplicationMgr(EvtSel=
"NONE", TopAlg=[ep2], EvtMax=10)
45 if "__main__" == __name__:
46 print(__doc__, __author__)
52 with warnings.catch_warnings():
53 warnings.simplefilter(
"ignore")
55 for h
in (
"GaudiKernel/SVectorAsProperty.h",
"GaudiKernel/VectorsAsProperty.h"):
56 cppyy.gbl.gInterpreter.Declare(
'#include "%s"' % h)
64 xp2 = gaudi.algorithm(
"xProps2")
66 xp2.Point3D =
"(-10,3, Z : 24)"
67 xp2.Vector3D = [-120, -30, -40]
69 xp2.Vector4D = [-100, -200, -300, 400]
70 xp2.Vector4D = (-100, -200, -300, 400)
71 xp2.Vector4D = [(-100, -200, -300), 400]
72 xp2.Vector4D = [[-100, -200, -300], 400]
73 xp2.Vector4D = ((-100, -200, -300), 400)
74 xp2.Vector4D = ([-100, -200, -300], 400)
76 xp2.SVector5 = (1, 2, 3, 4, 5)
78 xp2.SVector5 = [1, 2, 3, 4, 5]
81 xp2.SVector5 = [1, 2, 3, 4, 5, 6]
82 except Exception
as e:
83 print(
" Exception: ", e)
86 xp2.Point3D = (1, 2, 3, 4)
87 except Exception
as e:
88 print(
" Exception: ", e)
92 xp2.Vector4D = (1, 2, 3)
93 except Exception
as e:
94 print(
" Exception: ", e)
96 xp2.Vectors3D = [(1, 2, 3), (4, 5, 6), [7, 8, 9]]
98 xp2.Vectors4D = ((1, 2, 3, 4), [4, 5, 6, 7])
100 xp2.PropertiesPrint =
True