Loading [MathJax]/extensions/MathMenu.js
The Gaudi Framework
v36r7 (7f57a304)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
w
x
Enumerations
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
r
s
t
Enumerator
a
b
c
d
e
f
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Properties
Related Functions
:
a
b
c
d
e
g
h
i
m
o
p
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Functions
_
b
c
e
f
g
h
i
l
m
n
o
p
r
s
t
u
z
Variables
a
b
c
d
e
g
h
i
m
o
p
r
s
t
v
x
Typedefs
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
Enumerations
Enumerator
c
e
f
p
u
v
Macros
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
Mix.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
18
"""
19
Simple example to illustrate the problem for task #13911
20
https://savannah.cern.ch/task/?13911
21
"""
22
from
__future__
import
print_function
23
24
# =============================================================================
25
__author__ =
"Vanya BELYAEV Ivan.Belyaev@itep.ru"
26
__date__ =
"2010-04-24"
27
# =============================================================================
28
import
sys
29
30
from
Configurables
import
GaudiSequencer, HelloWorld, Sequencer
31
from
Gaudi.Configuration
import
*
32
from
GaudiPython.Bindings
import
AppMgr
33
from
GaudiPython.Bindings
import
gbl
as
cpp
34
from
GaudiPython.Bindings
import
setOwnership
35
from
GaudiPython.GaudiAlgs
import
SUCCESS, GaudiAlgo
36
37
# =============================================================================
38
# @class SimpleAlgo
39
# very simple (empty) python algorith
40
# @author Vanya BELYAEV Ivan.Belyaev@itep.ru
41
# @date 2010-04-24
42
43
44
class
SimpleAlgo
(
GaudiAlgo
):
45
def
execute
(self):
46
47
print(
"I am SimpleAlgo.execute! "
, self.name())
48
sys.stdout.flush()
49
50
return
SUCCESS
51
52
53
# =============================================================================
54
# configure the application :
55
56
57
def
configure
():
58
59
importOptions
(
"Common.opts"
)
60
61
ApplicationMgr
(
62
TopAlg=[
63
HelloWorld(),
64
GaudiSequencer(
65
"MySequencer"
,
66
MeasureTime=
True
,
67
Members=[HelloWorld(
"Hello1"
), HelloWorld(
"Hello2"
)],
68
),
69
],
70
# do not use any event input
71
EvtSel=
"NONE"
,
72
)
73
74
gaudi =
AppMgr
()
75
76
# create two "identical" algorithms:
77
78
myAlg1 =
SimpleAlgo
(
"Simple1"
)
79
myAlg2 =
SimpleAlgo
(
"Simple2"
)
80
81
# Adding something into TopAlg-sequence is OK:
82
gaudi.setAlgorithms([myAlg1] + gaudi.TopAlg)
83
84
# Extending of "other"-sequences causes failures:
85
seq = gaudi.algorithm(
"MySequencer"
)
86
87
seq.Members += [
"HelloWorld/Hello3"
]
# it is ok
88
seq.Members += [myAlg2.name()]
# it fails
89
90
91
if
"__main__"
== __name__:
92
93
# make printout of the own documentations
94
print(
"*"
* 120)
95
print(__doc__)
96
print(
" Author : %s "
% __author__)
97
print(
" Date : %s "
% __date__)
98
print(
"*"
* 120)
99
sys.stdout.flush()
100
101
configure
()
102
103
gaudi =
AppMgr
()
104
105
gaudi.run(4)
106
107
# add 'late' algorithms
108
109
myAlg3 =
SimpleAlgo
(
"Simple3"
)
110
111
seq = gaudi.algorithm(
"MySequencer"
)
112
seq.Members += [
"HelloWorld/Hello4"
]
113
114
gaudi.run(8)
115
116
seq.Members += [myAlg3.name()]
117
118
gaudi.run(3)
119
120
# =============================================================================
121
# The END
122
# =============================================================================
Mix.configure
def configure()
Definition:
Mix.py:57
Mix.SimpleAlgo
Definition:
Mix.py:44
GaudiPython.Bindings.AppMgr
Definition:
Bindings.py:873
Mix.SimpleAlgo.execute
def execute(self)
Definition:
Mix.py:45
GaudiPython.GaudiAlgs.GaudiAlgo
Definition:
GaudiAlgs.py:638
GaudiPython.Bindings
Definition:
Bindings.py:1
Gaudi.Configuration
Definition:
Configuration.py:1
GaudiKernel.ProcessJobOptions.importOptions
def importOptions(optsfile)
Definition:
ProcessJobOptions.py:541
ApplicationMgr
Definition:
ApplicationMgr.h:57
GaudiPython.GaudiAlgs
Definition:
GaudiAlgs.py:1
GaudiExamples
scripts
Mix.py
Generated on Fri Jul 29 2022 20:50:40 for The Gaudi Framework by
1.8.18