The Gaudi Framework  v36r10 (fc05264c)
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.GaudiHistoAlgorithm("SimpleHistos", HistoPrint=True, OutputLevel=3),
21  C.Gaudi.Examples.Counter.GaudiHistoAlgorithm("SimpleCounterHistos", OutputLevel=2),
22 ]
23 
24 app = C.ApplicationMgr(
25  "ApplicationMgr",
26  TopAlg=["SimpleHistos", "SimpleCounterHistos"],
27  EvtMax=50000,
28  EvtSel="NONE",
29 )
30 try:
31  app.TopAlg.append("MessageSvc")
32  assert False, "this is not expected"
33 except TypeError:
34  pass # this is expected
35 
36 app.TopAlg[0].OutputLevel = 2
37 
38 app.MessageSvcType = "MessageSvc"
39 app.MessageSvcType.OutputLevel = 3
40 app.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"]
41 
42 try:
43  app.JobOptionsSvcType = "MessageSvc"
44  assert False, "this is not expected"
45 except TypeError:
46  pass # this is expected
47 
48 app.HistogramPersistency = "ROOT"
49 C.RootHistCnv.PersSvc("RootHistSvc", OutputFile="histo-c2g.root")
50 
51 C.HistogramSvc(
52  "HistogramDataSvc",
53  OutputLevel=2,
54  Input=["InFile DATAFILE='../data/input.hbook' TYP='HBOOK'"],
55 )
GaudiConfig2._configurables.useGlobalInstances
def useGlobalInstances(enable)
Definition: _configurables.py:19