The Gaudi Framework  master (37c0b60a)
ExtendedProperties.py
Go to the documentation of this file.
1 
13 from Configurables import ExtendedProperties, GaudiTestSuiteCommonConf
14 from Gaudi.Configuration import *
15 
16 GaudiTestSuiteCommonConf()
17 
18 from GaudiKernel.SystemOfUnits import *
19 
20 # BEGIN of xProp configuration
21 
22 xProps = ExtendedProperties("xProps")
23 xProps.PairDD = (3.141592 * m, 2.18281828) # std::pair<double,double>
24 xProps.PairII = (3, 2) # std::pair<int,int>
25 
26 # std::vector<std::pair<double,double> >
27 xProps.VectorOfPairsDD += [(0, 1), (1, 2), (2, 3), (3, 4)]
28 xProps.VectorOfPairsDD += [(4, 5), (5, 6), (6, 7), (7, 8)]
29 
30 # std::vector<std::vector<std::string> >
31 xProps.VectorOfVectorsString = [["a", "b", "c"], ["A", "B", "C"]]
32 
33 # std::vector<std::vector<double> >
34 xProps.VectorOfVectorsDouble = [[0, 1, 2], [0, -0.5, -0.25]]
35 
36 # std::map<int,double>
37 xProps.MapIntDouble = {1: 0.1, 2: 0.2, 3: 0.3}
38 
39 # std::map<std::string,std::string>
40 xProps.MapStringString = {
41  "a": "sddsgsgsdgdggf",
42  "b": "sddsgsgsdgdggf",
43  "c": "sddsgsgsdgdggf",
44 }
45 
46 # std::map<std::string,int>
47 xProps.MapStringInt = {"a": 1, "b": 2, "c": 3}
48 
49 # std::map<std::string,int>
50 xProps.MapStringDouble = {"aa": 0.1, "bb": 0.2, "cc": 3}
51 
52 # std::map<std::string,std::vector<std::string> >
53 xProps.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> >
60 xProps.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> >
67 xProps.MapStringVectorOfInts = {"aaa": [1, 2, 3], "bbb": [4, 5, 6], "ccc": [7, 8, 9]}
68 
69 # std::map<int,int>
70 xProps.MapIntInt = {1: 10, 2: 20, 3: 30}
71 
72 # std::vector<std::pair<int,int> >
73 xProps.VectorOfPairsII = [(1, 1), (2, 1), (3, 2), (4, 3), (5, 5)]
74 
75 # std::map<int,std::string>
76 xProps.MapIntString = {0: "zero", 2: "two", -1: "minus one"}
77 
78 # std::map<unsigned int,std::string>
79 xProps.MapUIntString = {0: "UZero", 2: "UTwo", 1: "UOne"}
80 
81 xProps.EmptyMap = {}
82 xProps.EmptyVector = []
83 
84 xProps.TupleStringIntDouble = ("hello", 10, 0.001)
85 xProps.TupleString = ("hello",)
86 
87 xProps.SetOfInt = {1, 2}
88 xProps.SetOfString = {"a", "b"}
89 
90 xProps.StdArrayDouble3 = (3.3, 2.2, 1.1)
91 xProps.StdArrayInt1 = (42,)
92 
93 xProps.GaudiMapSS = {"a": "1", "b": "2"}
94 
95 # DataObjIDColl
96 xProps.ExtraInputs = set()
97 xProps.ExtraOutputs = {"a", ("a", "b"), (1, "a")}
98 
99 # END of xProp configuration
100 
102  TopAlg=[xProps], EvtMax=1, EvtSel="NONE", HistogramPersistency="NONE"
103 )
Gaudi.Configuration
Definition: Configuration.py:1
ApplicationMgr
Definition: ApplicationMgr.h:57
ExtendedProperties
Definition: ExtendedProperties.cpp:56
GaudiKernel.SystemOfUnits
Definition: SystemOfUnits.py:1