The Gaudi Framework  master (9f3f8895)
Loading...
Searching...
No Matches
ExtendedProperties.py
Go to the documentation of this file.
13from Configurables import ExtendedProperties, GaudiTestSuiteCommonConf
14from Gaudi.Configuration import *
15
16GaudiTestSuiteCommonConf()
17
18from GaudiKernel.SystemOfUnits import *
19
20# BEGIN of xProp configuration
21
22xProps = ExtendedProperties("xProps")
23xProps.PairDD = (3.141592 * m, 2.18281828) # std::pair<double,double>
24xProps.PairII = (3, 2) # std::pair<int,int>
25
26# std::vector<std::pair<double,double> >
27xProps.VectorOfPairsDD += [(0, 1), (1, 2), (2, 3), (3, 4)]
28xProps.VectorOfPairsDD += [(4, 5), (5, 6), (6, 7), (7, 8)]
29
30# std::vector<std::vector<std::string> >
31xProps.VectorOfVectorsString = [["a", "b", "c"], ["A", "B", "C"]]
32
33# std::vector<std::vector<double> >
34xProps.VectorOfVectorsDouble = [[0, 1, 2], [0, -0.5, -0.25]]
35
36# std::vector<std::vector<float> >
37xProps.VectorOfVectorsFloat = [[0, 1.5, 2], [-0.5, -0.25]]
38
39# std::map<int,double>
40xProps.MapIntDouble = {1: 0.1, 2: 0.2, 3: 0.3}
41
42# std::map<std::string,std::string>
43xProps.MapStringString = {
44 "a": "sddsgsgsdgdggf",
45 "b": "sddsgsgsdgdggf",
46 "c": "sddsgsgsdgdggf",
47}
48
49# std::map<std::string,int>
50xProps.MapStringInt = {"a": 1, "b": 2, "c": 3}
51
52# std::map<std::string,int>
53xProps.MapStringDouble = {"aa": 0.1, "bb": 0.2, "cc": 3}
54
55# std::map<std::string,std::vector<std::string> >
56xProps.MapStringVectorOfStrings = {
57 "aaa": ["a", "b", "c"],
58 "bbb": ["a", "b", "c"],
59 "ccc": ["a", "b", "c"],
60}
61
62# std::map<std::string,std::vector<double> >
63xProps.MapStringVectorOfDoubles = {
64 "aaa": [1, 2, 3],
65 "bbb": [1.0, 2.0, 3.0],
66 "ccc": [0.1, 0.2, 0.3],
67}
68
69# std::map<std::string,std::vector<int> >
70xProps.MapStringVectorOfInts = {"aaa": [1, 2, 3], "bbb": [4, 5, 6], "ccc": [7, 8, 9]}
71
72# std::map<int,int>
73xProps.MapIntInt = {1: 10, 2: 20, 3: 30}
74
75# std::vector<std::pair<int,int> >
76xProps.VectorOfPairsII = [(1, 1), (2, 1), (3, 2), (4, 3), (5, 5)]
77
78# std::map<int,std::string>
79xProps.MapIntString = {0: "zero", 2: "two", -1: "minus one"}
80
81# std::map<unsigned int,std::string>
82xProps.MapUIntString = {0: "UZero", 2: "UTwo", 1: "UOne"}
83
84xProps.EmptyMap = {}
85xProps.EmptyVector = []
86
87xProps.TupleStringIntDouble = ("hello", 10, 0.001)
88xProps.TupleString = ("hello",)
89
90xProps.SetOfInt = {1, 2}
91xProps.SetOfString = {"a", "b"}
92
93xProps.StdArrayDouble3 = (3.3, 2.2, 1.1)
94xProps.StdArrayInt1 = (42,)
95
96xProps.GaudiMapSS = {"a": "1", "b": "2"}
97
98# DataObjIDColl
99xProps.ExtraInputs = set()
100xProps.ExtraOutputs = {"a", ("a", "b"), (1, "a")}
101
102xProps.PTupleVector = [("one", "two", "three"), ("a", "b", "c")]
103xProps.PIntVectorTuple = (42, ["one", "two", "three"])
104xProps.PTupleSet = [("one", "two", "three"), ("a", "b", "c")]
105xProps.PIntSetTuple = (42, ["one", "two", "three"])
106xProps.PTupleUnSet = {("one", "two", "three"), ("a", "b", "c")}
107xProps.PIntUnSetTuple = (42, {"one", "two", "three"})
108
109# END of xProp configuration
110
112 TopAlg=[xProps], EvtMax=1, EvtSel="NONE", HistogramPersistency="NONE"
113)
The Application Manager class.
simple DEMO-file for "extended properties", implementation file for class ExtendedProperties