ATLAS Offline Software
BunchGroupCondData.cxx
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
3  */
13 #include <stdexcept>
14 
15 
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 }
26 
27 
34 const std::vector<unsigned int>&
36 {
37  if (group >= NBUNCHGROUPS) {
38  throw std::out_of_range ("BunchGroupCondData::bunchGroup");
39  }
40  return m_bunchGroups[group];
41 }
42 
43 
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 }
57 
58 
63 {
64  for (unsigned int i = 0; i < NBUNCHGROUPS; i++) {
65  m_bunchGroups[i].shrink_to_fit();
66  }
67 }
BunchGroupCondData::addBCID
void addBCID(unsigned int bcid, uint8_t mask)
Add informatin for one BCID.
Definition: BunchGroupCondData.cxx:49
xAOD::uint8_t
uint8_t
Definition: Muon_v1.cxx:575
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::BunchGroupCondData
BunchGroupCondData()
Constructor.
Definition: BunchGroupCondData.cxx:19
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
BunchGroupCondData.h
Holds data on filled bunches.
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
BunchGroupCondData::bunchGroup
const std::vector< unsigned int > & bunchGroup(unsigned int group) const
Return filled BCIDs for one bunch group.
Definition: BunchGroupCondData.cxx:35
CaloLCW_tf.group
group
Definition: CaloLCW_tf.py:28
BunchGroupCondData::shrink
void shrink()
Shrink all vectors to size.
Definition: BunchGroupCondData.cxx:62