ATLAS Offline Software
Public Member Functions | Static Public Attributes | Private Attributes | List of all members
BunchGroupCondData Class Reference

Holds data on filled bunches. More...

#include <BunchGroupCondData.h>

Collaboration diagram for BunchGroupCondData:

Public Member Functions

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

Static Public Attributes

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

Private Attributes

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

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 }

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

constexpr static unsigned int BunchGroupCondData::NBCID = 3564
staticconstexpr

Maximum size of BCID vectors.

Definition at line 35 of file BunchGroupCondData.h.

◆ NBUNCHGROUPS

constexpr static 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:
BunchGroupCondData::NBCID
constexpr static unsigned int NBCID
Maximum size of BCID vectors.
Definition: BunchGroupCondData.h:35
BunchGroupCondData::NBUNCHGROUPS
constexpr static unsigned int NBUNCHGROUPS
Number of bunch groups.
Definition: BunchGroupCondData.h:32
python.utils.AtlRunQueryLookup.mask
string mask
Definition: AtlRunQueryLookup.py:460
BunchGroupCondData::m_bunchGroups
std::vector< unsigned int > m_bunchGroups[NBUNCHGROUPS]
BCIDs of filled bunches, per group.
Definition: BunchGroupCondData.h:69
lumiFormat.i
int i
Definition: lumiFormat.py:92
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28