The Gaudi Framework  master (b9786168)
Loading...
Searching...
No Matches
Histograms_with_global.py
Go to the documentation of this file.
11from GaudiConfig2 import Configurables as C
12from GaudiConfig2 import useGlobalInstances
13
14useGlobalInstances(True)
15
16C.AuditorSvc("AuditorSvc", Auditors=["ChronoAuditor"])
17
18# algorithms
19algorithms = [
20 C.Gaudi.TestSuite.Counter.GaudiHistoAlgorithm("SimpleCounterHistos", OutputLevel=2),
21]
22
23app = C.ApplicationMgr(
24 "ApplicationMgr",
25 TopAlg=["SimpleCounterHistos"],
26 EvtMax=50000,
27 EvtSel="NONE",
28)
29try:
30 app.TopAlg.append("MessageSvc")
31 assert False, "this is not expected"
32except TypeError:
33 pass # this is expected
34
35app.TopAlg[0].OutputLevel = 2
36
37app.MessageSvcType = "MessageSvc"
38app.MessageSvcType.OutputLevel = 3
39app.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"]
40
41try:
42 app.JobOptionsSvcType = "MessageSvc"
43 assert False, "this is not expected"
44except TypeError:
45 pass # this is expected
46
47app.HistogramPersistency = "ROOT"
48C.RootHistCnv.PersSvc("RootHistSvc", OutputFile="histo-c2g.root")
49
50C.HistogramSvc(
51 "HistogramDataSvc",
52 OutputLevel=2,
53)