ATLAS Offline Software
Trigger
TrigT1
L1Topo
L1TopoInterfaces
L1TopoInterfaces
Count.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
// Count.h
5
// TopoCore
6
// Created by Carlos Moreno on 15/01/21.
7
8
#ifndef L1TOPOINTERFACES_COUNT_H
9
#define L1TOPOINTERFACES_COUNT_H
10
11
#include "
L1TopoCommon/StatusCode.h
"
12
13
#include <iostream>
14
#include <vector>
15
#include <stdint.h>
16
#include <bitset>
17
18
namespace
TCS
{
19
20
class
Count
{
21
public
:
22
23
Count
(
unsigned
int
firstBit
= 0,
24
unsigned
int
nBits
= 1,
25
unsigned
int
sizeCount
= 1 ) :
26
m_firstBit
(
firstBit
),
27
m_nBits
(
nBits
),
28
m_sizeCount
(
sizeCount
)
29
{};
30
31
// Destructor
32
~Count
(){};
33
34
// setters
35
StatusCode
reset
() {
m_count
= 0;
return
StatusCode::SUCCESS
; }
36
37
void
setFirstBit
(
unsigned
int
startBit) {
m_firstBit
= startBit; }
38
void
setNBits
(
unsigned
int
nBits
) {
m_nBits
=
nBits
; }
39
void
setSizeCount
(
unsigned
int
sizeCount
);
// { m_sizeCount = sizeCount; }
40
41
// getters
42
// TO-DO add function to get count bits for a determined position
43
// TO-DO make ready for executing multiple algorithms in one instance
44
45
const
std::bitset<128>&
getCountBits
()
const
{
return
m_count
; }
46
unsigned
int
firstBit
()
const
{
return
m_firstBit
; }
47
unsigned
int
lastBit
()
const
{
return
m_firstBit
+
m_nBits
- 1; }
48
unsigned
int
nBits
()
const
{
return
m_nBits
; }
49
unsigned
int
sizeCount
()
const
{
return
m_sizeCount
; }
50
51
private
:
52
std::bitset<128>
m_count
{0};
53
unsigned
int
m_firstBit
{0};
54
unsigned
int
m_nBits
{1};
55
unsigned
int
m_sizeCount
{1};
56
57
};
58
59
}
60
61
//std::ostream & operator<<(std::ostream&, const TCS:Count &);
62
63
#endif
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::Count::setFirstBit
void setFirstBit(unsigned int startBit)
Definition:
Count.h:37
TCS::Count::~Count
~Count()
Definition:
Count.h:32
TCS::Count::reset
StatusCode reset()
Definition:
Count.h:35
TCS::Count::m_nBits
unsigned int m_nBits
Definition:
Count.h:54
TCS::Count::sizeCount
unsigned int sizeCount() const
Definition:
Count.h:49
TCS::Count::m_count
std::bitset< 128 > m_count
Definition:
Count.h:52
TCS::Count::firstBit
unsigned int firstBit() const
Definition:
Count.h:46
StatusCode.h
TCS::Count::m_sizeCount
unsigned int m_sizeCount
Definition:
Count.h:55
TCS::Count::m_firstBit
unsigned int m_firstBit
Definition:
Count.h:53
TCS::Count::lastBit
unsigned int lastBit() const
Definition:
Count.h:47
TCS::Count::setNBits
void setNBits(unsigned int nBits)
Definition:
Count.h:38
TCS::Count
Definition:
Count.h:20
TCS::Count::Count
Count(unsigned int firstBit=0, unsigned int nBits=1, unsigned int sizeCount=1)
Definition:
Count.h:23
TCS::Count::getCountBits
const std::bitset< 128 > & getCountBits() const
Definition:
Count.h:45
TCS
Definition:
Global/GlobalSimulation/src/IO/eEmTOBArray.h:12
TCS::Count::setSizeCount
void setSizeCount(unsigned int sizeCount)
Definition:
Count.cxx:12
TCS::Count::nBits
unsigned int nBits() const
Definition:
Count.h:48
TCS::StatusCode
Definition:
Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:15
Generated on Fri Nov 21 2025 21:08:20 for ATLAS Offline Software by
1.8.18