The Gaudi Framework master (9cc87df9)
Loading...
Searching...
No Matches
CounterHistos.cpp
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 1998-2024 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
13#include <Gaudi/Algorithm.h>
16
17#include "../../../GaudiKernel/tests/src/LogHistogram.h"
18
19#include <deque>
20
21namespace Gaudi {
22 namespace TestSuite {
23 namespace Counter {
24
26 template <typename Arithmetic, Gaudi::Accumulators::atomicity Atomicity>
28 public:
31 // must be called first
33 if ( sc.isFailure() ) return sc;
34
35 // random number generator
36 auto randSvc = service<IRndmGenSvc>( "RndmGenSvc", true );
37 if ( !randSvc || !m_rand.initialize( randSvc, Rndm::Flat( 0., 1. ) ) ) {
38 error() << "Unable to create Random generator" << endmsg;
40 }
41
43 for ( unsigned int iH = 0; iH < m_nHistos; ++iH ) {
44 std::ostringstream title;
45 title << "Histogram Number " << iH;
46 m_histos.emplace_back( this, title.str(), title.str(), axis );
47 }
48
49 return sc;
50 }
51
52 StatusCode execute( const EventContext& ) const override {
53 for ( unsigned int iT = 0; iT < m_nTracks; ++iT ) {
54 for ( auto& h : m_histos ) { ++h[m_rand()]; }
55 }
57 }
58
59 private:
61
63
64 Gaudi::Property<unsigned int> m_nHistos{ this, "NumHistos", 20, "" };
65 Gaudi::Property<unsigned int> m_nTracks{ this, "NumTracks", 30, "" };
66 };
67 using HistoTimingAlgDA = HistoTimingAlg<double, Gaudi::Accumulators::atomicity::full>;
68 DECLARE_COMPONENT_WITH_ID( HistoTimingAlgDA, "HistoTimingAlgDA" )
69 using HistoTimingAlgIA = HistoTimingAlg<unsigned int, Gaudi::Accumulators::atomicity::full>;
70 DECLARE_COMPONENT_WITH_ID( HistoTimingAlgIA, "HistoTimingAlgIA" )
71 using HistoTimingAlgD = HistoTimingAlg<double, Gaudi::Accumulators::atomicity::none>;
72 DECLARE_COMPONENT_WITH_ID( HistoTimingAlgD, "HistoTimingAlgD" )
73 using HistoTimingAlgI = HistoTimingAlg<unsigned int, Gaudi::Accumulators::atomicity::none>;
74 DECLARE_COMPONENT_WITH_ID( HistoTimingAlgI, "HistoTimingAlgI" )
75
78 public:
80 using Base::Base;
81
83 return Base::initialize().andThen( [&] { m_custom_gauss_noinit.createHistogram( *this ); } );
84 }
85
86 StatusCode execute( const EventContext& ) const override {
87 // some random number generators, just to provide numbers
88 static Rndm::Numbers Gauss( randSvc(), Rndm::Gauss( 0.0, 1.0 ) );
89 static Rndm::Numbers Flat( randSvc(), Rndm::Flat( -10.0, 10.0 ) );
90 static Rndm::Numbers Gauss3( randSvc(), Rndm::Gauss( 5.0, 1.0 ) );
91
92 // cache some numbers
93 const double gauss( Gauss() );
94 const double gauss2( Gauss() );
95 const double flat( Flat() );
96 const double gauss3( Gauss3() );
97
98 // updating histograms
99 ++m_gauss[gauss];
100 ++m_gaussAbsName[gauss];
101 ++m_gaussVflat[{ flat, gauss }];
102 ++m_gaussVflatVgauss[{ flat, gauss, gauss2 }];
103 ++m_gauss_noato[gauss];
104 ++m_gaussVflat_noato[{ flat, gauss }];
105 ++m_gaussVflatVgauss_noato[{ flat, gauss, gauss2 }];
106 ++m_gauss_int[(int)gauss];
107 ++m_gaussVflat_int[{ (int)flat, (int)gauss }];
108 ++m_gaussVflatVgauss_int[{ (int)flat, (int)gauss, (int)gauss2 }];
109
110 // weighted cases
111 m_gauss_w[gauss] += .5;
112 m_gaussVflat_w[{ flat, gauss }] += .5;
113 m_gaussVflatVgauss_w[{ flat, gauss, gauss2 }] += .5;
114
115 // using buffers
116 auto gauss_buf = m_gauss_buf.buffer();
117 auto gaussVflat_buf = m_gaussVflat_buf.buffer();
118 auto gaussVflatVgauss_buf = m_gaussVflatVgauss_buf.buffer();
119 for ( unsigned int i = 0; i < 10; i++ ) {
120 ++gauss_buf[gauss];
121 ++gaussVflat_buf[{ flat, gauss }];
122 ++gaussVflatVgauss_buf[{ flat, gauss, gauss2 }];
123 }
124
125 // updating profile histograms
126 m_prof_gauss[gauss] += gauss3;
127 m_prof_gaussVflat[{ flat, gauss }] += gauss3;
128 m_prof_gaussVflatVgauss[{ flat, gauss, gauss2 }] += gauss3;
129 m_prof_gauss_noato[gauss] += gauss3;
130 m_prof_gaussVflat_noato[{ flat, gauss }] += gauss3;
131 m_prof_gaussVflatVgauss_noato[{ flat, gauss, gauss2 }] += gauss3;
132 m_prof_gauss_int[(int)gauss] += (int)gauss3;
133 m_prof_gaussVflat_int[{ (int)flat, (int)gauss }] += (int)gauss3;
134 m_prof_gaussVflatVgauss_int[{ (int)flat, (int)gauss, (int)gauss2 }] += (int)gauss3;
135
136 // weighted profile histograms
137 m_prof_gauss_w[gauss] += { gauss3, .5 };
138 m_prof_gaussVflat_w[{ flat, gauss }] += { gauss3, .5 };
139 m_prof_gaussVflatVgauss_w[{ flat, gauss, gauss2 }] += { gauss3, .5 };
140
141 // using buffers on profile histograms
142 auto prof_gauss_buf = m_prof_gauss_buf.buffer();
143 auto prof_gaussVflat_buf = m_prof_gaussVflat_buf.buffer();
144 auto prof_gaussVflatVgauss_buf = m_prof_gaussVflatVgauss_buf.buffer();
145 for ( unsigned int i = 0; i < 10; i++ ) {
146 prof_gauss_buf[gauss] += gauss3;
147 prof_gaussVflat_buf[{ flat, gauss }] += gauss3;
148 prof_gaussVflatVgauss_buf[{ flat, gauss, gauss2 }] += gauss3;
149 }
150
151 // using CaloHistogram
152 m_log_gauss[gauss]++;
153 m_log_gaussVflat[{ flat, gauss }]++;
154
155 // using Custom histograms, with title and axis defined in python
156 ++m_custom_gauss_noprop[gauss];
157 ++m_custom_gauss[gauss];
158 ++m_custom_gaussVflat[{ flat, gauss }];
159 ++m_custom_gaussVflatVgauss[{ flat, gauss, gauss2 }];
160 m_custom_gauss_w[gauss] += .5;
161 m_custom_gaussVflat_w[{ flat, gauss }] += .5;
162 m_custom_gaussVflatVgauss_w[{ flat, gauss, gauss2 }] += .5;
163 m_custom_prof_gauss[gauss] += gauss3;
164 m_custom_prof_gaussVflat[{ flat, gauss }] += gauss3;
165 m_custom_prof_gaussVflatVgauss[{ flat, gauss, gauss2 }] += gauss3;
166 m_custom_prof_gauss_w[gauss] += { gauss3, .5 };
167 m_custom_prof_gaussVflat_w[{ flat, gauss }] += { gauss3, .5 };
168 m_custom_prof_gaussVflatVgauss_w[{ flat, gauss, gauss2 }] += { gauss3, .5 };
169 ++m_custom_gauss_noinit[gauss];
170
171 if ( m_nCalls.nEntries() == 0 ) always() << "Filling Histograms...... Please be patient !" << endmsg;
172 ++m_nCalls;
173 return StatusCode::SUCCESS;
174 }
175
176 private:
177 mutable Gaudi::Accumulators::Counter<> m_nCalls{ this, "calls" };
178
179 // Testing regular histograms in all dimensions and features
180
181 // empty histograms. Should not be printed in Sinks
183 this, "Empty1D", "Empty 1D histogram", { 100, -5, 5, "X" } };
185 this, "Empty2D", "Empty 2D histogram", { { 50, -5, 5, "X" }, { 50, -5, 5, "Y" } } };
187 this, "Empty3D", "Empty 3D histogram", { { 10, -5, 5, "X" }, { 10, -5, 5, "Y" }, { 10, -5, 5, "Z" } } };
188
189 // "default" case, that is bins containing doubles and atomic
191 this, "Gauss", "Gaussian mean=0, sigma=1, atomic", { 100, -5, 5, "X" } };
193 this, "GaussFlat", "Gaussian V Flat, atomic", { { 50, -5, 5, "X" }, { 50, -5, 5, "Y" } } };
195 this,
196 "GaussFlatGauss",
197 "Gaussian V Flat V Gaussian, atomic",
198 { { 10, -5, 5, "X" }, { 10, -5, 5, "Y" }, { 10, -5, 5, "Z" } } };
199
200 // non atomic versions
202 this, "GaussNA", "Gaussian mean=0, sigma=1, non atomic", { 100, -5, 5 } };
204 this, "GaussFlatNA", "Gaussian V Flat, non atomic", { { 50, -5, 5 }, { 50, -5, 5 } } };
206 this,
207 "GaussFlatGaussNA",
208 "Gaussian V Flat V Gaussian, non atomic",
209 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
210
211 // using integers
213 this, "GaussInt", "Gaussian mean=0, sigma=1, integer values", { 10, -5, 5 } };
215 this, "GaussFlatInt", "Gaussian V Flat, integer values", { { 10, -5, 5 }, { 10, -5, 5 } } };
218 "GaussFlatGaussInt",
219 "Gaussian V Flat V Gaussian, interger values",
220 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
221
222 // weighted version, "default" case
224 this, "GaussW", "Gaussian mean=0, sigma=1, weighted", { 100, -5, 5 } };
226 this, "GaussFlatW", "Gaussian V Flat, weighted", { { 50, -5, 5 }, { 50, -5, 5 } } };
228 this,
229 "GaussFlatGaussW",
230 "Gaussian V Flat V Gaussian, weighted",
231 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
232
233 // "default" case, dedicated to testing buffers
235 this, "GaussBuf", "Gaussian mean=0, sigma=1, buffered", { 100, -5, 5 } };
237 this, "GaussFlatBuf", "Gaussian V Flat, buffered", { { 50, -5, 5 }, { 50, -5, 5 } } };
239 this,
240 "GaussFlatGaussBuf",
241 "Gaussian V Flat V Gaussian, buffered",
242 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
243
244 // Testing profiling histograms in all dimensions and features
245
246 // "default" case, that is bins containing doubles and atomic
248 this, "ProfGauss", "Profile, Gaussian mean=0, sigma=1, atomic", { 100, -5, 5 } };
250 this, "ProfGaussFlat", "Profile, Gaussian V Flat, atomic", { { 50, -5, 5 }, { 50, -5, 5 } } };
252 this,
253 "ProfGaussFlatGauss",
254 "Profile, Gaussian V Flat V Gaussian, atomic",
255 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
256
257 // non atomic versions
259 this, "ProfGaussNA", "Profile, Gaussian mean=0, sigma=1, non atomic", { 100, -5, 5 } };
262 this, "ProfGaussFlatNA", "Profile, Gaussian V Flat, non atomic", { { 50, -5, 5 }, { 50, -5, 5 } } };
265 "ProfGaussFlatGaussNA",
266 "Profile, Gaussian V Flat V Gaussian, non atomic",
267 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
268
269 // using integers internally
272 this, "ProfGaussInt", "Profile, Gaussian mean=0, sigma=1, integer values", { 10, -5, 5 } };
275 "ProfGaussFlatInt",
276 "Profile, Gaussian V Flat, integer values",
277 { { 10, -5, 5 }, { 10, -5, 5 } } };
280 "ProfGaussFlatGaussInt",
281 "Profile, Gaussian V Flat V Gaussian, interger values",
282 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
283
284 // weighted version, "default" case
286 this, "ProfGaussW", "Profile, Gaussian mean=0, sigma=1, weighted", { 100, -5, 5 } };
288 this, "ProfGaussFlatW", "Profile, Gaussian V Flat, weighted", { { 50, -5, 5 }, { 50, -5, 5 } } };
290 this,
291 "ProfGaussFlatGaussW",
292 "Profile, Gaussian V Flat V Gaussian, weighted",
293 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
294
295 // "default" case, dedicated to testing buffers
297 this, "ProfGaussBuf", "Profile, Gaussian mean=0, sigma=1, buffered", { 100, -5, 5 } };
299 this, "ProfGaussFlatBuf", "Profile, Gaussian V Flat, buffered", { { 50, -5, 5 }, { 50, -5, 5 } } };
301 this,
302 "ProfGaussFlatGaussBuf",
303 "Profile, Gaussian V Flat V Gaussian, buffered",
304 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
305
306 // Custom histogram, with log or log log behavior
307 mutable Accumulators::LogHistogram<1> m_log_gauss{ this, "LogGauss", "Log, Gaussian", { 5, 0, 2 } };
308 mutable Accumulators::LogHistogram<2, Accumulators::atomicity::full, float> m_log_gaussVflat{
309 this, "LogGaussFlat", "LogLog, Gaussian V Flat", { { 5, 0, 2 }, { 5, 0, 2 } } };
310
311 // Histogram in an absolute location
313 this, "/TopDir/SubDir/Gauss", "Gaussian mean=0, sigma=1, atomic", { 100, -5, 5, "X" } };
314
315 // Custom histograms, specifying title and axis in python
317 this, "CustomGaussNoProp", "Gaussian mean=0, sigma=1, atomic", { 100, -5, 5, "X" } };
318 mutable Gaudi::Accumulators::Histogram<1> m_custom_gauss{ this, "CustomGauss" };
319 mutable Gaudi::Accumulators::Histogram<2> m_custom_gaussVflat{ this, "CustomGaussFlat" };
320 mutable Gaudi::Accumulators::Histogram<3> m_custom_gaussVflatVgauss{ this, "CustomGaussFlatGauss" };
321
325
329 "CustomProfGaussFlatGauss" };
330
336
337 // Checking DoNotInitialize property of CustomHistogram
338 mutable Gaudi::Accumulators::Histogram<1> m_custom_gauss_noinit{ this, "CustomGaussNoInit", "", {}, true };
339 };
340 DECLARE_COMPONENT( GaudiHistoAlgorithm )
341
342
344 public:
346 using Base::Base;
347
348 StatusCode execute( const EventContext& ) const override {
349 // some random number generators, just to provide numbers
350 static Rndm::Numbers Gauss( randSvc(), Rndm::Gauss( 0.0, 1.0 ) );
351 static Rndm::Numbers Flat( randSvc(), Rndm::Flat( -10.0, 10.0 ) );
352
353 // cache some numbers
354 const double gauss( Gauss() );
355 const double gauss2( Gauss() );
356 const double flat( Flat() );
357
358 // updating histograms
359 ++m_gauss[gauss];
360 ++m_gaussVflat[{ flat, gauss }];
361 ++m_gaussVflatVgauss[{ flat, gauss, gauss2 }];
362
363 // using buffers
364 auto gauss_buf = m_gauss_buf.buffer();
365 auto gaussVflat_buf = m_gaussVflat_buf.buffer();
366 auto gaussVflatVgauss_buf = m_gaussVflatVgauss_buf.buffer();
367 for ( unsigned int i = 0; i < 10; i++ ) {
368 ++gauss_buf[gauss];
369 ++gaussVflat_buf[{ flat, gauss }];
370 ++gaussVflatVgauss_buf[{ flat, gauss, gauss2 }];
371 }
372
373 // custom histograms, with title and axis defined in python
374 ++m_custom_gauss[gauss];
375 ++m_custom_gaussVflat[{ flat, gauss }];
376 ++m_custom_gaussVflatVgauss[{ flat, gauss, gauss2 }];
377
378 if ( m_nCalls.nEntries() == 0 ) always() << "Filling Histograms...... Please be patient !" << endmsg;
379 ++m_nCalls;
380 return StatusCode::SUCCESS;
381 }
382
383 private:
384 mutable Gaudi::Accumulators::Counter<> m_nCalls{ this, "calls" };
385
386 // Testing Root histograms in all dimensions
387
388 // "default" case, that is bins containing doubles and atomic
390 this, "Gauss", "Gaussian mean=0, sigma=1, atomic", { 100, -5, 5, "X" } };
392 this, "GaussFlat", "Gaussian V Flat, atomic", { { 50, -5, 5, "X" }, { 50, -5, 5, "Y" } } };
394 this,
395 "GaussFlatGauss",
396 "Gaussian V Flat V Gaussian, atomic",
397 { { 10, -5, 5, "X" }, { 10, -5, 5, "Y" }, { 10, -5, 5, "Z" } } };
398
399 // "default" case, dedicated to testing buffers
401 this, "GaussBuf", "Gaussian mean=0, sigma=1, buffered", { 100, -5, 5 } };
403 this, "GaussFlatBuf", "Gaussian V Flat, buffered", { { 50, -5, 5 }, { 50, -5, 5 } } };
405 this,
406 "GaussFlatGaussBuf",
407 "Gaussian V Flat V Gaussian, buffered",
408 { { 10, -5, 5 }, { 10, -5, 5 }, { 10, -5, 5 } } };
409
410 // Custom histogram cases, specifying title and axis in python
412 "Gaussian mean=0, sigma=1, atomic" };
414 "Gaussian V Flat, atomic" };
416 "Gaussian V Flat V Gaussian, atomic" };
417 };
418 DECLARE_COMPONENT( GaudiRootHistoAlgorithm )
419 } // namespace Counter
420 } // namespace TestSuite
421} // namespace Gaudi
#define class
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition MsgStream.h:198
#define DECLARE_COMPONENT_WITH_ID(type, id)
#define DECLARE_COMPONENT(type)
__string_type str() const
MsgStream & error() const
shortcut for the method msgStream(MSG::ERROR)
This class represents an entry point to all the event specific data.
Definition of a default type of Histogram Axis It contains number of bins, min and max value plus a t...
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:87
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition Algorithm.h:98
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition Algorithm.h:175
SmartIF< IRndmGenSvc > & randSvc() const
The standard RandomGen service, Return a pointer to the service if present.
SmartIF< IService > service(std::string_view name, const bool createIf=true, const bool quiet=false) const
Return a pointer to the service identified by name (or "type/name").
Helper class to implement the IFSMCallbackHolder interface.
Implementation of property with value of concrete type.
Definition Property.h:35
Example of algorithm using histograms accumulators.
Gaudi::Accumulators::StaticHistogram< 1 > m_empty1D
Gaudi::Accumulators::StaticHistogram< 2 > m_gaussVflat_buf
Gaudi::Accumulators::WeightedHistogram< 2 > m_custom_gaussVflat_w
Gaudi::Accumulators::WeightedProfileHistogram< 3 > m_custom_prof_gaussVflatVgauss_w
Gaudi::Accumulators::StaticHistogram< 2 > m_empty2D
Gaudi::Accumulators::StaticHistogram< 2 > m_gaussVflat
Gaudi::Accumulators::Histogram< 1 > m_custom_gauss_noinit
Gaudi::Accumulators::StaticHistogram< 1 > m_gaussAbsName
Gaudi::Accumulators::StaticWeightedProfileHistogram< 2 > m_prof_gaussVflat_w
FSMCallbackHolder< Gaudi::Algorithm > Base
Gaudi::Accumulators::StaticWeightedHistogram< 3 > m_gaussVflatVgauss_w
Gaudi::Accumulators::StaticWeightedHistogram< 2 > m_gaussVflat_w
Gaudi::Accumulators::ProfileHistogram< 2 > m_custom_prof_gaussVflat
Gaudi::Accumulators::StaticProfileHistogram< 3 > m_prof_gaussVflatVgauss_buf
Gaudi::Accumulators::StaticHistogram< 3, Gaudi::Accumulators::atomicity::none > m_gaussVflatVgauss_noato
Gaudi::Accumulators::StaticProfileHistogram< 1, Gaudi::Accumulators::atomicity::none > m_prof_gauss_noato
Gaudi::Accumulators::StaticProfileHistogram< 2 > m_prof_gaussVflat_buf
Gaudi::Accumulators::StaticProfileHistogram< 1 > m_prof_gauss_buf
Gaudi::Accumulators::StaticHistogram< 3, Gaudi::Accumulators::atomicity::full, int > m_gaussVflatVgauss_int
Gaudi::Accumulators::ProfileHistogram< 1 > m_custom_prof_gauss
Gaudi::Accumulators::StaticHistogram< 1 > m_gauss_buf
Gaudi::Accumulators::WeightedProfileHistogram< 2 > m_custom_prof_gaussVflat_w
Gaudi::Accumulators::StaticHistogram< 2, Gaudi::Accumulators::atomicity::full, int > m_gaussVflat_int
StatusCode execute(const EventContext &) const override
Gaudi::Accumulators::StaticProfileHistogram< 1, Gaudi::Accumulators::atomicity::full, int > m_prof_gauss_int
Gaudi::Accumulators::StaticProfileHistogram< 3, Gaudi::Accumulators::atomicity::full, int > m_prof_gaussVflatVgauss_int
Gaudi::Accumulators::WeightedProfileHistogram< 1 > m_custom_prof_gauss_w
Gaudi::Accumulators::StaticHistogram< 1, Gaudi::Accumulators::atomicity::full, int > m_gauss_int
Gaudi::Accumulators::StaticWeightedProfileHistogram< 3 > m_prof_gaussVflatVgauss_w
Gaudi::Accumulators::StaticWeightedProfileHistogram< 1 > m_prof_gauss_w
Gaudi::Accumulators::StaticProfileHistogram< 2, Gaudi::Accumulators::atomicity::full, int > m_prof_gaussVflat_int
Gaudi::Accumulators::StaticHistogram< 2, Gaudi::Accumulators::atomicity::none > m_gaussVflat_noato
Gaudi::Accumulators::StaticHistogram< 1 > m_gauss
Gaudi::Accumulators::StaticHistogram< 3 > m_gaussVflatVgauss_buf
Accumulators::LogHistogram< 1 > m_log_gauss
Gaudi::Accumulators::StaticHistogram< 3 > m_empty3D
Gaudi::Accumulators::StaticProfileHistogram< 2, Gaudi::Accumulators::atomicity::none > m_prof_gaussVflat_noato
Accumulators::LogHistogram< 2, Accumulators::atomicity::full, float > m_log_gaussVflat
Gaudi::Accumulators::Histogram< 1 > m_custom_gauss_noprop
Gaudi::Accumulators::Histogram< 3 > m_custom_gaussVflatVgauss
Gaudi::Accumulators::Histogram< 1 > m_custom_gauss
Gaudi::Accumulators::StaticProfileHistogram< 2 > m_prof_gaussVflat
Gaudi::Accumulators::StaticWeightedHistogram< 1 > m_gauss_w
Gaudi::Accumulators::WeightedHistogram< 3 > m_custom_gaussVflatVgauss_w
Gaudi::Accumulators::WeightedHistogram< 1 > m_custom_gauss_w
Gaudi::Accumulators::StaticProfileHistogram< 3 > m_prof_gaussVflatVgauss
Gaudi::Accumulators::StaticHistogram< 1, Gaudi::Accumulators::atomicity::none > m_gauss_noato
Gaudi::Accumulators::StaticHistogram< 3 > m_gaussVflatVgauss
Gaudi::Accumulators::StaticProfileHistogram< 1 > m_prof_gauss
Gaudi::Accumulators::StaticProfileHistogram< 3, Gaudi::Accumulators::atomicity::none > m_prof_gaussVflatVgauss_noato
Gaudi::Accumulators::ProfileHistogram< 3 > m_custom_prof_gaussVflatVgauss
Gaudi::Accumulators::Histogram< 2 > m_custom_gaussVflat
Example of algorithm using root histograms accumulators.
Gaudi::Accumulators::StaticRootHistogram< 3 > m_gaussVflatVgauss
Gaudi::Accumulators::RootHistogram< 3 > m_custom_gaussVflatVgauss
Gaudi::Accumulators::StaticRootHistogram< 1 > m_gauss_buf
Gaudi::Accumulators::StaticRootHistogram< 3 > m_gaussVflatVgauss_buf
StatusCode execute(const EventContext &) const override
Gaudi::Accumulators::StaticRootHistogram< 1 > m_gauss
Gaudi::Accumulators::StaticRootHistogram< 2 > m_gaussVflat
Gaudi::Accumulators::RootHistogram< 2 > m_custom_gaussVflat
Gaudi::Accumulators::RootHistogram< 1 > m_custom_gauss
FSMCallbackHolder< Gaudi::Algorithm > Base
Gaudi::Accumulators::StaticRootHistogram< 2 > m_gaussVflat_buf
Simple timing of counter based histograms filling.
StatusCode execute(const EventContext &) const override
Gaudi::Property< unsigned int > m_nTracks
std::deque< Gaudi::Accumulators::StaticHistogram< 1, Atomicity, Arithmetic > > m_histos
Gaudi::Property< unsigned int > m_nHistos
HistoTimingAlg< unsigned int, Gaudi::Accumulators::atomicity::full > HistoTimingAlgIA
HistoTimingAlg< double, Gaudi::Accumulators::atomicity::none > HistoTimingAlgD
HistoTimingAlg< double, Gaudi::Accumulators::atomicity::full > HistoTimingAlgDA
HistoTimingAlg< unsigned int, Gaudi::Accumulators::atomicity::none > HistoTimingAlgI
Counter()
Constructors.
Definition Counter.cpp:15
Parameters for the flat random number generation within boundaries [minimum, maximum].
Parameters for the Gauss random number generation.
Random number accessor This small class encapsulates the use of the random number generator.
virtual StatusCode initialize(const SmartIF< IRndmGenSvc > &svc, const IRndmGen::Param &par)
Initialization.
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64
bool isFailure() const
Definition StatusCode.h:118
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
Definition StatusCode.h:151
constexpr static const auto SUCCESS
Definition StatusCode.h:99
constexpr static const auto FAILURE
Definition StatusCode.h:100
Efficient counter implementations for Gaudi.
HistogramWrapper< StaticHistogram< ND, Atomicity, Arithmetic, AxisTupleType > > Histogram
standard custom histogram. See HistogramWrapper and StaticHistogram for details
Definition Histogram.h:22
RootHistogramingCounterBase< ND, Atomicity, Arithmetic, naming::histogramString, AxisTupleType > StaticRootHistogram
Root histograming counter. See RootHistogramingCounterBase for details.
HistogramWrapper< StaticWeightedProfileHistogram< ND, Atomicity, Arithmetic, AxisTupleType > > WeightedProfileHistogram
custom weighted profile histogram. See HistogramWrapper and StaticWeightedProfileHistogram for detail...
Definition Histogram.h:37
HistogramWrapper< StaticProfileHistogram< ND, Atomicity, Arithmetic, AxisTupleType > > ProfileHistogram
custom profile histograming. See HistogramWrapper and StaticProfileHistogram for details
Definition Histogram.h:32
HistogramingCounterBase< ND, Atomicity, Arithmetic, naming::histogramString, HistogramingAccumulator, AxisTupleType > StaticHistogram
standard static histograming counter. See HistogramingCounterBase for details
HistogramingCounterBase< ND, Atomicity, Arithmetic, naming::weightedProfilehistogramString, WeightedProfileHistogramingAccumulator, AxisTupleType > StaticWeightedProfileHistogram
weighted static profile histograming counter. See HistogramingCounterBase for details
HistogramWrapper< StaticWeightedHistogram< ND, Atomicity, Arithmetic, AxisTupleType > > WeightedHistogram
custom histogram with weight. See HistogramWrapper and StaticWeightedHistogram for details
Definition Histogram.h:27
HistogramWrapper< StaticRootHistogram< ND, Atomicity, Arithmetic, AxisTupleType > > RootHistogram
standard custom histogram
HistogramingCounterBase< ND, Atomicity, Arithmetic, naming::profilehistogramString, ProfileHistogramingAccumulator, AxisTupleType > StaticProfileHistogram
profile static histograming counter. See HistogramingCounterBase for details
HistogramingCounterBase< ND, Atomicity, Arithmetic, naming::weightedHistogramString, WeightedHistogramingAccumulator, AxisTupleType > StaticWeightedHistogram
standard static histograming counter with weight. See HistogramingCounterBase for details
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1
A basic integral counter;.