The Gaudi Framework  master (181af51f)
Loading...
Searching...
No Matches
ConfigurableUser.py
Go to the documentation of this file.
11"""
12Example of usage of ConfigurableUser classes (for high level configuration).
13"""
14
15from Gaudi.Configuration import *
16
17
19 __slots__ = {"EvtMax": 1, "Read": "NONE", "Write": "NONE"}
20 __used_configurables__ = [ApplicationMgr]
21
23 # Propagate the properties to all used configurables
24 # In this case the only effect is to set the ApplicationMgr EvtMax.
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
45 __slots__ = {"OutputLevel": INFO}
46 __used_configurables__ = []
47
49 MessageSvc().OutputLevel = self.getProp("OutputLevel")
50
51
53 __slots__ = {
54 "FullDebug": False,
55 "TopAlg": [],
56 }
57 __used_configurables__ = [ExampleCommon, ApplicationMgr]
58
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.
67
68
70 """
71 Action printing the result of the configuration of the ApplicationMgr.
72 """
73 print("==== Configuration completed ====")
74 print(ApplicationMgr())
75
76
77appendPostConfigAction(PostConfAction)
78
79ExampleApplication(TopAlg=["GaudiTestSuite::TimingAlg/Timing"], FullDebug=True)
80ExampleIO(EvtMax=10)
The Application Manager class.
propagateProperties(self, names=None, others=None, force=True)