Loading [MathJax]/extensions/tex2jax.js
The Gaudi Framework
master (f31105fd)
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
j
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
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
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
Enumerations
a
c
d
e
f
i
l
m
n
o
p
q
r
s
t
v
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
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
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
q
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
ConfigurableUser.py
Go to the documentation of this file.
1
11
"""
12
Example of usage of ConfigurableUser classes (for high level configuration).
13
"""
14
15
from
Gaudi.Configuration
import
*
16
17
18
class
ExampleIO
(
ConfigurableUser
):
19
__slots__ = {
"EvtMax"
: 1,
"Read"
:
"NONE"
,
"Write"
:
"NONE"
}
20
__used_configurables__ = [ApplicationMgr]
21
22
def
__apply_configuration__
(self):
23
# Propagate the properties to all used configurables
24
# In this case the only effect is to set the ApplicationMgr EvtMax.
25
self.
propagateProperties
()
26
27
read = self.
getProp
(
"Read"
)
28
if
read ==
"NONE"
:
29
ApplicationMgr
(EvtSel=
"NONE"
)
30
else
:
31
log.warning(
32
"%s: Cannot handle value %r of property Read"
, self.
name
(), read
33
)
34
35
write = self.
getProp
(
"Write"
)
36
if
read ==
"NONE"
:
37
ApplicationMgr
(HistogramPersistency=
"NONE"
)
38
else
:
39
log.warning(
40
"%s: Cannot handle value %r of property Write"
, self.
name
(), write
41
)
42
43
44
class
ExampleCommon
(
ConfigurableUser
):
45
__slots__ = {
"OutputLevel"
: INFO}
46
__used_configurables__ = []
47
48
def
__apply_configuration__
(self):
49
MessageSvc
().OutputLevel = self.
getProp
(
"OutputLevel"
)
50
51
52
class
ExampleApplication
(
ConfigurableUser
):
53
__slots__ = {
54
"FullDebug"
:
False
,
55
"TopAlg"
: [],
56
}
57
__used_configurables__ = [ExampleCommon, ApplicationMgr]
58
59
def
__apply_configuration__
(self):
60
if
self.
getProp
(
"FullDebug"
):
61
ExampleCommon
(OutputLevel=VERBOSE)
62
else
:
63
ExampleCommon
(OutputLevel=INFO)
64
# Propagate the properties to all used configurables
65
# In this case the only effect is to set the ApplicationMgr TopAlg.
66
self.
propagateProperties
()
67
68
69
def
PostConfAction
():
70
"""
71
Action printing the result of the configuration of the ApplicationMgr.
72
"""
73
print(
"==== Configuration completed ===="
)
74
print(
ApplicationMgr
())
75
76
77
appendPostConfigAction
(PostConfAction)
78
79
ExampleApplication
(TopAlg=[
"GaudiTestSuite::TimingAlg/Timing"
], FullDebug=
True
)
80
ExampleIO
(EvtMax=10)
GaudiKernel.Configurable.ConfigurableUser
Definition:
Configurable.py:1361
ConfigurableUser.ExampleCommon
Definition:
ConfigurableUser.py:44
GaudiKernel.Configurable.ConfigurableUser.propagateProperties
def propagateProperties(self, names=None, others=None, force=True)
Definition:
Configurable.py:1517
GaudiKernel.Configurable.Configurable.getProp
def getProp(self, name)
Definition:
Configurable.py:773
ConfigurableUser.ExampleIO
Definition:
ConfigurableUser.py:18
ConfigurableUser.ExampleApplication.__apply_configuration__
def __apply_configuration__(self)
Definition:
ConfigurableUser.py:59
GaudiKernel.Configurable.Configurable.name
def name(self)
Definition:
Configurable.py:805
ConfigurableUser.ExampleCommon.__apply_configuration__
def __apply_configuration__(self)
Definition:
ConfigurableUser.py:48
GaudiKernel.Configurable.appendPostConfigAction
def appendPostConfigAction(function)
Definition:
Configurable.py:1581
Gaudi.Configuration
Definition:
Configuration.py:1
MessageSvc
Definition:
MessageSvc.h:40
ConfigurableUser.ExampleApplication
Definition:
ConfigurableUser.py:52
ConfigurableUser.PostConfAction
def PostConfAction()
Definition:
ConfigurableUser.py:69
ApplicationMgr
Definition:
ApplicationMgr.h:57
ConfigurableUser.ExampleIO.__apply_configuration__
def __apply_configuration__(self)
Definition:
ConfigurableUser.py:22
GaudiTestSuite
options
ConfigurableUser.py
Generated on Mon Apr 7 2025 16:26:25 for The Gaudi Framework by
1.8.18