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
14#include <iostream>
15
16namespace 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:
52 };
53 } // namespace TestSuite
54} // namespace Gaudi
unsigned int CLID
Class ID definition.
Definition ClassID.h:16
#define GAUDI_API
Definition Kernel.h:49
DataObject()
Standard Constructor.
void set(int val)
Set value.
Definition Counter.h:47
int decrement()
Decrement counter.
Definition Counter.h:45
const CLID & clID() const override
Retrieve reference to class definition structure.
Definition Counter.h:37
int m_counter
Counter number.
Definition Counter.h:51
int value() const
Retrieve counter value.
Definition Counter.h:41
int increment()
Increment counter.
Definition Counter.h:43
static const CLID & classID()
Definition Counter.h:38
Counter()
Constructors.
Definition Counter.cpp:15
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition __init__.py:1