ATLAS Offline Software
Loading...
Searching...
No Matches
TCS::Count Class Reference

#include <Count.h>

Collaboration diagram for TCS::Count:

Public Member Functions

 Count (unsigned int firstBit=0, unsigned int nBits=1, unsigned int sizeCount=1)
 ~Count ()
StatusCode reset ()
void setFirstBit (unsigned int startBit)
void setNBits (unsigned int nBits)
void setSizeCount (unsigned int sizeCount)
const std::bitset< 128 > & getCountBits () const
unsigned int firstBit () const
unsigned int lastBit () const
unsigned int nBits () const
unsigned int sizeCount () const

Private Attributes

std::bitset< 128 > m_count {0}
unsigned int m_firstBit {0}
unsigned int m_nBits {1}
unsigned int m_sizeCount {1}

Detailed Description

Definition at line 20 of file Count.h.

Constructor & Destructor Documentation

◆ Count()

TCS::Count::Count ( unsigned int firstBit = 0,
unsigned int nBits = 1,
unsigned int sizeCount = 1 )
inline

Definition at line 23 of file Count.h.

25 :
29 {};
unsigned int m_firstBit
Definition Count.h:53
unsigned int firstBit() const
Definition Count.h:46
unsigned int m_sizeCount
Definition Count.h:55
unsigned int sizeCount() const
Definition Count.h:49
unsigned int m_nBits
Definition Count.h:54
unsigned int nBits() const
Definition Count.h:48

◆ ~Count()

TCS::Count::~Count ( )
inline

Definition at line 32 of file Count.h.

32{};

Member Function Documentation

◆ firstBit()

unsigned int TCS::Count::firstBit ( ) const
inline

Definition at line 46 of file Count.h.

46{ return m_firstBit; }

◆ getCountBits()

const std::bitset< 128 > & TCS::Count::getCountBits ( ) const
inline

Definition at line 45 of file Count.h.

45{ return m_count; }
std::bitset< 128 > m_count
Definition Count.h:52

◆ lastBit()

unsigned int TCS::Count::lastBit ( ) const
inline

Definition at line 47 of file Count.h.

47{ return m_firstBit + m_nBits - 1; }

◆ nBits()

unsigned int TCS::Count::nBits ( ) const
inline

Definition at line 48 of file Count.h.

48{ return m_nBits; }

◆ reset()

StatusCode TCS::Count::reset ( )
inline

◆ setFirstBit()

void TCS::Count::setFirstBit ( unsigned int startBit)
inline

Definition at line 37 of file Count.h.

37{ m_firstBit = startBit; }

◆ setNBits()

void TCS::Count::setNBits ( unsigned int nBits)
inline

Definition at line 38 of file Count.h.

38{ m_nBits = nBits; }

◆ setSizeCount()

void TCS::Count::setSizeCount ( unsigned int sizeCount)

Definition at line 12 of file Count.cxx.

12 {
13
15
16 // Compute the final bits that make up the output of the multiplicity algorithm
17
18 unsigned int maximum = (1 << m_nBits) - 1; // saturation limit given by the number of bits allowed for the trigger line
19
20 std::bitset<128> mask = (sizeCount < maximum)?sizeCount:maximum;
21
22 m_count = (mask << m_firstBit);
23
24}

◆ sizeCount()

unsigned int TCS::Count::sizeCount ( ) const
inline

Definition at line 49 of file Count.h.

49{ return m_sizeCount; }

Member Data Documentation

◆ m_count

std::bitset<128> TCS::Count::m_count {0}
private

Definition at line 52 of file Count.h.

52{0};

◆ m_firstBit

unsigned int TCS::Count::m_firstBit {0}
private

Definition at line 53 of file Count.h.

53{0};

◆ m_nBits

unsigned int TCS::Count::m_nBits {1}
private

Definition at line 54 of file Count.h.

54{1};

◆ m_sizeCount

unsigned int TCS::Count::m_sizeCount {1}
private

Definition at line 55 of file Count.h.

55{1};

The documentation for this class was generated from the following files: