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