ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
GlobalSim::Count Class Reference

#include <Count.h>

Collaboration diagram for GlobalSim::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 23 of file Global/GlobalSimulation/src/IO/Count.h.

Constructor & Destructor Documentation

◆ Count()

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

Definition at line 26 of file Global/GlobalSimulation/src/IO/Count.h.

28  :
30  m_nBits(nBits),
32  {};

◆ ~Count()

GlobalSim::Count::~Count ( )
inline

Definition at line 35 of file Global/GlobalSimulation/src/IO/Count.h.

35 {};

Member Function Documentation

◆ firstBit()

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

Definition at line 49 of file Global/GlobalSimulation/src/IO/Count.h.

49 { return m_firstBit; }

◆ getCountBits()

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

Definition at line 48 of file Global/GlobalSimulation/src/IO/Count.h.

48 { return m_count; }

◆ lastBit()

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

Definition at line 50 of file Global/GlobalSimulation/src/IO/Count.h.

50 { return m_firstBit + m_nBits - 1; }

◆ nBits()

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

Definition at line 51 of file Global/GlobalSimulation/src/IO/Count.h.

51 { return m_nBits; }

◆ reset()

StatusCode GlobalSim::Count::reset ( )
inline

Definition at line 38 of file Global/GlobalSimulation/src/IO/Count.h.

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

◆ setFirstBit()

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

Definition at line 40 of file Global/GlobalSimulation/src/IO/Count.h.

40 { m_firstBit = startBit; }

◆ setNBits()

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

Definition at line 41 of file Global/GlobalSimulation/src/IO/Count.h.

41 { m_nBits = nBits; }

◆ setSizeCount()

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

Definition at line 13 of file Global/GlobalSimulation/src/IO/Count.cxx.

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

◆ sizeCount()

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

Definition at line 52 of file Global/GlobalSimulation/src/IO/Count.h.

52 { return m_sizeCount; }

Member Data Documentation

◆ m_count

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

Definition at line 55 of file Global/GlobalSimulation/src/IO/Count.h.

◆ m_firstBit

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

Definition at line 56 of file Global/GlobalSimulation/src/IO/Count.h.

◆ m_nBits

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

Definition at line 57 of file Global/GlobalSimulation/src/IO/Count.h.

◆ m_sizeCount

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

Definition at line 58 of file Global/GlobalSimulation/src/IO/Count.h.


The documentation for this class was generated from the following files:
GlobalSim::Count::nBits
unsigned int nBits() const
Definition: Global/GlobalSimulation/src/IO/Count.h:51
GlobalSim::Count::m_firstBit
unsigned int m_firstBit
Definition: Global/GlobalSimulation/src/IO/Count.h:56
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
GlobalSim::Count::firstBit
unsigned int firstBit() const
Definition: Global/GlobalSimulation/src/IO/Count.h:49
GlobalSim::Count::sizeCount
unsigned int sizeCount() const
Definition: Global/GlobalSimulation/src/IO/Count.h:52
GlobalSim::Count::m_count
std::bitset< 128 > m_count
Definition: Global/GlobalSimulation/src/IO/Count.h:55
GlobalSim::Count::m_sizeCount
unsigned int m_sizeCount
Definition: Global/GlobalSimulation/src/IO/Count.h:58
GlobalSim::Count::m_nBits
unsigned int m_nBits
Definition: Global/GlobalSimulation/src/IO/Count.h:57