The Gaudi Framework
master (82fdf313)
Loading...
Searching...
No Matches
Counter.h
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
\***********************************************************************************/
11
#pragma once
12
13
#include <
GaudiKernel/DataObject.h
>
14
#include <iostream>
15
16
namespace
Gaudi
{
17
namespace
TestSuite
{
18
19
class
Collision
;
20
21
// CLID definition
22
static
const
CLID
& CLID_Counter = 1109;
23
29
30
class
GAUDI_API
Counter
:
public
DataObject
{
31
32
public
:
34
Counter
();
35
37
const
CLID
&
clID
()
const override
{
return
classID
(); }
38
static
const
CLID
&
classID
() {
return
CLID_Counter; }
39
41
int
value
()
const
{
return
m_counter
; }
43
int
increment
() {
return
++
m_counter
; }
45
int
decrement
() {
return
--
m_counter
; }
47
void
set
(
int
val ) {
m_counter
= val; }
48
49
private
:
51
int
m_counter
;
52
};
53
}
// namespace TestSuite
54
}
// namespace Gaudi
CLID
unsigned int CLID
Class ID definition.
Definition
ClassID.h:16
DataObject.h
GAUDI_API
#define GAUDI_API
Definition
Kernel.h:49
DataObject::DataObject
DataObject()
Standard Constructor.
Definition
DataObject.cpp:23
Gaudi::TestSuite::Collision
Definition
Collision.h:26
Gaudi::TestSuite::Counter::set
void set(int val)
Set value.
Definition
Counter.h:47
Gaudi::TestSuite::Counter::decrement
int decrement()
Decrement counter.
Definition
Counter.h:45
Gaudi::TestSuite::Counter::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition
Counter.h:37
Gaudi::TestSuite::Counter::m_counter
int m_counter
Counter number.
Definition
Counter.h:51
Gaudi::TestSuite::Counter::value
int value() const
Retrieve counter value.
Definition
Counter.h:41
Gaudi::TestSuite::Counter::increment
int increment()
Increment counter.
Definition
Counter.h:43
Gaudi::TestSuite::Counter::classID
static const CLID & classID()
Definition
Counter.h:38
Gaudi::TestSuite::Counter::Counter
Counter()
Constructors.
Definition
Counter.cpp:15
Gaudi::TestSuite
Definition
ConditionAccessorHolder.h:21
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition
__init__.py:1
GaudiTestSuite
include
GaudiTestSuite
Counter.h
Generated on Thu Oct 2 2025 15:31:12 for The Gaudi Framework by
1.13.1