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