The Gaudi Framework  v36r9p1 (5c15b2bb)
TestConfig2.py
Go to the documentation of this file.
1 
11 from GaudiConfig2 import Configurable
12 from GaudiConfig2 import Configurables as C
13 from GaudiConfig2 import mergeConfigs
14 
15 
17  algorithms = [
18  C.GaudiHistoAlgorithm("SimpleHistos", HistoPrint=True, OutputLevel=3),
19  ]
20  app = C.ApplicationMgr(TopAlg=algorithms)
21  return algorithms + [app]
22 
23 
25  return [C.AuditorSvc("AuditorSvc", Auditors=["ChronoAuditor"])]
26 
27 
28 def setFakeEvents(nevt):
29  return [C.ApplicationMgr(EvtMax=nevt, EvtSel="NONE")]
30 
31 
32 def histogramWriting(filename):
33  return [
34  C.ApplicationMgr(HistogramPersistency="ROOT"),
35  C.RootHistCnv.PersSvc("RootHistSvc", OutputFile=filename),
36  C.HistogramSvc(
37  "HistogramDataSvc",
38  OutputLevel=2,
39  Input=["InFile DATAFILE='../data/input.hbook' TYP='HBOOK'"],
40  ),
41  ]
42 
43 
44 def adjustLogLevels(config):
45  config["ApplicationMgr"].TopAlg[0].OutputLevel = 2
46  return config
47 
48 
49 def main(nevt=50000, outfile="histo-c2.root", OutputLevel=3):
50  msgSvc = C.MessageSvc(OutputLevel=3)
51  app = C.ApplicationMgr(MessageSvcType=msgSvc)
52  app.ExtSvc = ["Gaudi::Monitoring::MessageSvcSink"]
53  return adjustLogLevels(
55  [app, msgSvc],
58  setFakeEvents(nevt),
59  histogramWriting(outfile),
60  )
61  )
GaudiExamples.TestConfig2.histogramWriting
def histogramWriting(filename)
Definition: TestConfig2.py:32
GaudiExamples.TestConfig2.configureTiming
def configureTiming()
Definition: TestConfig2.py:24
GaudiExamples.TestConfig2.setFakeEvents
def setFakeEvents(nevt)
Definition: TestConfig2.py:28
GaudiExamples.TestConfig2.main
def main(nevt=50000, outfile="histo-c2.root", OutputLevel=3)
Definition: TestConfig2.py:49
GaudiExamples.TestConfig2.adjustLogLevels
def adjustLogLevels(config)
Definition: TestConfig2.py:44
GaudiConfig2.mergeConfigs
def mergeConfigs(*configs)
Definition: __init__.py:51
GaudiExamples.TestConfig2.setUpAlgorithms
def setUpAlgorithms()
Definition: TestConfig2.py:16