14 *******************************************************************************
16 * Simple example which illustrate the extended job-properties and their *
18 *******************************************************************************
20 from __future__
import print_function
23 __author__ =
"Vanya BELYAEV ibelyaev@physics.syr.edu"
27 from Configurables
import ApplicationMgr
28 from Configurables
import Gaudi__Examples__ExtendedProperties2
as EP2
39 isWin = sys.platform.startswith(
"win")
41 ep2 = EP2(
"xProps2", Point3D=(10, 40, 55), Points3D=[(10, 40, 55), (1, 2, 3)])
43 ApplicationMgr(EvtSel=
"NONE", TopAlg=[ep2], EvtMax=10)
48 if "__main__" == __name__:
50 print(__doc__, __author__)
56 with warnings.catch_warnings():
57 warnings.simplefilter(
"ignore")
59 for h
in (
"GaudiKernel/SVectorAsProperty.h",
"GaudiKernel/VectorsAsProperty.h"):
60 cppyy.gbl.gInterpreter.Declare(
'#include "%s"' % h)
68 xp2 = gaudi.algorithm(
"xProps2")
70 xp2.Point3D =
"(-10,3, Z : 24)"
71 xp2.Vector3D = [-120, -30, -40]
73 xp2.Vector4D = [-100, -200, -300, 400]
74 xp2.Vector4D = (-100, -200, -300, 400)
75 xp2.Vector4D = [(-100, -200, -300), 400]
76 xp2.Vector4D = [[-100, -200, -300], 400]
77 xp2.Vector4D = ((-100, -200, -300), 400)
78 xp2.Vector4D = ([-100, -200, -300], 400)
80 xp2.SVector5 = (1, 2, 3, 4, 5)
82 xp2.SVector5 = [1, 2, 3, 4, 5]
85 xp2.SVector5 = [1, 2, 3, 4, 5, 6]
86 except Exception
as e:
87 print(
" Exception: ", e)
90 xp2.Point3D = (1, 2, 3, 4)
91 except Exception
as e:
92 print(
" Exception: ", e)
96 xp2.Vector4D = (1, 2, 3)
97 except Exception
as e:
98 print(
" Exception: ", e)
100 xp2.Vectors3D = [(1, 2, 3), (4, 5, 6), [7, 8, 9]]
102 xp2.Vectors4D = ((1, 2, 3, 4), [4, 5, 6, 7])
104 xp2.PropertiesPrint =
True