ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
TrigConfiguration
TrigConfL1Data
Root
BunchGroupSet.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#include "
TrigConfL1Data/BunchGroupSet.h
"
6
7
#include <iostream>
8
9
using namespace
std
;
10
using namespace
TrigConf
;
11
12
13
BunchGroupSet::BunchGroupSet
() :
L1DataBaseclass
(),
m_MenuPartition
(0),
m_BGpattern
(3564) {}
14
15
BunchGroupSet::BunchGroupSet
(
const
std::vector<BunchGroup>& bgv) :
16
L1DataBaseclass
(),
17
m_MenuPartition
(0),
18
m_BunchGroups
(bgv),
19
m_BGpattern
(3564)
20
{
21
for
(
const
BunchGroup
& bg:
m_BunchGroups
)
22
fillPattern
(bg.internalNumber(), bg);
23
}
24
25
void
26
BunchGroupSet::addBunchGroup
(
const
BunchGroup
& bg) {
27
fillPattern
(bg.internalNumber(), bg);
28
m_BunchGroups
.push_back(bg);
29
}
30
31
32
void
33
BunchGroupSet::setBGName
(uint32_t i,
const
std::string&
name
) {
34
if
(i<
m_BunchGroups
.size())
35
m_BunchGroups
[i].setName(
name
);
36
}
37
38
void
39
BunchGroupSet::fillPattern
(uint32_t bitpos,
const
BunchGroup
& bg) {
40
if
(bitpos>=16)
41
return
;
42
uint16_t bit = 0x1 << bitpos;
43
const
std::vector<int>& b = bg.bunches();
44
for
(
size_t
i=0; i<b.size(); ++i)
45
m_BGpattern
[b[i]] |= bit;
46
}
47
48
49
void
50
BunchGroupSet::print
(
const
std::string&
indent
,
unsigned
int
detail
)
const
{
51
if
(
detail
>=1) {
52
cout <<
indent
<<
"BunchGroupSet "
<<
name
();
53
if
(
id
()>0 ||
version
()>0)
54
cout <<
" (id="
<<
id
() <<
"/v="
<<
version
() <<
")"
;
55
cout << endl;
56
cout <<
indent
<<
"Number of bunch groups: "
<<
m_BunchGroups
.size() << endl;
57
if
(
detail
>=2) {
58
for
(
const
BunchGroup
& bg:
m_BunchGroups
)
59
bg.print(
indent
+
indent
,
detail
);
60
}
61
}
62
}
63
64
void
65
BunchGroupSet::writeXML
(std::ostream &
xmlfile
,
int
indentLevel,
int
indentWidth)
const
{
66
indent
(
xmlfile
,indentLevel, indentWidth)
67
<<
"<BunchGroupSet name=\""
<<
name
() <<
"\" menuPartition=\""
<<
m_MenuPartition
<<
"\">"
<< endl;
68
for
(
const
BunchGroup
& bg:
m_BunchGroups
)
69
bg.writeXML(
xmlfile
, indentLevel+1, indentWidth);
70
indent
(
xmlfile
,indentLevel, indentWidth)
71
<<
"</BunchGroupSet>"
<< endl;
72
}
73
BunchGroupSet.h
TrigConf::BunchGroupSet::BunchGroupSet
BunchGroupSet()
Definition
BunchGroupSet.cxx:13
TrigConf::BunchGroupSet::setBGName
void setBGName(uint32_t, const std::string &)
Definition
BunchGroupSet.cxx:33
TrigConf::BunchGroupSet::m_BunchGroups
std::vector< BunchGroup > m_BunchGroups
Definition
BunchGroupSet.h:44
TrigConf::BunchGroupSet::print
virtual void print(const std::string &indent="", unsigned int detail=1) const override
Definition
BunchGroupSet.cxx:50
TrigConf::BunchGroupSet::m_MenuPartition
uint16_t m_MenuPartition
Definition
BunchGroupSet.h:43
TrigConf::BunchGroupSet::fillPattern
void fillPattern(uint32_t bitpos, const BunchGroup &bg)
Definition
BunchGroupSet.cxx:39
TrigConf::BunchGroupSet::addBunchGroup
void addBunchGroup(const BunchGroup &)
Definition
BunchGroupSet.cxx:26
TrigConf::BunchGroupSet::m_BGpattern
std::vector< uint16_t > m_BGpattern
Definition
BunchGroupSet.h:45
TrigConf::BunchGroupSet::writeXML
void writeXML(std::ostream &xmlfile, int indentLevel=0, int indentWidth=2) const
Definition
BunchGroupSet.cxx:65
TrigConf::BunchGroup
Definition
BunchGroup.h:17
TrigConf::L1DataBaseclass::L1DataBaseclass
L1DataBaseclass()
Definition
L1DataBaseclass.h:24
TrigConf::TrigConfData::id
unsigned int id() const
Definition
TrigConfData.h:21
TrigConf::TrigConfData::indent
std::ostream & indent(std::ostream &o, int lvl, int size) const
Definition
TrigConfData.cxx:23
TrigConf::TrigConfData::name
const std::string & name() const
Definition
TrigConfData.h:22
TrigConf::TrigConfData::version
unsigned int version() const
Definition
TrigConfData.h:24
xmlfile
static std::vector< std::string > xmlfile
Definition
iLumiCalc.h:29
TrigConf
Forward iterator to traverse the main components of the trigger configuration.
Definition
Config.h:22
detail
Definition
extract_histogram_tag.cxx:14
std
STL namespace.
TrigConf::name
Definition
HLTChainList.h:35
Generated on
for ATLAS Offline Software by
1.17.0