ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Database
CoolLumiUtilities
src
BunchGroupCondData.cxx
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration.
3
*/
10
11
12
#include "
CoolLumiUtilities/BunchGroupCondData.h
"
13
#include <stdexcept>
14
15
19
BunchGroupCondData::BunchGroupCondData
()
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>&
35
BunchGroupCondData::bunchGroup
(
unsigned
int
group)
const
36
{
37
if
(group >=
NBUNCHGROUPS
) {
38
throw
std::out_of_range (
"BunchGroupCondData::bunchGroup"
);
39
}
40
return
m_bunchGroups
[group];
41
}
42
43
49
void
BunchGroupCondData::addBCID
(
unsigned
int
bcid, uint8_t mask)
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
62
void
BunchGroupCondData::shrink
()
63
{
64
for
(
unsigned
int
i = 0; i <
NBUNCHGROUPS
; i++) {
65
m_bunchGroups
[i].shrink_to_fit();
66
}
67
}
BunchGroupCondData.h
Holds data on filled bunches.
BunchGroupCondData::shrink
void shrink()
Shrink all vectors to size.
Definition
BunchGroupCondData.cxx:62
BunchGroupCondData::NBCID
static constexpr unsigned int NBCID
Maximum size of BCID vectors.
Definition
BunchGroupCondData.h:35
BunchGroupCondData::m_bunchGroups
std::vector< unsigned int > m_bunchGroups[NBUNCHGROUPS]
BCIDs of filled bunches, per group.
Definition
BunchGroupCondData.h:69
BunchGroupCondData::BunchGroupCondData
BunchGroupCondData()
Constructor.
Definition
BunchGroupCondData.cxx:19
BunchGroupCondData::addBCID
void addBCID(unsigned int bcid, uint8_t mask)
Add informatin for one BCID.
Definition
BunchGroupCondData.cxx:49
BunchGroupCondData::NBUNCHGROUPS
static constexpr unsigned int NBUNCHGROUPS
Number of bunch groups.
Definition
BunchGroupCondData.h:32
BunchGroupCondData::bunchGroup
const std::vector< unsigned int > & bunchGroup(unsigned int group) const
Return filled BCIDs for one bunch group.
Definition
BunchGroupCondData.cxx:35
Generated on
for ATLAS Offline Software by
1.17.0