The Gaudi Framework  master (37c0b60a)
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 
21 namespace Gaudi {
22  namespace TestSuite {
23  namespace Counter {
24 
26  template <typename Arithmetic, Gaudi::Accumulators::atomicity Atomicity>
28  public:
30  StatusCode initialize() override {
31  // must be called first
32  const StatusCode sc = Algorithm::initialize();
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;
39  return StatusCode::FAILURE;
40  }
41 
42  Gaudi::Accumulators::Axis<Arithmetic> axis{ 100, 0, 1 };
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  }
56  return StatusCode::SUCCESS;
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  };
68  DECLARE_COMPONENT_WITH_ID( HistoTimingAlgDA, "HistoTimingAlgDA" )
69  using HistoTimingAlgIA = HistoTimingAlg<unsigned int, Gaudi::Accumulators::atomicity::full>;
71  using HistoTimingAlgD = HistoTimingAlg<double, Gaudi::Accumulators::atomicity::none>;
73  using HistoTimingAlgI = HistoTimingAlg<unsigned int, Gaudi::Accumulators::atomicity::none>;
75 
78  public:
80  using Base::Base;
81 
82  StatusCode initialize() override {
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" } } };
194  mutable Gaudi::Accumulators::StaticHistogram<3> m_gaussVflatVgauss{
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 } } };
217  m_gaussVflatVgauss_int{ this,
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 } };
236  mutable Gaudi::Accumulators::StaticHistogram<2> m_gaussVflat_buf{
237  this, "GaussFlatBuf", "Gaussian V Flat, buffered", { { 50, -5, 5 }, { 50, -5, 5 } } };
238  mutable Gaudi::Accumulators::StaticHistogram<3> m_gaussVflatVgauss_buf{
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 } } };
251  mutable Gaudi::Accumulators::StaticProfileHistogram<3> m_prof_gaussVflatVgauss{
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 } };
261  m_prof_gaussVflat_noato{
262  this, "ProfGaussFlatNA", "Profile, Gaussian V Flat, non atomic", { { 50, -5, 5 }, { 50, -5, 5 } } };
264  m_prof_gaussVflatVgauss_noato{ this,
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
271  m_prof_gauss_int{
272  this, "ProfGaussInt", "Profile, Gaussian mean=0, sigma=1, integer values", { 10, -5, 5 } };
274  m_prof_gaussVflat_int{ this,
275  "ProfGaussFlatInt",
276  "Profile, Gaussian V Flat, integer values",
277  { { 10, -5, 5 }, { 10, -5, 5 } } };
279  m_prof_gaussVflatVgauss_int{ this,
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 } };
298  mutable Gaudi::Accumulators::StaticProfileHistogram<2> m_prof_gaussVflat_buf{
299  this, "ProfGaussFlatBuf", "Profile, Gaussian V Flat, buffered", { { 50, -5, 5 }, { 50, -5, 5 } } };
300  mutable Gaudi::Accumulators::StaticProfileHistogram<3> m_prof_gaussVflatVgauss_buf{
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
316  mutable Gaudi::Accumulators::Histogram<1> m_custom_gauss_noprop{
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 
322  mutable Gaudi::Accumulators::WeightedHistogram<1> m_custom_gauss_w{ this, "CustomGaussW" };
323  mutable Gaudi::Accumulators::WeightedHistogram<2> m_custom_gaussVflat_w{ this, "CustomGaussFlatW" };
324  mutable Gaudi::Accumulators::WeightedHistogram<3> m_custom_gaussVflatVgauss_w{ this, "CustomGaussFlatGaussW" };
325 
326  mutable Gaudi::Accumulators::ProfileHistogram<1> m_custom_prof_gauss{ this, "CustomProfGauss" };
327  mutable Gaudi::Accumulators::ProfileHistogram<2> m_custom_prof_gaussVflat{ this, "CustomProfGaussFlat" };
328  mutable Gaudi::Accumulators::ProfileHistogram<3> m_custom_prof_gaussVflatVgauss{ this,
329  "CustomProfGaussFlatGauss" };
330 
331  mutable Gaudi::Accumulators::WeightedProfileHistogram<1> m_custom_prof_gauss_w{ this, "CustomProfGaussW" };
332  mutable Gaudi::Accumulators::WeightedProfileHistogram<2> m_custom_prof_gaussVflat_w{ this,
333  "CustomProfGaussFlatW" };
334  mutable Gaudi::Accumulators::WeightedProfileHistogram<3> m_custom_prof_gaussVflatVgauss_w{
335  this, "CustomProfGaussFlatGaussW" };
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 } } };
404  mutable Gaudi::Accumulators::StaticRootHistogram<3> m_gaussVflatVgauss_buf{
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
411  mutable Gaudi::Accumulators::RootHistogram<1> m_custom_gauss{ this, "CustomGauss",
412  "Gaussian mean=0, sigma=1, atomic" };
413  mutable Gaudi::Accumulators::RootHistogram<2> m_custom_gaussVflat{ this, "CustomGaussFlat",
414  "Gaussian V Flat, atomic" };
415  mutable Gaudi::Accumulators::RootHistogram<3> m_custom_gaussVflatVgauss{ this, "CustomGaussFlatGauss",
416  "Gaussian V Flat V Gaussian, atomic" };
417  };
418  DECLARE_COMPONENT( GaudiRootHistoAlgorithm )
419  } // namespace Counter
420  } // namespace TestSuite
421 } // namespace Gaudi
Gaudi::TestSuite::Counter
Definition: Counter.h:30
RndmGenerators.h
Gaudi::Algorithm::randSvc
SmartIF< IRndmGenSvc > & randSvc() const
The standard RandomGen service, Return a pointer to the service if present.
Definition: Algorithm.cpp:563
StatusCode::andThen
StatusCode andThen(F &&f, ARGS &&... args) const
Chain code blocks making the execution conditional a success result.
Definition: StatusCode.h:163
Gaudi::TestSuite::Counter::GaudiHistoAlgorithm::initialize
StatusCode initialize() override
Definition: CounterHistos.cpp:82
Gaudi::Accumulators::Counter<>
Histogram.h
TestSuite
#define TestSuite
Definition: MakeAndConsume.cpp:658
Gaudi::Accumulators::HistogramingCounterBase
A base counter dealing with Histograms.
Definition: StaticHistogram.h:653
Gaudi::Algorithm::initialize
StatusCode initialize() override
the default (empty) implementation of IStateful::initialize() method
Definition: Algorithm.h:178
Gaudi::TestSuite::Counter::HistoTimingAlg::m_rand
Rndm::Numbers m_rand
Definition: CounterHistos.cpp:60
Gaudi::TestSuite::Counter::HistoTimingAlg::m_nHistos
Gaudi::Property< unsigned int > m_nHistos
Definition: CounterHistos.cpp:64
class
#define class
Definition: HistogramPersistencySvc.cpp:54
Rndm::Flat
Parameters for the flat random number generation within boundaries [minimum, maximum].
Definition: RndmGenerators.h:253
DECLARE_COMPONENT_WITH_ID
#define DECLARE_COMPONENT_WITH_ID(type, id)
Definition: PluginServiceV1.h:47
Gaudi::TestSuite::Counter::HistoTimingAlg::m_nTracks
Gaudi::Property< unsigned int > m_nTracks
Definition: CounterHistos.cpp:65
FSMCallbackHolder.h
Gaudi::TestSuite::Counter::GaudiHistoAlgorithm
Example of algorithm using histograms accumulators.
Definition: CounterHistos.cpp:77
StatusCode
Definition: StatusCode.h:65
Rndm::Gauss
Parameters for the Gauss random number generation.
Definition: RndmGenerators.h:32
Gaudi::FSMCallbackHolder
Helper class to implement the IFSMCallbackHolder interface.
Definition: FSMCallbackHolder.h:37
Rndm::Numbers
Random number accessor This small class encapsulates the use of the random number generator.
Definition: RndmGenerators.h:359
Gaudi::Algorithm
Base class from which all concrete algorithm classes should be derived.
Definition: Algorithm.h:90
AlgSequencer.h
h
Definition: AlgSequencer.py:31
Gaudi::TestSuite::Counter::HistoTimingAlg::initialize
StatusCode initialize() override
Definition: CounterHistos.cpp:30
Algorithm.h
std::deque
STL class.
endmsg
MsgStream & endmsg(MsgStream &s)
MsgStream Modifier: endmsg. Calls the output method of the MsgStream.
Definition: MsgStream.h:202
Gaudi::TestSuite::Counter::GaudiRootHistoAlgorithm
Example of algorithm using root histograms accumulators.
Definition: CounterHistos.cpp:343
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
Rndm::Numbers::initialize
virtual StatusCode initialize(const SmartIF< IRndmGenSvc > &svc, const IRndmGen::Param &par)
Initialization.
Definition: RndmGenerators.cpp:30
std::ostringstream
STL class.
StatusCode::isFailure
bool isFailure() const
Definition: StatusCode.h:129
Gaudi::TestSuite::Counter::HistoTimingAlg::m_histos
std::deque< Gaudi::Accumulators::StaticHistogram< 1, Atomicity, Arithmetic > > m_histos
Definition: CounterHistos.cpp:62
Gaudi::TestSuite::Counter::GaudiHistoAlgorithm::execute
StatusCode execute(const EventContext &) const override
Definition: CounterHistos.cpp:86
Gaudi::Units::gauss
constexpr double gauss
Definition: SystemOfUnits.h:252
StatusCode::SUCCESS
constexpr static const auto SUCCESS
Definition: StatusCode.h:100
Gaudi::Accumulators::HistogramWrapperInternal
A Wrapper of a static Histogram base class using Properties to define title and axis.
Definition: HistogramWrapper.h:41
DECLARE_COMPONENT
#define DECLARE_COMPONENT(type)
Definition: PluginServiceV1.h:46
EventContext
Definition: EventContext.h:34
Gaudi::Accumulators::atomicity
atomicity
Defines atomicity of the accumulators.
Definition: Accumulators.h:263
Gaudi::TestSuite::Counter::HistoTimingAlg
Simple timing of counter based histograms filling.
Definition: CounterHistos.cpp:27
std::ostringstream::str
T str(T... args)
Gaudi::Algorithm::Algorithm
Algorithm(std::string name, ISvcLocator *svcloc, std::string version=PACKAGE_VERSION)
Constructor.
Definition: Algorithm.h:101
StatusCode::FAILURE
constexpr static const auto FAILURE
Definition: StatusCode.h:101
Gaudi::Accumulators::RootHistogramingCounterBase
Extension of the standard Gaudi histogram to provide similar functionnality as ROOT.
Definition: StaticRootHistogram.h:283
Gaudi::Accumulators::Axis
Definition of a default type of Histogram Axis It contains number of bins, min and max value plus a t...
Definition: StaticHistogram.h:229
Gaudi::Property< unsigned int >
RootHistogram.h
Gaudi::TestSuite::Counter::GaudiRootHistoAlgorithm::execute
StatusCode execute(const EventContext &) const override
Definition: CounterHistos.cpp:348
Gaudi::TestSuite::Counter::HistoTimingAlg::execute
StatusCode execute(const EventContext &) const override
Definition: CounterHistos.cpp:52