The Gaudi Framework  master (37c0b60a)
Properties.py
Go to the documentation of this file.
1 
11 
12 # common configuration plus output level threshold
13 from Configurables import GaudiTestSuiteCommonConf
14 from Gaudi.Configuration import *
15 
16 GaudiTestSuiteCommonConf(OutputLevel=INFO)
17 
18 from GaudiKernel import SystemOfUnits as units
19 
20 # test the job opts search path mechanism
21 # The environment variable JOBOPTSEARCHPATH controls it
22 importOptions("optsub1/dummy1.opts")
23 
24 from Configurables import PropertyAlg, PropertyProxy
25 
26 # --------------------------------------------------------------
27 # Algorithms Private Options
28 # --------------------------------------------------------------
29 alg = PropertyAlg(
30  OutputLevel=3,
31  Int=101,
32  Int64=1 << 32,
33  UInt64=int(1 << 32), # 'int' is used for testing
34  Double=101.1e10,
35  String='hundred "one"',
36  Bool=False,
37  IntArray=[1, 2, 3, 5],
38  Int64Array=[1 << 32],
39  UInt64Array=[int(1 << 32)], # 'int' is used for testing
40  DoubleArray=[-11.0, 2.0, 3.3, 0.4e-03, 1.0e-20, 1.0e20],
41  StringArray=["one", "two", "four"],
42  StringMap={"one": "une"},
43  BoolArray=[False, True, False],
44  EmptyArray=[],
45  IntSet=[1, 1, 2], # this becomes [1, 2]
46  StringSet=["one", "two"],
47  FloatUnorderedSet={1.1, 2.2},
48  # Units testing
49  DoubleArrayWithUnits=[
50  1.1 * units.m2,
51  -2.0 * units.cm,
52  3.3 * units.cm,
53  0.4e-03 * units.m,
54  ],
55  DoubleArrayWithoutUnits=[1100000.0, -20.0, 33.0, 0.4],
56  PInt=101,
57  PDouble=101.0e5,
58  PString="hundred 'one'",
59  PBool=True,
60  PIntArray=[1, 2, 3, 5],
61  PDoubleArray=[1.1, 2.0, 3.3, 1.0e-20, 1.0e20],
62  PStringArray=["one", "two", "four"],
63  PBoolArray=[True, False, True, False],
64  IntPairArray=[(1, 2), (3, 4), (5, 6)],
65  DoublePairArray=[(1.1, 2.1), (2.3, 4.5), (5.6, 6.7)],
66 )
67 
68 # FIXME: remote properties not supported by configurables
69 # proxy = PropertyProxy(String = "This is set by the proxy")
70 proxy = PropertyProxy()
71 
72 # --------------------------------------------------------------
73 # Private Application Configuration options
74 # --------------------------------------------------------------
76 app.TopAlg = [alg]
77 # test for the multiple inclusion of the same alg
78 app.TopAlg += [alg, proxy]
79 # test for the removal of an algorithm
80 app.TopAlg.remove(alg)
81 
82 # --------------------------------------------------------------
83 # Event related parameters
84 # --------------------------------------------------------------
85 app.EvtMax = 1 # events to be processed (default is 10)
86 app.EvtSel = "NONE" # do not use any event input
87 app.HistogramPersistency = "NONE"
88 
89 # --------------------------------------------------------------
90 # MessageSvc Properties testing
91 # --------------------------------------------------------------
92 msgSvc = MessageSvc()
93 msgSvc.setDebug += ["EventLoopMgr"]
94 msgSvc.setVerbose += ["MsgTest"]
95 # msgSvc.setDebug += ["MsgTest"]
96 # msgSvc.setInfo += ["MsgTest"]
97 # msgSvc.setError += ["MsgTest"]
98 msgSvc.setWarning += ["MsgTest"]
99 # msgSvc.setFatal += ["MsgTest"]
100 # msgSvc.setAlways += ["MsgTest"]
GaudiKernel.PropertyProxy.PropertyProxy
Definition: PropertyProxy.py:80
Gaudi.Configuration
Definition: Configuration.py:1
GaudiKernel.ProcessJobOptions.importOptions
def importOptions(optsfile)
Definition: ProcessJobOptions.py:541
MessageSvc
Definition: MessageSvc.h:40
ApplicationMgr
Definition: ApplicationMgr.h:57