Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework  v38r0 (2143aa4c)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
StringKeyEx.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 
13 """
14 *******************************************************************************
15 * *
16 * Simple example which illustrates the usage of class StringKey *
17 * *
18 *******************************************************************************
19 """
20 # =============================================================================
21 __author__ = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
22 from Configurables import ApplicationMgr
23 from Configurables import Gaudi__Examples__StringKeyEx as SKE
24 
25 # =============================================================================
26 # @file
27 # Simple example which illustrates the usage of class StringKey
28 # @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
29 # @date 2009-10-07
30 # =============================================================================
31 
32 ske = SKE("StringKeys", Key="key", Keys=["a", "b", "key", "c", "d"])
33 
34 ApplicationMgr(EvtSel="NONE", TopAlg=[ske], EvtMax=10)
35 
36 # =============================================================================
37 # The actual job excution
38 # =============================================================================
39 if "__main__" == __name__:
40  print(__doc__)
41  print(__author__)
42 
43  from GaudiPython.Bindings import AppMgr
44 
45  gaudi = AppMgr()
46 
47  gaudi.run(1)
48 
49  ske = gaudi.algorithm("StringKeys")
50 
51  ske.PropertiesPrint = True
52 
53  from GaudiPython.Bindings import gbl as cpp
54 
55  SK = cpp.Gaudi.StringKey
56 
57  key = SK("new Key")
58 
59  print("set new key: ", key)
60 
61  ske.Key = key
62 
63  keys = [key, "rrr", SK("s")]
64 
65  print("set new keys: ", keys)
66 
67  ske.Keys = keys
68 
69  ske.PropertiesPrint = True
70 
71  gaudi.run(1)
72 
73 # =============================================================================
74 # The END
75 # =============================================================================
GaudiPython.Bindings.AppMgr
Definition: Bindings.py:884
GaudiPython.Bindings
Definition: Bindings.py:1
StringKeyEx.SK
SK
Definition: StringKeyEx.py:55