The Gaudi Framework  v38r0 (2143aa4c)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 __author__ = "Vanya BELYAEV Ivan.Belyaev@nikhef.nl"
23 from Configurables import ApplicationMgr
24 from Configurables import Gaudi__Examples__BoostArrayProperties as BAP
25 
26 # =============================================================================
27 # @file
28 # Simple which illustrates
29 # the 'array-like' job-properties and their C++/Python intercommunication
30 # @author Vanya BELYAEV Ivan.Belyaev@nikhef.nl
31 # @date 2007-02-13
32 # =============================================================================
33 
34 bap = BAP(
35  "BoostArrayProps", Strings=("a", "bb", "ccc", "dddd"), Doubles=(1, 2, 3, 4, 5)
36 )
37 
38 ApplicationMgr(EvtSel="NONE", TopAlg=[bap], EvtMax=10)
39 
40 # =============================================================================
41 # The actual job excution
42 # =============================================================================
43 if "__main__" == __name__:
44  print(__doc__, __author__)
45 
46  from GaudiPython.Bindings import AppMgr
47 
48  gaudi = AppMgr()
49 
50  gaudi.run(5)
51 
52  bap = gaudi.algorithm("BoostArrayProps")
53 
54  bap.PropertiesPrint = True
55 
56  import warnings
57 
58  from GaudiKernel import ROOT6WorkAroundEnabled
59 
60  with warnings.catch_warnings():
61  if ROOT6WorkAroundEnabled("ROOT-7142"):
62  warnings.simplefilter("ignore")
63  bap.Doubles = [-1, -2, -3, -4, -5]
64  bap.Strings = ["a1", "a2", "a3", "a4"]
65 
66  bap.PropertiesPrint = True
67 
68 # =============================================================================
69 # The END
70 # =============================================================================
GaudiKernel.ROOT6WorkAroundEnabled
def ROOT6WorkAroundEnabled(id=None)
Definition: __init__.py:14
GaudiPython.Bindings.AppMgr
Definition: Bindings.py:884
GaudiPython.Bindings
Definition: Bindings.py:1