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