The Gaudi Framework  v38r1p1 (ae26267b)
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  # Units testing
46  DoubleArrayWithUnits=[
47  1.1 * units.m2,
48  -2.0 * units.cm,
49  3.3 * units.cm,
50  0.4e-03 * units.m,
51  ],
52  DoubleArrayWithoutUnits=[1100000.0, -20.0, 33.0, 0.4],
53  PInt=101,
54  PDouble=101.0e5,
55  PString="hundred 'one'",
56  PBool=True,
57  PIntArray=[1, 2, 3, 5],
58  PDoubleArray=[1.1, 2.0, 3.3, 1.0e-20, 1.0e20],
59  PStringArray=["one", "two", "four"],
60  PBoolArray=[True, False, True, False],
61  IntPairArray=[(1, 2), (3, 4), (5, 6)],
62  DoublePairArray=[(1.1, 2.1), (2.3, 4.5), (5.6, 6.7)],
63 )
64 
65 # FIXME: remote properties not supported by configurables
66 # proxy = PropertyProxy(String = "This is set by the proxy")
67 proxy = PropertyProxy()
68 
69 # --------------------------------------------------------------
70 # Private Application Configuration options
71 # --------------------------------------------------------------
73 app.TopAlg = [alg]
74 # test for the multiple inclusion of the same alg
75 app.TopAlg += [alg, proxy]
76 # test for the removal of an algorithm
77 app.TopAlg.remove(alg)
78 
79 # --------------------------------------------------------------
80 # Event related parameters
81 # --------------------------------------------------------------
82 app.EvtMax = 1 # events to be processed (default is 10)
83 app.EvtSel = "NONE" # do not use any event input
84 app.HistogramPersistency = "NONE"
85 
86 # --------------------------------------------------------------
87 # MessageSvc Properties testing
88 # --------------------------------------------------------------
89 msgSvc = MessageSvc()
90 msgSvc.setDebug += ["EventLoopMgr"]
91 msgSvc.setVerbose += ["MsgTest"]
92 # msgSvc.setDebug += ["MsgTest"]
93 # msgSvc.setInfo += ["MsgTest"]
94 # msgSvc.setError += ["MsgTest"]
95 msgSvc.setWarning += ["MsgTest"]
96 # msgSvc.setFatal += ["MsgTest"]
97 # msgSvc.setAlways += ["MsgTest"]
GaudiKernel.PropertyProxy.PropertyProxy
Definition: PropertyProxy.py:81
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