The Gaudi Framework
master (37c0b60a)
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
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
Gaudi::TestSuite::Counter
Definition:
Counter.h:30
Gaudi::TestSuite::Counter::increment
int increment()
Increment counter.
Definition:
Counter.h:43
Gaudi::TestSuite::Counter::classID
static const CLID & classID()
Definition:
Counter.h:38
TestSuite
#define TestSuite
Definition:
MakeAndConsume.cpp:658
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::decrement
int decrement()
Decrement counter.
Definition:
Counter.h:45
Gaudi::TestSuite::Counter::set
void set(int val)
Set value.
Definition:
Counter.h:47
CLID
unsigned int CLID
Class ID definition.
Definition:
ClassID.h:18
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition:
__init__.py:1
DataObject.h
DataObject
Definition:
DataObject.h:36
GAUDI_API
#define GAUDI_API
Definition:
Kernel.h:81
Gaudi::TestSuite::Counter::clID
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition:
Counter.h:37
GaudiTestSuite
include
GaudiTestSuite
Counter.h
Generated on Thu Dec 19 2024 15:35:06 for The Gaudi Framework by
1.8.18