The Gaudi Framework  v36r1 (3e2fb5a8)
Histograms_with_global.py
Go to the documentation of this file.
1 
11 from GaudiConfig2 import Configurables as C, useGlobalInstances
13 
14 C.AuditorSvc('AuditorSvc', Auditors=['ChronoAuditor'])
15 
16 # algorithms
17 algorithms = [
18  C.GaudiHistoAlgorithm('SimpleHistos', HistoPrint=True, OutputLevel=3),
19  C.Gaudi.Examples.Counter.GaudiHistoAlgorithm(
20  'SimpleCounterHistos', OutputLevel=2),
21 ]
22 
23 app = C.ApplicationMgr(
24  'ApplicationMgr',
25  TopAlg=['SimpleHistos', '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  Input=["InFile DATAFILE='../data/input.hbook' TYP='HBOOK'"])
GaudiConfig2._configurables.useGlobalInstances
def useGlobalInstances(enable)
Definition: _configurables.py:19