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