The Gaudi Framework  v36r1 (3e2fb5a8)
bug_38882.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
13 
14 # =============================================================================
15 from __future__ import print_function
16 __author__ = 'Marco Clemencic'
17 # =============================================================================
18 
19 import GaudiPython
20 
21 from GaudiPython.GaudiAlgs import GaudiAlgo
22 
23 SUCCESS = GaudiPython.SUCCESS
24 
25 # =============================================================================
26 # Simple algorithm which book&fill 3 histograms
27 # =============================================================================
28 
29 
31  """ Simple algorithm that prints a message during execute """
32 
33  def __init__(self, name):
34  """ Constructor """
35  GaudiAlgo.__init__(self, name)
36 
37  def execute(self):
38  """ The main method 'execute', it is invoked for each event """
39  print("=== %s Execute ===" % self.name())
40  return SUCCESS
41 
42 
43 # =============================================================================
44 # job configuration
45 # =============================================================================
46 
47 
48 def configure(gaudi=None):
49  """ Configuration of the job """
50 
51  if not gaudi:
52  gaudi = GaudiPython.AppMgr()
53 
54  gaudi.JobOptionsType = 'NONE'
55  gaudi.EvtSel = 'NONE'
56  gaudi.HistogramPersistency = 'NONE'
57 
58  gaudi.config()
59 
60  gaudi.initialize()
61 
62  alg = TestAlg('bug_38882_test_alg')
63  gaudi.setAlgorithms([alg])
64 
65  return SUCCESS
66 
67 
68 # =============================================================================
69 # The actual job excution
70 # =============================================================================
71 if '__main__' == __name__:
73  configure(gaudi)
74  gaudi.run(1)
bug_38882.TestAlg.execute
def execute(self)
Definition: bug_38882.py:37
GaudiPython.Bindings.AppMgr
Definition: Bindings.py:842
bug_38882.TestAlg.__init__
def __init__(self, name)
Definition: bug_38882.py:33
GaudiPython.GaudiAlgs.GaudiAlgo
Definition: GaudiAlgs.py:639
bug_38882.TestAlg
Definition: bug_38882.py:30
GaudiPython.GaudiAlgs
Definition: GaudiAlgs.py:1
bug_38882.configure
def configure(gaudi=None)
Definition: bug_38882.py:48