ATLAS Offline Software
Loading...
Searching...
No Matches
BunchGroupCondData Class Reference

Holds data on filled bunches. More...

#include <BunchGroupCondData.h>

Collaboration diagram for BunchGroupCondData:

Public Member Functions

 BunchGroupCondData ()
 Constructor.
const std::vector< unsigned int > & bunchGroup (unsigned int group) const
 Return filled BCIDs for one bunch group.
void addBCID (unsigned int bcid, uint8_t mask)
 Add informatin for one BCID.
void shrink ()
 Shrink all vectors to size.

Static Public Attributes

static constexpr unsigned int NBUNCHGROUPS = 8
 Number of bunch groups.
static constexpr unsigned int NBCID = 3564
 Maximum size of BCID vectors.

Private Attributes

std::vector< unsigned int > m_bunchGroups [NBUNCHGROUPS]
 BCIDs of filled bunches, per group.

Detailed Description

Holds data on filled bunches.

For each bunch group, hold a vector of filled BCIDs.

Definition at line 28 of file BunchGroupCondData.h.

Constructor & Destructor Documentation

◆ BunchGroupCondData()

BunchGroupCondData::BunchGroupCondData ( )

Constructor.

Definition at line 19 of file BunchGroupCondData.cxx.

20{
21 // Reserve all vectors to their full size.
22 for (unsigned int i = 0; i < NBUNCHGROUPS; i++) {
23 m_bunchGroups[i].reserve (NBCID);
24 }
25}
static constexpr unsigned int NBCID
Maximum size of BCID vectors.
std::vector< unsigned int > m_bunchGroups[NBUNCHGROUPS]
BCIDs of filled bunches, per group.
static constexpr unsigned int NBUNCHGROUPS
Number of bunch groups.

Member Function Documentation

◆ addBCID()

void BunchGroupCondData::addBCID ( unsigned int bcid,
uint8_t mask )

Add informatin for one BCID.

Parameters
bcidBCID to add.
maskMask of groups in which this BCID is filled.

Definition at line 49 of file BunchGroupCondData.cxx.

50{
51 for (size_t i = 0; i < NBUNCHGROUPS; i++) {
52 if ((mask & (1<<i)) != 0) {
53 m_bunchGroups[i].push_back (bcid);
54 }
55 }
56}

◆ bunchGroup()

const std::vector< unsigned int > & BunchGroupCondData::bunchGroup ( unsigned int group) const

Return filled BCIDs for one bunch group.

Parameters
groupBunch group to retrieve.

Returns a vector of filled BCIDs for a group.

Definition at line 35 of file BunchGroupCondData.cxx.

36{
37 if (group >= NBUNCHGROUPS) {
38 throw std::out_of_range ("BunchGroupCondData::bunchGroup");
39 }
40 return m_bunchGroups[group];
41}

◆ shrink()

void BunchGroupCondData::shrink ( )

Shrink all vectors to size.

Definition at line 62 of file BunchGroupCondData.cxx.

63{
64 for (unsigned int i = 0; i < NBUNCHGROUPS; i++) {
65 m_bunchGroups[i].shrink_to_fit();
66 }
67}

Member Data Documentation

◆ m_bunchGroups

std::vector<unsigned int> BunchGroupCondData::m_bunchGroups[NBUNCHGROUPS]
private

BCIDs of filled bunches, per group.

Definition at line 69 of file BunchGroupCondData.h.

◆ NBCID

unsigned int BunchGroupCondData::NBCID = 3564
staticconstexpr

Maximum size of BCID vectors.

Definition at line 35 of file BunchGroupCondData.h.

◆ NBUNCHGROUPS

unsigned int BunchGroupCondData::NBUNCHGROUPS = 8
staticconstexpr

Number of bunch groups.

Definition at line 32 of file BunchGroupCondData.h.


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