The Gaudi Framework  master (37c0b60a)
Histograms.py
Go to the documentation of this file.
1 
11 from Configurables import Gaudi__Monitoring__MessageSvcSink as MessageSvcSink
12 from Gaudi.Configuration import *
13 
14 AuditorSvc().Auditors = ["ChronoAuditor"]
15 MessageSvc().OutputLevel = INFO
16 RootHistSvc("RootHistSvc").OutputFile = "histo.root"
17 
18 from Configurables import Gaudi__Histograming__Sink__Root as RootHistoSink
19 from Configurables import (
20  Gaudi__TestSuite__Counter__GaudiHistoAlgorithm as CounterHistoAlg,
21 )
22 from Configurables import (
23  Gaudi__TestSuite__Counter__GaudiRootHistoAlgorithm as RootCounterHistoAlg,
24 )
25 
26 histoAlg = CounterHistoAlg(
27  "SimpleCounterHistos",
28  OutputLevel=DEBUG,
29  CustomGauss_Title="Gaussian mean=0, sigma=1, atomic",
30  CustomGauss_Axis0=(100, -5, 5, "X"),
31  CustomGaussFlat_Title="Gaussian V Flat, atomic",
32  CustomGaussFlat_Axis0=(50, -5, 5, "X"),
33  CustomGaussFlat_Axis1=(50, -5, 5, "Y"),
34  CustomGaussFlatGauss_Title="Gaussian V Flat V Gaussian, atomic",
35  CustomGaussFlatGauss_Axis0=(10, -5, 5, "X"),
36  CustomGaussFlatGauss_Axis1=(10, -5, 5, "Y"),
37  CustomGaussFlatGauss_Axis2=(10, -5, 5, "Z"),
38  CustomGaussW_Title="Gaussian mean=0, sigma=1, weighted",
39  CustomGaussW_Axis0=(100, -5, 5),
40  CustomGaussFlatW_Title="Gaussian V Flat, weighted",
41  CustomGaussFlatW_Axis0=(50, -5, 5),
42  CustomGaussFlatW_Axis1=(50, -5, 5),
43  CustomGaussFlatGaussW_Title="Gaussian V Flat V Gaussian, weighted",
44  CustomGaussFlatGaussW_Axis0=(10, -5, 5),
45  CustomGaussFlatGaussW_Axis1=(10, -5, 5),
46  CustomGaussFlatGaussW_Axis2=(10, -5, 5),
47  CustomProfGauss_Title="Profile, Gaussian mean=0, sigma=1, atomic",
48  CustomProfGauss_Axis0=(100, -5, 5),
49  CustomProfGaussFlat_Title="Profile, Gaussian V Flat, atomic",
50  CustomProfGaussFlat_Axis0=(50, -5, 5),
51  CustomProfGaussFlat_Axis1=(50, -5, 5),
52  CustomProfGaussFlatGauss_Title="Profile, Gaussian V Flat V Gaussian, atomic",
53  CustomProfGaussFlatGauss_Axis0=(10, -5, 5),
54  CustomProfGaussFlatGauss_Axis1=(10, -5, 5),
55  CustomProfGaussFlatGauss_Axis2=(10, -5, 5),
56  CustomProfGaussW_Title="Profile, Gaussian mean=0, sigma=1, weighted",
57  CustomProfGaussW_Axis0=(100, -5, 5),
58  CustomProfGaussFlatW_Title="Profile, Gaussian V Flat, weighted",
59  CustomProfGaussFlatW_Axis0=(50, -5, 5),
60  CustomProfGaussFlatW_Axis1=(50, -5, 5),
61  CustomProfGaussFlatGaussW_Title="Profile, Gaussian V Flat V Gaussian, weighted",
62  CustomProfGaussFlatGaussW_Axis0=(10, -5, 5),
63  CustomProfGaussFlatGaussW_Axis1=(10, -5, 5),
64  CustomProfGaussFlatGaussW_Axis2=(10, -5, 5),
65  CustomGaussNoInit_Title="Gaussian mean=0, sigma=1, atomic",
66  CustomGaussNoInit_Axis0=(100, -5, 5, "X"),
67 )
68 
69 rootHistoAlg = RootCounterHistoAlg(
70  "SimpleRootCounterHistos",
71  OutputLevel=DEBUG,
72  CustomGauss_Title="Gaussian mean=0, sigma=1, atomic",
73  CustomGauss_Axis0=(100, -5, 5, "X"),
74  CustomGaussFlat_Title="Gaussian V Flat, atomic",
75  CustomGaussFlat_Axis0=(50, -5, 5, "X"),
76  CustomGaussFlat_Axis1=(50, -5, 5, "Y"),
77  CustomGaussFlatGauss_Title="Gaussian V Flat V Gaussian, atomic",
78  CustomGaussFlatGauss_Axis0=(10, -5, 5, "X"),
79  CustomGaussFlatGauss_Axis1=(10, -5, 5, "Y"),
80  CustomGaussFlatGauss_Axis2=(10, -5, 5, "Z"),
81 )
82 
84  EvtMax=50000,
85  EvtSel="NONE",
86  HistogramPersistency="ROOT",
87  TopAlg=[histoAlg, rootHistoAlg],
88  ExtSvc=[
89  MessageSvcSink(TypesToSave=["counter:.*", "histogram:.*"]),
90  RootHistoSink(),
91  ],
92 )
AuditorSvc
Definition: AuditorSvc.h:28
Gaudi.Configuration
Definition: Configuration.py:1
MessageSvc
Definition: MessageSvc.h:40
ApplicationMgr
Definition: ApplicationMgr.h:57