14 *******************************************************************************
16 * Simple example (identical to C++ ExtendedProperties.opts) which illustrates *
17 * the extended job-properties and their 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 = [
"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',
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 = {
99 'ccc': [0.1, 0.2, 0.3]
103 xProps.MapStringVectorOfInts = {
115 if '__main__' == __name__:
117 print(__doc__, __author__)
123 alg = gaudi.algorithm(
'xProps')
132 props = alg.properties()
134 print(
'All Properties of %s ' % alg.name())
138 print(
"Python: Name/Value: '%s' / '%s' " % (p, v))
141 print(
'All Properties of %s ' % alg.name())
144 properties[p] = props[p].value()
147 print(
"Python: Name/Value: '%s' / '%s' " % (p, properties[p]))