The Gaudi Framework
v36r16 (ea80daf8)
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
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
w
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
ConfigurableUser.py
Go to the documentation of this file.
1
11
"""
12
Example of usage of ConfigurableUser classes (for high level configuration).
13
"""
14
from
__future__
import
print_function
15
16
from
Gaudi.Configuration
import
*
17
18
19
class
ExampleIO
(
ConfigurableUser
):
20
__slots__ = {
"EvtMax"
: 1,
"Read"
:
"NONE"
,
"Write"
:
"NONE"
}
21
__used_configurables__ = [ApplicationMgr]
22
23
def
__apply_configuration__
(self):
24
# Propagate the properties to all used configurables
25
# In this case the only effect is to set the ApplicationMgr EvtMax.
26
self.
propagateProperties
()
27
28
read = self.
getProp
(
"Read"
)
29
if
read ==
"NONE"
:
30
ApplicationMgr
(EvtSel=
"NONE"
)
31
else
:
32
log.warning(
33
"%s: Cannot handle value %r of property Read"
, self.
name
(), read
34
)
35
36
write = self.
getProp
(
"Write"
)
37
if
read ==
"NONE"
:
38
ApplicationMgr
(HistogramPersistency=
"NONE"
)
39
else
:
40
log.warning(
41
"%s: Cannot handle value %r of property Write"
, self.
name
(), write
42
)
43
44
45
class
ExampleCommon
(
ConfigurableUser
):
46
__slots__ = {
"OutputLevel"
: INFO}
47
__used_configurables__ = []
48
49
def
__apply_configuration__
(self):
50
MessageSvc
().OutputLevel = self.
getProp
(
"OutputLevel"
)
51
52
53
class
ExampleApplication
(
ConfigurableUser
):
54
__slots__ = {
55
"FullDebug"
:
False
,
56
"TopAlg"
: [],
57
}
58
__used_configurables__ = [ExampleCommon, ApplicationMgr]
59
60
def
__apply_configuration__
(self):
61
if
self.
getProp
(
"FullDebug"
):
62
ExampleCommon
(OutputLevel=VERBOSE)
63
else
:
64
ExampleCommon
(OutputLevel=INFO)
65
# Propagate the properties to all used configurables
66
# In this case the only effect is to set the ApplicationMgr TopAlg.
67
self.
propagateProperties
()
68
69
70
def
PostConfAction
():
71
"""
72
Action printing the result of the configuration of the ApplicationMgr.
73
"""
74
print(
"==== Configuration completed ===="
)
75
print(
ApplicationMgr
())
76
77
78
appendPostConfigAction
(PostConfAction)
79
80
ExampleApplication
(TopAlg=[
"GaudiExamples::TimingAlg/Timing"
], FullDebug=
True
)
81
ExampleIO
(EvtMax=10)
GaudiKernel.Configurable.ConfigurableUser
Definition:
Configurable.py:1359
ConfigurableUser.ExampleCommon
Definition:
ConfigurableUser.py:45
GaudiKernel.Configurable.ConfigurableUser.propagateProperties
def propagateProperties(self, names=None, others=None, force=True)
Definition:
Configurable.py:1515
GaudiKernel.Configurable.Configurable.getProp
def getProp(self, name)
Definition:
Configurable.py:778
ConfigurableUser.ExampleIO
Definition:
ConfigurableUser.py:19
ConfigurableUser.ExampleApplication.__apply_configuration__
def __apply_configuration__(self)
Definition:
ConfigurableUser.py:60
GaudiKernel.Configurable.Configurable.name
def name(self)
Definition:
Configurable.py:810
ConfigurableUser.ExampleCommon.__apply_configuration__
def __apply_configuration__(self)
Definition:
ConfigurableUser.py:49
GaudiKernel.Configurable.appendPostConfigAction
def appendPostConfigAction(function)
Definition:
Configurable.py:1579
Gaudi.Configuration
Definition:
Configuration.py:1
MessageSvc
Definition:
MessageSvc.h:40
ConfigurableUser.ExampleApplication
Definition:
ConfigurableUser.py:53
ConfigurableUser.PostConfAction
def PostConfAction()
Definition:
ConfigurableUser.py:70
ApplicationMgr
Definition:
ApplicationMgr.h:57
ConfigurableUser.ExampleIO.__apply_configuration__
def __apply_configuration__(self)
Definition:
ConfigurableUser.py:23
GaudiExamples
options
ConfigurableUser.py
Generated on Fri Jul 28 2023 16:22:53 for The Gaudi Framework by
1.8.18