The Gaudi Framework  master (37c0b60a)
BoostArrayProperties.py
Go to the documentation of this file.
1 #!/usr/bin/env python3
2 
13 """
14 *******************************************************************************
15 * *
16 * Simple example which illustrate the 'boost::array'-job-properties and their *
17 * C++/Python intercommunications *
18 * *
19 *******************************************************************************
20 """
21 
22 # =============================================================================
23 __author__ = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
24 from Configurables import ApplicationMgr
25 from Configurables import Gaudi__TestSuite__BoostArrayProperties as BAP
26 
27 # =============================================================================
28 # @file
29 # Simple which illustrates
30 # the 'array-like' job-properties and their C++/Python intercommunication
31 # @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
32 # @date 2007-02-13
33 # =============================================================================
34 
35 bap = BAP(
36  "BoostArrayProps", Strings=("a", "bb", "ccc", "dddd"), Doubles=(1, 2, 3, 4, 5)
37 )
38 
39 ApplicationMgr(EvtSel="NONE", TopAlg=[bap], EvtMax=10)
40 
41 # =============================================================================
42 # The actual job excution
43 # =============================================================================
44 if "__main__" == __name__:
45  print(__doc__, __author__)
46 
47  from GaudiPython.Bindings import AppMgr
48 
49  gaudi = AppMgr()
50 
51  gaudi.run(5)
52 
53  bap = gaudi.algorithm("BoostArrayProps")
54 
55  bap.PropertiesPrint = True
56 
57  import warnings
58 
59  from GaudiKernel import ROOT6WorkAroundEnabled
60 
61  with warnings.catch_warnings():
62  if ROOT6WorkAroundEnabled("ROOT-7142"):
63  warnings.simplefilter("ignore")
64  bap.Doubles = [-1, -2, -3, -4, -5]
65  bap.Strings = ["a1", "a2", "a3", "a4"]
66 
67  bap.PropertiesPrint = True
68 
69 # =============================================================================
70 # The END
71 # =============================================================================
GaudiKernel.ROOT6WorkAroundEnabled
def ROOT6WorkAroundEnabled(id=None)
Definition: __init__.py:14
GaudiPython.Bindings.AppMgr
Definition: Bindings.py:887
GaudiPython.Bindings
Definition: Bindings.py:1