The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
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# =============================================================================
22__author__ = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
23from Configurables import ApplicationMgr
24from Configurables import Gaudi__TestSuite__StringKeyEx as SKE
25
26# =============================================================================
27# @file
28# Simple example which illustrates the usage of class StringKey
29# @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
30# @date 2009-10-07
31# =============================================================================
32
33ske = SKE("StringKeys", Key="key", Keys=["a", "b", "key", "c", "d"])
34
35ApplicationMgr(EvtSel="NONE", TopAlg=[ske], EvtMax=10)
36
37# =============================================================================
38# The actual job excution
39# =============================================================================
40if "__main__" == __name__:
41 print(__doc__)
42 print(__author__)
43
44 from GaudiPython.Bindings import AppMgr
45
46 gaudi = AppMgr()
47
48 gaudi.run(1)
49
50 ske = gaudi.algorithm("StringKeys")
51
52 ske.PropertiesPrint = True
53
54 from GaudiPython.Bindings import gbl as cpp
55
56 SK = cpp.Gaudi.StringKey
57
58 key = SK("new Key")
59
60 print("set new key: ", key)
61
62 ske.Key = key
63
64 keys = [key, "rrr", SK("s")]
65
66 print("set new keys: ", keys)
67
68 ske.Keys = keys
69
70 ske.PropertiesPrint = True
71
72 gaudi.run(1)
73
74# =============================================================================
75# The END
76# =============================================================================
The Application Manager class.