The Gaudi Framework  master (e68eea06)
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::map<int,double>
37xProps.MapIntDouble = {1: 0.1, 2: 0.2, 3: 0.3}
38
39# std::map<std::string,std::string>
40xProps.MapStringString = {
41 "a": "sddsgsgsdgdggf",
42 "b": "sddsgsgsdgdggf",
43 "c": "sddsgsgsdgdggf",
44}
45
46# std::map<std::string,int>
47xProps.MapStringInt = {"a": 1, "b": 2, "c": 3}
48
49# std::map<std::string,int>
50xProps.MapStringDouble = {"aa": 0.1, "bb": 0.2, "cc": 3}
51
52# std::map<std::string,std::vector<std::string> >
53xProps.MapStringVectorOfStrings = {
54 "aaa": ["a", "b", "c"],
55 "bbb": ["a", "b", "c"],
56 "ccc": ["a", "b", "c"],
57}
58
59# std::map<std::string,std::vector<double> >
60xProps.MapStringVectorOfDoubles = {
61 "aaa": [1, 2, 3],
62 "bbb": [1.0, 2.0, 3.0],
63 "ccc": [0.1, 0.2, 0.3],
64}
65
66# std::map<std::string,std::vector<int> >
67xProps.MapStringVectorOfInts = {"aaa": [1, 2, 3], "bbb": [4, 5, 6], "ccc": [7, 8, 9]}
68
69# std::map<int,int>
70xProps.MapIntInt = {1: 10, 2: 20, 3: 30}
71
72# std::vector<std::pair<int,int> >
73xProps.VectorOfPairsII = [(1, 1), (2, 1), (3, 2), (4, 3), (5, 5)]
74
75# std::map<int,std::string>
76xProps.MapIntString = {0: "zero", 2: "two", -1: "minus one"}
77
78# std::map<unsigned int,std::string>
79xProps.MapUIntString = {0: "UZero", 2: "UTwo", 1: "UOne"}
80
81xProps.EmptyMap = {}
82xProps.EmptyVector = []
83
84xProps.TupleStringIntDouble = ("hello", 10, 0.001)
85xProps.TupleString = ("hello",)
86
87xProps.SetOfInt = {1, 2}
88xProps.SetOfString = {"a", "b"}
89
90xProps.StdArrayDouble3 = (3.3, 2.2, 1.1)
91xProps.StdArrayInt1 = (42,)
92
93xProps.GaudiMapSS = {"a": "1", "b": "2"}
94
95# DataObjIDColl
96xProps.ExtraInputs = set()
97xProps.ExtraOutputs = {"a", ("a", "b"), (1, "a")}
98
99xProps.PTupleVector = [("one", "two", "three"), ("a", "b", "c")]
100xProps.PIntVectorTuple = (42, ["one", "two", "three"])
101xProps.PTupleSet = [("one", "two", "three"), ("a", "b", "c")]
102xProps.PIntSetTuple = (42, ["one", "two", "three"])
103xProps.PTupleUnSet = {("one", "two", "three"), ("a", "b", "c")}
104xProps.PIntUnSetTuple = (42, {"one", "two", "three"})
105
106# END of xProp configuration
107
109 TopAlg=[xProps], EvtMax=1, EvtSel="NONE", HistogramPersistency="NONE"
110)
The Application Manager class.
simple DEMO-file for "extended properties", implementation file for class ExtendedProperties