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