ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
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 L1Topo/L1TopoInterfaces/L1TopoInterfaces/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 L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

25  :
27  m_nBits(nBits),
29  {};

◆ ~Count()

TCS::Count::~Count ( )
inline

Definition at line 32 of file L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

32 {};

Member Function Documentation

◆ firstBit()

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

Definition at line 46 of file L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

46 { return m_firstBit; }

◆ getCountBits()

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

Definition at line 45 of file L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

45 { return m_count; }

◆ lastBit()

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

Definition at line 47 of file L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

47 { return m_firstBit + m_nBits - 1; }

◆ nBits()

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

Definition at line 48 of file L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

48 { return m_nBits; }

◆ reset()

StatusCode TCS::Count::reset ( )
inline

Definition at line 35 of file L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

35 { m_count = 0; return StatusCode::SUCCESS; }

◆ setFirstBit()

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

Definition at line 37 of file L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

37 { m_firstBit = startBit; }

◆ setNBits()

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

Definition at line 38 of file L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

38 { m_nBits = nBits; }

◆ setSizeCount()

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

Definition at line 12 of file L1Topo/L1TopoInterfaces/Root/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 L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h.

49 { return m_sizeCount; }

Member Data Documentation

◆ m_count

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

◆ m_firstBit

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

◆ m_nBits

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

◆ m_sizeCount

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

The documentation for this class was generated from the following files:
TCS::StatusCode::SUCCESS
@ SUCCESS
Definition: Trigger/TrigT1/L1Topo/L1TopoCommon/L1TopoCommon/StatusCode.h:17
TCS::Count::m_nBits
unsigned int m_nBits
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h:54
TCS::Count::sizeCount
unsigned int sizeCount() const
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h:49
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
TCS::Count::m_count
std::bitset< 128 > m_count
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h:52
TCS::Count::firstBit
unsigned int firstBit() const
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h:46
TCS::Count::m_sizeCount
unsigned int m_sizeCount
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h:55
TCS::Count::m_firstBit
unsigned int m_firstBit
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h:53
TCS::Count::nBits
unsigned int nBits() const
Definition: L1Topo/L1TopoInterfaces/L1TopoInterfaces/Count.h:48