The Gaudi Framework
v37r1 (a7f61348)
Configuration.py
Go to the documentation of this file.
1
11
"""
12
Module with the ConfigurablesUser for the common configuration in the examples.
13
14
@author Marco Clemencic <marco.clemencic@cern.ch>
15
"""
16
17
from
Gaudi.Configuration
import
INFO
18
from
GaudiKernel.Configurable
import
ConfigurableUser, SuperAlgorithm
19
20
21
class
GaudiExamplesCommonConf
(
ConfigurableUser
):
22
"""Enable common configuration for GaudiExamples tests."""
23
24
__slots__ = {
"OutputLevel"
: INFO,
"DummyEvents"
: -1}
25
26
def
__apply_configuration__
(self):
27
from
Configurables
import
ApplicationMgr, AuditorSvc, ChronoAuditor, MessageSvc
28
29
AuditorSvc
().Auditors.append(
ChronoAuditor
())
30
appmgr =
ApplicationMgr
()
31
self.
propagateProperties
(others=
MessageSvc
())
32
if
self.
getProp
(
"DummyEvents"
) >= 0:
33
appmgr.EvtMax = self.
getProp
(
"DummyEvents"
)
34
appmgr.EvtSel =
"NONE"
35
36
37
class
Gaudi_Test_MySuperAlg
(
SuperAlgorithm
):
38
"""
39
Example implementation of a SuperAlgorithm specialization.
40
"""
41
42
def
_initGraph
(self):
43
"""
44
Prepare the graph represented by the SuperAlgorithm.
45
"""
46
from
Configurables
import
Gaudi__Examples__EventCounter
as
EventCounter
47
from
Configurables
import
Gaudi__Examples__Prescaler
as
Prescaler
48
from
Configurables
import
HelloWorld
49
50
p = self.
_makeAlg
(Prescaler, name=
"Prescaler"
, PercentPass=50.0)
51
h = self.
_makeAlg
(HelloWorld, name=
"HW"
)
52
c = self.
_makeAlg
(EventCounter, name=
"Counter"
)
53
return
p & h & c
GaudiKernel.Configurable.ConfigurableUser
Definition:
Configurable.py:1357
GaudiKernel.Configurable.SuperAlgorithm
Definition:
Configurable.py:1851
GaudiExamples.Configuration.GaudiExamplesCommonConf
Definition:
Configuration.py:21
GaudiKernel.Configurable.ConfigurableUser.propagateProperties
def propagateProperties(self, names=None, others=None, force=True)
Definition:
Configurable.py:1513
GaudiKernel.Configurable.Configurable.getProp
def getProp(self, name)
Definition:
Configurable.py:777
AuditorSvc
Definition:
AuditorSvc.h:28
GaudiKernel.Configurable
Definition:
Configurable.py:1
Gaudi.Configuration
Definition:
Configuration.py:1
GaudiExamples.Configuration.Gaudi_Test_MySuperAlg
Definition:
Configuration.py:37
GaudiKernel.Configurable.SuperAlgorithm._makeAlg
def _makeAlg(self, typ, **kwargs)
Definition:
Configurable.py:1900
GaudiExamples.Configuration.GaudiExamplesCommonConf.__apply_configuration__
def __apply_configuration__(self)
Definition:
Configuration.py:26
GaudiExamples.Configuration.Gaudi_Test_MySuperAlg._initGraph
def _initGraph(self)
Definition:
Configuration.py:42
MessageSvc
Definition:
MessageSvc.h:40
ApplicationMgr
Definition:
ApplicationMgr.h:57
ChronoAuditor
Definition:
ChronoAuditor.h:24
GaudiExamples
python
GaudiExamples
Configuration.py
Generated on Mon Oct 30 2023 11:39:48 for The Gaudi Framework by
1.8.18